(self)
| 279 | npt.assert_array_almost_equal( sin_np, sin_ne ) |
| 280 | |
| 281 | def test_ipow(self): |
| 282 | # Test integer powers; NumPy generates ValueErrors for negative exponents |
| 283 | # so simply avoid testing on those values |
| 284 | for dtype in (np.uint8, np.int8, np.uint16, np.int32, np.uint32, np.int32, np.uint64, np.int64): |
| 285 | ssize_clip = 64 # This is enough to overflow anything |
| 286 | base = np.arange(ssize_clip).astype(dtype) |
| 287 | exp = np.arange(ssize_clip).astype(dtype) |
| 288 | ipow_ne = ne3.evaluate('base**exp') |
| 289 | ipow_np = np.power(base, exp) |
| 290 | npt.assert_array_almost_equal(ipow_ne, ipow_np) |
| 291 | |
| 292 | # NOTE: Non-unit length multiple strides are not supported any more as it |
| 293 | # isn't supported with the SIMD auto-vectorizationion. |
nothing calls this directly
no outgoing calls
no test coverage detected