Skip to content

Commit ed5ba69

Browse files
authored
style25JUN2021 (#746)
1 parent 1eaceaf commit ed5ba69

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

benchmarks/pytest_benchmark/test_random.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,41 +31,42 @@
3131
import dpnp
3232
import numpy as np
3333

34-
ROUNDS=30
35-
ITERATIONS=4
34+
ROUNDS = 30
35+
ITERATIONS = 4
36+
37+
NNUMBERS = 2**26
3638

37-
NNUMBERS=2**26
3839

3940
@pytest.mark.parametrize("function", [dpnp.random.beta, np.random.beta],
40-
ids=["dpnp", "numpy"])
41+
ids=["dpnp", "numpy"])
4142
def test_beta(benchmark, function):
4243
result = benchmark.pedantic(target=function, args=(4.0, 5.0, NNUMBERS,),
4344
rounds=ROUNDS, iterations=ITERATIONS)
4445

4546

4647
@pytest.mark.parametrize("function", [dpnp.random.exponential, np.random.exponential],
47-
ids=["dpnp", "numpy"])
48+
ids=["dpnp", "numpy"])
4849
def test_exponential(benchmark, function):
4950
result = benchmark.pedantic(target=function, args=(4.0, NNUMBERS,),
5051
rounds=ROUNDS, iterations=ITERATIONS)
5152

5253

5354
@pytest.mark.parametrize("function", [dpnp.random.gamma, np.random.gamma],
54-
ids=["dpnp", "numpy"])
55+
ids=["dpnp", "numpy"])
5556
def test_gamma(benchmark, function):
5657
result = benchmark.pedantic(target=function, args=(2.0, 4.0, NNUMBERS,),
5758
rounds=ROUNDS, iterations=ITERATIONS)
5859

5960

6061
@pytest.mark.parametrize("function", [dpnp.random.normal, np.random.normal],
61-
ids=["dpnp", "numpy"])
62+
ids=["dpnp", "numpy"])
6263
def test_normal(benchmark, function):
6364
result = benchmark.pedantic(target=function, args=(0.0, 1.0, NNUMBERS,),
6465
rounds=ROUNDS, iterations=ITERATIONS)
6566

6667

6768
@pytest.mark.parametrize("function", [dpnp.random.uniform, np.random.uniform],
68-
ids=["dpnp", "numpy"])
69+
ids=["dpnp", "numpy"])
6970
def test_uniform(benchmark, function):
7071
result = benchmark.pedantic(target=function, args=(0.0, 1.0, NNUMBERS,),
7172
rounds=ROUNDS, iterations=ITERATIONS)

tests/test_statistics.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def test_max(axis):
3131

3232
numpy.testing.assert_allclose(dpnp_res, np_res)
3333

34+
3435
@pytest.mark.parametrize("array",
3536
[[2, 0, 6, 2],
3637
[2, 0, 6, 2, 5, 6, 7, 8],

0 commit comments

Comments
 (0)