Hi, > Yeah, it's just that numpy knows that it cannot compare pears with apples: > >>>> a = numpy.asarray(['a', 'b']) >>>> a.__eq__(1) > NotImplemented
Thank you - that's very helpful and clear. > Maybe it would be better to raise a ValueError, which is not caught by > the evaluation mechanism, to prevent such stuff. Sorry that this is not yet clear to me, but, is it true then that: The only situation where array.__eq__ sensibly falls back to python __eq__ is for the individual elements of object arrays? Thanks again, Matthew _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion