Skip to content

Commit 4343118

Browse files
Update test_special
1 parent 2597c40 commit 4343118

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

tests/test_special.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
import math
22
import dpnp
33
import numpy
4+
from .helper import skip_or_change_if_dtype_not_supported
5+
6+
7+
dtype = skip_or_change_if_dtype_not_supported(numpy.float64, change_dtype=True)
48

59

610
def test_erf():
7-
a = numpy.linspace(2.0, 3.0, num=10)
8-
ia = dpnp.linspace(2.0, 3.0, num=10)
11+
a = numpy.linspace(2.0, 3.0, num=10, dtype=dtype)
12+
ia = dpnp.linspace(2.0, 3.0, num=10, dtype=dtype)
913

1014
numpy.testing.assert_array_equal(a, ia)
1115

@@ -19,8 +23,8 @@ def test_erf():
1923

2024

2125
def test_erf_fallback():
22-
a = numpy.linspace(2.0, 3.0, num=10)
23-
dpa = dpnp.linspace(2.0, 3.0, num=10)
26+
a = numpy.linspace(2.0, 3.0, num=10, dtype=dtype)
27+
dpa = dpnp.linspace(2.0, 3.0, num=10, dtype=dtype)
2428

2529
expected = numpy.empty_like(a)
2630
for idx, val in enumerate(a):

0 commit comments

Comments
 (0)