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
74 lines (56 loc) · 1.95 KB
/
repl.txt
File metadata and controls
74 lines (56 loc) · 1.95 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
{{alias}}( x[, options] )
Computes the arithmetic mean 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 floating-point 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 x = {{alias:@stdlib/ndarray/array}}( [ -1.0, 2.0, -3.0, -4.0 ] );
> var y = {{alias}}( x )
<ndarray>[ -1.5 ]
{{alias}}.assign( x, out[, options] )
Computes the arithmetic mean 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 x = {{alias:@stdlib/ndarray/array}}( [ -1.0, 2.0, -3.0, -4.0 ] );
> var out = {{alias:@stdlib/ndarray/zeros}}( [] );
> var y = {{alias}}.assign( x, out )
<ndarray>[ -1.5 ]
> var bool = ( out === y )
true
See Also
--------