-
-
Notifications
You must be signed in to change notification settings - Fork 804
/
Copy pathrepl.txt
46 lines (34 loc) · 1.33 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
{{alias}}( arrays, shape, fcn, clbk[, thisArg] )
Applies a unary function to each element retrieved from a five-dimensional
nested input array according to a callback function and assigns results to
elements in a five-dimensional nested output array.
The callback function is provided the following arguments:
- value: array element.
- indices: current array element indices.
- arrays: input and output arrays.
If the callback function does not return any value (or equivalently,
explicitly returns `undefined`), the value is ignored.
Parameters
----------
arrays: ArrayLikeObject
Array-like object containing one input nested array and one output
nested array.
shape: Array<integer>
Array shape.
fcn: Function
Unary function to apply to callback return values.
clbk: Function
Callback function.
thisArg: any (optional)
Callback execution context.
Examples
--------
> var x = [ [ [ [ [ -1.0, -2.0 ], [ -3.0, -4.0 ] ] ] ] ];
> var y = [ [ [ [ [ 0.0, 0.0 ], [ 0.0, 0.0 ] ] ] ] ];
> var shape = [ 1, 1, 1, 2, 2 ];
> function clbk( v ) { return v * 2.0; };
> {{alias}}( [ x, y ], shape, {{alias:@stdlib/math/base/special/abs}}, clbk );
> y
[ [ [ [ [ 2.0, 4.0 ], [ 6.0, 8.0 ] ] ] ] ]
See Also
--------