-
-
Notifications
You must be signed in to change notification settings - Fork 804
/
Copy pathrepl.txt
53 lines (41 loc) · 1.61 KB
/
repl.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{{alias}}( x[, dtype] )
Creates an uninitialized array having the same length and data type as a
provided input array.
In browser environments, the function always returns zero-filled arrays.
If `dtype` is 'generic', the function always returns a zero-filled array.
In Node.js versions >=3.0.0, the underlying memory of returned typed arrays
is *not* initialized. Memory contents are unknown and may contain
*sensitive* data.
The function supports the following data types:
- float64: double-precision floating-point numbers (IEEE 754)
- float32: single-precision floating-point numbers (IEEE 754)
- complex128: double-precision complex floating-point numbers
- complex64: single-precision complex floating-point numbers
- int32: 32-bit two's complement signed integers
- uint32: 32-bit unsigned integers
- int16: 16-bit two's complement signed integers
- uint16: 16-bit unsigned integers
- int8: 8-bit two's complement signed integers
- uint8: 8-bit unsigned integers
- uint8c: 8-bit unsigned integers clamped to 0-255
- generic: generic JavaScript values
Parameters
----------
x: TypedArray|Array
Input array.
dtype: string (optional)
Data type. If not provided, the output array data type is inferred from
the input array.
Returns
-------
out: TypedArray|Array
Output array.
Examples
--------
> var x = new {{alias:@stdlib/array/float64}}( 2 );
> var arr = {{alias}}( x )
<Float64Array>
> arr = {{alias}}( x, 'float32' )
<Float32Array>
See Also
--------