当我跑步时
import numpy as np
from sklearn.cluster import MeanShift, estimate_bandwidth
estimate_bandwidth(np.array([1,2,3,4,5,6]))
我收到错误
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "[..]/anaconda2/envs/reifen/lib/python2.7/site-packages/sklearn/cluster/mean_shift_.py", line 72, in estimate_bandwidth
d, _ = nbrs.kneighbors(X[batch, :], return_distance=True)
IndexError: too many indices for array
我理解数组的维数不正确 - 但我不确定我在这里做错了什么 - 代码不长。 estimate_bandwidth只能用于多变量数据吗?