Skip to content

Commit a26bbee

Browse files
authored
style16JULY2021 (#787)
1 parent 827c603 commit a26bbee

File tree

2 files changed

+34
-33
lines changed

2 files changed

+34
-33
lines changed

dpnp/dpnp_algo/dpnp_algo.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ cdef dparray call_fptr_1in_1out(DPNPFuncName fptr_name, utils.dpnp_descriptor x1
261261

262262
""" get the FPTR data structure """
263263
cdef DPNPFuncData kernel_data = get_dpnp_function_ptr(fptr_name, param1_type, param1_type)
264-
264+
265265
result_type = dpnp_DPNPFuncType_to_dtype(< size_t > kernel_data.return_type)
266266

267267
cdef dparray result

tests/test_umath.py

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ def test_sin_ordinary(self):
9191
numpy.testing.assert_array_equal(expected, result)
9292

9393
@pytest.mark.parametrize("dtype",
94-
[numpy.float32, numpy.int64, numpy.int32],
95-
ids=['numpy.float32', 'numpy.int64', 'numpy.int32'])
94+
[numpy.float32, numpy.int64, numpy.int32],
95+
ids=['numpy.float32', 'numpy.int64', 'numpy.int32'])
9696
def test_invalid_dtype(self, dtype):
9797

9898
dp_array = dpnp.arange(10, dtype=dpnp.float64)
@@ -102,8 +102,8 @@ def test_invalid_dtype(self, dtype):
102102
dpnp.sin(dp_array, out=dp_out)
103103

104104
@pytest.mark.parametrize("shape",
105-
[(0,), (15, ), (2,2)],
106-
ids=['(0,)', '(15, )', '(2,2)'])
105+
[(0,), (15, ), (2, 2)],
106+
ids=['(0,)', '(15, )', '(2,2)'])
107107
def test_invalid_shape(self, shape):
108108

109109
dp_array = dpnp.arange(10, dtype=dpnp.float64)
@@ -112,6 +112,7 @@ def test_invalid_shape(self, shape):
112112
with pytest.raises(ValueError):
113113
dpnp.sin(dp_array, out=dp_out)
114114

115+
115116
class TestCos:
116117

117118
def test_cos(self):
@@ -130,8 +131,8 @@ def test_cos(self):
130131
numpy.testing.assert_array_equal(expected, result)
131132

132133
@pytest.mark.parametrize("dtype",
133-
[numpy.float32, numpy.int64, numpy.int32],
134-
ids=['numpy.float32', 'numpy.int64', 'numpy.int32'])
134+
[numpy.float32, numpy.int64, numpy.int32],
135+
ids=['numpy.float32', 'numpy.int64', 'numpy.int32'])
135136
def test_invalid_dtype(self, dtype):
136137

137138
dp_array = dpnp.arange(10, dtype=dpnp.float64)
@@ -141,8 +142,8 @@ def test_invalid_dtype(self, dtype):
141142
dpnp.cos(dp_array, out=dp_out)
142143

143144
@pytest.mark.parametrize("shape",
144-
[(0,), (15, ), (2,2)],
145-
ids=['(0,)', '(15, )', '(2,2)'])
145+
[(0,), (15, ), (2, 2)],
146+
ids=['(0,)', '(15, )', '(2,2)'])
146147
def test_invalid_shape(self, shape):
147148

148149
dp_array = dpnp.arange(10, dtype=dpnp.float64)
@@ -170,8 +171,8 @@ def test_log(self):
170171
numpy.testing.assert_array_equal(expected, result)
171172

172173
@pytest.mark.parametrize("dtype",
173-
[numpy.float32, numpy.int64, numpy.int32],
174-
ids=['numpy.float32', 'numpy.int64', 'numpy.int32'])
174+
[numpy.float32, numpy.int64, numpy.int32],
175+
ids=['numpy.float32', 'numpy.int64', 'numpy.int32'])
175176
def test_invalid_dtype(self, dtype):
176177

177178
dp_array = dpnp.arange(10, dtype=dpnp.float64)
@@ -181,8 +182,8 @@ def test_invalid_dtype(self, dtype):
181182
dpnp.log(dp_array, out=dp_out)
182183

183184
@pytest.mark.parametrize("shape",
184-
[(0,), (15, ), (2,2)],
185-
ids=['(0,)', '(15, )', '(2,2)'])
185+
[(0,), (15, ), (2, 2)],
186+
ids=['(0,)', '(15, )', '(2,2)'])
186187
def test_invalid_shape(self, shape):
187188

188189
dp_array = dpnp.arange(10, dtype=dpnp.float64)
@@ -210,8 +211,8 @@ def test_exp(self):
210211
numpy.testing.assert_array_equal(expected, result)
211212

212213
@pytest.mark.parametrize("dtype",
213-
[numpy.float32, numpy.int64, numpy.int32],
214-
ids=['numpy.float32', 'numpy.int64', 'numpy.int32'])
214+
[numpy.float32, numpy.int64, numpy.int32],
215+
ids=['numpy.float32', 'numpy.int64', 'numpy.int32'])
215216
def test_invalid_dtype(self, dtype):
216217

217218
dp_array = dpnp.arange(10, dtype=dpnp.float64)
@@ -221,8 +222,8 @@ def test_invalid_dtype(self, dtype):
221222
dpnp.exp(dp_array, out=dp_out)
222223

223224
@pytest.mark.parametrize("shape",
224-
[(0,), (15, ), (2,2)],
225-
ids=['(0,)', '(15, )', '(2,2)'])
225+
[(0,), (15, ), (2, 2)],
226+
ids=['(0,)', '(15, )', '(2,2)'])
226227
def test_invalid_shape(self, shape):
227228

228229
dp_array = dpnp.arange(10, dtype=dpnp.float64)
@@ -250,8 +251,8 @@ def test_arcsin(self):
250251
numpy.testing.assert_array_equal(expected, result)
251252

252253
@pytest.mark.parametrize("dtype",
253-
[numpy.float32, numpy.int64, numpy.int32],
254-
ids=['numpy.float32', 'numpy.int64', 'numpy.int32'])
254+
[numpy.float32, numpy.int64, numpy.int32],
255+
ids=['numpy.float32', 'numpy.int64', 'numpy.int32'])
255256
def test_invalid_dtype(self, dtype):
256257

257258
dp_array = dpnp.arange(10, dtype=dpnp.float64)
@@ -261,8 +262,8 @@ def test_invalid_dtype(self, dtype):
261262
dpnp.arcsin(dp_array, out=dp_out)
262263

263264
@pytest.mark.parametrize("shape",
264-
[(0,), (15, ), (2,2)],
265-
ids=['(0,)', '(15, )', '(2,2)'])
265+
[(0,), (15, ), (2, 2)],
266+
ids=['(0,)', '(15, )', '(2,2)'])
266267
def test_invalid_shape(self, shape):
267268

268269
dp_array = dpnp.arange(10, dtype=dpnp.float64)
@@ -290,8 +291,8 @@ def test_arctan(self):
290291
numpy.testing.assert_array_equal(expected, result)
291292

292293
@pytest.mark.parametrize("dtype",
293-
[numpy.float32, numpy.int64, numpy.int32],
294-
ids=['numpy.float32', 'numpy.int64', 'numpy.int32'])
294+
[numpy.float32, numpy.int64, numpy.int32],
295+
ids=['numpy.float32', 'numpy.int64', 'numpy.int32'])
295296
def test_invalid_dtype(self, dtype):
296297

297298
dp_array = dpnp.arange(10, dtype=dpnp.float64)
@@ -301,8 +302,8 @@ def test_invalid_dtype(self, dtype):
301302
dpnp.arctan(dp_array, out=dp_out)
302303

303304
@pytest.mark.parametrize("shape",
304-
[(0,), (15, ), (2,2)],
305-
ids=['(0,)', '(15, )', '(2,2)'])
305+
[(0,), (15, ), (2, 2)],
306+
ids=['(0,)', '(15, )', '(2,2)'])
306307
def test_invalid_shape(self, shape):
307308

308309
dp_array = dpnp.arange(10, dtype=dpnp.float64)
@@ -330,8 +331,8 @@ def test_tan(self):
330331
numpy.testing.assert_array_equal(expected, result)
331332

332333
@pytest.mark.parametrize("dtype",
333-
[numpy.float32, numpy.int64, numpy.int32],
334-
ids=['numpy.float32', 'numpy.int64', 'numpy.int32'])
334+
[numpy.float32, numpy.int64, numpy.int32],
335+
ids=['numpy.float32', 'numpy.int64', 'numpy.int32'])
335336
def test_invalid_dtype(self, dtype):
336337

337338
dp_array = dpnp.arange(10, dtype=dpnp.float64)
@@ -341,8 +342,8 @@ def test_invalid_dtype(self, dtype):
341342
dpnp.tan(dp_array, out=dp_out)
342343

343344
@pytest.mark.parametrize("shape",
344-
[(0,), (15, ), (2,2)],
345-
ids=['(0,)', '(15, )', '(2,2)'])
345+
[(0,), (15, ), (2, 2)],
346+
ids=['(0,)', '(15, )', '(2,2)'])
346347
def test_invalid_shape(self, shape):
347348

348349
dp_array = dpnp.arange(10, dtype=dpnp.float64)
@@ -370,8 +371,8 @@ def test_arctan2(self):
370371
numpy.testing.assert_array_equal(expected, result)
371372

372373
@pytest.mark.parametrize("dtype",
373-
[numpy.float32, numpy.int64, numpy.int32],
374-
ids=['numpy.float32', 'numpy.int64', 'numpy.int32'])
374+
[numpy.float32, numpy.int64, numpy.int32],
375+
ids=['numpy.float32', 'numpy.int64', 'numpy.int32'])
375376
def test_invalid_dtype(self, dtype):
376377

377378
dp_array = dpnp.arange(10, dtype=dpnp.float64)
@@ -381,8 +382,8 @@ def test_invalid_dtype(self, dtype):
381382
dpnp.arctan2(dp_array, dp_array, out=dp_out)
382383

383384
@pytest.mark.parametrize("shape",
384-
[(0,), (15, ), (2,2)],
385-
ids=['(0,)', '(15, )', '(2,2)'])
385+
[(0,), (15, ), (2, 2)],
386+
ids=['(0,)', '(15, )', '(2,2)'])
386387
def test_invalid_shape(self, shape):
387388

388389
dp_array = dpnp.arange(10, dtype=dpnp.float64)

0 commit comments

Comments
 (0)