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

Method setup

benchmarks/benchmarks/bench_ufunc.py:38–51  ·  view source on GitHub ↗
(self, ufuncname)

Source from the content-addressed store, hash-verified

36 timeout = 10
37
38 def setup(self, ufuncname):
39 np.seterr(all='ignore')
40 try:
41 self.afdn = getattr(np, ufuncname)
42 except AttributeError:
43 raise NotImplementedError()
44 self.args = []
45 for _, aarg in get_squares_().items():
46 arg = (aarg,) * 1 # no nin
47 try:
48 self.afdn(*arg)
49 except TypeError:
50 continue
51 self.args.append(arg)
52
53 def time_afdn_types(self, ufuncname):
54 [self.afdn(*arg) for arg in self.args]

Callers

nothing calls this directly

Calls 1

get_squares_Function · 0.85

Tested by

no test coverage detected