function vector() {
	var nargs;
	var arg0;
	var arg1;
	var arg2;
	var arg3;
	var arg4;
	var buf;
	var out;

	nargs = arguments.length;

	// Case: vector()
	if ( nargs === 0 ) {
		buf = buffer( DEFAULT_DTYPE, 0 );
		return new ndarray( DEFAULT_DTYPE, buf, [ buf.length ], [ 1 ], 0, DEFAULT_ORDER );
	}
	arg0 = arguments[ 0 ];

	// Case: vector( arg0 );
	if ( nargs === 1 ) {
		if ( isDataType( arg0 ) ) {
			return vectorWithDType( 0, arg0, null );
		}
		out = vectorWithDType( arg0, DEFAULT_DTYPE, null );
		if ( out === null ) {
			throw new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, iterable, data type, or options object. Value: `%s`.', arg0 ) );
		}
		return out;
	}
	arg1 = arguments[ 1 ];

	// Case: vector( arg0, arg1 )
	if ( nargs === 2 ) {
		// Case: vector( dtype, options )
		if ( isDataType( arg0 ) ) {
			if ( arg1 === null ) {
				throw new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', arg1 ) );
			}
			return vectorWithDType( 0, arg0, arg1 );
		}
		// Case: vector( arg0, dtype )
		if ( isDataType( arg1 ) ) {
			out = vectorWithDType( arg0, arg1, null );
			if ( out === null ) {
				throw new TypeError( format( 'invalid argument. First argument must be a length, ArrayBuffer, typed array, array-like object, or iterable. Value: `%s`.', arg0 ) );
			}
			return out;
		}
		// Case: vector( ArrayBuffer, byteOffset )
		if ( isNonNegativeInteger( arg1 ) ) {
			if ( !isArrayBuffer( arg0 ) ) {
				throw new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', arg0 ) );
			}
			return arraybuffer2vector( DEFAULT_DTYPE, arg0, (arg0.byteLength-arg1)/bytesPerElement( DEFAULT_DTYPE ), 1, arg1, DEFAULT_ORDER );
		}
		// Case: vector( arg0, options )
		if ( arg1 === null ) {
			throw new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', arg1 ) );
		}
		out = vectorWithDType( arg0, DEFAULT_DTYPE, arg1 );
		if ( out === null ) {
			throw new TypeError( format( 'invalid argument. First argument must be a length, ArrayBuffer, typed array, array-like object, or iterable. Value: `%s`.', arg0 ) );
		}
		return out;
	}
	arg2 = arguments[ 2 ];

	// Case: vector( arg0, arg1, arg2 )
	if ( nargs === 3 ) {
		// Case: vector( ArrayBuffer, byteOffset, dtype )
		if ( isDataType( arg2 ) ) {
			if ( !isArrayBuffer( arg0 ) ) {
				throw new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', arg0 ) );
			}
			if ( !isNonNegativeInteger( arg1 ) ) {
				throw new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', arg1 ) );
			}
			return arraybuffer2vector( arg2, arg0, (arg0.byteLength-arg1)/bytesPerElement( arg2 ), 1, arg1, DEFAULT_ORDER );
		}
		// Case: vector( arg0, dtype, options )
		if ( isDataType( arg1 ) ) {
			if ( arg2 === null ) {
				throw new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', arg2 ) );
			}
			out = vectorWithDType( arg0, arg1, arg2 );
			if ( out === null ) {
				throw new TypeError( format( 'invalid argument. First argument must be a length, ArrayBuffer, typed array, array-like object, or iterable. Value: `%s`.', arg0 ) );
			}
			return out;
		}
		// Case: vector( ArrayBuffer, byteOffset, arg2 )
		if ( !isArrayBuffer( arg0 ) ) {
			throw new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', arg0 ) );
		}
		if ( !isNonNegativeInteger( arg1 ) ) {
			throw new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', arg1 ) );
		}
		// Case: vector( ArrayBuffer, byteOffset, length )
		if ( isNonNegativeInteger( arg2 ) ) {
			return arraybuffer2vector( DEFAULT_DTYPE, arg0, arg2, 1, arg1, DEFAULT_ORDER );
		}
		// Case: vector( ArrayBuffer, byteOffset, options )
		if ( arg2 === null ) {
			throw new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', arg2 ) );
		}
		return arraybuffer2vector( DEFAULT_DTYPE, arg0, (arg0.byteLength-arg1)/bytesPerElement( DEFAULT_DTYPE ), 1, arg1, resolveOrder( arg2 ), arg2 );
	}
	arg3 = arguments[ 3 ];

	// Case: vector( ArrayBuffer, byteOffset, arg2, arg3 )
	if ( nargs === 4 ) {
		if ( !isArrayBuffer( arg0 ) ) {
			throw new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', arg0 ) );
		}
		if ( !isNonNegativeInteger( arg1 ) ) {
			throw new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', arg1 ) );
		}
		// Case: vector( ArrayBuffer, byteOffset, length, dtype )
		if ( isNonNegativeInteger( arg2 ) ) {
			if ( isDataType( arg3 ) ) {
				return arraybuffer2vector( arg3, arg0, arg2, 1, arg1, DEFAULT_ORDER );
			}
			// Case: vector( ArrayBuffer, byteOffset, length, options )
			if ( !isPlainObject( arg3 ) ) {
				throw new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', arg3 ) );
			}
			return arraybuffer2vector( DEFAULT_DTYPE, arg0, arg2, 1, arg1, resolveOrder( arg3 ), arg3 );
		}
		// Case: vector( ArrayBuffer, byteOffset, dtype, options )
		if ( !isDataType( arg2 ) ) {
			throw new TypeError( format( 'invalid argument. Third argument must be a recognized/supported data type. Value: `%s`.', arg2 ) );
		}
		if ( !isPlainObject( arg3 ) ) {
			throw new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', arg3 ) );
		}
		return arraybuffer2vector( arg2, arg0, (arg0.byteLength-arg1)/bytesPerElement( arg2 ), 1, arg1, resolveOrder( arg3 ), arg3 );
	}
	arg4 = arguments[ 4 ];

	// Case: vector( ArrayBuffer, byteOffset, length, dtype, options )
	if ( !isArrayBuffer( arg0 ) ) {
		throw new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', arg0 ) );
	}
	if ( !isNonNegativeInteger( arg1 ) ) {
		throw new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', arg1 ) );
	}
	if ( !isNonNegativeInteger( arg2 ) ) {
		throw new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', arg2 ) );
	}
	if ( !isDataType( arg3 ) ) {
		throw new TypeError( format( 'invalid argument. Fourth argument must be a recognized/supported data type. Value: `%s`.', arg3 ) );
	}
	if ( !isPlainObject( arg4 ) ) {
		throw new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', arg4 ) );
	}
	return arraybuffer2vector( arg3, arg0, arg2, 1, arg1, resolveOrder( arg4 ), arg4 );
}
Creates a vector (i.e., a one-dimensional ndarray).

## Notes

-   This API is intended to match the conventions of `@stdlib/array/typed`, which has a similar signature.

@param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or iterable
@param {NonNegativeInteger} [byteOffset=0] - byte offset
@param {NonNegativeInteger} [length] - view length
@param {string} [dtype='float64'] - data type
@param {Options} [options] - function options
@param {boolean} [options.readonly=false] - boolean indicating whether to return a read-only vector
@param {string} [options.mode='throw'] - specifies how to handle indices which exceed vector dimensions
@param {string} [options.order='row-major'] - memory layout (either row-major or column-major)
@throws {TypeError} first argument must be either a length, typed array, array-like object, buffer, iterable, data type, or options object
@throws {TypeError} must provide valid options
@returns {ndarray} one-dimensional ndarray

@example
var getDType = require( '@stdlib/ndarray/dtype' );
var numel = require( '@stdlib/ndarray/numel' );

var arr = vector();
// returns <ndarray>

var len = numel( arr );
// returns 0

var dt = getDType( arr );
// returns 'float64'

@example
var getDType = require( '@stdlib/ndarray/dtype' );
var numel = require( '@stdlib/ndarray/numel' );

var arr = vector( 2 );
// returns <ndarray>

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

var dt = getDType( arr );
// returns 'float64'

@example
var getDType = require( '@stdlib/ndarray/dtype' );
var numel = require( '@stdlib/ndarray/numel' );

var arr = vector( [ 1.0, 2.0 ] );
// returns <ndarray>

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

var dt = getDType( arr );
// returns 'float64'

@example
var getDType = require( '@stdlib/ndarray/dtype' );
var numel = require( '@stdlib/ndarray/numel' );

var arr = vector( [ 1.0, 2.0 ], 'float32' );
// returns <ndarray>

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

var dt = getDType( arr );
// returns 'float32'

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

var buf = new ArrayBuffer( 32 );
var arr = vector( buf );
// returns <ndarray>

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

var dt = getDType( arr );
// returns 'float64'

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

var buf = new ArrayBuffer( 32 );
var arr = vector( buf, 16 );
// returns <ndarray>

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

var dt = getDType( arr );
// returns 'float64'

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

var buf = new ArrayBuffer( 64 );
var arr = vector( buf, 16, 2 );
// returns <ndarray>

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

var dt = getDType( arr );
// returns 'float64'