@@ -114,8 +114,8 @@ def test_properties():
114
114
assert isinstance (X .ndim , numbers .Integral )
115
115
116
116
117
- @pytest .mark .parametrize ("func" , [bool , float , int ])
118
- @pytest .mark .parametrize ("shape" , [(1 ,), (1 , 1 ), (1 , 1 , 1 )])
117
+ @pytest .mark .parametrize ("func" , [bool , float , int , complex ])
118
+ @pytest .mark .parametrize ("shape" , [tuple (), (1 ,), (1 , 1 ), (1 , 1 , 1 )])
119
119
@pytest .mark .parametrize ("dtype" , ["|b1" , "|u2" , "|f4" , "|i8" ])
120
120
def test_copy_scalar_with_func (func , shape , dtype ):
121
121
X = dpt .usm_ndarray (shape , dtype = dtype )
@@ -124,8 +124,10 @@ def test_copy_scalar_with_func(func, shape, dtype):
124
124
assert func (X ) == func (Y )
125
125
126
126
127
- @pytest .mark .parametrize ("method" , ["__bool__" , "__float__" , "__int__" ])
128
- @pytest .mark .parametrize ("shape" , [(1 ,), (1 , 1 ), (1 , 1 , 1 )])
127
+ @pytest .mark .parametrize (
128
+ "method" , ["__bool__" , "__float__" , "__int__" , "__complex__" ]
129
+ )
130
+ @pytest .mark .parametrize ("shape" , [tuple (), (1 ,), (1 , 1 ), (1 , 1 , 1 )])
129
131
@pytest .mark .parametrize ("dtype" , ["|b1" , "|u2" , "|f4" , "|i8" ])
130
132
def test_copy_scalar_with_method (method , shape , dtype ):
131
133
X = dpt .usm_ndarray (shape , dtype = dtype )
@@ -134,7 +136,7 @@ def test_copy_scalar_with_method(method, shape, dtype):
134
136
assert getattr (X , method )() == getattr (Y , method )()
135
137
136
138
137
- @pytest .mark .parametrize ("func" , [bool , float , int ])
139
+ @pytest .mark .parametrize ("func" , [bool , float , int , complex ])
138
140
@pytest .mark .parametrize ("shape" , [(2 ,), (1 , 2 ), (3 , 4 , 5 ), (0 ,)])
139
141
def test_copy_scalar_invalid_shape (func , shape ):
140
142
X = dpt .usm_ndarray (shape )
0 commit comments