[SciPy-User] Filtering record arrays by contents of columns using `ismember`-like syntax

Bruce Southey bsouthey at gmail.com
Mon May 23 15:42:15 EDT 2011


On 05/23/2011 01:45 PM, Skipper Seabold wrote:
> On Mon, May 23, 2011 at 1:23 PM, Bruce Southey<bsouthey at gmail.com>  wrote:
>> On 05/23/2011 10:07 AM, Skipper Seabold wrote:
>>> On Mon, May 23, 2011 at 3:37 AM, Chris Rodgers
>>> <chris.rodgers at berkeley.edu>    wrote:
>>>> A common task for my work is slicing a record array to find records
>>>> matching some set of criteria. For any criteria beyond the most
>>>> simple, I find the syntax grows complex and implementation efficiency
>>>> starts to matter a lot. I wrote a class to encapsulate this filtering,
>>>> and I wanted to share it with the list and also get feedback on: 1) am
>>>> I approaching this problem correctly?, and 2) is the implementation
>>>> efficient for very large arrays?
>>>>
>>> I also have this problem quite frequently. I would be interested to
>>> see something like this as a method of arrays and sub-classes, or at
>>> least as a convenience function.
>> My thought would be that PyTables would be a better and more flexible
>> solution especially since fast queries are a main seeling point of PyTables.
>>
> I agree that if speed (and presumably size) is the main issue,
> pytables might be worth it, but I see this as lightweight,
> dependency-free syntactic sugar for a common use of structured arrays.
>
> Skipper
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user

Just create an appropriate ticket with code, docstring, examples and 
test cases. :-)
At least then it would not get lost in the email archives.

Also does it work when you have multi-dimensional arrays as record arrays?

Bruce




More information about the SciPy-User mailing list