(arr, expected, *round_args)
| 2220 | |
| 2221 | def test_round(self): |
| 2222 | def check_round(arr, expected, *round_args): |
| 2223 | assert_equal(arr.round(*round_args), expected) |
| 2224 | # With output array |
| 2225 | out = np.zeros_like(arr) |
| 2226 | res = arr.round(*round_args, out=out) |
| 2227 | assert_equal(out, expected) |
| 2228 | assert out is res |
| 2229 | |
| 2230 | check_round(np.array([1, 2, 3]), [1, 2, 3]) |
| 2231 | check_round(np.array([1.2, 1.5]), [1, 2]) |
nothing calls this directly
no test coverage detected