Skip to content

Commit 39dd9ac

Browse files
authored
Merge pull request #666 from steff456/fix-desc
PR-URL: #666 Reviewed-by: Athan Reines <[email protected]>
2 parents b823223 + 1d99f90 commit 39dd9ac

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

Diff for: src/array_api_stubs/_draft/linalg.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -745,10 +745,11 @@ def trace(x: array, /, *, offset: int = 0, dtype: Optional[dtype] = None) -> arr
745745
data type of the returned array. If ``None``,
746746
747747
- if the default data type corresponding to the data type "kind" (integer, real-valued floating-point, or complex floating-point) of ``x`` has a smaller range of values than the data type of ``x`` (e.g., ``x`` has data type ``int64`` and the default data type is ``int32``, or ``x`` has data type ``uint64`` and the default data type is ``int64``), the returned array must have the same data type as ``x``.
748-
- if ``x`` has a real-valued floating-point data type, the returned array must have the default real-valued floating-point data type.
749-
- if ``x`` has a complex floating-point data type, the returned array must have the default complex floating-point data type.
750-
- if ``x`` has a signed integer data type (e.g., ``int16``), the returned array must have the default integer data type.
751-
- if ``x`` has an unsigned integer data type (e.g., ``uint16``), the returned array must have an unsigned integer data type having the same number of bits as the default integer data type (e.g., if the default integer data type is ``int32``, the returned array must have a ``uint32`` data type).
748+
- if the default data type corresponding to the data type "kind" of ``x`` has the same or a larger range of values than the data type of ``x``,
749+
- if ``x`` has a real-valued floating-point data type, the returned array must have the default real-valued floating-point data type.
750+
- if ``x`` has a complex floating-point data type, the returned array must have the default complex floating-point data type.
751+
- if ``x`` has a signed integer data type (e.g., ``int16``), the returned array must have the default integer data type.
752+
- if ``x`` has an unsigned integer data type (e.g., ``uint16``), the returned array must have an unsigned integer data type having the same number of bits as the default integer data type (e.g., if the default integer data type is ``int32``, the returned array must have a ``uint32`` data type).
752753
753754
If the data type (either specified or resolved) differs from the data type of ``x``, the input array should be cast to the specified data type before computing the sum. Default: ``None``.
754755

Diff for: src/array_api_stubs/_draft/statistical_functions.py

+10-8
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,11 @@ def prod(
146146
data type of the returned array. If ``None``,
147147
148148
- if the default data type corresponding to the data type "kind" (integer, real-valued floating-point, or complex floating-point) of ``x`` has a smaller range of values than the data type of ``x`` (e.g., ``x`` has data type ``int64`` and the default data type is ``int32``, or ``x`` has data type ``uint64`` and the default data type is ``int64``), the returned array must have the same data type as ``x``.
149-
- if ``x`` has a real-valued floating-point data type, the returned array must have the default real-valued floating-point data type.
150-
- if ``x`` has a complex floating-point data type, the returned array must have the default complex floating-point data type.
151-
- if ``x`` has a signed integer data type (e.g., ``int16``), the returned array must have the default integer data type.
152-
- if ``x`` has an unsigned integer data type (e.g., ``uint16``), the returned array must have an unsigned integer data type having the same number of bits as the default integer data type (e.g., if the default integer data type is ``int32``, the returned array must have a ``uint32`` data type).
149+
- if the default data type corresponding to the data type "kind" of ``x`` has the same or a larger range of values than the data type of ``x``,
150+
- if ``x`` has a real-valued floating-point data type, the returned array must have the default real-valued floating-point data type.
151+
- if ``x`` has a complex floating-point data type, the returned array must have the default complex floating-point data type.
152+
- if ``x`` has a signed integer data type (e.g., ``int16``), the returned array must have the default integer data type.
153+
- if ``x`` has an unsigned integer data type (e.g., ``uint16``), the returned array must have an unsigned integer data type having the same number of bits as the default integer data type (e.g., if the default integer data type is ``int32``, the returned array must have a ``uint32`` data type).
153154
154155
If the data type (either specified or resolved) differs from the data type of ``x``, the input array should be cast to the specified data type before computing the product. Default: ``None``.
155156
@@ -243,10 +244,11 @@ def sum(
243244
data type of the returned array. If ``None``,
244245
245246
- if the default data type corresponding to the data type "kind" (integer, real-valued floating-point, or complex floating-point) of ``x`` has a smaller range of values than the data type of ``x`` (e.g., ``x`` has data type ``int64`` and the default data type is ``int32``, or ``x`` has data type ``uint64`` and the default data type is ``int64``), the returned array must have the same data type as ``x``.
246-
- if ``x`` has a real-valued floating-point data type, the returned array must have the default real-valued floating-point data type.
247-
- if ``x`` has a complex floating-point data type, the returned array must have the default complex floating-point data type.
248-
- if ``x`` has a signed integer data type (e.g., ``int16``), the returned array must have the default integer data type.
249-
- if ``x`` has an unsigned integer data type (e.g., ``uint16``), the returned array must have an unsigned integer data type having the same number of bits as the default integer data type (e.g., if the default integer data type is ``int32``, the returned array must have a ``uint32`` data type).
247+
- if the default data type corresponding to the data type "kind" of ``x`` has the same or a larger range of values than the data type of ``x``,
248+
- if ``x`` has a real-valued floating-point data type, the returned array must have the default real-valued floating-point data type.
249+
- if ``x`` has a complex floating-point data type, the returned array must have the default complex floating-point data type.
250+
- if ``x`` has a signed integer data type (e.g., ``int16``), the returned array must have the default integer data type.
251+
- if ``x`` has an unsigned integer data type (e.g., ``uint16``), the returned array must have an unsigned integer data type having the same number of bits as the default integer data type (e.g., if the default integer data type is ``int32``, the returned array must have a ``uint32`` data type).
250252
251253
If the data type (either specified or resolved) differs from the data type of ``x``, the input array should be cast to the specified data type before computing the sum. Default: ``None``.
252254

0 commit comments

Comments
 (0)