-
-
Notifications
You must be signed in to change notification settings - Fork 809
/
Copy pathrepl.txt
66 lines (52 loc) · 2.52 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
53
54
55
56
57
58
59
60
61
62
63
64
65
{{alias}}( shape[, options] )
Returns an uninitialized ndarray having a specified shape and data type.
In browser environments, the function always returns zero-filled ndarrays.
If `dtype` is 'generic', the function always returns a zero-filled ndarray.
For returned ndarrays whose underlying memory is *not* initialized, memory
contents are unknown and may contain *sensitive* data.
Parameters
----------
shape: ArrayLikeObject<integer>|integer
Array shape.
options: Object (optional)
Options.
options.dtype: string (optional)
Underlying data type. Default: 'float64'.
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.submode: Array<string> (optional)
Specifies how to handle subscripts which exceed array dimensions. If a
mode for a corresponding dimension is equal to 'throw', an ndarray
instance throws an error when a subscript exceeds array dimensions. If
equal to 'normalize', an ndarray instance normalizes negative
subscripts and throws an error when a subscript exceeds array
dimensions. If equal to 'wrap', an ndarray instance wraps around
subscripts exceeding array dimensions using modulo arithmetic. If equal
to 'clamp', an ndarray instance sets a subscript exceeding array
dimensions to either `0` (minimum index) or the maximum index. If the
number of modes is fewer than the number of dimensions, the function
recycles modes using modulo arithmetic. Default: [ options.mode ].
Returns
-------
out: ndarray
Output array.
Examples
--------
> var arr = {{alias}}( [ 2, 2 ] )
<ndarray>
> var sh = arr.shape
[ 2, 2 ]
> var dt = arr.dtype
'float64'
See Also
--------