[Numpy-discussion] strange behavior with a numpy array as member of a list
robert.kern at gmail.com
Thu Nov 30 16:18:15 CST 2006
Christopher Barker wrote:
> Robert Kern wrote:
>>> What determines if an array tests for equality as the entire array or
>> 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)
In : import Numeric
In : a = Numeric.arange(10)
In : a == None
Out: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
> Personally, I liked it that way -- if you can't do a rich comparison, an
> error is better than a meaningless result.
I'm just reporting what the comment in the code says.
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
More information about the Numpy-discussion