Beispiel #1
0
 def test_error1(self):
     a = np.ones((5, ))
     try:
         size_check.reduction(a, 1)
     except ValueError:
         pass
Beispiel #2
0
 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)
Beispiel #3
0
 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)
Beispiel #4
0
 def test_error1(self):
     a = np.ones((5,))
     try:
         size_check.reduction(a,1)
     except ValueError:
         pass
Beispiel #5
0
 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)
Beispiel #6
0
 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)
Beispiel #7
0
 def check_error1(self):
     a = ones((5,))
     try:
         actual = size_check.reduction(a,1)
     except ValueError:
         pass
Beispiel #8
0
 def check_2d_1(self):
     a = ones((5,10))
     actual = size_check.reduction(a,1)
     desired = size_check.dummy_array((5,),1)
     assert_array_equal(actual.shape,desired.shape)