MCPcopy
hub / github.com/numpy/numpy / inner

Method inner

numpy/_core/_ufunc_config.py:497–513  ·  view source on GitHub ↗
(*args, **kwargs)

Source from the content-addressed store, hash-verified

495 # This duplicates the code from `__enter__`.
496 @functools.wraps(func)
497 def inner(*args, **kwargs):
498 if self._call is _Unspecified:
499 extobj = _make_extobj(
500 all=self._all, divide=self._divide, over=self._over,
501 under=self._under, invalid=self._invalid)
502 else:
503 extobj = _make_extobj(
504 call=self._call,
505 all=self._all, divide=self._divide, over=self._over,
506 under=self._under, invalid=self._invalid)
507
508 _token = _extobj_contextvar.set(extobj)
509 try:
510 # Call the original, decorated, function:
511 return func(*args, **kwargs)
512 finally:
513 _extobj_contextvar.reset(_token)
514
515 return inner

Calls 1

funcFunction · 0.50