Skip to content

Commit 41d6e64

Browse files
committed
autopep
1 parent 9ea0d31 commit 41d6e64

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

benchmarks/benchmarks/bench_core.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,18 +169,19 @@ def time_count_nonzero_multi_axis(self, numaxes, size, dtype):
169169
np.count_nonzero(self.x, axis=(
170170
self.x.ndim - 1, self.x.ndim - 2))
171171

172+
172173
class Nonzero(Benchmark):
173174
params = [
174-
[bool, np.uint8, np.uint64, np.int64, np.float32, np.float64],
175-
[(1_000_000,), (1000, 1000), (100, ), (2, )]
175+
[bool, np.uint8, np.uint64, np.int64, np.float32, np.float64],
176+
[(1_000_000,), (1000, 1000), (100, ), (2, )]
176177
]
177178
param_names = ["dtype", "shape"]
178179

179180
def setup(self, dtype, size):
180181
self.x = np.random.randint(0, 3, size=size).astype(dtype)
181182
self.x_sparse = np.zeros(size=size).astype(dtype)
182-
self.x_sparse[1] = 1
183-
self.x_sparse[-1] = 1
183+
self.x_sparse[1] = 1
184+
self.x_sparse[-1] = 1
184185
self.x_dense = np.ones(size=size).astype(dtype)
185186

186187
def time_nonzero(self, dtype, size):
@@ -192,9 +193,11 @@ def time_nonzero_sparse(self, dtype, size):
192193
def time_nonzero_dense(self, dtype, size):
193194
np.nonzero(self.x_dense)
194195

196+
195197
class PackBits(Benchmark):
196198
param_names = ['dtype']
197199
params = [[bool, np.uintp]]
200+
198201
def setup(self, dtype):
199202
self.d = np.ones(10000, dtype=dtype)
200203
self.d2 = np.ones((200, 1000), dtype=dtype)

0 commit comments

Comments
 (0)