Skip to content

Commit 07015f1

Browse files
test_square.py::test_sqrt_out_overlap -> test_square.py::test_square_out_overlap
1 parent 6fc7666 commit 07015f1

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

dpctl/tests/elementwise/test_square.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,18 @@ def test_square_out_overlap(dtype):
108108
X = dpt.reshape(X, (3, 5, 4))
109109

110110
Xnp = dpt.asnumpy(X)
111-
Ynp = np.sqrt(Xnp, out=Xnp)
111+
Ynp = np.square(Xnp, out=Xnp)
112112

113-
Y = dpt.sqrt(X, out=X)
113+
Y = dpt.square(X, out=X)
114114
assert Y is X
115115
assert np.allclose(dpt.asnumpy(X), Xnp)
116116

117-
Ynp = np.sqrt(Xnp, out=Xnp[::-1])
118-
Y = dpt.sqrt(X, out=X[::-1])
117+
X = dpt.linspace(0, 35, 60, dtype=dtype, sycl_queue=q)
118+
X = dpt.reshape(X, (3, 5, 4))
119+
Xnp = dpt.asnumpy(X)
120+
121+
Ynp = np.square(Xnp, out=Xnp[::-1])
122+
Y = dpt.square(X, out=X[::-1])
119123
assert Y is not X
120124
assert np.allclose(dpt.asnumpy(X), Xnp)
121125
assert np.allclose(dpt.asnumpy(Y), Ynp)

0 commit comments

Comments
 (0)