def test_error1(self): a = np.ones((5,)) try: size_check.reduction(a,1) except ValueError: pass
def test_3d_0(self): a = np.ones((5,6,7)) actual = size_check.reduction(a,1) desired = size_check.dummy_array((5,7),1) assert_array_equal(actual.shape,desired.shape)
def test_error0(self): a = np.ones((5, )) try: actual = size_check.reduction(a, -2) except ValueError: pass
def test_2d_0(self): a = np.ones((5,10)) actual = size_check.reduction(a,0) desired = size_check.dummy_array((10,),1) assert_array_equal(actual.shape,desired.shape)
def test_error0(self): a = np.ones((5,)) try: actual = size_check.reduction(a,-2) except ValueError: pass