Skip to content

Commit e2e633e

Browse files
Fix incorrect expected dtype in test_complex_usm_type
1 parent fd62a26 commit e2e633e

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

dpnp/tests/tensor/elementwise/test_complex.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,12 @@ def test_complex_usm_type(np_call, dpt_call, usm_type):
112112
assert Y.sycl_queue == X.sycl_queue
113113
assert Y.flags.c_contiguous
114114

115-
expected_Y = np.empty(input_shape, dtype=arg_dt)
116-
expected_Y[..., 0::2] = np_call(np.complex64(np.pi / 6 + 1j * np.pi / 3))
117-
expected_Y[..., 1::2] = np_call(np.complex64(np.pi / 3 + 1j * np.pi / 6))
115+
X_np = np.empty(input_shape, dtype=arg_dt)
116+
X_np[..., 0::2] = np.complex64(np.pi / 6 + 1j * np.pi / 3)
117+
X_np[..., 1::2] = np.complex64(np.pi / 3 + 1j * np.pi / 6)
118+
119+
expected_Y = np_call(X_np)
120+
118121
tol = 8 * dpt.finfo(Y.dtype).resolution
119122

120123
assert_allclose(dpt.asnumpy(Y), expected_Y, atol=tol, rtol=tol)

0 commit comments

Comments
 (0)