Skip to content

Commit da4d88c

Browse files
authored
feat: update ndarray TypeScript declarations
PR-URL: #11084 Reviewed-by: Athan Reines <kgryte@gmail.com>
1 parent 57fc70a commit da4d88c

File tree

1 file changed

+24
-0
lines changed
  • lib/node_modules/@stdlib/ndarray/docs/types

1 file changed

+24
-0
lines changed

lib/node_modules/@stdlib/ndarray/docs/types/index.d.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ import ndarray2array = require( '@stdlib/ndarray/to-array' );
113113
import toFlippedlr = require( '@stdlib/ndarray/to-flippedlr' );
114114
import toFlippedud = require( '@stdlib/ndarray/to-flippedud' );
115115
import ndarray2json = require( '@stdlib/ndarray/to-json' );
116+
import ndarray2localeString = require( '@stdlib/ndarray/to-locale-string' );
116117
import toReversed = require( '@stdlib/ndarray/to-reversed' );
117118
import toReversedDimension = require( '@stdlib/ndarray/to-reversed-dimension' );
118119
import unshift = require( '@stdlib/ndarray/unshift' );
@@ -3263,6 +3264,29 @@ interface Namespace {
32633264
*/
32643265
ndarray2json: typeof ndarray2json;
32653266

3267+
/**
3268+
* Serializes an ndarray as a locale-aware string.
3269+
*
3270+
* ## Notes
3271+
*
3272+
* - The function does **not** serialize data outside of the buffer region defined by the ndarray view.
3273+
*
3274+
* @param x - input ndarray
3275+
* @param locales - locale identifier(s)
3276+
* @param options - configuration options
3277+
* @returns string representation
3278+
*
3279+
* @example
3280+
* var array = require( `@stdlib/ndarray/array` );
3281+
*
3282+
* var x = array( [ [ 1.0, 2.0 ], [ 3.0, 4.0 ] ] );
3283+
* // returns <ndarray>
3284+
*
3285+
* var str = ns.ndarray2localeString( x );
3286+
* // returns <string>
3287+
*/
3288+
ndarray2localeString: typeof ndarray2localeString;
3289+
32663290
/**
32673291
* Returns a new ndarray where the order of elements of an input ndarray is reversed along each dimension.
32683292
*

0 commit comments

Comments
 (0)