From dbfafe9e0ead0048dfdd541d27649f9525e5a97c Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 17 Dec 2024 10:39:35 +0000 Subject: [PATCH] Auto-generated commit --- CHANGELOG.md | 2 ++ docs/types/index.d.ts | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b7b738a..150e44ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ ##### Features +- [`323e4e5`](https://github.com/stdlib-js/stdlib/commit/323e4e5e0f1af8130e8a6462abf619999c955f88) - update namespace TypeScript declarations [(#3977)](https://github.com/stdlib-js/stdlib/pull/3977) - [`9d912a3`](https://github.com/stdlib-js/stdlib/commit/9d912a3e992cb9c5fe272a3aecc55293efbc0647) - add `ndarray2json` to namespace - [`1a202e3`](https://github.com/stdlib-js/stdlib/commit/1a202e3605b10cd01bf9654f8356c72c5c8a8186) - update namespace TypeScript declarations [(#3916)](https://github.com/stdlib-js/stdlib/pull/3916) - [`dbfd8f5`](https://github.com/stdlib-js/stdlib/commit/dbfd8f5c81d11be2142ebfc4f2f0bb0316ba7478) - add `filterMap` to namespace @@ -432,6 +433,7 @@ A total of 3 people contributed to this release. Thank you to the following cont
+- [`323e4e5`](https://github.com/stdlib-js/stdlib/commit/323e4e5e0f1af8130e8a6462abf619999c955f88) - **feat:** update namespace TypeScript declarations [(#3977)](https://github.com/stdlib-js/stdlib/pull/3977) _(by stdlib-bot, Philipp Burckhardt)_ - [`c5a9ae2`](https://github.com/stdlib-js/stdlib/commit/c5a9ae2f9d4076665eba406ab1d420ba9df1fbdc) - **docs:** update namespace table of contents [(#3979)](https://github.com/stdlib-js/stdlib/pull/3979) _(by stdlib-bot, Philipp Burckhardt)_ - [`9d912a3`](https://github.com/stdlib-js/stdlib/commit/9d912a3e992cb9c5fe272a3aecc55293efbc0647) - **feat:** add `ndarray2json` to namespace _(by Athan Reines)_ - [`ae80da2`](https://github.com/stdlib-js/stdlib/commit/ae80da29fdbfd1be7541df6607715b77b06f1019) - **feat:** add `ndarray/to-json` _(by Athan Reines)_ diff --git a/docs/types/index.d.ts b/docs/types/index.d.ts index cff313c8..7e9b4f0d 100644 --- a/docs/types/index.d.ts +++ b/docs/types/index.d.ts @@ -73,6 +73,7 @@ import stride = require( './../../stride' ); import strides = require( './../../strides' ); import sub2ind = require( './../../sub2ind' ); import ndarray2array = require( './../../to-array' ); +import ndarray2json = require( './../../to-json' ); import zeros = require( './../../zeros' ); import zerosLike = require( './../../zeros-like' ); @@ -1599,6 +1600,27 @@ interface Namespace { */ ndarray2array: typeof ndarray2array; + /** + * Serializes an ndarray as a JSON object. + * + * ## Notes + * + * - The function does **not** serialize data outside of the buffer region defined by the ndarray view. + * + * @param x - input ndarray + * @returns JSON object + * + * @example + * var array = require( './../../array' ); + * + * var x = array( [ [ 1.0, 2.0 ], [ 3.0, 4.0 ] ] ); + * // returns + * + * var o = ns.ndarray2json( x ); + * // returns {...} + */ + ndarray2json: typeof ndarray2json; + /** * Creates a zero-filled array having a specified shape and data type. *