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
Copy file name to clipboardExpand all lines: spec/API_specification/functions.md
+27-26
Original file line number
Diff line number
Diff line change
@@ -36,14 +36,15 @@ a tuple of `N` non-negative integers that specify the sizes of each dimension an
36
36
37
37
A conforming implementation of the array API standard must provide and support the following functions adhering to the following conventions.
38
38
39
-
- Optional arguments must be [keyword-only](https://www.python.org/dev/peps/pep-3102/) arguments.
40
-
- The `out` keyword argument must be a tuple with one entry per output.
39
+
- 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.
40
+
- Optional parameters must be [keyword-only](https://www.python.org/dev/peps/pep-3102/) arguments.
41
+
- An `out` keyword argument must be a tuple with one entry per output.
41
42
- If `out` is not provided or is `None` (the default), an uninitialized return array must be created for each output.
42
43
- Unless stated otherwise, floating-point operations must adhere to IEEE 754-2019.
43
44
44
45
<!-- NOTE: please keep the functions in alphabetical order -->
Calculates the absolute value for each element `x_i` of the input array `x` (i.e., the element-wise result has the same magnitude as the respective element in `x` but has positive sign).
49
50
@@ -60,7 +61,7 @@ Calculates the absolute value for each element `x_i` of the input array `x` (i.e
60
61
61
62
-**out**: an array containing the absolute value of each element in `x`.
Calculates an implementation-dependent approximation to the inverse cosine, having domain `[-1,+1]` and codomain `[+0, +π]`, for each element `x_i` of the input array `x`. Each element-wise result is expressed in radians.
66
67
@@ -78,7 +79,7 @@ Calculates an implementation-dependent approximation to the inverse cosine, havi
78
79
79
80
-**out**: an array containing the inverse cosine of each element in `x`.
Calculates an implementation-dependent approximation to the inverse sine for each element `x_i` of the input array `x`. Each element-wise result is expressed in radians and ranges from `-π/2` to `+π/2`.
118
119
@@ -131,7 +132,7 @@ Calculates an implementation-dependent approximation to the inverse sine for eac
131
132
132
133
-**out**: an array containing the inverse sine of each element in `x`.
Calculates an implementation-dependent approximation to the inverse tangent for each element `x_i` of the input array `x`. Each element-wise result is expressed in radians and ranges from `-π/2` to `+π/2`.
156
157
@@ -169,7 +170,7 @@ Calculates an implementation-dependent approximation to the inverse tangent for
169
170
170
171
-**out**: an array containing the inverse tangent of each element in `x`.
Calculates an implementation-dependent approximation to the cosine for each element `x_i` of the input array `x`. Each element `x_i` is assumed to be expressed in radians.
211
212
@@ -224,7 +225,7 @@ Calculates an implementation-dependent approximation to the cosine for each elem
224
225
225
226
-**out**: an array containing the cosine of each element in `x`.
Calculates an implementation-dependent approximation to the exponential function for each element `x_i` of the input array `x` (`e` raised to the power of `x_i`, where `e` is the base of the natural logarithm).
265
266
@@ -278,7 +279,7 @@ Calculates an implementation-dependent approximation to the exponential function
278
279
279
280
-**out**: an array containing the evaluated exponential function result for each element in `x`.
Calculates an implementation-dependent approximation to the sine for each element `x_i` of the input array `x`. Each element `x_i` is assumed to be expressed in radians.
350
351
@@ -362,7 +363,7 @@ Calculates an implementation-dependent approximation to the sine for each elemen
362
363
363
364
-**out**: an array containing the sine of each element in `x`.
Calculates an implementation-dependent approximation to the tangent for each element `x_i` of the input array `x`. Each element `x_i` is assumed to be expressed in radians.
422
423
@@ -434,7 +435,7 @@ Calculates an implementation-dependent approximation to the tangent for each ele
434
435
435
436
-**out**: an array containing the tangent of each element in `x`.
0 commit comments