(arr, expected, *round_args)
| 1989 | |
| 1990 | def test_round(self): |
| 1991 | def check_round(arr, expected, *round_args): |
| 1992 | assert_equal(arr.round(*round_args), expected) |
| 1993 | # With output array |
| 1994 | out = np.zeros_like(arr) |
| 1995 | res = arr.round(*round_args, out=out) |
| 1996 | assert_equal(out, expected) |
| 1997 | assert out is res |
| 1998 | |
| 1999 | check_round(np.array([1.2, 1.5]), [1, 2]) |
| 2000 | check_round(np.array(1.5), 2) |
nothing calls this directly
no test coverage detected