diff¶

metpy.units.
diff
(x, **kwargs)[source]¶ Calculate the nth discrete difference along given axis.
Wraps
numpy.diff()
to handle units.Parameters: Returns: diff (ndarray) – The nth differences. The shape of the output is the same as a except along axis where the dimension is smaller by n. The type of the output is the same as that of the input.
See also