Skip to content

Commit 1acea67

Browse files
STY: style fix (whitespace, PEP8) (#365)
1 parent 7a722e5 commit 1acea67

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

doc/docstring_template.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
>>> [i for i in a]
6464
[0, 1, 2]
6565
66-
`dpnp.array` contains a good example of docstring.
66+
`dpnp.array` contains a good example of docstring.
6767
6868
"""
6969

dpnp/dpnp_iface_arraycreation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,7 @@ def zeros(shape, dtype=None, order='C'):
962962
[0.0, 0.0, 0.0, 0.0, 0.0]
963963
>>> x = np.zeros((2, 1))
964964
>>> x.ndim, x.size, x.shape
965-
(2, 2, (2, 1))
965+
(2, 2, (2, 1))
966966
>>> [i for i in x]
967967
[0.0, 0.0]
968968

dpnp/dpnp_iface_linearalgebra.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def einsum(*args, **kwargs):
134134

135135
def einsum_path(*args, **kwargs):
136136
"""
137-
Evaluates the lowest cost contraction order for an einsum expression
137+
Evaluates the lowest cost contraction order for an einsum expression
138138
by considering the creation of intermediate arrays.
139139
140140
For full documentation refer to :obj:`numpy.einsum_path`.

dpnp/dpnp_iface_manipulation.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ def moveaxis(x1, source, destination):
351351
for destination_id, source_id in sorted(zip(destination_norm, source_norm)):
352352
# if destination_id in input_permute:
353353
# pytest tests/third_party/cupy/manipulation_tests/test_transpose.py::TestTranspose::test_moveaxis_invalid5_3
354-
#checker_throw_value_error("swapaxes", "source_id exists", source_id, input_permute)
354+
# checker_throw_value_error("swapaxes", "source_id exists", source_id, input_permute)
355355
input_permute.insert(destination_id, source_id)
356356

357357
return transpose(x1, axes=input_permute)
@@ -415,11 +415,7 @@ def repeat(x1, repeats, axis=None):
415415

416416
is_x1_dparray = isinstance(x1, dparray)
417417

418-
if (not use_origin_backend(x1)
419-
and is_x1_dparray
420-
and (axis is None or axis == 0)
421-
and (x1.ndim < 2)
422-
):
418+
if (not use_origin_backend(x1) and is_x1_dparray and (axis is None or axis == 0) and (x1.ndim < 2)):
423419

424420
repeat_val = repeats
425421
if isinstance(repeats, (tuple, list)):

tests/tests_perf/math_tests/test_trigonometric.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ def cos_2_args(input_A, input_B, lib):
2121

2222
class TestDPNPTrigonometric(DPNPTestPerfBase):
2323

24-
@pytest.mark.parametrize("func_name", ["arccos", "arccosh", "arcsin", "arcsinh", "arctan", "arctanh", "cbrt", "cos", "cosh", "deg2rad", "degrees", "exp", "exp2", "expm1", "log", "log10", "log1p", "log2", "rad2deg", "radians", "reciprocal", "sin", "sinh", "sqrt", "square", "tan", "tanh"])
24+
@pytest.mark.parametrize("func_name", ["arccos", "arccosh", "arcsin", "arcsinh", "arctan", "arctanh",
25+
"cbrt", "cos", "cosh", "deg2rad", "degrees", "exp", "exp2",
26+
"expm1", "log", "log10", "log1p", "log2", "rad2deg", "radians",
27+
"reciprocal", "sin", "sinh", "sqrt", "square", "tan", "tanh"])
2528
@pytest.mark.parametrize("dtype", [numpy.float64, numpy.float32, numpy.int64, numpy.int32])
2629
@pytest.mark.parametrize("size", [512, 1024, 2048, 4096, 8192, 16384, 32768])
2730
def test_trig1(self, func_name, lib, dtype, size):
@@ -33,10 +36,11 @@ def test_trig1(self, func_name, lib, dtype, size):
3336
@pytest.mark.parametrize("size", [16777216])
3437
def test_app1(self, lib, dtype, size):
3538
"""
36-
/opt/intel/oneapi/vtune/2021.1-beta10/bin64/vtune -collect gpu-offload
39+
/opt/intel/oneapi/vtune/2021.1-beta10/bin64/vtune -collect gpu-offload
3740
-knob enable-stack-collection=true -app-working-dir /home/work/dpnp --
38-
/home/work/anaconda3/bin/python -m pytest
39-
tests/tests_perf/math_tests/test_trigonometric.py::TestDPNPTrigonometric::test_app1[32768-float64-dpnp] -sv
41+
/home/work/anaconda3/bin/python -m pytest
42+
tests/tests_perf/math_tests/test_trigonometric.py::TestDPNPTrigonometric::test_app1[32768-float64-dpnp]
43+
-sv
4044
"""
4145
input1 = gen_array_1d(lib, size, dtype=dtype, seed=self.seed)
4246
input2 = gen_array_1d(lib, size, dtype=dtype, seed=self.seed)

0 commit comments

Comments
 (0)