how to select indices from boolean array
25 Oct
2007
25 Oct
'07
5:25 a.m.
Dear list, is nonzero the appropriate function to get the indexes of a boolean array? foo = numpy.random.random(10000) cut = foo > .5 indexes = cut.nonzero()[0] Another question: Why is the the type returned by nonzero a tuple and not an ndarray of the same shape as the input (or self if used on an object)? Thanks! Bernhard
6030
Age (days ago)
6030
Last active (days ago)
0 comments
1 participants
participants (1)
-
Bernhard Voigt