[英]pretty print kind of multiple equations with Sympy and Jupyter Notebook
有沒有辦法得到一組方程式,例如:
Eq(expr1,expr2) and Eq(expr2,expr3)
漂亮地打印在 Jupyter Notebook 中,所以它看起來像這樣:
expr1=expr2=expr3
以下是您需要的:
Eq(Eq(expr1,expr2),expr3, evaluate=False)
編輯:我建議像這樣一個更通用的解決方案:
from IPython.display import display_latex
from sympy import latex
def display_eqs(left,*args):
tex = "\[ " + left
for arg in args:
tex+= "=" + arg
tex+=" \]"
display_latex(tex,raw=True)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.