[Numpy-discussion] array_equal returns True and 0

Robert Kern robert.kern@gmail....
Mon Jul 7 11:48:08 CDT 2008


On Mon, Jul 7, 2008 at 11:30, Keith Goodman <kwgoodman@gmail.com> wrote:
> I'm writing the doc string for array_equal. From the existing one-line
> doc string I expect array_equal to return True or False. But I get
> this:
>
>>> np.array_equal([1,2], [1,2])
>   True
>>> np.array_equal([1,2], [1,2,3])
>   0
>>> np.array_equal(np.array([1,2]), np.array([1,2,3]))
>   0
>>> np.__version__
>   '1.1.0'

Fixed on the trunk. array_equal() and array_equiv() now consistently
return either True or False exactly.

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