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

Class Take

asv_bench/benchmarks/sparse.py:179–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

177
178
179class Take:
180 params = ([np.array([0]), np.arange(100_000), np.full(100_000, -1)], [True, False])
181 param_names = ["indices", "allow_fill"]
182
183 def setup(self, indices, allow_fill):
184 N = 1_000_000
185 fill_value = 0.0
186 arr = make_array(N, 1e-5, fill_value, np.float64)
187 self.sp_arr = SparseArray(arr, fill_value=fill_value)
188
189 def time_take(self, indices, allow_fill):
190 self.sp_arr.take(indices, allow_fill=allow_fill)
191
192
193class GetItem:

Callers

nothing calls this directly

Calls 1

arrayMethod · 0.45

Tested by

no test coverage detected