Skip to content

Commit bc35610

Browse files
Test: test_print_dpnp_1d on CPU
1 parent 4ffd5b5 commit bc35610

1 file changed

Lines changed: 2 additions & 15 deletions

File tree

dpnp/tests/test_ndarray.py

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -491,27 +491,14 @@ def test_print_dpnp_special_character(character):
491491

492492

493493
def test_print_dpnp_1d():
494-
# Reset print options to defaults to avoid test pollution
495-
dpt.set_print_options(
496-
linewidth=75,
497-
edgeitems=3,
498-
threshold=1000,
499-
precision=8,
500-
floatmode="maxprec",
501-
suppress=False,
502-
nanstr="nan",
503-
infstr="inf",
504-
sign="-",
505-
)
506-
507494
dtype = dpnp.default_float_type()
508-
result = repr(dpnp.arange(10000, dtype=dtype))
495+
result = repr(dpnp.arange(10000, dtype=dtype, device="cpu"))
509496
expected = "array([0.000e+00, 1.000e+00, 2.000e+00, ..., 9.997e+03, 9.998e+03,\n 9.999e+03], shape=(10000,))"
510497
if not has_support_aspect64():
511498
expected = expected[:-1] + ", dtype=float32)"
512499
assert result == expected
513500

514-
result = str(dpnp.arange(10000, dtype=dtype))
501+
result = str(dpnp.arange(10000, dtype=dtype, device="cpu"))
515502
expected = (
516503
"[0.000e+00 1.000e+00 2.000e+00 ... 9.997e+03 9.998e+03 9.999e+03]"
517504
)

0 commit comments

Comments
 (0)