Skip to content

Commit 28d3e7d

Browse files
authored
feat: update ndarray/base TypeScript declarations
PR-URL: #11166 Reviewed-by: Athan Reines <kgryte@gmail.com>
1 parent bf03c10 commit 28d3e7d

File tree

1 file changed

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

1 file changed

+40
-0
lines changed

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

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ import minSignedIntegerDataType = require( '@stdlib/ndarray/base/min-signed-inte
104104
import minUnsignedIntegerDataType = require( '@stdlib/ndarray/base/min-unsigned-integer-dtype' );
105105
import minViewBufferIndex = require( '@stdlib/ndarray/base/min-view-buffer-index' );
106106
import minmaxViewBufferIndex = require( '@stdlib/ndarray/base/minmax-view-buffer-index' );
107+
import nans = require( '@stdlib/ndarray/base/nans' );
107108
import ndarraylike2ndarray = require( '@stdlib/ndarray/base/ndarraylike2ndarray' );
108109
import ndarraylike2object = require( '@stdlib/ndarray/base/ndarraylike2object' );
109110
import ndarraylike2scalar = require( '@stdlib/ndarray/base/ndarraylike2scalar' );
@@ -117,6 +118,7 @@ import nullaryLoopOrder = require( '@stdlib/ndarray/base/nullary-loop-interchang
117118
import nullaryStrided1dDispatch = require( '@stdlib/ndarray/base/nullary-strided1d-dispatch' );
118119
import nullaryStrided1dDispatchFactory = require( '@stdlib/ndarray/base/nullary-strided1d-dispatch-factory' );
119120
import nullaryBlockSize = require( '@stdlib/ndarray/base/nullary-tiling-block-size' );
121+
import nulls = require( '@stdlib/ndarray/base/nulls' );
120122
import numel = require( '@stdlib/ndarray/base/numel' );
121123
import numelDimension = require( '@stdlib/ndarray/base/numel-dimension' );
122124
import offset = require( '@stdlib/ndarray/base/offset' );
@@ -2761,6 +2763,25 @@ interface Namespace {
27612763
*/
27622764
minmaxViewBufferIndex: typeof minmaxViewBufferIndex;
27632765

2766+
/**
2767+
* Creates a NaN-filled array having a specified shape and data type.
2768+
*
2769+
* @param dtype - underlying data type
2770+
* @param shape - array shape
2771+
* @param order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)
2772+
* @returns NaN-filled array
2773+
*
2774+
* @example
2775+
* var getDType = require( '@stdlib/ndarray/dtype' );
2776+
*
2777+
* var arr = ns.nans( 'float64', [ 2, 2 ], 'row-major' );
2778+
* // returns <ndarray>[ [ NaN, NaN ], [ NaN, NaN ] ]
2779+
*
2780+
* var dt = String( getDType( arr ) );
2781+
* // returns 'float64'
2782+
*/
2783+
nans: typeof nans;
2784+
27642785
/**
27652786
* Converts an ndarray-like object to an ndarray.
27662787
*
@@ -3120,6 +3141,25 @@ interface Namespace {
31203141
*/
31213142
nullaryBlockSize: typeof nullaryBlockSize;
31223143

3144+
/**
3145+
* Creates a null-filled array having a specified shape and data type.
3146+
*
3147+
* @param dtype - underlying data type
3148+
* @param shape - array shape
3149+
* @param order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)
3150+
* @returns null-filled array
3151+
*
3152+
* @example
3153+
* var getDType = require( '@stdlib/ndarray/dtype' );
3154+
*
3155+
* var arr = ns.nulls( 'generic', [ 2, 2 ], 'row-major' );
3156+
* // returns <ndarray>[ [ null, null ], [ null, null ] ]
3157+
*
3158+
* var dt = String( getDType( arr ) );
3159+
* // returns 'generic'
3160+
*/
3161+
nulls: typeof nulls;
3162+
31233163
/**
31243164
* Returns the number of elements in an array.
31253165
*

0 commit comments

Comments
 (0)