test_symbolic_utils.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:vadouvan 作者: vadouvan 项目源码 文件源码
def test_two_variables(self):
        """
        It can eliminate ``x, y`` from the system
        ``(a = 3x - 4y, b = 4x + 5y, c = 6x + 2y)``.
        """
        equations = [
            sympy.Eq(a, 3 * x - 4 * y),
            sympy.Eq(b, 4 * x + 5 * y),
            sympy.Eq(c, 6 * x + 2 * y),
            ]
        new_equations = vadouvan.symbolic_utils.eliminate(equations, [x, y])
        assert len(new_equations) == 1
        assert new_equations[0].free_symbols == {a, b, c}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号