Base (i.e., lower-level) array utilities.
var ns = require( '@stdlib/array/base' );
Array utilities.
var o = ns;
// returns {...}
The namespace exports the following:
accessorGetter( dtype )
: return an accessor function for retrieving an element from an array-like object supporting the get/set protocol.accessorSetter( dtype )
: return an accessor function for setting an element in an array-like object supporting the get/set protocol.AccessorArray( arr )
: create a minimal array-like object supporting the accessor protocol from another array-like object.accessors( x )
: return element accessors for a provided array-like object.arraylike2object( x )
: convert an array-like object to an object likely to have the same "shape".assert
: base array assertion utilities.broadcastArray( x, inShape, outShape )
: broadcast an array to a specified shape.cartesianPower( x, n )
: return the Cartesian power.cartesianProduct( x1, x2 )
: return the Cartesian product.cartesianSquare( x )
: return the Cartesian square.copyIndexed( x )
: copy the elements of an indexed array-like object to a new "generic" array.copy( x )
: copy the elements of an array-like object to a new "generic" array.filledBy( len, clbk[, thisArg] )
: create a filled "generic" array according to a provided callback function.filled( value, len )
: create a filled "generic" array.filled2dBy( len, clbk[, thisArg] )
: create a filled two-dimensional nested array according to a provided callback function.filled2d( value, shape )
: create a filled two-dimensional nested array.filled3dBy( len, clbk[, thisArg] )
: create a filled three-dimensional nested array according to a provided callback function.filled3d( value, shape )
: create a filled three-dimensional nested array.filled4dBy( len, clbk[, thisArg] )
: create a filled four-dimensional nested array according to a provided callback function.filled4d( value, shape )
: create a filled four-dimensional nested array.filled5dBy( len, clbk[, thisArg] )
: create a filled five-dimensional nested array according to a provided callback function.filled5d( value, shape )
: create a filled five-dimensional nested array.fillednd( value, shape )
: create a filled n-dimensional nested array.flattenBy( x, shape, colexicographic, clbk[, thisArg] )
: flatten an n-dimensional nested array according to a callback function.flatten( x, shape, colexicographic )
: flatten an n-dimensional nested array.flatten2dBy( x, shape, colexicographic, clbk[, thisArg] )
: flatten a two-dimensional nested array according to a callback function.flatten2d( x, shape, colexicographic )
: flatten a two-dimensional nested array.flatten3dBy( x, shape, colexicographic, clbk[, thisArg] )
: flatten a three-dimensional nested array according to a callback function.flatten3d( x, shape, colexicographic )
: flatten a three-dimensional nested array.flatten4dBy( x, shape, colexicographic, clbk[, thisArg] )
: flatten a four-dimensional nested array according to a callback function.flatten4d( x, shape, colexicographic )
: flatten a four-dimensional nested array.flatten5dBy( x, shape, colexicographic, clbk[, thisArg] )
: flatten a five-dimensional nested array according to a callback function.flatten5d( x, shape, colexicographic )
: flatten a five-dimensional nested array.getter( dtype )
: return an accessor function for retrieving an element from an indexed array-like object.incrspace( start, stop, increment )
: generate a linearly spaced numeric array according to a provided increment.last( x )
: return the last element of an array-like object.linspace( start, stop, length )
: generate a linearly spaced numeric array.logspace( a, b, length )
: generate a logarithmically spaced numeric array.nCartesianProduct( x1, x2[, ...xN] )
: return the n-fold Cartesian product.oneTo( n )
: generate a linearly spaced numeric array whose elements increment by 1 starting from one.ones( len )
: create a "generic" array filled with ones.ones2d( shape )
: create a two-dimensional nested array filled with ones.ones3d( shape )
: create a three-dimensional nested array filled with ones.ones4d( shape )
: create a four-dimensional nested array filled with ones.ones5d( shape )
: create a five-dimensional nested array filled with ones.onesnd( shape )
: create an n-dimensional nested array filled with ones.setter( dtype )
: return an accessor function for setting an element in an indexed array-like object.take( x, indices )
: take elements from an array.toAccessorArray( arr )
: convert an array-like object to a minimal array-like object supporting the accessor protocol.unitspace( start, stop )
: generate a linearly spaced numeric array whose elements increment by 1.zeroTo( n )
: generate a linearly spaced numeric array whose elements increment by 1 starting from zero.zeros( len )
: create a zero-filled "generic" array.zeros2d( shape )
: create a zero-filled two-dimensional nested array.zeros3d( shape )
: create a zero-filled three-dimensional nested array.zeros4d( shape )
: create a zero-filled four-dimensional nested array.zeros5d( shape )
: create a zero-filled five-dimensional nested array.zerosnd( shape )
: create a zero-filled n-dimensional nested array.
var objectKeys = require( '@stdlib/utils/keys' );
var ns = require( '@stdlib/array/base' );
console.log( objectKeys( ns ) );