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

Robert Kern robert.kern at gmail.com
Thu Nov 30 14:59:57 EST 2006


Tim Hirzel wrote:
> Does this seem odd to anyone else?  I am not sure about the 
> implementation of 'in' but it seems like a comparison is going funny 
> somewhere.  Or I am missing something...

Yes, list.__contains__ uses equality to test for membership, not identity.

-- 
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



More information about the NumPy-Discussion mailing list