def test_applevel(self): from _numpypy import array, sum, max, min a = array([[1, 2], [3, 4]]) out = array([[0, 0], [0, 0]]) c = sum(a, axis=0, out=out[0]) assert (c == [4, 6]).all() assert (c == out[0]).all() assert (c != out[1]).all() c = max(a, axis=1, out=out[0]) assert (c == [2, 4]).all() assert (c == out[0]).all() assert (c != out[1]).all()
def test_max(self): from _numpypy import array, max assert max(range(10)) == 9 assert max(array(range(10))) == 9