Modify the code as follows:
#print('Optimal number of features %d' % percentiles[opt]) print('Optimal number of features %d' % np.array(percentiles)[opt])
Modify the code as follows:
#print('Optimal number of features %d' % percentiles[opt]) print('Optimal number of features %d' % np.array(percentiles)[opt])