Robert Kern gmail.com> writes:
>
> Abel Daniel wrote:
> > Now, I think that having a way of getting an element-wise comparison
> > (i.e. getting an array of bools) is great. _But_ why make that the
> > result of a '==' comparison? Is there any a
>
Hi!
My unittests got broken because 'a==b' for numpy arrays returns an
array instead of returning True or False:
>>> import numpy
>>> a = numpy.array([1, 2])
>>> b = numpy.array([1, 4])
>>> a==b
array([True, False], dtype=bool)
This means, for example:
>>> if a==b:
... print 'equal'
...
Trac