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

2007-06-23 Thread Andriy Basilisk
> 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

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

2007-06-22 Thread Andriy Basilisk
Hello all, My challenge is this: I'm working on an application that parses numerical data from a text report using regular expressions, and then places the results in Numpy matrices for processing. The data contains integers, floats, and boolean values. The boolean values are represented in the