fcts.py 文件源码

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

项目:nanosat-control 作者: ceyzeriat 项目源码 文件源码
def inverse_eqn(eqn):
    """
    Inverse a symbolic expression with variable x
    Keeps x as the variable in the inverted expression
    > inverse('4*x/2')
    'y = x/2'
    """
    e = sympify('-x + ' + eqn.replace('x', 'y'))
    return str(solve(e, 'y')[0]).replace('x', 'float(x)')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号