[Numpy-discussion] How to create a boolean sub-array from a larger string array?

Andriy Basilisk basilisk96 at gmail.com
Sat Jun 23 15:21:56 EDT 2007

> You can always use something like
>   mdat[[2,4]] == '*'
> to get the boolean array you want. This scheme can work with any string
> representation of True and False.

Dang! I keep forgetting that a conditional test can return an array
like that - thanks for the reminder, this will clean up my ugly code
from before :)

Back to the drawing board,

More information about the NumPy-Discussion mailing list