Skip to content

Commit acd5365

Browse files
committed
Fix linting
1 parent 6fe2ffb commit acd5365

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/array_api_extra/_lib/_at.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ class at: # pylint: disable=invalid-name # numpydoc ignore=PR02
152152
153153
For frameworks that don't support fancy indexing by default, e.g. array-api-strict,
154154
we implement a workaround for 1D integer indices and ``xpx.at().set``. Assignments
155-
with multiple occurences of the same index always choose the last occurence. This is
156-
consistent with numpy's behaviour, e.g.::
155+
with multiple occurrences of the same index always choose the last occurrence. This
156+
is consistent with numpy's behaviour, e.g.::
157157
158158
>>> import numpy as np
159159
>>> import array_api_strict as xp

tests/test_at.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -327,13 +327,13 @@ def test_setitem_int_array_index(xp: ModuleType):
327327
if is_array_api_strict_namespace(xp) or is_numpy_namespace(xp):
328328
# Test wrong shapes
329329
with pytest.raises(ValueError, match="shape"):
330-
at_op(xp.asarray([0]), xp.asarray([0]), _AtOp.SET, xp.asarray([1, 2]))
330+
_ = at_op(xp.asarray([0]), xp.asarray([0]), _AtOp.SET, xp.asarray([1, 2]))
331331
# Test positive out of bounds index
332332
with pytest.raises(IndexError, match="out of bounds"):
333-
at_op(xp.asarray([0]), xp.asarray([1]), _AtOp.SET, xp.asarray([1]))
333+
_ = at_op(xp.asarray([0]), xp.asarray([1]), _AtOp.SET, xp.asarray([1]))
334334
# Test negative out of bounds index
335335
with pytest.raises(IndexError, match="out of bounds"):
336-
at_op(xp.asarray([0]), xp.asarray([-2]), _AtOp.SET, xp.asarray([1]))
336+
_ = at_op(xp.asarray([0]), xp.asarray([-2]), _AtOp.SET, xp.asarray([1]))
337337

338338

339339
@pytest.mark.parametrize("bool_mask", [False, True])

0 commit comments

Comments
 (0)