@stdlib/ndarray-iter
v0.2.1
Published
Multidimensional array iterators.
Downloads
3
Readme
Iterators
Multidimensional array iterators.
Installation
npm install @stdlib/ndarray-iter
Usage
var ns = require( '@stdlib/ndarray-iter' );
ns
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.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).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
.
Examples
var objectKeys = require( '@stdlib/utils-keys' );
var ns = require( '@stdlib/ndarray-iter' );
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.