Skip to content

Commit d4450b3

Browse files
committed
add note on unspecified promotion
1 parent 41880c0 commit d4450b3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/array_api_stubs/_draft/data_type_functions.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ def astype(
6363
- Otherwise, ``x`` should be cast to a data type of that kind, according to the type promotion rules (see :ref:`type-promotion`) and the above notes.
6464
6565
- Kinds must be interpreted as the lowest-precision standard data type of that kind for the purposes of type promotion. For example, ``astype(x, 'complex floating')`` will return an array with the data type ``complex64`` when ``x.dtype`` is ``float32``, since ``complex64`` is the result of promoting ``float32`` with the lowest-precision standard complex data type, ``complex64``.
66+
- Where type promotion is unspecified and thus implementation-specific, the result is also unspecified. For example, ``astype(x, 'complex floating')``, where ``x`` has data type ``int32``.
6667
6768
The returned array must have the same shape as ``x``.
6869

0 commit comments

Comments
 (0)