(self)
| 200 | assert_equal(round(val, ndigits), round(np.int32(val), ndigits)) |
| 201 | |
| 202 | def test_dunder_round_accuracy(self): |
| 203 | f = np.float64(5.1 * 10**73) |
| 204 | assert_(isinstance(round(f, -73), np.float64)) |
| 205 | assert_array_max_ulp(round(f, -73), 5.0 * 10**73) |
| 206 | assert_(isinstance(round(f, ndigits=-73), np.float64)) |
| 207 | assert_array_max_ulp(round(f, ndigits=-73), 5.0 * 10**73) |
| 208 | |
| 209 | i = np.int64(501) |
| 210 | assert_(isinstance(round(i, -2), np.int64)) |
| 211 | assert_array_max_ulp(round(i, -2), 500) |
| 212 | assert_(isinstance(round(i, ndigits=-2), np.int64)) |
| 213 | assert_array_max_ulp(round(i, ndigits=-2), 500) |
| 214 | |
| 215 | @pytest.mark.xfail(raises=AssertionError, reason="gh-15896") |
| 216 | def test_round_py_consistency(self): |
nothing calls this directly
no test coverage detected