Skip to content

Commit 60e78d4

Browse files
authored
docs: update ndarray TypeScript declarations
PR-URL: #11132 Reviewed-by: Athan Reines <kgryte@gmail.com>
1 parent 727c508 commit 60e78d4

1 file changed

Lines changed: 14 additions & 9 deletions

File tree

  • lib/node_modules/@stdlib/ndarray/docs/types

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

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3410,13 +3410,16 @@ interface Namespace {
34103410
* @returns zero-filled array
34113411
*
34123412
* @example
3413+
* var getShape = require( '@stdlib/ndarray/shape' );
3414+
* var getDType = require( '@stdlib/ndarray/dtype' );
3415+
*
34133416
* var arr = ns.zeros( [ 2, 2 ] );
3414-
* // returns <ndarray>
3417+
* // returns <ndarray>[ [ 0.0, 0.0 ], [ 0.0, 0.0 ] ]
34153418
*
3416-
* var sh = arr.shape;
3419+
* var sh = getShape( arr );
34173420
* // returns [ 2, 2 ]
34183421
*
3419-
* var dt = arr.dtype;
3422+
* var dt = String( getDType( arr ) );
34203423
* // returns 'float64'
34213424
*/
34223425
zeros: typeof zeros;
@@ -3435,26 +3438,28 @@ interface Namespace {
34353438
* @returns zero-filled array
34363439
*
34373440
* @example
3441+
* var getShape = require( '@stdlib/ndarray/shape' );
3442+
* var getDType = require( '@stdlib/ndarray/dtype' );
34383443
* var zeros = require( '@stdlib/ndarray/zeros' );
34393444
*
34403445
* var x = zeros( [ 2, 2 ], {
34413446
* 'dtype': 'float64'
34423447
* });
3443-
* // returns <ndarray>
3448+
* // returns <ndarray>[ [ 0.0, 0.0 ], [ 0.0, 0.0 ] ]
34443449
*
3445-
* var sh = x.shape;
3450+
* var sh = getShape( x );
34463451
* // returns [ 2, 2 ]
34473452
*
3448-
* var dt = x.dtype;
3453+
* var dt = String( getDType( x ) );
34493454
* // returns 'float64'
34503455
*
34513456
* var y = ns.zerosLike( x );
3452-
* // returns <ndarray>
3457+
* // returns <ndarray>[ [ 0.0, 0.0 ], [ 0.0, 0.0 ] ]
34533458
*
3454-
* sh = y.shape;
3459+
* sh = getShape( y );
34553460
* // returns [ 2, 2 ]
34563461
*
3457-
* dt = y.dtype;
3462+
* dt = String( getDType( y ) );
34583463
* // returns 'float64'
34593464
*/
34603465
zerosLike: typeof zerosLike;

0 commit comments

Comments
 (0)