-
-
Notifications
You must be signed in to change notification settings - Fork 805
/
Copy pathrepl.txt
63 lines (51 loc) · 2.4 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
{{alias}}( shape[, options] )
Returns a zero-filled ndarray having a specified shape and data type.
Parameters
----------
shape: ArrayLikeObject<integer>|integer
Array shape.
options: Object (optional)
Options.
options.dtype: string (optional)
Underlying data type. Must be a numeric data type or "generic". 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 ].
options.readonly: boolean (optional)
Boolean indicating whether an array should be read-only. Default: false.
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
--------