-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrepl.txt
More file actions
80 lines (59 loc) · 1.8 KB
/
repl.txt
File metadata and controls
80 lines (59 loc) · 1.8 KB
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
{{alias}}( x, fcn[, thisArg] )
Applies a callback function to elements in an input array and assigns
results to elements in a new output array.
The callback function is provided the following arguments:
- value: current array element.
- index: current array element index.
- arr: the input array.
If provided an array-like object having a `map` method, the function defers
execution to that method and assumes that the method has the following
signature:
x.map( fcn, thisArg )
Parameters
----------
x: Array|TypedArray|Object
Input array.
fcn: Function
Callback function.
thisArg: any (optional)
Callback execution context.
Returns
-------
out: Array|TypedArray|Object
Output array.
Examples
--------
> var x = [ -1, -2, -3, -4 ];
> var y = {{alias}}( x, {{alias:@stdlib/math/base/special/abs}} )
[ 1, 2, 3, 4 ]
{{alias}}.assign( x, y, stride, offset, fcn[, thisArg] )
Applies a callback function to elements in an input array and assigns
results to elements in an output array.
Parameters
----------
x: Array|TypedArray|Object
Input array.
y: Array|TypedArray|Object
Output array.
stride: integer
Stride length for output array.
offset: integer
Starting index for output array.
fcn: Function
Callback function.
thisArg: any (optional)
Callback execution context.
Returns
-------
out: Array|TypedArray|Object
Output array.
Examples
--------
> var x = [ -1, -2, -3, -4 ];
> var y = [ 0, 0, 0, 0 ];
> var out = {{alias}}.assign( x, y, 1, 0, {{alias:@stdlib/math/base/special/abs}} )
[ 1, 2, 3, 4 ]
> var bool = ( out === y )
true
See Also
--------