当我运行代码时,会发生语法错误,而且我不知道why.Of是否成功安装了函数模块,但是这个错误发生了。
%pylab inline
%matplotlib notebook
rcParams["figure.figsize"]=12,8
from functions import circles,deposit_particles,create_envelope,create_envelope_selected
from ipywidgets import interact
from ipywidgets.widgets import IntSlider,IntText,Label,VBox,HBox,Layout,Button,FloatSlider,ToggleButton,FloatText
from IPython.display import clear_output,display
'''
the error:
'''
Populating the interactive namespace from numpy and matplotlib
Traceback (most recent call last):
File "C:\Users\Win 8.1\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 3326, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-3-1f3efd9a314f>", line 10, in <module>
from functions import circles,deposit_particles,create_envelope,create_envelope_selected
File "C:\Users\Win 8.1\Anaconda3\lib\site-packages\functions.py", line 68
nodes = tuple(map(lambda (k, v): process_node(inner, k, v),
^
SyntaxError: invalid syntax
发布于 2022-01-25 21:40:43
只需修补functions.py:更改所有lambda (x,y) -> lambda x,y
https://stackoverflow.com/questions/61594819
复制相似问题