(self)
| 2325 | out=None, invalid=0) |
| 2326 | |
| 2327 | def test_structured_equal(self): |
| 2328 | # https://github.com/numpy/numpy/issues/4855 |
| 2329 | |
| 2330 | class MyA(np.ndarray): |
| 2331 | def __array_ufunc__(self, ufunc, method, *inputs, **kwargs): |
| 2332 | return getattr(ufunc, method)(*(input.view(np.ndarray) |
| 2333 | for input in inputs), **kwargs) |
| 2334 | a = np.arange(12.).reshape(4,3) |
| 2335 | ra = a.view(dtype=('f8,f8,f8')).squeeze() |
| 2336 | mra = ra.view(MyA) |
| 2337 | |
| 2338 | target = np.array([ True, False, False, False], dtype=bool) |
| 2339 | assert_equal(np.all(target == (mra == ra[0])), True) |
| 2340 | |
| 2341 | def test_scalar_equal(self): |
| 2342 | # Scalar comparisons should always work, without deprecation warnings. |
nothing calls this directly
no test coverage detected