相关疑难解决方法(0)

如何通过sympy在ipython笔记本上打印漂亮?

我试过pprint,print前者只打印Unicode版本,后者不做漂亮的打印.

from sympy import symbols, Function
import sympy.functions as sym
from sympy import init_printing
init_printing(use_latex=True)
from sympy import pprint
from sympy import Symbol

x = Symbol('x')

# If a cell contains only the following, it will render perfectly.
(pi + x)**2

# However I would like to control what to print in a function, 
# so that multiple expressions can be printed from a single notebook cell.
pprint((pi + x)**2)
Run Code Online (Sandbox Code Playgroud)

python pretty-print sympy jupyter jupyter-notebook

44
推荐指数
4
解决办法
3万
查看次数

用python打印乳胶配方

如何在python中显示一个简单的乳胶配方?也许numpy是正确的选择?

编辑:

我有python代码,如:

a = '\frac{a}{b}'
Run Code Online (Sandbox Code Playgroud)

并希望在图形输出中打印(如matplotlib).

python latex formula

12
推荐指数
4
解决办法
3万
查看次数