(self)
| 196 | assert_equal(result, expected.view(OverrideSub)) |
| 197 | |
| 198 | def test_no_wrapper(self): |
| 199 | # Regular numpy functions have wrappers, but do not presume |
| 200 | # all functions do (array creation ones do not): check that |
| 201 | # we just call the function in that case. |
| 202 | array = np.array(1) |
| 203 | func = lambda x: x * 2 |
| 204 | result = array.__array_function__(func=func, types=(np.ndarray,), |
| 205 | args=(array,), kwargs={}) |
| 206 | assert_equal(result, array * 2) |
| 207 | |
| 208 | def test_wrong_arguments(self): |
| 209 | # Check our implementation guards against wrong arguments. |
nothing calls this directly
no test coverage detected