{{alias}}( [dtype][, options] ) Returns a one-dimensional ndarray. Parameters ---------- dtype: string (optional) Underlying data type. Default: 'float64'. options: Object (optional) Options. options.order: string (optional) Specifies whether an array is row-major (C-style) or column-major (Fortran-style). Default: 'row-major'. options.mode: string (optional) Specifies how to handle indices which exceed array dimensions. If equal to 'throw', an ndarray instance throws an error when an index exceeds array dimensions. If equal to 'normalize', an ndarray instance normalizes negative indices and throws an error when an index exceeds array dimensions. If equal to 'wrap', an ndarray instance wraps around indices exceeding array dimensions using modulo arithmetic. If equal to 'clamp', an ndarray instance sets an index exceeding array dimensions to either `0` (minimum index) or the maximum index. Default: 'throw'. options.readonly: boolean (optional) Boolean indicating whether an array should be read-only. Default: false. Returns ------- out: ndarray A one-dimensional ndarray. Examples -------- > var arr = {{alias}}() > var dt = {{alias:@stdlib/ndarray/dtype}}( arr ) 'float64' > arr = {{alias}}( 'float32' ) > dt = {{alias:@stdlib/ndarray/dtype}}( arr ) 'float32' {{alias}}( length[, dtype][, options] ) Returns a one-dimensional ndarray having a specified length. Parameters ---------- length: integer Number of elements. dtype: string (optional) Underlying data type. Default: 'float64'. options: Object (optional) Options. options.order: string (optional) Specifies whether an array is row-major (C-style) or column-major (Fortran-style). Default: 'row-major'. options.mode: string (optional) Specifies how to handle indices which exceed array dimensions. If equal to 'throw', an ndarray instance throws an error when an index exceeds array dimensions. If equal to 'normalize', an ndarray instance normalizes negative indices and throws an error when an index exceeds array dimensions. If equal to 'wrap', an ndarray instance wraps around indices exceeding array dimensions using modulo arithmetic. If equal to 'clamp', an ndarray instance sets an index exceeding array dimensions to either `0` (minimum index) or the maximum index. Default: 'throw'. options.readonly: boolean (optional) Boolean indicating whether an array should be read-only. Default: false. Returns ------- out: ndarray A one-dimensional ndarray. Examples -------- > var arr = {{alias}}( 5 ) > var dt = {{alias:@stdlib/ndarray/dtype}}( arr ) 'float64' > var len = {{alias:@stdlib/ndarray/numel}}( arr ) 5 > arr = {{alias}}( 5, 'float32' ) > dt = {{alias:@stdlib/ndarray/dtype}}( arr ) 'float32' > len = {{alias:@stdlib/ndarray/numel}}( arr ) 5 {{alias}}( obj[, dtype][, options] ) Creates a one-dimensional ndarray from an array-like object or iterable. Parameters ---------- obj: Object Array-like object or iterable from which to generate an ndarray. dtype: string (optional) Underlying data type. Default: 'float64'. options: Object (optional) Options. options.order: string (optional) Specifies whether an array is row-major (C-style) or column-major (Fortran-style). Default: 'row-major'. options.mode: string (optional) Specifies how to handle indices which exceed array dimensions. If equal to 'throw', an ndarray instance throws an error when an index exceeds array dimensions. If equal to 'normalize', an ndarray instance normalizes negative indices and throws an error when an index exceeds array dimensions. If equal to 'wrap', an ndarray instance wraps around indices exceeding array dimensions using modulo arithmetic. If equal to 'clamp', an ndarray instance sets an index exceeding array dimensions to either `0` (minimum index) or the maximum index. Default: 'throw'. options.readonly: boolean (optional) Boolean indicating whether an array should be read-only. Default: false. Returns ------- out: ndarray A one-dimensional ndarray. Examples -------- > var v = [ 0.5, 0.5, 0.5 ]; > var arr = {{alias}}( v, 'float32' ) > var dt = {{alias:@stdlib/ndarray/dtype}}( arr ) 'float32' > var len = {{alias:@stdlib/ndarray/numel}}( arr ) 3 {{alias}}( buffer[, byteOffset[, length]][, dtype][, options] ) Returns a one-dimensional ndarray view of an ArrayBuffer. Parameters ---------- buffer: ArrayBuffer Underlying ArrayBuffer. byteOffset: integer (optional) Integer byte offset specifying the location of the first indexed element. Default: 0. length: integer (optional) View length. If not provided, the view spans from the byteOffset to the end of the underlying ArrayBuffer. dtype: string (optional) Underlying data type. Default: 'float64'. options: Object (optional) Options. options.order: string (optional) Specifies whether an array is row-major (C-style) or column-major (Fortran-style). Default: 'row-major'. options.mode: string (optional) Specifies how to handle indices which exceed array dimensions. If equal to 'throw', an ndarray instance throws an error when an index exceeds array dimensions. If equal to 'normalize', an ndarray instance normalizes negative indices and throws an error when an index exceeds array dimensions. If equal to 'wrap', an ndarray instance wraps around indices exceeding array dimensions using modulo arithmetic. If equal to 'clamp', an ndarray instance sets an index exceeding array dimensions to either `0` (minimum index) or the maximum index. Default: 'throw'. options.readonly: boolean (optional) Boolean indicating whether an array should be read-only. Default: false. Returns ------- out: ndarray A one-dimensional ndarray. Examples -------- > var buf = new {{alias:@stdlib/array/buffer}}( 32 ); > var arr = {{alias}}( buf, 0, 4, 'float32' ) > var dt = {{alias:@stdlib/ndarray/dtype}}( arr ) 'float32' > var len = {{alias:@stdlib/ndarray/numel}}( arr ) 4 {{alias}}.factory( dtype[, options] ) Returns a function for creating a one-dimensional ndarray. Parameters ---------- dtype: string Underlying data type. options: Object (optional) Options. options.order: string (optional) Specifies whether the default memory layout should be row-major (C- style) or column-major (Fortran-style). Default: 'row-major'. options.mode: string (optional) Specifies the default behavior when handling indices which exceed array dimensions. If equal to 'throw', an ndarray instance throws an error when an index exceeds array dimensions. If equal to 'normalize', an ndarray instance normalizes negative indices and throws an error when an index exceeds array dimensions. If equal to 'wrap', an ndarray instance wraps around indices exceeding array dimensions using modulo arithmetic. If equal to 'clamp', an ndarray instance sets an index exceeding array dimensions to either `0` (minimum index) or the maximum index. Default: 'throw'. options.readonly: boolean (optional) Boolean indicating whether an array should be read-only by default. Default: false. Returns ------- fcn: Function Function for creating a one-dimensional ndarray. Examples -------- > var f = {{alias}}.factory( 'float32' ); > var arr = f() > var dt = {{alias:@stdlib/ndarray/dtype}}( arr ) 'float32' See Also --------