Esempio n. 1
0
 def test_fvec_min_removal_of_fvec(self):
     a = fvec(3)
     a = array([20, 1, 19], dtype = 'float32')
     b = min_removal(a)
     assert_equal (array(b), [19, 0, 18])
     assert_equal (b, [19, 0, 18])
     assert_equal (a, b)
Esempio n. 2
0
 def test_fvec_min_removal_of_fvec(self):
     a = fvec(3)
     a = array([20, 1, 19], dtype="float32")
     b = min_removal(a)
     assert_equal(array(b), [19, 0, 18])
     assert_equal(b, [19, 0, 18])
     assert_equal(a, b)
Esempio n. 3
0
 def test_fvec_min_removal_of_array(self):
     a = array([20,1,19], dtype='float32')
     b = min_removal(a)
     assert_equal (array(b), [19, 0, 18])
     assert_equal (b, [19, 0, 18])
     assert_equal (a, b)
     a[0] = 0
     assert_equal (a, b)
Esempio n. 4
0
 def test_good_input(self):
     a = np.zeros(10, dtype=float_type)
     assert_equal(np.zeros(10, dtype=float_type), min_removal(a))
Esempio n. 5
0
 def test_fvec_min_removal_of_array(self):
     a = np.array([20, 1, 19], dtype=float_type)
     b = min_removal(a)
     assert_equal(b, [19, 0, 18])
Esempio n. 6
0
 def test_good_input(self):
     a = np.zeros(10, dtype=float_type)
     assert_equal(np.zeros(10, dtype=float_type), min_removal(a))
Esempio n. 7
0
 def test_fvec_min_removal_of_array(self):
     a = np.array([20, 1, 19], dtype=float_type)
     b = min_removal(a)
     assert_equal(b, [19, 0, 18])