(self)
| 1303 | assert_equal(np.power(a, b), r) |
| 1304 | |
| 1305 | def test_power_fast_paths(self): |
| 1306 | # gh-26055 |
| 1307 | for dt in [np.float32, np.float64]: |
| 1308 | a = np.array([0, 1.1, 2, 12e12, -10., np.inf, -np.inf], dt) |
| 1309 | expected = np.array([0.0, 1.21, 4., 1.44e+26, 100, np.inf, np.inf]) |
| 1310 | result = np.power(a, 2.) |
| 1311 | assert_array_max_ulp(result, expected.astype(dt), maxulp=1) |
| 1312 | |
| 1313 | a = np.array([0, 1.1, 2, 12e12], dt) |
| 1314 | expected = np.sqrt(a).astype(dt) |
| 1315 | result = np.power(a, 0.5) |
| 1316 | assert_array_max_ulp(result, expected, maxulp=1) |
| 1317 | |
| 1318 | |
| 1319 | class TestFloat_power: |
nothing calls this directly
no test coverage detected