-
-
Notifications
You must be signed in to change notification settings - Fork 804
/
Copy pathrepl.txt
88 lines (70 loc) · 2.3 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
83
84
85
86
87
{{alias}}( x[, options] )
Computes the maximum value along one or more ndarray dimensions.
Parameters
----------
x: ndarray
Input array. Must have a real-valued or "generic" data type.
options: Object (optional)
Function options.
options.dtype: string (optional)
Output array data type. Must be a real-valued or "generic" data type.
options.dims: Array<integer> (optional)
List of dimensions over which to perform a reduction. If not provided,
the function performs a reduction over all elements in a provided input
ndarray.
options.keepdims: boolean (optional)
Boolean indicating whether the reduced dimensions should be included in
the returned ndarray as singleton dimensions. Default: false.
Returns
-------
out: ndarray
Output array.
Examples
--------
> var buf = [ -1.0, 2.0, -3.0, -4.0 ];
> var dt = 'generic';
> var sh = [ buf.length ];
> var sx = [ 1 ];
> var ox = 0;
> var ord = 'row-major';
> var x = new {{alias:@stdlib/ndarray/ctor}}( dt, buf, sh, sx, ox, ord );
> var y = {{alias}}( x );
> var v = y.get()
2.0
{{alias}}.assign( x, out[, options] )
Computes the maximum value along one or more ndarray dimensions and assigns
results to a provided output ndarray.
Parameters
----------
x: ndarray
Input array. Must have a real-valued or generic data type.
out: ndarray
Output array.
options: Object (optional)
Function options.
options.dims: Array<integer> (optional)
List of dimensions over which to perform a reduction. If not provided,
the function performs a reduction over all elements in a provided input
ndarray.
Returns
-------
out: ndarray
Output array.
Examples
--------
> var buf = [ -1.0, 2.0, -3.0, -4.0 ];
> var dt = 'generic';
> var sh = [ buf.length ];
> var sx = [ 1 ];
> var ox = 0;
> var ord = 'row-major';
> var x = new {{alias:@stdlib/ndarray/ctor}}( dt, buf, sh, sx, ox, ord );
> var out = {{alias:@stdlib/ndarray/zeros}}( [], { 'dtype': dt } );
> var y = {{alias}}.assign( x, out )
<ndarray>
> var bool = ( out === y )
true
> var v = out.get()
2.0
See Also
--------