human
How to turn a boolean array into index array in numpy
assistant
Here is some code to get all indexes of boolean numpy array where boolean value `mask` is True

numpy.where(mask)

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.