lundi 11 juin 2018

get random element on condition

i have two lists: images and coresponding labels. I want to get random image by given label. I thought about using numpy array to get boolean array and then use list.index. Problem is that it returns index of first occurance. Any ideas?




Aucun commentaire:

Enregistrer un commentaire