We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 71ec88e commit 459f634Copy full SHA for 459f634
tests/test_sum.py
@@ -1,10 +1,23 @@
1
import dpnp
2
+from .helper import skip_or_check_if_dtype_not_supported
3
4
import numpy
5
6
-def test_sum_float64():
7
- a = numpy.array([[[-2., 3.], [9.1, 0.2]], [[-2., 5.0], [-2, -1.2]], [[1.0, -2.], [5.0, -1.1]]])
+dtype = numpy.float64 if skip_or_check_if_dtype_not_supported(
8
+ numpy.float64, check_dtype=True
9
+ ) else numpy.float32
10
+
11
12
+def test_sum_float():
13
+ a = numpy.array(
14
+ [
15
+ [[-2.0, 3.0], [9.1, 0.2]],
16
+ [[-2.0, 5.0], [-2, -1.2]],
17
+ [[1.0, -2.0], [5.0, -1.1]],
18
+ ],
19
+ dtype=dtype,
20
+ )
21
ia = dpnp.array(a)
22
23
for axis in range(len(a)):
@@ -23,7 +36,14 @@ def test_sum_int():
36
24
37
25
38
def test_sum_axis():
26
39
40
41
42
43
44
45
46
27
47
28
48
29
49
result = dpnp.sum(ia, axis=1)
0 commit comments