MCPcopy Create free account
hub / github.com/numpy/numpy / setup

Method setup

benchmarks/benchmarks/bench_ufunc.py:227–235  ·  view source on GitHub ↗
(self, methname, npdtypes)

Source from the content-addressed store, hash-verified

225 timeout = 10
226
227 def setup(self, methname, npdtypes):
228 values = get_squares_()
229 if npdtypes == 'bool':
230 if version.parse(np.__version__) > version.parse("1.25"):
231 self.xarg = values.get('int16')[0].astype('bool')
232 else:
233 raise NotImplementedError("Not supported before v1.25")
234 else:
235 self.xarg = values.get('int16')[0]
236
237 def time_ndarray_dlp(self, methname, npdtypes):
238 meth = getattr(self.xarg, methname)

Callers

nothing calls this directly

Calls 4

get_squares_Function · 0.85
astypeMethod · 0.80
parseMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected