MCPcopy
hub / github.com/pandas-dev/pandas / setup

Method setup

asv_bench/benchmarks/multiindex_object.py:76–81  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

74
75class Duplicates:
76 def setup(self):
77 size = 65536
78 arrays = [np.random.randint(0, 8192, size), np.random.randint(0, 1024, size)]
79 mask = np.random.rand(size) < 0.1
80 self.mi_unused_levels = MultiIndex.from_arrays(arrays)
81 self.mi_unused_levels = self.mi_unused_levels[mask]
82
83 def time_remove_unused_levels(self):
84 self.mi_unused_levels.remove_unused_levels()

Callers

nothing calls this directly

Calls 1

from_arraysMethod · 0.45

Tested by

no test coverage detected