MAINT: avoid indexing with a float array

Avoids `IndexError: non integer (and non boolean) array-likes will not be accepted as in
dices in the future`.  Perhaps this error occurs only with a new version or even only the development version of numpy.