logical statements (in Python and Numeric)

Fernando Pérez fperez528 at yahoo.com
Thu Jun 20 17:51:35 EDT 2002


Chris Barker wrote:

> oops, that's what I get for posting untested code. You need parentheses,
> the above was trying to bitwise-and -2.0 and x
> 
> (x >= -2.) & (x < 0.)
> works.
> 

Ah, thanks. That actually makes the code almost like the OP's (moudulo the 
necessary parens). An it looks nicer than the logical_and() variation.

Somethin new learned, thanks a lot.

f.



More information about the Python-list mailing list