In numpy.testing, there's assert_array_less and assert_array_equal, but there isn't an assert_array_less_equal function or even an assert_array_greater. I have two questions:
- Is there a reason these functions are missing, but
assert_array_lessis not? - I've written my own versions of these missing functions by using numpy.testing.util.assert_array_compare, e.g.:
def assert_array_greater(aa, bb):
assert_array_compare(np.greater, aa, bb)
Is this safe? I.e. is there a reason why assert_array_compare is hidden away in numpy.testing.util, rather than living in numpy.testing?
Forgive my paranoia; it just seems weird that these functions don't exist, to the extent that I fear it's for some good reason that I shouldn't be working around.