예제 #1
0
    def test_to_symbolic(self):
        nodes = np.eye(3, order="F")
        triangle = self._make_one(nodes, 1, copy=False)
        b_polynomial = triangle.to_symbolic()

        s, t = sympy.symbols("s, t")
        expected = sympy.Matrix([[1 - s - t, s, t]]).T
        self.assertTrue(
            test__symbolic.sympy_matrix_equal(b_polynomial, expected))
예제 #2
0
    def test_to_symbolic(self):
        nodes = np.asfortranarray([[3, 3, 4, 6], [3, 3, 3, 0]])
        curve = self._make_one(nodes, 3, copy=False)
        b_polynomial = curve.to_symbolic()

        s = sympy.Symbol("s")
        expected = 3 * sympy.Matrix([[1 + s**2, 1 - s**3]]).T
        self.assertTrue(
            test__symbolic.sympy_matrix_equal(b_polynomial, expected))