(self, f, t, arrs, kw)
| 57 | return np.asarray(self.arr, *args, **kwargs) |
| 58 | |
| 59 | def __array_function__(self, f, t, arrs, kw): |
| 60 | if not all( |
| 61 | issubclass(ti, (type(self), np.ndarray) + np.ScalarType) for ti in t |
| 62 | ): |
| 63 | return NotImplemented |
| 64 | arrs = tuple( |
| 65 | arr if not isinstance(arr, type(self)) else arr.arr for arr in arrs |
| 66 | ) |
| 67 | t = tuple(ti for ti in t if not issubclass(ti, type(self))) |
| 68 | print(t) |
| 69 | a = self.arr.__array_function__(f, t, arrs, kw) |
| 70 | return a if not isinstance(a, np.ndarray) else type(self)(a) |
| 71 | |
| 72 | __getitem__ = wrap("__getitem__") |
| 73 |
nothing calls this directly
no test coverage detected