MCPcopy Create free account
hub / github.com/numpy/numpy / check_round

Method check_round

numpy/core/tests/test_multiarray.py:1991–1997  ·  view source on GitHub ↗
(arr, expected, *round_args)

Source from the content-addressed store, hash-verified

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)

Callers

nothing calls this directly

Calls 2

assert_equalFunction · 0.90
roundMethod · 0.80

Tested by

no test coverage detected