Base
Base slice namespace.
Usage
var ns = require( '@stdlib/slice/base' );
ns
Base slice namespace.
var o = ns;
// returns {...}
The namespace contains the following:
args2multislice( args )
: create aMultiSlice
object from a list ofMultiSlice
constructor arguments.int2slice( value, max, strict )
: convert an integer to aSlice
object.sliceLength( slice )
: compute the number of elements in a normalized slice.nonreducedDimensions( slice )
: return a list of non-reduced dimensions in an un-normalizedMultiSlice
object.normalizeMultiSlice( slice, shape, strict )
: normalize aMultiSlice
object.normalizeSlice( slice, len, strict )
: normalize aSlice
object.reducedDimensions( slice )
: return a list of reduced dimensions in an un-normalizedMultiSlice
object.sargs2multislice( str )
: create aMultiSlice
object from a comma-separated list of string-serializedMultiSlice
constructor arguments.seq2multislice( str, shape, strict )
: convert a multidimensional subsequence string to aMultiSlice
object.seq2slice( str, len, strict )
: convert a subsequence string to aSlice
object.sliceShape( slice )
: compute the shape of a normalized multi-slice.slice2seq( str )
: convert aSlice
object to a subsequence string.str2multislice( str )
: parse a string-serializedMultiSlice
object.str2slice( str )
: parse a string-serializedSlice
object.
Examples
var objectKeys = require( '@stdlib/utils/keys' );
var ns = require( '@stdlib/slice/base' );
console.log( objectKeys( ns ) );