How to turn a boolean array into index array in numpy,numpy.where(mask)