Orders
List of 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