Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add random state
  • Loading branch information
rth committed Mar 19, 2020
commit 508fda51f97b372eb157bc42983200fb49e5fda7
3 changes: 1 addition & 2 deletions asv_bench/benchmarks/sparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ def time_sparse_array(self, dense_proportion, fill_value, dtype):
class SparseDataFrameConstructor:
def setup(self):
N = 1000
self.arr = np.arange(N)
self.sparse = scipy.sparse.rand(N, N, 0.005)
self.sparse = scipy.sparse.rand(N, N, 0.005, random_state=0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

given what we said in the other PR, you can remove this random state again (it's covered by the global setup function which will be run for every benchmark)


def time_from_scipy(self):
pd.DataFrame.sparse.from_spmatrix(self.sparse)
Expand Down