Skip to content

Commit b54e2c5

Browse files
committed
Caveat on duplicated indices
1 parent 6366fe7 commit b54e2c5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

array_api_compat/common/_helpers.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -886,6 +886,13 @@ class at:
886886
In the above example, y == [2, 0, 0] and z == [0, 3, 0] when x is read-only,
887887
whereas y == z == [2, 3, 0] when x is writeable!
888888
889+
Caveat
890+
------
891+
The behaviour of methods other than `get()` when the index is an array of
892+
integers which contains multiple occurrences of the same index is undefined.
893+
894+
**Undefined behaviour:** ``at(x, [0, 0]).set(2)``
895+
889896
See Also
890897
--------
891898
https://jax.readthedocs.io/en/latest/_autosummary/jax.numpy.ndarray.at.html

0 commit comments

Comments
 (0)