[Numpy-discussion] equality of empty arrays

Vincent Davis vincent at vincentdavis.net
Mon Oct 11 20:03:11 EDT 2010


I assume there is some reasoning behind this
>>> m = np.array([])
>>> n = np.array([])
>>> m==n
array([], dtype=bool)

I was expecting somthing like.
>>> m = []
>>> n = []
>>> m==n
True

What is the right way to test if an array is empty?

-- 
Thanks
Vincent Davis
720-301-3003



More information about the NumPy-Discussion mailing list