Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork0
Return a list of non-reduced dimensions in an un-normalized multi-slice.
License
stdlib-js/slice-base-nonreduced-dimensions
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
About stdlib...
We believe in a future in which the web is a preferred environment for numerical computation. To help realize this future, we've built stdlib. stdlib is a standard library, with an emphasis on numerical and scientific computation, written in JavaScript (and C) for execution in browsers and in Node.js.
The library is fully decomposable, being architected in such a way that you can swap out and mix and match APIs and functionality to cater to your exact preferences and use cases.
When you use stdlib, you can be absolutely certain that you are using the most thorough, rigorous, well-written, studied, documented, tested, measured, and high-quality code out there.
To join us in bringing numerical computing to the web, get started by checking us out onGitHub, and please considerfinancially supporting stdlib. We greatly appreciate your continued support!
Return a list of non-reduced dimensions in an un-normalized
MultiSliceobject.
In a multi-axis indexing expression (e.g., '1,:,2,:,0:10:1'), a non-reduced dimension corresponds to a dimension which is retained in the slice result. Only integer indexing expressions (e.g., only the first and third dimensions in '1,:,2,:,0:10:1') result in dimension reduction; slices always retain respective dimensions, even if a slice is empty or only selects a single element.
importnonreducedDimensionsfrom'https://cdn.jsdelivr.net/gh/stdlib-js/slice-base-nonreduced-dimensions@deno/mod.js';
Returns a list of non-reduced dimensions in an un-normalizedMultiSlice object.
importMultiSlicefrom'https://cdn.jsdelivr.net/gh/stdlib-js/slice-multi@deno/mod.js';importSlicefrom'https://cdn.jsdelivr.net/gh/stdlib-js/slice-ctor@deno/mod.js';vars=newMultiSlice(1,null,2,void0,newSlice(0,10,1));// returns <MultiSlice>varindices=nonreducedDimensions(s);// returns [ 1, 3, 4 ]
importSfrom'https://cdn.jsdelivr.net/gh/stdlib-js/slice-ctor@deno/mod.js';importMultiSlicefrom'https://cdn.jsdelivr.net/gh/stdlib-js/slice-multi@deno/mod.js';importnonreducedDimensionsfrom'https://cdn.jsdelivr.net/gh/stdlib-js/slice-base-nonreduced-dimensions@deno/mod.js';vars=newMultiSlice(null,S(),-1);varout=nonreducedDimensions(s);console.log('%s => [%s]',s.toString(),out.join(','));s=newMultiSlice(null);out=nonreducedDimensions(s);console.log('%s => [%s]',s.toString(),out.join(','));s=newMultiSlice(S(-1,null,-1),3);out=nonreducedDimensions(s);console.log('%s => [%s]',s.toString(),out.join(','));s=newMultiSlice(2,S(-10,-2,2),3,null);out=nonreducedDimensions(s);console.log('%s => [%s]',s.toString(),out.join(','));s=newMultiSlice(S(1,20,2),S(null,null,-1));out=nonreducedDimensions(s);console.log('%s => [%s]',s.toString(),out.join(','));
@stdlib/slice-base/length:compute the number of elements in a normalized slice.@stdlib/slice-base/reduced-dimensions:return a list of reduced dimensions in an un-normalized multi-slice.@stdlib/slice-base/shape:compute the shape of a normalized multi-slice.
This package is part ofstdlib, a standard library 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 developstdlib, see the main projectrepository.
SeeLICENSE.
Copyright © 2016-2025. The StdlibAuthors.
About
Return a list of non-reduced dimensions in an un-normalized multi-slice.
Topics
Resources
License
Code of conduct
Contributing
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Uh oh!
There was an error while loading.Please reload this page.