Skip to content

Commit 52bbfeb

Browse files
authored
docs: clarify type promotion behavior in diff
PR-URL: data-apis#881 Closes: data-apis#852 Reviewed-by: Ralf Gommers <[email protected]>
1 parent 532db5b commit 52bbfeb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/array_api_stubs/_draft/utility_functions.py

+1
Original file line numberDiff line numberDiff line change
@@ -125,4 +125,5 @@ def diff(
125125
-----
126126
127127
- The first-order differences are given by ``out[i] = x[i+1] - x[i]`` along a specified axis. Higher-order differences must be calculated recursively (e.g., by calling ``diff(out, axis=axis, n=n-1)``).
128+
- If a conforming implementation chooses to support ``prepend`` and ``append`` arrays which have a different data type than ``x``, behavior is unspecified and thus implementation-defined. Implementations may choose to type promote (:ref:`type-promotion`), cast ``prepend`` and/or ``append`` to the same data type as ``x``, or raise an exception.
128129
"""

0 commit comments

Comments
 (0)