[Numpy-discussion] unexpected behavior with allclose( scalar, empty array)

Robert Kern robert.kern@gmail....
Thu Jan 3 16:56:15 CST 2008

Matthew Brett wrote:
> So, currently we have all and allclose giving the same answer:
> In [19]: a = array([])
> In [20]: b = array([1])
> In [21]: all(a == b)
> Out[21]: True
> In [22]: allclose(a, b)
> Out[22]: True
> Would we want the answers to be different?

No. I wasn't thinking correctly, previously.

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