(self)
| 256 | assert_equal(round(val, ndigits), round(np.int32(val), ndigits)) |
| 257 | |
| 258 | def test_dunder_round_accuracy(self): |
| 259 | f = np.float64(5.1 * 10**73) |
| 260 | assert_(isinstance(round(f, -73), np.float64)) |
| 261 | assert_array_max_ulp(round(f, -73), 5.0 * 10**73) |
| 262 | assert_(isinstance(round(f, ndigits=-73), np.float64)) |
| 263 | assert_array_max_ulp(round(f, ndigits=-73), 5.0 * 10**73) |
| 264 | |
| 265 | i = np.int64(501) |
| 266 | assert_(isinstance(round(i, -2), np.int64)) |
| 267 | assert_array_max_ulp(round(i, -2), 500) |
| 268 | assert_(isinstance(round(i, ndigits=-2), np.int64)) |
| 269 | assert_array_max_ulp(round(i, ndigits=-2), 500) |
| 270 | |
| 271 | @pytest.mark.xfail(raises=AssertionError, reason="gh-15896") |
| 272 | def test_round_py_consistency(self): |
nothing calls this directly
no test coverage detected