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