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
49 changes: 41 additions & 8 deletions lib/node_modules/@stdlib/ndarray/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ import nextDataType = require( '@stdlib/ndarray/next-dtype' );
import numel = require( '@stdlib/ndarray/numel' );
import numelDimension = require( '@stdlib/ndarray/numel-dimension' );
import offset = require( '@stdlib/ndarray/offset' );
import ones = require( '@stdlib/ndarray/ones' );
import order = require( '@stdlib/ndarray/order' );
import orders = require( '@stdlib/ndarray/orders' );
import outputDataTypePolicies = require( '@stdlib/ndarray/output-dtype-policies' );
Expand Down Expand Up @@ -1007,16 +1008,19 @@ interface Namespace {
* @param options.order - specifies whether an array is row-major (C-style) or column-major (Fortran-style) (default: 'row-major')
* @param options.mode - specifies how to handle a linear index which exceeds array dimensions
* @param options.submode - specifies how to handle subscripts which exceed array dimensions on a per dimension basis
* @returns zero-filled array
* @returns output array
*
* @example
* var getShape = require( '@stdlib/ndarray/shape' );
* var getDType = require( '@stdlib/ndarray/dtype' );
*
* var arr = ns.empty( [ 2, 2 ] );
* // returns <ndarray>
*
* var sh = arr.shape;
* var sh = getShape( arr );
* // returns [ 2, 2 ]
*
* var dt = arr.dtype;
* var dt = String( getDType( arr ) );
* // returns 'float64'
*/
empty: typeof empty;
Expand All @@ -1034,26 +1038,28 @@ interface Namespace {
* @returns output array
*
* @example
* var getShape = require( '@stdlib/ndarray/shape' );
* var getDType = require( '@stdlib/ndarray/dtype' );
* var zeros = require( '@stdlib/ndarray/zeros' );
*
* var x = zeros( [ 2, 2 ], {
* 'dtype': 'float64'
* });
* // returns <ndarray>
* // returns <ndarray>[ [ 0.0, 0.0 ], [ 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 'float64'
*
* var y = ns.emptyLike( x );
* // returns <ndarray>
*
* sh = y.shape;
* sh = getShape( y );
* // returns [ 2, 2 ]
*
* dt = y.dtype;
* dt = String( getDType( y ) );
* // returns 'float64'
*/
emptyLike: typeof emptyLike;
Expand Down Expand Up @@ -2304,6 +2310,33 @@ interface Namespace {
*/
offset: typeof offset;

/**
* Creates a ones-filled array having a specified shape and data type.
*
* @param shape - array shape
* @param options - options
* @param options.dtype - underlying data type (default: 'float64')
* @param options.order - specifies whether an array is row-major (C-style) or column-major (Fortran-style) (default: 'row-major')
* @param options.mode - specifies how to handle a linear index which exceeds array dimensions
* @param options.submode - specifies how to handle subscripts which exceed array dimensions on a per dimension basis
* @param options.readonly - boolean indicating whether an array should be read-only
* @returns ones-filled array
*
* @example
* var getShape = require( '@stdlib/ndarray/shape' );
* var getDType = require( '@stdlib/ndarray/dtype' );
*
* var arr = ns.ones( [ 2, 2 ] );
* // 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