-
-
Notifications
You must be signed in to change notification settings - Fork 813
/
Copy pathrepl.txt
83 lines (61 loc) · 2.03 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
{{alias}}( x )
Converts an ndarray-like to an object likely to have the same "shape".
The returned object has the following properties:
- ref: reference to the original ndarray-like object.
- dtype: underlying data type.
- data: data buffer.
- length: number of elements.
- shape: array dimensions.
- strides: array strides.
- offset: index offset.
- order: order.
- accessorProtocol: boolean indicating whether the data buffer uses
accessors for getting and setting elements.
- accessors: a two-element array whose first element is an accessor for
retrieving an ndarray element and whose second element is an accessor for
setting an ndarray element.
The getter accessor accepts two arguments:
- data: data buffer.
- idx: element index.
The setter accessor accepts three arguments:
- data: data buffer.
- idx: element index.
- value: value to set.
Parameters
----------
x: ndarray
Input ndarray.
Returns
-------
out: Object
Object containing ndarray meta data.
out.ref: ndarray
Reference to input array.
out.dtype: string
Underlying data type.
out.data: ArrayLikeObject
Data buffer.
out.length: integer
Number of elements.
out.shape: ArrayLikeObject<integer>
Array dimensions.
out.strides: ArrayLikeObject<integer>
Array strides.
out.offset: integer
Index offset.
out.order: string
Layout order.
out.accessorProtocol: boolean
Boolean indicating whether the input array use accessors for getting and
setting elements.
out.accessors: Array<Function>
A two-element array whose first element is an accessor for retrieving an
ndarray element and whose second element is an accessor for setting an
ndarray element.
Examples
--------
> var arr = {{alias:@stdlib/ndarray/array}}( [ [ 1, 2 ], [ 3, 4 ] ] );
> var out = {{alias}}( arr )
{...}
See Also
--------