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)
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)
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)
def test_good_input(self): a = np.zeros(10, dtype=float_type) assert_equal(np.zeros(10, dtype=float_type), min_removal(a))
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])