这可能非常琐碎。
我想从scipy调用spearmanr函数:(数据只是示例)
import scipy
from numpy import *
Len = [2,3,5,7,2]
Pop = [5,2,6,3,2]
a = array(Len)
b = array(Pop)
print scipy.stats.spearmanr(a,b)
这会产生错误:
AttributeError: 'module' object has no attribute 'spearmanr'
我做错了什么?
谢谢
os
时访问os.path
模块的成员时,为什么还需要这样做呢?os
是否自动导入os.path
? - JABimport
语句后,对我来说运行良好。这似乎是你的SciPy安装出了问题。 - Björn Pollex