diff --git a/lib/node_modules/@stdlib/ndarray/docs/types/index.d.ts b/lib/node_modules/@stdlib/ndarray/docs/types/index.d.ts index 3473911162c8..1ad11c2d8019 100644 --- a/lib/node_modules/@stdlib/ndarray/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/ndarray/docs/types/index.d.ts @@ -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' ); @@ -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 * - * 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; @@ -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 + * // returns [ [ 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 * - * sh = y.shape; + * sh = getShape( y ); * // returns [ 2, 2 ] * - * dt = y.dtype; + * dt = String( getDType( y ) ); * // returns 'float64' */ emptyLike: typeof emptyLike; @@ -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 [ [ 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. *