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 on GitHub, and please consider financially supporting stdlib. We greatly appreciate your continued support!
Multidimensional array iterators.
To use in Observable,
ns = require( 'https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter@umd/browser.js' )
To vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:
var ns = require( 'path/to/vendor/umd/ndarray-iter/index.js' )
To include the bundle in a webpage,
<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter@umd/browser.js"></script>
If no recognized module system is present, access bundle contents via the global scope:
<script type="text/javascript">
(function () {
window.ns;
})();
</script>
Namespace containing utilities for iterating over multidimensional arrays.
var o = ns;
// returns {...}
nditerColumnEntries( x[, options] )
: create an iterator which returns[index, column]
pairs for each column in a matrix (or stack of matrices).nditerColumns( x[, options] )
: create an iterator which iterates over each column in a matrix (or stack of matrices).nditerEntries( x[, options] )
: create an iterator which returns[index, value]
pairs for each element in a providedndarray
.nditerIndices( shape[, options] )
: create an iterator which returns indices for use indexing into anndarray
having a specified shape.nditerInterleaveSubarrays( arr, ndims )
: create an iterator which iterates over interleaved subarrays.nditerMatrices( x[, options] )
: create an iterator which iterates over each matrix in a stack of matrices.nditerMatrixEntries( x[, options] )
: create an iterator which returns[index, matrix]
pairs for each matrix in a stack of matrices.nditerRowEntries( x[, options] )
: create an iterator which returns[index, row]
pairs for each row in a matrix (or stack of matrices).nditerRows( x[, options] )
: create an iterator which iterates over each row in a matrix (or stack of matrices).nditerSelectDimension( x, dim[, options] )
: create an iterator which iterates over each view along a specified dimension.nditerStacks( x, dims[, options] )
: create an iterator which iterates over each subarray in a stack of subarrays according to a list of specified stack dimensions.nditerSubarrays( x, ndims[, options] )
: create an iterator which iterates over each subarray in a stack of subarrays.nditer2arrayEach( iterator )
: create an iterator which converts each iteratedndarray
to a generic array.nditerValues( x[, options] )
: create an iterator which returns individual elements from a providedndarray
.
<!DOCTYPE html>
<html lang="en">
<body>
<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/stdlib-js/utils-keys@umd/browser.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-iter@umd/browser.js"></script>
<script type="text/javascript">
(function () {
console.log( objectKeys( ns ) );
})();
</script>
</body>
</html>
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.
See LICENSE.
Copyright © 2016-2024. The Stdlib Authors.