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

Method _definition

numpy/core/tests/test_overrides.py:563–570  ·  view source on GitHub ↗
(*args, **kwargs)

Source from the content-addressed store, hash-verified

561
562 def add_method(self, name, arr_class, enable_value_error=False):
563 def _definition(*args, **kwargs):
564 # Check that `like=` isn't propagated downstream
565 assert 'like' not in kwargs
566
567 if enable_value_error and 'value_error' in kwargs:
568 raise ValueError
569
570 return arr_class(getattr(arr_class, name))
571 setattr(arr_class, name, _definition)
572
573 def func_args(*args, **kwargs):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected