[Numpy-discussion] Re: [SciPy-user] numarray equality testing

Pearu Peterson pearu at cens.ioc.ee
Mon Dec 9 08:13:04 CST 2002


On Mon, 9 Dec 2002, Perry Greenfield wrote:

> >>> array_equal(array([[1,2,3],[1,2,3]]), array([1,2,3]))
> 1

Hmm, I would have expected 0. 
What's the rationale for 1?

May be you meant

>>> array_equal(array([[1,2,3]]), array([1,2,3]))
1

which I would agree. Also

>>> array_equal(array([[1],[2],[3]]), array([1,2,3]))
1

but I am not sure about

>>> array_equal(array([[1,2,3],[1,2,3]]), array([1,2,3,1,2,3]))
1

Pearu






More information about the Numpy-discussion mailing list