MCPcopy Index your code
hub / github.com/numpy/numpy / Ufunc

Class Ufunc

numpy/_core/code_generators/generate_umath.py:193–227  ·  view source on GitHub ↗

Description of a ufunc. Attributes ---------- nin : number of input arguments nout : number of output arguments identity : identity element for a two-argument function (like Zero) docstring : docstring for the ufunc typereso: type resolver function of type PyUFunc_TypeRe

Source from the content-addressed store, hash-verified

191 return tds
192
193class Ufunc:
194 """Description of a ufunc.
195
196 Attributes
197 ----------
198 nin : number of input arguments
199 nout : number of output arguments
200 identity : identity element for a two-argument function (like Zero)
201 docstring : docstring for the ufunc
202 typereso: type resolver function of type PyUFunc_TypeResolutionFunc
203 type_descriptions : TypeDescription objects
204 signature: a generalized ufunc signature (like for matmul)
205 indexed: add indexed loops (ufunc.at) for these type characters
206 no_float_errors: if True, the ufunc never raises floating point errors
207 """
208 def __init__(self, nin, nout, identity, docstring, typereso,
209 *type_descriptions, signature=None, indexed='',
210 no_float_errors=False):
211 self.nin = nin
212 self.nout = nout
213 if identity is None:
214 identity = None_
215 self.identity = identity
216 self.docstring = docstring
217 self.typereso = typereso
218 self.type_descriptions = []
219 self.signature = signature
220 self.indexed = indexed
221 self.no_float_errors = no_float_errors
222 for td in type_descriptions:
223 self.type_descriptions.extend(td)
224 for td in self.type_descriptions:
225 td.finish_signature(self.nin, self.nout)
226
227 check_td_order(self.type_descriptions)
228
229
230# String-handling utilities to avoid locale-dependence.

Callers 1

generate_umath.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…