Base ndarray.
var ns = require( '@stdlib/ndarray/base' );Base ndarray.
var o = ns;
// returns {...}anyBy( arrays, predicate[, thisArg] ): test whether at least one element in an ndarray passes a test implemented by a predicate function.any( arrays ): test whether at least one element in an ndarray is truthy.assignScalar( arrays ): assign a scalar value to every element of an output ndarray.assign( arrays ): assign elements in an input ndarray to elements in an output ndarray.atleastnd( ndims, arrays ): convert a list of values (scalars and/or ndarrays) to ndarrays having at least a specified number of dimensions.binaryInputCastingDataType( idtype1, idtype2, odtype, policy ): resolve the casting data type for an input ndarray provided to a binary function.binaryLoopOrder( shape, stridesX, stridesY, stridesZ ): reorder ndarray dimensions and associated strides for loop interchange.binaryOutputDataType( xdtype, ydtype, policy ): resolve the output ndarray data type for a binary function.binaryReduceStrided1dDispatchFactory( table, idtypes, odtypes, policies ): create a function for performing reduction on two input ndarrays.binaryReduceStrided1dDispatch( table, idtypes, odtypes, policies ): constructor for performing a reduction on two input ndarrays.binaryReduceStrided1d( fcn, arrays, dims[, options] ): perform a reduction over a list of specified dimensions in two input ndarrays via a one-dimensional strided array binary reduction function and assign results to a provided output ndarray.binaryBlockSize( dtypeX, dtypeY, dtypeZ ): resolve a loop block size for multi-dimensional array tiled loops.binary( arrays, fcn ): apply a binary callback to elements in input ndarrays and assign results to elements in an output ndarray.bind2vind( shape, strides, offset, order, idx, mode ): convert a linear index in an underlying data buffer to a linear index in an array view.broadcastArrayExceptDimensions( arr, shape, dims ): broadcast an input ndarray to a target shape while keeping a list of specified dimensions unchanged.broadcastArray( arr, shape ): broadcast an ndarray to a specified shape.broadcastArrays( arrays ): broadcast ndarrays to a common shape.broadcastScalarLike( x, value ): broadcast a scalar value to an ndarray having the same shape and data type as a provided input ndarray.broadcastScalar( value, dtype, shape, order ): broadcast a scalar value to an ndarray having a specified shape.broadcastShapes( shapes ): broadcast array shapes to a single shape.bufferCtors( dtype ): ndarray data buffer constructors.bufferDataTypeEnum( buffer ): return the data type enumeration constant of an ndarray data buffer.bufferDataType( buffer ): return the data type of an ndarray data buffer.buffer( dtype, size ): create a contiguous linear ndarray data buffer.bytesPerElement( dtype ): return the number of bytes per element for a provided underlying ndarray data type.char2dtype( [ch] ): return the data type string associated with a provided single letter character abbreviation.clampIndex( idx, max ): restrict an index to the interval[0,max].complementShape( shape, dims ): return the shape defined by the dimensions which are not included in a list of dimensions.copy( x ): copy an input ndarray to a new ndarray having the same shape and data type.countFalsy( arrays ): count the number of falsy elements in an ndarray.countIf( arrays, predicate[, thisArg] ): count the number of elements in an ndarray which pass a test implemented by a predicate function.countTruthy( arrays ): count the number of truthy elements in an ndarray.ndarray( dtype, buffer, shape, strides, offset, order ): create a multidimensional array.data( x ): return the underlying data buffer of a provided ndarray.dtypeAlignment( [dtype] ): return the alignment (in bytes) for an underlying array data type.dtypeChar( [dtype] ): return the single letter abbreviation for an underlying array data type.dtypeChars( [kind] ): list of ndarray data type single letter character abbreviations.dtypeDesc( [dtype] ): return the description for a specified data type.dtypeEnum2Str( dtype ): return the data type string associated with an ndarray data type enumeration constant.dtypeEnums(): return an object mapping supported data type strings to enumeration constants.dtypeObjects(): return an object mapping supported data type strings to data type objects.dtypeResolveEnum( dtype ): return the enumeration constant associated with a supported ndarray data type value.dtypeResolveStr( dtype ): return the data type string associated with a supported ndarray data type value.dtypeStr2Enum( dtype ): return the enumeration constant associated with an ndarray data type string.dtypeStrings( [kind] ): list of ndarray data type strings.dtype( x ): return the data type of a provided ndarray.dtype2c( dtype ): return the C data type associated with a provided data type value.dtypes2enums( dtypes ): resolve a list of data type enumeration constants.dtypes2signatures( dtypes, nin, nout ): transform a list of array argument data types into a list of signatures.dtypes2strings( dtypes ): resolve a list of data type strings.emptyLike( x ): create an uninitialized ndarray having the same shape and data type as a provided ndarray.empty( dtype, shape, order ): create an uninitialized ndarray having a specified shape and data type.everyBy( arrays, predicate[, thisArg] ): test whether all elements in an ndarray pass a test implemented by a predicate function.every( arrays ): test whether every element in an ndarray is truthy.expandDimensions( x, dim, writable ): expand the shape of an array by inserting a new dimension of size one at a specified dimension index.fillBy( x, fcn[, thisArg] ): fill an input ndarray according to a callback function.fill( x, value ): fill an input ndarray with a specified value.find( arrays, predicate[, thisArg] ): return the first element in an ndarray which passes a test implemented by a predicate function.flag( x, name ): return a specified flag for a provided ndarray.flags( x, copy ): return the flags of a provided ndarray.flattenShapeFrom( shape, dim ): flatten a shape starting from a specified dimension.flattenShape( shape, depth ): flatten a shape to a specified depth.fliplr( x, writable ): return a view of an input ndarray in which the order of elements along the last dimension is reversed.flipud( x, writable ): return a view of an input ndarray in which the order of elements along the second-to-last dimension is reversed.forEach( arrays, fcn[, thisArg] ): invoke a callback function once for each element in an ndarray.array2ndarray( buf, order ): convert an array to a one-dimensional ndarray.scalar2ndarrayLike( x, value ): convert a scalar value to a zero-dimensional ndarray having the same data type as a provided ndarray.scalar2ndarray( value, dtype, order ): convert a scalar value to a zero-dimensional ndarray.full( value, dtype, shape, order ): create an ndarray filled with a specified value and having a specified shape and data type.includes( arrays ): test whether an ndarray contains a specified value.ind( idx, max, mode ): return an index given an index mode.ind2sub( shape, strides, offset, order, idx, mode ): convert a linear index to an array of subscripts.iterationOrder( strides ): given a stride array, determine array iteration order.loopOrder( shape, strides ): reorder ndarray dimensions and associated strides for loop interchange.map( arrays, fcn[, thisArg] ): apply a callback function to elements in an input ndarray and assign results to elements in an output ndarray.maxViewBufferIndex( shape, strides, offset ): compute the maximum linear index in an underlying data buffer accessible to an array view.maybeBroadcastArrayExceptDimensions( arr, shape, dims ): broadcast an ndarray to a specified shape while keeping a list of specified dimensions unchanged if and only if the specified shape differs from the provided ndarray's shape.maybeBroadcastArray( arr, shape ): broadcast an ndarray to a specified shape if and only if the specified shape differs from the provided ndarray's shape.maybeBroadcastArrays( arrays ): broadcast ndarrays to a common shape.metaDataProps( meta, dtypes, obj ): define non-enumerable read-only properties which expose ndarray function meta data.minSignedIntegerDataType( value ): determine the minimum ndarray data type for storing a provided signed integer value.minUnsignedIntegerDataType( value ): determine the minimum ndarray data type for storing a provided unsigned integer value.minViewBufferIndex( shape, strides, offset ): compute the minimum linear index in an underlying data buffer accessible to an array view.minmaxViewBufferIndex( shape, strides, offset ): compute the minimum and maximum linear indices in an underlying data buffer which are accessible to an array view.nans( dtype, shape, order ): create a NaN-filled ndarray having a specified shape and data type.ndarraylike2ndarray( x ): convert an ndarray-like object to anndarray.ndarraylike2object( x ): convert anndarray-like object to an object likely to have the same "shape".ndarraylike2scalar( x ): convert an ndarray-like object to a scalar value.ndims( x ): return the number of ndarray dimensions.nextCartesianIndex( shape, order, idx, dim ): return the next Cartesian index (i.e., set of subscripts/dimension indices).nonsingletonDimensions( shape ): return the number of non-singleton dimensions.normalizeIndex( idx, max ): normalize an index to the interval[0,max].normalizeIndices( indices, max ): normalize a list of indices to the interval[0,max].nullaryLoopOrder( shape, stridesX ): reorder ndarray dimensions and associated strides for loop interchange.nullaryStrided1dDispatchFactory( table, idtypes, odtypes[, options] ): create a function for applying a strided function to an ndarray.nullaryStrided1dDispatch( table, idtypes, odtypes[, options] ): constructor for applying a strided function to an ndarray.nullaryStrided1d( fcn, arrays, dims[, options] ): apply a one-dimensional strided array function to a list of specified dimensions in an ndarray.nullaryBlockSize( dtypeX ): resolve a loop block size for multi-dimensional array tiled loops.nullary( arrays, fcn ): apply a nullary callback and assign results to elements in an output ndarray.nulls( dtype, shape, order ): create a null-filled ndarray having a specified shape and data type.numelDimension( x, dim ): return the size (i.e., number of elements) of a specified dimension for a provided ndarray.numel( shape ): return the number of elements in an array.offset( x ): return the index offset specifying the underlying buffer index of the first iterated ndarray element.onesLike( x ): create a ones-filled ndarray having the same shape and data type as a provided ndarray.ones( dtype, shape, order ): create a ones-filled ndarray having a specified shape and data type.order( x ): return the layout order of a provided ndarray.outputDataType( dtypes, policy ): resolve the output ndarray data type from a list of input ndarray data types.outputPolicyEnum2Str( policy ): return the policy string associated with an output ndarray data type policy enumeration constant.outputPolicyResolveEnum( policy ): return the enumeration constant associated with a supported ndarray data type policy value.outputPolicyResolveStr( dtype ): return the policy string associated with a supported ndarray data type policy value.outputPolicyStr2Enum( policy ): return the enumeration constant associated with an output ndarray data type policy string.pop( x, dim, writable ): return an array containing a truncated view of an input ndarray and a view of the last element(s) along a specified dimension.prependSingletonDimensions( x, n, writable ): prepend singleton dimensions.promoteDataTypes( dtypes ): resolve the data type that results from applying promotion rules to a provided list of data types.quaternaryLoopOrder( shape, stridesX, stridesY, stridesZ, stridesW, stridesU ): reorder ndarray dimensions and associated strides for loop interchange.quaternaryBlockSize( dtypeX, dtypeY, dtypeZ, dtypeW, dtypeU ): resolve a loop block size for multi-dimensional array tiled loops.quinaryLoopOrder( shape, stridesX, stridesY, stridesZ, stridesW, stridesU, stridesV ): reorder ndarray dimensions and associated strides for loop interchange.quinaryBlockSize( dtypeX, dtypeY, dtypeZ, dtypeW, dtypeU, dtypeV ): resolve a loop block size for multi-dimensional array tiled loops.removeSingletonDimensions( x, writable ): remove singleton dimensions.reverseDimension( x, dim, writable ): return a view of an input ndarray in which the order of elements along a specified dimension is reversed.reverse( x, writable ): return a view of an input ndarray in which the order of elements along each dimension is reversed.serializeMetaData( x ): serialize ndarray meta data.shape( x, copy ): return the shape of a provided ndarray.shape2strides( shape, order ): generate a stride array from an array shape.shift( x, dim, writable ): return an array containing a truncated view of an input ndarray and a view of the first element(s) along a specified dimension.singletonDimensions( shape ): return the number of singleton dimensions.sliceAssign( x, y, slice, strict ): assign element values from a broadcasted inputndarrayto corresponding elements in an outputndarrayview.sliceDimensionFrom( x, dim, start, strict, writable ): return a shifted view of an input ndarray along a specified dimension.sliceDimensionTo( x, dim, stop, strict, writable ): return a truncated view of an input ndarray along a specified dimension.sliceDimension( x, dim, slice, strict, writable ): return a view of an input ndarray when sliced along a specified dimension.sliceFrom( x, start, strict, writable ): return a shifted view of an input ndarray.sliceTo( x, stop, strict, writable ): return a truncated view of an input ndarray.slice( x, slice, strict, writable ): return a view of an input ndarray.someBy( arrays, predicate[, thisArg ] ): test whether at leastnelements in an ndarray pass a test implemented by a predicate function.some( arrays ): test whether at leastnelements in an ndarray are truthy.spreadDimensions( ndims, x, dims, writable ): expand the shape of an array to a specified dimensionality by spreading its dimensions to specified dimension indices and inserting dimensions of size one for the remaining dimensions.stride( x, dim ): return the stride along a specified dimension for a provided ndarray.strides( x, copy ): return the strides of a provided ndarray.strides2offset( shape, strides ): determine the index offset which specifies the location of the first indexed value in a multidimensional array based on a stride array.strides2order( strides ): determine the order of a multidimensional array based on a provided stride array.sub2ind( shape, strides, offset, ...subscripts, mode ): convert subscripts to a linear index.ternaryLoopOrder( shape, stridesX, stridesY, stridesZ, stridesW ): reorder ndarray dimensions and associated strides for loop interchange.ternaryOutputDataType( xdtype, ydtype, zdtype, policy ): resolve the output ndarray data type for a ternary function.ternaryBlockSize( dtypeX, dtypeY, dtypeZ, dtypeW ): resolve a loop block size for multi-dimensional array tiled loops.ternary( arrays, fcn ): apply a ternary callback to elements in input ndarrays and assign results to elements in an output ndarray.blockSize( dtypes ): resolve a loop block size for multi-dimensional array tiled loops.ndarray2array( buffer, shape, strides, offset, order ): convert an ndarray buffer to a generic array.toFlippedlr( x ): return a new ndarray where the order of elements along the last dimension of an input ndarray is reversed.toFlippedud( x ): return a new ndarray where the order of elements along the second-to-last dimension of an input ndarray is reversed.toNormalizedIndices( indices, max ): normalize a list of indices to the interval[0,max].toReversedDimension( x, dim ): return a new ndarray where the order of elements of an input ndarray along a specified dimension is reversed.toReversed( x ): return a new ndarray where the order of elements of an input ndarray is reversed along each dimension.toTransposed( x ): return a new ndarray containing the elements of an input ndarray but whose last two dimensions are transposed.toUniqueNormalizedIndices( indices, max ): return a list of unique indices after normalizing to the interval[0,max].transpose( x, writable ): transpose a matrix (or a stack of matrices).unaryAccumulate( arrays, initial, clbk ): perform a reduction over elements in an input ndarray.unaryAddonDispatch( addon, fallback ): dispatch to a native add-on applying a unary function to an input ndarray.unaryBy( arrays, fcn, clbk[, thisArg] ): apply a unary function to each element in an input ndarray according to a callback function and assign results to elements in an output ndarray.unaryInputCastingDataType( idtype, odtype, policy ): resolve the input ndarray casting data type for a unary function.unaryLoopOrder( shape, stridesX, stridesY ): reorder ndarray dimensions and associated strides for loop interchange.unaryOutputDataType( dtype, policy ): resolve the output ndarray data type for a unary function.unaryReduceStrided1dAssignStruct( fcn, arrays, dims[, options] ): perform a reduction over a list of specified dimensions in an input ndarray via a one-dimensional strided array reduction function which accepts an outputstructobject and assign results to a provided output ndarray.unaryReduceStrided1dBy( fcn, arrays, dims[, options], clbk[, thisArg] ): perform a reduction over a list of specified dimensions in an input ndarray via a one-dimensional strided array reduction function accepting a callback and assign results to a provided output ndarray.unaryReduceStrided1dDispatchByFactory( table, idtypes, odtypes, policies ): create a function for performing a reduction on an input ndarray according to a callback function.unaryReduceStrided1dDispatchBy( table, idtypes, odtypes, policies ): constructor for performing a reduction on an input ndarray according to a callback function.unaryReduceStrided1dDispatchFactory( table, idtypes, odtypes, policies ): create a function for performing a reduction on an input ndarray.unaryReduceStrided1dDispatch( table, idtypes, odtypes, policies ): constructor for performing a reduction on an input ndarray.unaryReduceStrided1d( fcn, arrays, dims[, options] ): perform a reduction over a list of specified dimensions in an input ndarray via a one-dimensional strided array reduction function and assign results to a provided output ndarray.unaryReduceSubarrayBy( fcn, arrays, dims[, options], clbk[, thisArg] ): perform a reduction over a list of specified dimensions in an input ndarray according to a callback function and assign results to a provided output ndarray.unaryReduceSubarray( fcn, arrays, dims[, options] ): perform a reduction over a list of specified dimensions in an input ndarray and assign results to a provided output ndarray.unaryStrided1dDispatchFactory( table, idtypes, odtypes, policies[, options] ): create a function for applying a strided function an input ndarray.unaryStrided1dDispatch( table, idtypes, odtypes, policies[, options] ): constructor for applying a strided function to an input ndarray.unaryStrided1d( fcn, arrays, dims[, options] ): apply a one-dimensional strided array function to a list of specified dimensions in an input ndarray and assign results to a provided output ndarray.unaryBlockSize( dtypeX, dtypeY ): resolve a loop block size for multi-dimensional array tiled loops.unary( arrays, fcn ): apply a unary callback to elements in an input ndarray and assign results to elements in an output ndarray.unflattenShape( shape, dim, sizes ): expand a dimension over multiple dimensions.vind2bind( shape, strides, offset, order, idx, mode ): convert a linear index in an array view to a linear index in an underlying data buffer.wrapIndex( idx, max ): wrap an index on the interval[0,max].zerosLike( x ): create a zero-filled ndarray having the same shape and data type as a provided ndarray.zeros( dtype, shape, order ): create a zero-filled ndarray having a specified shape and data type.zip2views1d( arrays, labels ): zip one or more one-dimensional ndarrays to an array of composite views.
The namespace contains the following sub-namespaces:
assert: base ndarray assertion utilities.
var objectKeys = require( '@stdlib/utils/keys' );
var ns = require( '@stdlib/ndarray/base' );
console.log( objectKeys( ns ) );