function arraybuffer2vector( dtype, buffer, length, stride, byteOffset, order, options ) { // TODO: consider moving to `@stdlib/ndarray/from-arraybuffer` and generalize to n-dimensions such that `length` becomes `shape` and `stride` becomes `strides`
	var buf;
	var sh;
	var st;
	var N;
	var o;

	if ( isGenericDataType( dtype ) ) {
		throw new TypeError( format( 'invalid argument. ArrayBuffer is incompatible with the specified data type. Value: `%s`.', dtype ) );
	}
	o = byteOffset;

	// Compute the number of underlying elements across which the vector view will span:
	N = length * stride;

	// Adjust the byte offset to point to the element marking the beginning of the view:
	if ( stride < 0 ) { // TODO: the following is effectively unreachable code, as provided strides are never anything other than unity; however, we keep this around in the event that we want to extract this function to a separate package and would like to maintain generality
		N *= -1;
		o -= N * bytesPerElement( dtype );
	}
	// Create the underlying ndarray buffer:
	if ( isBinaryDataType( dtype ) ) {
		buf = arraybuffer2buffer( buffer, o, N );
	} else {
		buf = typedarray( buffer, o, N, dtype );
	}
	// Resolve ndarray meta data:
	sh = [ length ];
	st = [ stride ];
	o = strides2offset( sh, st );

	// Return a new ndarray instance:
	if ( arguments.length > 6 ) {
		return new ndarray( dtype, buf, sh, st, o, order, options );
	}
	return new ndarray( dtype, buf, sh, st, o, order );
}
Creates a one-dimensional ndarray from an ArrayBuffer.

@private
@param {string} dtype - data type
@param {ArrayBuffer} buffer - ArrayBuffer
@param {NonNegativeInteger} length - number of indexed elements
@param {integer} stride - stride length (in units of elements)
@param {NonNegativeInteger} byteOffset - byte offset of the first indexed element
@param {string} order - memory layout (either row-major or column-major)
@param {Options} [options] - function options
@param {boolean} [options.readonly=false] - boolean indicating whether to return a read-only ndarray
@param {string} [options.mode='throw'] - specifies how to handle indices which exceed ndarray dimensions
@throws {TypeError} data type must be compatible with the provided ArrayBuffer
@returns {ndarray} one-dimensional ndarray

@example
var numel = require( '@stdlib/ndarray/numel' );
var ArrayBuffer = require( '@stdlib/array/buffer' );

var buf = new ArrayBuffer( 32 );
var v = arraybuffer2vector( 'float64', buf, 4, 1, 0, 'row-major' );
// returns <ndarray>

var len = numel( v );
// returns 4

@example
var numel = require( '@stdlib/ndarray/numel' );
var ArrayBuffer = require( '@stdlib/array/buffer' );

var buf = new ArrayBuffer( 32 );
var v = arraybuffer2vector( 'float32', buf, 8, 1, 0, 'row-major' );
// returns <ndarray>

var len = numel( v );
// returns 8

@example
var numel = require( '@stdlib/ndarray/numel' );
var ArrayBuffer = require( '@stdlib/array/buffer' );

var buf = new ArrayBuffer( 32 );
var v = arraybuffer2vector( 'float64', buf, 4, -1, 32, 'row-major' );
// returns <ndarray>

var len = numel( v );
// returns 4

@example
var numel = require( '@stdlib/ndarray/numel' );
var ArrayBuffer = require( '@stdlib/array/buffer' );

var buf = new ArrayBuffer( 32 );
var v = arraybuffer2vector( 'float64', buf, 2, -1, 24, 'row-major' );
// returns <ndarray>

var len = numel( v );
// returns 2