【发布时间】:2015-02-17 08:33:18
【问题描述】:
在 Python 3.4 上使用 Scipy,当我运行最小的 KDTree 示例时,here:
from scipy import spatial
x, y = np.mgrid[0:5, 2:8]
tree = spatial.KDTree(zip(x.ravel(), y.ravel()))
我收到此错误:
File "C:/_work/kdtree.py", line 9, in <module>
tree = spatial.KDTree(zip(x.ravel(), y.ravel()))
File "C:\Python34\lib\site-packages\scipy\spatial\kdtree.py", line 229, in __init__
self.n, self.m = np.shape(self.data)
ValueError: need more than 0 values to unpack
我做错了什么?我尝试将两者与 scipy 14.0 和 15.1 一起使用
【问题讨论】:
标签: scipy python-3.4 kdtree