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

Method _create_MyArray

numpy/_core/tests/test_overrides.py:553–566  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

551
552class TestArrayLike:
553 def _create_MyArray(self):
554 class MyArray:
555 def __init__(self, function=None):
556 self.function = function
557
558 def __array_function__(self, func, types, args, kwargs):
559 assert func is getattr(np, func.__name__)
560 try:
561 my_func = getattr(self, func.__name__)
562 except AttributeError:
563 return NotImplemented
564 return my_func(*args, **kwargs)
565
566 return MyArray
567
568 def _create_MyNoArrayFunctionArray(self):
569 class MyNoArrayFunctionArray:

Callers 5

test_array_likeMethod · 0.95
test_like_as_noneMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected