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.binary2d( arrays, shape, fcn )
: apply a binary callback to elements in two two-dimensional nested input arrays and assign results to elements in a two-dimensional nested output array.binary3d( arrays, shape, fcn )
: apply a binary callback to elements in two three-dimensional nested input arrays and assign results to elements in a three-dimensional nested output array.binary4d( arrays, shape, fcn )
: apply a binary callback to elements in two four-dimensional nested input arrays and assign results to elements in a four-dimensional nested output array.binary5d( arrays, shape, fcn )
: apply a binary callback to elements in two five-dimensional nested input arrays and assign results to elements in a five-dimensional nested output array.binarynd( arrays, shape, fcn )
: apply a binary callback to elements in two n-dimensional nested input arrays and assign results to elements in an n-dimensional nested output array.broadcastArray( x, inShape, outShape )
: broadcast an array to a specified shape.bbinary2d( arrays, shapes, fcn )
: apply a binary callback to elements in two broadcasted nested input arrays and assign results to elements in a two-dimensional nested output array.bbinary3d( arrays, shapes, fcn )
: apply a binary callback to elements in two broadcasted nested input arrays and assign results to elements in a three-dimensional nested output array.bbinary4d( arrays, shapes, fcn )
: apply a binary callback to elements in two broadcasted nested input arrays and assign results to elements in a four-dimensional nested output array.bbinary5d( arrays, shapes, fcn )
: apply a binary callback to elements in two broadcasted nested input arrays and assign results to elements in a five-dimensional nested output array.bquaternary2d( arrays, shapes, fcn )
: apply a quaternary callback to elements in four broadcasted nested input arrays and assign results to elements in a two-dimensional nested output array.bquinary2d( arrays, shapes, fcn )
: apply a quinary callback to elements in four broadcasted nested input arrays and assign results to elements in a two-dimensional nested output array.bternary2d( arrays, shapes, fcn )
: apply a ternary callback to elements in three broadcasted nested input arrays and assign results to elements in a two-dimensional nested output array.bunary2d( arrays, shapes, fcn )
: apply a unary callback to elements in a broadcasted nested input array and assign results to elements in a two-dimensional nested output array.bunary3d( arrays, shapes, fcn )
: apply a unary callback to elements in a broadcasted nested input array and assign results to elements in a three-dimensional nested output array.bunary4d( arrays, shapes, fcn )
: apply a unary callback to elements in a broadcasted nested input array and assign results to elements in a four-dimensional nested output array.bunary5d( arrays, shapes, fcn )
: apply a unary callback to elements in a broadcasted nested input array and assign results to elements in a five-dimensional nested output array.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( shape, 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( shape, 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( shape, 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( shape, 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.filledndBy( shape, clbk[, thisArg] )
: create a filled n-dimensional nested array according to a provided callback function.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.mskbinary2d( arrays, shape, fcn )
: apply a binary callback to elements in two two-dimensional nested input arrays according to elements in a two-dimensional nested mask array and assign results to elements in a two-dimensional nested output array.mskunary2d( arrays, shape, fcn )
: apply a unary callback to elements in a two-dimensional nested input array according to elements in a two-dimensional nested mask array and assign results to elements in a two-dimensional nested output array.mskunary3d( arrays, shape, fcn )
: apply a unary callback to elements in a three-dimensional nested input array according to elements in a three-dimensional nested mask array and assign results to elements in a three-dimensional nested output 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.quaternary2d( arrays, shape, fcn )
: apply a quaternary callback to elements in four two-dimensional nested input arrays and assign results to elements in a two-dimensional nested output array.quinary2d( arrays, shape, fcn )
: apply a quinary callback to elements in five two-dimensional nested input arrays and assign results to elements in a two-dimensional nested output array.setter( dtype )
: return an accessor function for setting an element in an indexed array-like object.strided2array2d( x, shape, strides, offset )
: convert a strided array to a two-dimensional nested array.strided2array3d( x, shape, strides, offset )
: convert a strided array to a three-dimensional nested array.strided2array4d( x, shape, strides, offset )
: convert a strided array to a four-dimensional nested array.strided2array5d( x, shape, strides, offset )
: convert a strided array to a five-dimensional nested array.take( x, indices )
: take elements from an array.ternary2d( arrays, shape, fcn )
: apply a ternary callback to elements in three two-dimensional nested input arrays and assign results to elements in a two-dimensional nested output array.ternary3d( arrays, shape, fcn )
: apply a ternary callback to elements in three three-dimensional nested input arrays and assign results to elements in a three-dimensional nested output array.ternary4d( arrays, shape, fcn )
: apply a ternary callback to elements in three four-dimensional nested input arrays and assign results to elements in a four-dimensional nested output array.ternary5d( arrays, shape, fcn )
: apply a ternary callback to elements in three five-dimensional nested input arrays and assign results to elements in a five-dimensional nested output array.toAccessorArray( arr )
: convert an array-like object to a minimal array-like object supporting the accessor protocol.unary2dBy( arrays, shape, fcn, clbk[, thisArg] )
: apply a unary function to each element retrieved from a two-dimensional nested input array according to a callback function and assign results to elements in a two-dimensional nested output array.unary2d( arrays, shape, fcn )
: apply a unary callback to elements in a two-dimensional nested input array and assign results to elements in a two-dimensional nested output array.unary3d( arrays, shape, fcn )
: apply a unary callback to elements in a three-dimensional nested input array and assign results to elements in a three-dimensional nested output array.unary4d( arrays, shape, fcn )
: apply a unary callback to elements in a four-dimensional nested input array and assign results to elements in a four-dimensional nested output array.unary5d( arrays, shape, fcn )
: apply a unary callback to elements in a five-dimensional nested input array and assign results to elements in a five-dimensional nested output array.unarynd( arrays, shape, fcn )
: apply a unary callback to elements in an n-dimensional nested input array and assign results to elements in an n-dimensional nested output array.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 ) );