ma.
ediff1d
Compute the differences between consecutive elements of an array.
This function is the equivalent of numpy.ediff1d that takes masked values into account, see numpy.ediff1d for details.
numpy.ediff1d
See also
Equivalent function for ndarrays.