[Numpy-discussion] logical priority
Stephen Walton
stephen.walton at csun.edu
Wed Feb 9 11:54:34 EST 2005
On Wed, 2005-02-09 at 13:48 -0500, Perry Greenfield wrote:
> Strictly speaking there is no operator equivalent (you can always use
> the ufunc logical_and: f = logical_and(~isnan(data1), ~isnan(data2)) )
> (using isnan for the sake of illustration)
OK, how did I miss in "Learning Python" and the numarray docs that ~ is
bitwise NOT and works on numarray bool arrays? In point of fact,
"~isnan(data1) & ~isnan(data2)" works fine. I kept trying !isnan(data1)
which I gather makes no sense.
Thanks for the patient help, all.
More information about the NumPy-Discussion
mailing list