@stdlib/ndarray-orders
v0.2.2
Published
List of ndarray orders.
Downloads
10,053
Readme
Orders
List of ndarray orders.
Installation
npm install @stdlib/ndarray-orders
Usage
var orders = require( '@stdlib/ndarray-orders' );
orders()
Returns a list of ndarray orders.
var out = orders();
// e.g., returns [ 'row-major', 'column-major' ]
The output array contains the following orders:
row-major
: row-major (C-style) order.column-major
: column-major (Fortran-style) order.
Examples
var contains = require( '@stdlib/array-base-assert-contains' ).factory;
var orders = require( '@stdlib/ndarray-orders' );
var isOrder = contains( orders() );
var bool = isOrder( 'row-major' );
// returns true
bool = isOrder( 'column-major' );
// returns true
bool = isOrder( 'beep' );
// returns false
See Also
@stdlib/ndarray-array
: multidimensional arrays.@stdlib/ndarray-ctor
: multidimensional array constructor.
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.