How to turn a boolean array into index array in numpy

前端 未结 4 936
执念已碎
执念已碎 2020-12-23 19:07

Is there an efficient Numpy mechanism to retrieve the integer indexes of locations in an array based on a condition is true as opposed to the Boolean mask array?

For

4条回答
提交回复
热议问题