Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 38 additions & 9 deletions lib/node_modules/@stdlib/ndarray/base/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ import nullaryBlockSize = require( '@stdlib/ndarray/base/nullary-tiling-block-si
import numel = require( '@stdlib/ndarray/base/numel' );
import numelDimension = require( '@stdlib/ndarray/base/numel-dimension' );
import offset = require( '@stdlib/ndarray/base/offset' );
import ones = require( '@stdlib/ndarray/base/ones' );
import order = require( '@stdlib/ndarray/base/order' );
import outputDataType = require( '@stdlib/ndarray/base/output-dtype' );
import outputPolicyEnum2Str = require( '@stdlib/ndarray/base/output-policy-enum2str' );
Expand Down Expand Up @@ -3159,6 +3160,29 @@ interface Namespace {
*/
offset: typeof offset;

/**
* Creates a ones-filled array having a specified shape and data type.
*
* @param dtype - underlying data type
* @param shape - array shape
* @param order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)
* @returns ones-filled array
*
* @example
* var getShape = require( '@stdlib/ndarray/shape' );
* var getDType = require( '@stdlib/ndarray/dtype' );
*
* var arr = ns.ones( 'float64', [ 2, 2 ], 'row-major' );
* // returns <ndarray>[ [ 1.0, 1.0 ], [ 1.0, 1.0 ] ]
*
* var sh = getShape( arr );
* // returns [ 2, 2 ]
*
* var dt = String( getDType( arr ) );
* // returns 'float64'
*/
ones: typeof ones;

/**
* Returns the layout order of a provided ndarray.
*
Expand Down Expand Up @@ -5386,13 +5410,16 @@ interface Namespace {
* @returns zero-filled array
*
* @example
* var getShape = require( '@stdlib/ndarray/shape' );
* var getDType = require( '@stdlib/ndarray/dtype' );
*
* var arr = ns.zeros( 'float64', [ 2, 2 ], 'row-major' );
* // returns <ndarray>
* // returns <ndarray>[ [ 0.0, 0.0 ], [ 0.0, 0.0 ] ]
*
* var sh = arr.shape;
* var sh = getShape( arr );
* // returns [ 2, 2 ]
*
* var dt = arr.dtype;
* var dt = String( getDType( arr ) );
* // returns 'float64'
*/
zeros: typeof zeros;
Expand All @@ -5404,24 +5431,26 @@ interface Namespace {
* @returns zero-filled array
*
* @example
* var getShape = require( '@stdlib/ndarray/shape' );
* var getDType = require( '@stdlib/ndarray/dtype' );
* var zeros = require( '@stdlib/ndarray/base/zeros' );
*
* var x = zeros( 'generic', [ 2, 2 ], 'row-major' );
* // returns <ndarray>
* // returns <ndarray>[ [ 0, 0 ], [ 0, 0 ] ]
*
* var sh = x.shape;
* var sh = getShape( x );
* // returns [ 2, 2 ]
*
* var dt = x.dtype;
* var dt = String( getDType( x ) );
* // returns 'generic'
*
* var y = ns.zerosLike( x );
* // returns <ndarray>
* // returns <ndarray>[ [ 0, 0 ], [ 0, 0 ] ]
*
* sh = y.shape;
* sh = getShape( y );
* // returns [ 2, 2 ]
*
* dt = y.dtype;
* dt = String( getDType( y ) );
* // returns 'generic'
*/
zerosLike: typeof zerosLike;
Expand Down