0.2.2 • Published 1 year ago
@stdlib/slice-base v0.2.2
Base
Base slice namespace.
Installation
npm install @stdlib/slice-baseUsage
var ns = require( '@stdlib/slice-base' );ns
Base slice namespace.
var o = ns;
// returns {...}The namespace contains the following:
args2multislice( args ): create aMultiSliceobject from a list ofMultiSliceconstructor arguments.int2slice( value, max, strict ): convert an integer to aSliceobject.sliceLength( slice ): compute the number of elements in a normalized slice.nonreducedDimensions( slice ): return a list of non-reduced dimensions in an un-normalizedMultiSliceobject.normalizeMultiSlice( slice, shape, strict ): normalize aMultiSliceobject.normalizeSlice( slice, len, strict ): normalize aSliceobject.reducedDimensions( slice ): return a list of reduced dimensions in an un-normalizedMultiSliceobject.sargs2multislice( str ): create aMultiSliceobject from a comma-separated list of string-serializedMultiSliceconstructor arguments.seq2multislice( str, shape, strict ): convert a multidimensional subsequence string to aMultiSliceobject.seq2slice( str, len, strict ): convert a subsequence string to aSliceobject.sliceShape( slice ): compute the shape of a normalized multi-slice.slice2seq( str ): convert aSliceobject to a subsequence string.str2multislice( str ): parse a string-serializedMultiSliceobject.str2slice( str ): parse a string-serializedSliceobject.
Examples
var objectKeys = require( '@stdlib/utils-keys' );
var ns = require( '@stdlib/slice-base' );
console.log( objectKeys( ns ) );Notice
This package is part of stdlib, a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.
For more information on the project, filing bug reports and feature requests, and guidance on how to develop stdlib, see the main project repository.
Community
License
See LICENSE.
Copyright
Copyright © 2016-2024. The Stdlib Authors.