Christopher Barker wrote:
> 
> 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)


In [4]: import Numeric

In [5]: a = Numeric.arange(10)

In [6]: a == None
Out[6]: 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.

-- 
Robert Kern

"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
_______________________________________________
Numpy-discussion mailing list
[email protected]
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to