Skip to content

Commit

Permalink
docs: clarify type promotion behavior in diff
Browse files Browse the repository at this point in the history
PR-URL: data-apis#881
Closes: data-apis#852
Reviewed-by: Ralf Gommers <[email protected]>
  • Loading branch information
kgryte authored Jan 20, 2025
1 parent 532db5b commit 52bbfeb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/array_api_stubs/_draft/utility_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,5 @@ def diff(
-----
- 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)``).
- 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.
"""

0 comments on commit 52bbfeb

Please sign in to comment.