function nans( length ) {
	var dtype;
	var value;

	if ( arguments.length > 1 ) {
		dtype = arguments[ 1 ];
		if ( !isValidDType( dtype ) ) {
			throw new TypeError( format( 'invalid argument. Second argument must be one of the following: "%s". Value: `%s`.', DTYPES.join( '", "' ), dtype ) );
		}
	} else {
		dtype = DEFAULT_DTYPE;
	}
	if ( dtype === 'complex128' ) {
		value = Z128;
	} else if ( dtype === 'complex64' ) {
		value = Z64;
	} else {
		value = NaN;
	}
	return full( length, value, dtype );
}
Creates an array filled with NaNs and having a specified length.

@param {NonNegativeInteger} length - array length
@param {string} [dtype="float64"] - data type
@throws {TypeError} first argument must be a nonnegative integer
@throws {TypeError} second argument must be a supported data type
@returns {(TypedArray|Array|ComplexArray)} array or typed array

@example
var arr = nans( 2 );
// returns <Float64Array>[ NaN, NaN ]

@example
var arr = nans( 2, 'float32' );
// returns <Float32Array>[ NaN, NaN ]