Exemplo n.º 1
0
    def test_float_array(self):
        array = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0]
        s = foo.matrix_sum_of_elements(array)
        self.assertEqual(s, sum(array))

        result = foo.matrix_identity_new()
        expected = [1.0, 0.0, 0.0, 0.0, 1.0, 0.0]
        self.assertEqual(result, expected)
Exemplo n.º 2
0
    def test_float_array(self):
        array = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0]
        s = foo.matrix_sum_of_elements(array)
        self.assertEqual(s, sum(array))

        result = foo.matrix_identity_new()
        expected = [1.0, 0.0, 0.0, 0.0, 1.0, 0.0]
        self.assertEqual(result, expected)