[SciPy-user] Best way to test several values
Jose Luis Gomez Dans
Mon Oct 20 09:05:40 CDT 2008
I have a 2D array of numbers, and I want to use "where" to effectively mask
bits of the array out. Essentially, if any element in this 2D array of
numbers belongs to a given list (stored as a 1D array), the condition should
be e.g., True.
Up to now, I have used numpy.any ( data==QA ), where data is a single element
of my 2D array, and QA is my acceptance values list. However, I need to loop
through elements, and is taking a long time.
Any hints? numpy/scipy seems to have a plethora of clever functions to this
sort of thing efficiently!
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser
More information about the SciPy-user