File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 1
1
import math
2
2
import dpnp
3
3
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
4
10
5
11
6
12
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 )
9
15
10
16
numpy .testing .assert_array_equal (a , ia )
11
17
@@ -19,8 +25,8 @@ def test_erf():
19
25
20
26
21
27
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 )
24
30
25
31
expected = numpy .empty_like (a )
26
32
for idx , val in enumerate (a ):
You can’t perform that action at this time.
0 commit comments