Skip to content

Commit

Permalink
fix np.zeros argument
Browse files Browse the repository at this point in the history
  • Loading branch information
eendebakpt committed Oct 6, 2024
1 parent 41d6e64 commit f615671
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions benchmarks/benchmarks/bench_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,10 @@ class Nonzero(Benchmark):

def setup(self, dtype, size):
self.x = np.random.randint(0, 3, size=size).astype(dtype)
self.x_sparse = np.zeros(size=size).astype(dtype)
self.x_sparse = np.zeros(size).astype(dtype)
self.x_sparse[1] = 1
self.x_sparse[-1] = 1
self.x_dense = np.ones(size=size).astype(dtype)
self.x_dense = np.ones(size).astype(dtype)

def time_nonzero(self, dtype, size):
np.nonzero(self.x)
Expand Down

0 comments on commit f615671

Please sign in to comment.