Skip to content

Commit c286389

Browse files
Removed meaningless tests testing __getitem__ of numpy, rather than dpctl.tensor
1 parent 4a2daa8 commit c286389

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

dpctl/tests/test_usm_ndarray_ctor.py

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -144,34 +144,6 @@ def test_copy_scalar_invalid_shape(func, shape):
144144
func(X)
145145

146146

147-
@pytest.mark.parametrize("shape", [(1,), (1, 1), (1, 1, 1)])
148-
@pytest.mark.parametrize("index_dtype", ["|i8"])
149-
def test_usm_ndarray_as_index(shape, index_dtype):
150-
X = dpt.usm_ndarray(shape, dtype=index_dtype)
151-
Xnp = np.arange(1, X.size + 1, dtype=index_dtype).reshape(shape)
152-
X.usm_data.copy_from_host(Xnp.reshape(-1).view("|u1"))
153-
Y = np.arange(X.size + 1)
154-
assert Y[X] == Y[1]
155-
156-
157-
@pytest.mark.parametrize("shape", [(2,), (1, 2), (3, 4, 5), (0,)])
158-
@pytest.mark.parametrize("index_dtype", ["|i8"])
159-
def test_usm_ndarray_as_index_invalid_shape(shape, index_dtype):
160-
X = dpt.usm_ndarray(shape, dtype=index_dtype)
161-
Y = np.arange(X.size + 1)
162-
with pytest.raises(IndexError):
163-
Y[X]
164-
165-
166-
@pytest.mark.parametrize("shape", [(1,), (1, 1), (1, 1, 1)])
167-
@pytest.mark.parametrize("index_dtype", ["|f8"])
168-
def test_usm_ndarray_as_index_invalid_dtype(shape, index_dtype):
169-
X = dpt.usm_ndarray(shape, dtype=index_dtype)
170-
Y = np.arange(X.size + 1)
171-
with pytest.raises(IndexError):
172-
Y[X]
173-
174-
175147
@pytest.mark.parametrize(
176148
"ind",
177149
[

0 commit comments

Comments
 (0)