time-to-botec/squiggle/node_modules/@stdlib/ndarray/base/buffer/docs/repl.txt

42 lines
1.0 KiB
Plaintext
Raw Normal View History

{{alias}}( dtype, size )
Returns a zero-filled contiguous linear ndarray data buffer.
The function supports the following data types:
- binary: binary.
- complex64: single-precision complex floating-point numbers.
- complex128: double-precision complex floating-point numbers.
- float32: single-precision floating-point numbers.
- float64: double-precision floating-point numbers.
- generic: values of any type.
- int16: signed 16-bit integers.
- int32: signed 32-bit integers.
- int8: signed 8-bit integers.
- uint16: unsigned 16-bit integers.
- uint32: unsigned 32-bit integers.
- uint8: unsigned 8-bit integers.
- uint8c: unsigned clamped 8-bit integers.
Parameters
----------
dtype: string
Data type.
size: integer
Buffer size.
Returns
-------
out: Array|TypedArray|Buffer
Contiguous ndarray data buffer.
Examples
--------
> var buf = {{alias}}( 'float64', 3 )
<Float64Array>[ 0.0, 0.0, 0.0 ]
See Also
--------