sklearn / numpy依赖性问题

时间:2019-05-30 11:59:11

标签: python numpy scikit-learn

所以我已经从使用

获得了所有最新软件包。
conda update --all

但是,当我尝试使用sklearns相似性传播时,出现以下错误

Traceback (most recent call last):
  File "Clustering.py", line 114, in <module>
    clust = clust_af.fit_predict(credit_clean)
  File "/home/fd-dsmodeltrainer01/anaconda3/lib/python3.7/site-packages/sklearn/                                                                             base.py", line 410, in fit_predict
    self.fit(X)
  File "/home/fd-dsmodeltrainer01/anaconda3/lib/python3.7/site-packages/sklearn/                                                                             cluster/affinity_propagation_.py", line 308, in fit
    copy=self.copy, verbose=self.verbose, return_n_iter=True)
  File "/home/fd-dsmodeltrainer01/anaconda3/lib/python3.7/site-packages/sklearn/                                                                             cluster/affinity_propagation_.py", line 96, in affinity_propagation
    S.flat[::(n_samples + 1)] = preference
  File "/home/fd-dsmodeltrainer01/anaconda3/lib/python3.7/site-packages/scipy/sp                                                                             arse/base.py", line 686, in __getattr__
    raise AttributeError(attr + " not found")
AttributeError: flat not found

似乎sklearn.flat找不到numpy属性

有什么想法吗?

0 个答案:

没有答案