Skip to content

Commit 0441bac

Browse files
authored
Enable muted test since dpctl-2053 is resolved (#2545)
The PR removes the w/a in tests, since [dpctl#2053](IntelPython/dpctl#2053) is merged. The mentioned dpctl change allows passing `numpy.ndarray` as an array mask.
1 parent 30918e4 commit 0441bac

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

dpnp/tests/third_party/cupy/core_tests/test_ndarray_adv_indexing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,7 @@ class TestArrayAdvancedIndexingSetitemScalarValueIndexError:
751751
def test_adv_setitem(self):
752752
for xp in (numpy, cupy):
753753
a = xp.zeros(self.shape)
754-
with pytest.raises(IndexError):
754+
with pytest.raises((IndexError, ValueError)):
755755
a[self.indexes] = self.value
756756

757757

dpnp/tests/third_party/cupy/testing/_loops.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -408,9 +408,7 @@ def test_func(*args, **kw):
408408
if cupy_r.shape == ():
409409
skip = (mask == 0).all()
410410
else:
411-
# mask is numpy.ndarray here which is not supported now
412-
# TODO remove asarray() once dpctl-2053 is addressed
413-
cupy_r = cupy_r[cupy.asarray(mask)].asnumpy()
411+
cupy_r = cupy_r[mask].asnumpy()
414412
numpy_r = numpy_r[mask]
415413

416414
if not skip:

0 commit comments

Comments
 (0)