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

Function array_ufunc_errmsg_formatter

numpy/_core/_internal.py:834–843  ·  view source on GitHub ↗

Format the error message for when __array_ufunc__ gives up.

(dummy, ufunc, method, *inputs, **kwargs)

Source from the content-addressed store, hash-verified

832 return a // _gcd(a, b) * b
833
834def array_ufunc_errmsg_formatter(dummy, ufunc, method, *inputs, **kwargs):
835 """ Format the error message for when __array_ufunc__ gives up. """
836 args_string = ', '.join([f'{arg!r}' for arg in inputs] +
837 [f'{k}={v!r}'
838 for k, v in kwargs.items()])
839 args = inputs + kwargs.get('out', ())
840 types_string = ', '.join(repr(type(arg).__name__) for arg in args)
841 return ('operand type(s) all returned NotImplemented from '
842 f'__array_ufunc__({ufunc!r}, {method!r}, {args_string}): {types_string}'
843 )
844
845
846def array_function_errmsg_formatter(public_api, types):

Callers

nothing calls this directly

Calls 3

joinMethod · 0.80
itemsMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…