把代码处修改如下:
#print(‘Optimal number of features %d‘ % percentiles[opt]) print(‘Optimal number of features %d‘ % np.array(percentiles)[opt])
TypeError: only integer scalar arrays can be converted to a scalar index
原文:https://www.cnblogs.com/xiaodongsuibi/p/8975307.html