Skip to content

Commit 71ec88e

Browse files
Update test_special
1 parent 1a3fca7 commit 71ec88e

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

tests/test_special.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
import math
22
import dpnp
33
import numpy
4+
from .helper import skip_or_check_if_dtype_not_supported
5+
6+
7+
dtype = numpy.float64 if skip_or_check_if_dtype_not_supported(
8+
numpy.float64, check_dtype=True
9+
) else numpy.float32
410

511

612
def test_erf():
7-
a = numpy.linspace(2.0, 3.0, num=10)
8-
ia = dpnp.linspace(2.0, 3.0, num=10)
13+
a = numpy.linspace(2.0, 3.0, num=10, dtype=dtype)
14+
ia = dpnp.linspace(2.0, 3.0, num=10, dtype=dtype)
915

1016
numpy.testing.assert_array_equal(a, ia)
1117

@@ -19,8 +25,8 @@ def test_erf():
1925

2026

2127
def test_erf_fallback():
22-
a = numpy.linspace(2.0, 3.0, num=10)
23-
dpa = dpnp.linspace(2.0, 3.0, num=10)
28+
a = numpy.linspace(2.0, 3.0, num=10, dtype=dtype)
29+
dpa = dpnp.linspace(2.0, 3.0, num=10, dtype=dtype)
2430

2531
expected = numpy.empty_like(a)
2632
for idx, val in enumerate(a):

0 commit comments

Comments
 (0)