你现在在哪里scipy.特殊在水蟒里面?

2024-05-13 05:44:19 发布

您现在位置:Python中文网/ 问答频道 /正文

我已经在Linux中安装了Anaconda2,大概它有所有需要的包等等。我想用球谐函数,但我得到

import scipy
Y = scipy.special.sph_harm(-M, L, theta, phi)
AttributeError: 'module' object has no attribute 'special'

我也运行了conda install scipy,但仍然得到相同的错误。我使用的是标准online manual。你知道吗


Tags: importobjectlinuxscipyattributeerrorhasmodulespecial
1条回答
网友
1楼 · 发布于 2024-05-13 05:44:19

使用以下命令运行sph_harm()并避免使用AttributeError

from scipy.special import sph_harm
M, L, theta, phi = 10, 20, 30, 80
Y = sph_harm(-M, L, theta, phi)

相关问题 更多 >