You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Returns the indices of the maximum values along a specified axis. When the maximum value occurs multiple times, only the indices corresponding to the first occurrence are returned.
19
19
@@ -31,17 +31,13 @@ Returns the indices of the maximum values along a specified axis. When the maxim
31
31
32
32
- If `True`, the reduced axes (dimensions) must be included in the result as singleton dimensions, and, accordingly, the result must be compatible with the input array (see :ref:`broadcasting`). Otherwise, if `False`, the reduced axes (dimensions) must not be included in the result. Default: `False`.
33
33
34
-
-**out**: _Optional\[<array>]_
35
-
36
-
- output array. If provided, the output array must have the expected output shape. If not provided or is `None`, an uninitialized return array must be created and then filled with the result of each computation. Default: `None`.
37
-
38
34
#### Returns
39
35
40
36
-**out**: _<array>_
41
37
42
38
- if `axis` is `None`, a zero-dimensional array containing the index of the first occurrence of the maximum value; otherwise, a non-zero-dimensional array containing the indices of the maximum values.
Returns the indices of the minimum values along a specified axis. When the minimum value occurs multiple times, only the indices corresponding to the first occurrence are returned.
47
43
@@ -59,10 +55,6 @@ Returns the indices of the minimum values along a specified axis. When the minim
59
55
60
56
- If `True`, the reduced axes (dimensions) must be included in the result as singleton dimensions, and, accordingly, the result must be compatible with the input array (see :ref:`broadcasting`). Otherwise, if `False`, the reduced axes (dimensions) must not be included in the result. Default: `False`.
61
57
62
-
-**out**: _Optional\[<array>]_
63
-
64
-
- output array. If provided, the output array must have the expected output shape. If not provided or is `None`, an uninitialized return array must be created and then filled with the result of each computation. Default: `None`.
Copy file name to clipboardExpand all lines: spec/API_specification/statistical_functions.md
+7-36
Original file line number
Diff line number
Diff line change
@@ -6,15 +6,14 @@ A conforming implementation of the array API standard must provide and support t
6
6
7
7
- Positional parameters must be [positional-only](https://www.python.org/dev/peps/pep-0570/) parameters. Positional-only parameters have no externally-usable name. When a function accepting positional-only parameters is called, positional arguments are mapped to these parameters based solely on their order.
8
8
- Optional parameters must be [keyword-only](https://www.python.org/dev/peps/pep-3102/) arguments.
9
-
- The `out` keyword argument must follow the conventions defined in :ref:`out-keyword`.
10
9
- Broadcasting semantics must follow the semantics defined in :ref:`broadcasting`.
11
10
- Unless stated otherwise, functions must support the data types defined in :ref:`data-types`.
12
11
- Unless stated otherwise, functions must adhere to the type promotion rules defined in :ref:`type-promotion`.
13
12
- Unless stated otherwise, floating-point operations must adhere to IEEE 754-2019.
14
13
15
14
<!-- NOTE: please keep the functions in alphabetical order -->
Calculates the maximum value of the input array `x`.
20
19
@@ -32,17 +31,13 @@ Calculates the maximum value of the input array `x`.
32
31
33
32
- If `True`, the reduced axes (dimensions) must be included in the result as singleton dimensions, and, accordingly, the result must be compatible with the input array (see :ref:`broadcasting`). Otherwise, if `False`, the reduced axes (dimensions) must not be included in the result. Default: `False`.
34
33
35
-
-**out**: _Optional\[<array>]_
36
-
37
-
- output array. If provided, the output array must have the expected output shape. If not provided or is `None`, an uninitialized return array must be created and then filled with the result of each computation. Default: `None`.
38
-
39
34
#### Returns
40
35
41
36
-**out**: _<array>_
42
37
43
38
- if the maximum value was computed over the entire array, a zero-dimensional array containing the maximum value; otherwise, a non-zero-dimensional array containing the maximum values.
Calculates the arithmetic mean of the input array `x`.
48
43
@@ -60,17 +55,13 @@ Calculates the arithmetic mean of the input array `x`.
60
55
61
56
- If `True`, the reduced axes (dimensions) must be included in the result as singleton dimensions, and, accordingly, the result must be compatible with the input array (see :ref:`broadcasting`). Otherwise, if `False`, the reduced axes (dimensions) must not be included in the result. Default: `False`.
62
57
63
-
-**out**: _Optional\[<array>]_
64
-
65
-
- output array. If provided, the output array must have the expected output shape. If not provided or is `None`, an uninitialized return array must be created and then filled with the result of each computation. Default: `None`.
66
-
67
58
#### Returns
68
59
69
60
-**out**: _<array>_
70
61
71
62
- if the arithmetic mean was computed over the entire array, a zero-dimensional array containing the arithmetic mean; otherwise, a non-zero-dimensional array containing the arithmetic means.
Calculates the minimum value of the input array `x`.
76
67
@@ -88,17 +79,13 @@ Calculates the minimum value of the input array `x`.
88
79
89
80
- If `True`, the reduced axes (dimensions) must be included in the result as singleton dimensions, and, accordingly, the result must be compatible with the input array (see :ref:`broadcasting`). Otherwise, if `False`, the reduced axes (dimensions) must not be included in the result. Default: `False`.
90
81
91
-
-**out**: _Optional\[<array>]_
92
-
93
-
- output array. If provided, the output array must have the expected output shape. If not provided or is `None`, an uninitialized return array must be created and then filled with the result of each computation. Default: `None`.
94
-
95
82
#### Returns
96
83
97
84
-**out**: _<array>_
98
85
99
86
- if the minimum value was computed over the entire array, a zero-dimensional array containing the minimum value; otherwise, a non-zero-dimensional array containing the minimum values.
Calculates the product of input array `x` elements.
104
91
@@ -116,17 +103,13 @@ Calculates the product of input array `x` elements.
116
103
117
104
- If `True`, the reduced axes (dimensions) must be included in the result as singleton dimensions, and, accordingly, the result must be compatible with the input array (see :ref:`broadcasting`). Otherwise, if `False`, the reduced axes (dimensions) must not be included in the result. Default: `False`.
118
105
119
-
-**out**: _Optional\[<array>]_
120
-
121
-
- output array. If provided, the output array must have the expected output shape. If not provided or is `None`, an uninitialized return array must be created and then filled with the result of each computation. Default: `None`.
122
-
123
106
#### Returns
124
107
125
108
-**out**: _<array>_
126
109
127
110
- if the product was computed over the entire array, a zero-dimensional array containing the product; otherwise, a non-zero-dimensional array containing the products.
Calculates the standard deviation of the input array `x`.
132
115
@@ -148,17 +131,13 @@ Calculates the standard deviation of the input array `x`.
148
131
149
132
- If `True`, the reduced axes (dimensions) must be included in the result as singleton dimensions, and, accordingly, the result must be compatible with the input array (see :ref:`broadcasting`). Otherwise, if `False`, the reduced axes (dimensions) must not be included in the result. Default: `False`.
150
133
151
-
-**out**: _Optional\[<array>]_
152
-
153
-
- output array. If provided, the output array must have the expected output shape. If not provided or is `None`, an uninitialized return array must be created and then filled with the result of each computation. Default: `None`.
154
-
155
134
#### Returns
156
135
157
136
-**out**: _<array>_
158
137
159
138
- if the standard deviation was computed over the entire array, a zero-dimensional array containing the standard deviation; otherwise, a non-zero-dimensional array containing the standard deviations.
@@ -176,17 +155,13 @@ Calculates the sum of the input array `x`.
176
155
177
156
- If `True`, the reduced axes (dimensions) must be included in the result as singleton dimensions, and, accordingly, the result must be compatible with the input array (see :ref:`broadcasting`). Otherwise, if `False`, the reduced axes (dimensions) must not be included in the result. Default: `False`.
178
157
179
-
-**out**: _Optional\[<array>]_
180
-
181
-
- output array. If provided, the output array must have the expected output shape. If not provided or is `None`, an uninitialized return array must be created and then filled with the result of each computation. Default: `None`.
182
-
183
158
#### Returns
184
159
185
160
-**out**: _<array>_
186
161
187
162
- if the sum was computed over the entire array, a zero-dimensional array containing the sum; otherwise, an array containing the sums.
@@ -208,10 +183,6 @@ Calculates the variance of the input array `x`.
208
183
209
184
- If `True`, the reduced axes (dimensions) must be included in the result as singleton dimensions, and, accordingly, the result must be compatible with the input array (see :ref:`broadcasting`). Otherwise, if `False`, the reduced axes (dimensions) must not be included in the result. Default: `False`.
210
185
211
-
-**out**: _Optional\[<array>]_
212
-
213
-
- output array. If provided, the output array must have the expected output shape. If not provided or is `None`, an uninitialized return array must be created and then filled with the result of each computation. Default: `None`.
0 commit comments