[Numpy-discussion] strange behavior with a numpy array as member of a list

Christopher Barker Chris.Barker at noaa.gov
Thu Nov 30 15:56:10 CST 2006



Robert Kern wrote:

>> What determines if an array tests for equality as the entire array or 
>> element-wise?
> 
> There are some special cases for backwards compatibility. 

with what?

IIRC, Numeric has raised an error for a very long time with:

a == None #(a is a Numeric array)

Personally, I liked it that way -- if you can't do a rich comparison, an 
error is better than a meaningless result.

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov


More information about the Numpy-discussion mailing list