-
-
Notifications
You must be signed in to change notification settings - Fork 804
/
Copy pathrepl.txt
51 lines (40 loc) · 1.78 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
{{alias}}( x[, options], predicate[, thisArg] )
Returns a shallow copy of an ndarray containing only those elements which
fail a test implemented by a predicate function.
The predicate function is provided the following arguments:
- value: current array element.
- indices: current array element indices.
- arr: the input ndarray.
Parameters
----------
x: ndarray
Input ndarray.
options: Object (optional)
Function options.
options.dtype: string (optional)
Output ndarray data type. Overrides using the input array's inferred
data type.
options.order: string (optional)
Index iteration order. By default, the function iterates over elements
according to the layout order of the provided array. Accordingly, for
row-major input arrays, the last dimension indices increment fastest.
For column-major input arrays, the first dimension indices increment
fastest. To override the inferred order and ensure that indices
increment in a specific manner, regardless of the input array's layout
order, explicitly set the iteration order. Note, however, that iterating
according to an order which does not match that of the input array may,
in some circumstances, result in performance degradation due to cache
misses. Must be either 'row-major' or 'column-major'.
predicate: Function
Predicate function.
thisArg: any (optional)
Predicate function execution context.
Examples
--------
> var x = {{alias:@stdlib/ndarray/array}}( [ [ 1.0, 2.0 ], [ 3.0, 4.0 ] ] );
> function f( v ) { return v <= 2.0; };
> var y = {{alias}}( x, f );
> {{alias:@stdlib/ndarray/to-array}}( y )
[ 3.0, 4.0 ]
See Also
--------