function ndarray( dtype, buffer, shape, strides, offset, order ) {
	var contiguous;
	var nbytes;
	var ord;
	var len;
	var i;
	if ( !(this instanceof ndarray) ) {
		return new ndarray( dtype, buffer, shape, strides, offset, order );
	}
	// Compute the number of elements...
	len = 1;
	for ( i = 0; i < shape.length; i++ ) {
		len *= shape[ i ]; // TODO: consider supporting accessor arrays here
	}
	// Compute the number of bytes...
	if ( buffer.BYTES_PER_ELEMENT ) {
		nbytes = buffer.BYTES_PER_ELEMENT * len;
	} else {
		nbytes = null;
	}
	// Set private properties...
	this._byteLength = nbytes;
	this._bytesPerElement = bytesPerElement( dtype );
	this._buffer = buffer;
	this._dtype = dtype;
	this._length = len;
	this._ndims = shape.length;
	this._offset = offset;
	this._order = order;
	this._shape = shape;
	this._strides = strides;
	this._accessors = Boolean( buffer.get && buffer.set );

	this._iterationOrder = iterationOrder( strides );

	// Determine if the array can be stored contiguously:
	contiguous = isContiguous( len, shape, strides, offset, this._iterationOrder ); // eslint-disable-line max-len

	// Infer the array "order" from the stride array (this is supplementary to the `order` parameter):
	ord = strides2order( strides );

	this._flags = {
		'ROW_MAJOR_CONTIGUOUS': isRowMajorContiguous( ord, contiguous ),
		'COLUMN_MAJOR_CONTIGUOUS': isColumnMajorContiguous( ord, contiguous ),
		'READONLY': false
	};

	// Initialize a property for caching serialized meta data:
	this.__meta_dataview__ = null;

	return this;
}
ndarray constructor.

## Notes

-   To create a zero-dimensional array,

    ```javascript
    var buffer = [ 1 ];
    var shape = [];
    var strides = [ 0 ];
    var offset = 0;

    var out = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );
    ```

@constructor
@param {string} dtype - data type
@param {(ArrayLikeObject|TypedArray|Buffer)} buffer - data buffer
@param {NonNegativeIntegerArray} shape - array shape
@param {IntegerArray} strides - array strides
@param {NonNegativeInteger} offset - index offset
@param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)
@returns {ndarray} ndarray instance

@example
var buffer = [ 1, 2, 3, 4, 5, 6 ];
var shape = [ 3, 2 ];
var strides = [ 2, 1 ];
var offset = 0;

var out = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );