Numeric: 'where' function conditions

Jorl Shefner v451v at yahoo.com
Tue Nov 30 09:48:58 EST 2004


In article <cogan6$kt0$1 at news1.ucsd.edu>, Robert Kern <rkern at ucsd.edu> 
wrote:

> 
> Right. "3 < data" creates an array of 0s and 1s where the condition is 
> false and true, respectively. You don't need where() at all.
> 
> Try
> 
> mask = logical_and(3 < data, data <= 7)

Great.  That's exactly what I needed.  Thanks.



More information about the Python-list mailing list