There is a numpy.testing package for comparing numpy arrays, but there doesn't appear to be an equivalent for masked arrays. Is there a library out there that does this already?
I notice that numpy.ma itself has some comparison functions like numpy.ma.allequal, but this function doesn't seem to check that both array masks are identical. E.g. -
In [151]: a = ma.masked_array([0,1,2,3],[True,False,False,False])
In [152]: b = ma.masked_array([0,1,2,3],[True,True,False,False])
In [153]: ma.allequal(a,b)
Out[153]: True