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

Method setup

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

Source from the content-addressed store, hash-verified

83 timeout = 10
84
85 def setup(self, ufuncname):
86 np.seterr(all='ignore')
87 try:
88 self.ufn = getattr(np, ufuncname)
89 except AttributeError:
90 raise NotImplementedError()
91 self.args = []
92 for _, aarg in get_squares_().items():
93 arg = (aarg,) * self.ufn.nin
94 try:
95 self.ufn(*arg)
96 except TypeError:
97 continue
98 self.args.append(arg)
99
100 def time_ufunc_types(self, ufuncname):
101 [self.ufn(*arg) for arg in self.args]

Callers

nothing calls this directly

Calls 1

get_squares_Function · 0.85

Tested by

no test coverage detected