We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f42065 commit 9df1c65Copy full SHA for 9df1c65
src/array_api_extra/_lib/_at.py
@@ -364,7 +364,7 @@ def _op(
364
# Vectorize the operation using boolean indexing
365
# For non-unique indices, take the last occurrence. This requires creating
366
# masks for x and y that create matching shapes.
367
- unique_indices, first_occurrence_mask = xp.unique_inverse(idx)
+ unique_indices, _ = xp.unique_inverse(idx)
368
x_mask = xp.any(xp.arange(x.shape[0])[..., None] == unique_indices, axis=-1)
369
# Get last occurrence of each unique index
370
cmp = unique_indices[:, None] == unique_indices[None, :]
0 commit comments