TypeError: only integer scalar arrays can be converted to a scalar index

技术分享图片

把代码处修改如下:

#print(‘Optimal number of features %d‘ % percentiles[opt])
print(‘Optimal number of features %d‘ % np.array(percentiles)[opt])

  

文章来自:https://www.cnblogs.com/xiaodongsuibi/p/8975307.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3