forked from stdlib-js/stdlib
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrepl.txt
More file actions
49 lines (37 loc) · 1.23 KB
/
repl.txt
File metadata and controls
49 lines (37 loc) · 1.23 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
{{alias}}( arrays, clbk[, thisArg] )
Computes the minimum value of a one-dimensional ndarray via a callback
function, ignoring NaN values.
If provided an empty ndarray, the function returns `NaN`.
The callback function is provided three arguments:
- value: current array element.
- index: current array index.
- array: the input ndarray.
The callback function should return a numeric value.
If the callback function does not return any value (or equivalently,
explicitly returns `undefined`), the value is ignored.
Parameters
----------
arrays: ArrayLikeObject<ndarray>
Array-like object containing a one-dimensional input ndarray.
clbk: Function
Callback function.
thisArg: any (optional)
Callback execution context.
Returns
-------
out: number
Minimum value.
Examples
--------
> var xbuf = [ 1.0, -2.0, NaN, 2.0 ];
> var dt = 'generic';
> var sh = [ xbuf.length ];
> var sx = [ 1 ];
> var ox = 0;
> var ord = 'row-major';
> var x = new {{alias:@stdlib/ndarray/ctor}}( dt, xbuf, sh, sx, ox, ord );
> function f ( v ) { return v * 2.0; };
> {{alias}}( [ x ], f )
-4.0
See Also
--------