我就废话不多说了,还是直接看代码吧!
from IPython.display import display,Latex,Math
%matplotlib inline
from IPython.core.interactiveshell import InteractiveShell
sh = InteractiveShell.instance()
def number_to_str(n,cut=5):
ns=str(n)
format_='{0:.'+str(cut)+'f}'
if 'e' in ns or ('.' in ns and len(ns)>cut+1):