
python:import sklearn 报错:numpy.core.multiarray failed to import
处理办法:https://blog.csdn.net/weixin_51723388/article/details/128577782。删除原有的numpy。一开始按照其他人的教程安装的numpy+mkl。也就是不使用numpy+mkl 而是使用numpy。重新使用pip命令安装新的numpy即可。
处理办法:
删除原有的numpy。一开始按照其他人的教程安装的numpy+mkl
pip uninstall numpy
重新使用pip命令安装新的numpy即可
pip install numpy
也就是不使用numpy+mkl 而是使用numpy
但是在使用sklearn中的KNN函数时会有警告提示:
FutureWarning: Unlike other reduction functions (e.g. skew
, kurtosis
), the default behavior of mode
typically preserves the axis it acts along. In SciPy 1.11.0, this behavior will change: the default value of keepdims
will become False, the axis
over which the statistic is taken will be eliminated, and the value None will no longer be accepted. Set keepdims
to True or False to avoid this warning.
mode, _ = stats.mode(_y[neigh_ind, k], axis=1)
处理办法:https://blog.csdn.net/weixin_51723388/article/details/128577782
更多推荐
所有评论(0)