Skip to content

Commit 2d34b1d

Browse files
authored
Remove out keyword support (#44)
1 parent 07711a0 commit 2d34b1d

File tree

2 files changed

+9
-46
lines changed

2 files changed

+9
-46
lines changed

spec/API_specification/searching_functions.md

+2-10
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ A conforming implementation of the array API standard must provide and support t
1313

1414
<!-- NOTE: please keep the functions in alphabetical order -->
1515

16-
### <a name="argmax" href="#argmax">#</a> argmax(x, /, *, axis=None, keepdims=False, out=None)
16+
### <a name="argmax" href="#argmax">#</a> argmax(x, /, *, axis=None, keepdims=False)
1717

1818
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.
1919

@@ -31,17 +31,13 @@ Returns the indices of the maximum values along a specified axis. When the maxim
3131

3232
- 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`.
3333

34-
- **out**: _Optional\[ &lt;array&gt; ]_
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-
3834
#### Returns
3935

4036
- **out**: _&lt;array&gt;_
4137

4238
- 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.
4339

44-
### <a name="argmin" href="#argmin">#</a> argmin(x, /, *, axis=None, keepdims=False, out=None)
40+
### <a name="argmin" href="#argmin">#</a> argmin(x, /, *, axis=None, keepdims=False)
4541

4642
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.
4743

@@ -59,10 +55,6 @@ Returns the indices of the minimum values along a specified axis. When the minim
5955

6056
- 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`.
6157

62-
- **out**: _Optional\[ &lt;array&gt; ]_
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`.
65-
6658
#### Returns
6759

6860
- **out**: _&lt;array&gt;_

spec/API_specification/statistical_functions.md

+7-36
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@ A conforming implementation of the array API standard must provide and support t
66

77
- 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.
88
- 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`.
109
- Broadcasting semantics must follow the semantics defined in :ref:`broadcasting`.
1110
- Unless stated otherwise, functions must support the data types defined in :ref:`data-types`.
1211
- Unless stated otherwise, functions must adhere to the type promotion rules defined in :ref:`type-promotion`.
1312
- Unless stated otherwise, floating-point operations must adhere to IEEE 754-2019.
1413

1514
<!-- NOTE: please keep the functions in alphabetical order -->
1615

17-
### <a name="max" href="#max">#</a> max(x, /, *, axis=None, keepdims=False, out=None)
16+
### <a name="max" href="#max">#</a> max(x, /, *, axis=None, keepdims=False)
1817

1918
Calculates the maximum value of the input array `x`.
2019

@@ -32,17 +31,13 @@ Calculates the maximum value of the input array `x`.
3231

3332
- 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`.
3433

35-
- **out**: _Optional\[ &lt;array&gt; ]_
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-
3934
#### Returns
4035

4136
- **out**: _&lt;array&gt;_
4237

4338
- 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.
4439

45-
### <a name="mean" href="#mean">#</a> mean(x, /, *, axis=None, keepdims=False, out=None)
40+
### <a name="mean" href="#mean">#</a> mean(x, /, *, axis=None, keepdims=False)
4641

4742
Calculates the arithmetic mean of the input array `x`.
4843

@@ -60,17 +55,13 @@ Calculates the arithmetic mean of the input array `x`.
6055

6156
- 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`.
6257

63-
- **out**: _Optional\[ &lt;array&gt; ]_
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-
6758
#### Returns
6859

6960
- **out**: _&lt;array&gt;_
7061

7162
- 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.
7263

73-
### <a name="min" href="#min">#</a> min(x, /, *, axis=None, keepdims=False, out=None)
64+
### <a name="min" href="#min">#</a> min(x, /, *, axis=None, keepdims=False)
7465

7566
Calculates the minimum value of the input array `x`.
7667

@@ -88,17 +79,13 @@ Calculates the minimum value of the input array `x`.
8879

8980
- 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`.
9081

91-
- **out**: _Optional\[ &lt;array&gt; ]_
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-
9582
#### Returns
9683

9784
- **out**: _&lt;array&gt;_
9885

9986
- 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.
10087

101-
### <a name="prod" href="#prod">#</a> prod(x, /, *, axis=None, keepdims=False, out=None)
88+
### <a name="prod" href="#prod">#</a> prod(x, /, *, axis=None, keepdims=False)
10289

10390
Calculates the product of input array `x` elements.
10491

@@ -116,17 +103,13 @@ Calculates the product of input array `x` elements.
116103

117104
- 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`.
118105

119-
- **out**: _Optional\[ &lt;array&gt; ]_
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-
123106
#### Returns
124107

125108
- **out**: _&lt;array&gt;_
126109

127110
- 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.
128111

129-
### <a name="std" href="#std">#</a> std(x, /, *, axis=None, correction=0.0, keepdims=False, out=None)
112+
### <a name="std" href="#std">#</a> std(x, /, *, axis=None, correction=0.0, keepdims=False)
130113

131114
Calculates the standard deviation of the input array `x`.
132115

@@ -148,17 +131,13 @@ Calculates the standard deviation of the input array `x`.
148131

149132
- 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`.
150133

151-
- **out**: _Optional\[ &lt;array&gt; ]_
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-
155134
#### Returns
156135

157136
- **out**: _&lt;array&gt;_
158137

159138
- 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.
160139

161-
### <a name="sum" href="#sum">#</a> sum(x, /, *, axis=None, keepdims=False, out=None)
140+
### <a name="sum" href="#sum">#</a> sum(x, /, *, axis=None, keepdims=False)
162141

163142
Calculates the sum of the input array `x`.
164143

@@ -176,17 +155,13 @@ Calculates the sum of the input array `x`.
176155

177156
- 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`.
178157

179-
- **out**: _Optional\[ &lt;array&gt; ]_
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-
183158
#### Returns
184159

185160
- **out**: _&lt;array&gt;_
186161

187162
- if the sum was computed over the entire array, a zero-dimensional array containing the sum; otherwise, an array containing the sums.
188163

189-
### <a name="var" href="#var">#</a> var(x, /, *, axis=None, correction=0.0, keepdims=False, out=None)
164+
### <a name="var" href="#var">#</a> var(x, /, *, axis=None, correction=0.0, keepdims=False)
190165

191166
Calculates the variance of the input array `x`.
192167

@@ -208,10 +183,6 @@ Calculates the variance of the input array `x`.
208183

209184
- 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`.
210185

211-
- **out**: _Optional\[ &lt;array&gt; ]_
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`.
214-
215186
#### Returns
216187

217188
- **out**: _&lt;array&gt;_

0 commit comments

Comments
 (0)