[Numpy-discussion] equality of empty arrays

Vincent Davis vincent@vincentdavis....
Mon Oct 11 19:03:11 CDT 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