diff --git a/xarray/core/dataarray.py b/xarray/core/dataarray.py index 062cc6342df..154bd939836 100644 --- a/xarray/core/dataarray.py +++ b/xarray/core/dataarray.py @@ -2693,6 +2693,8 @@ def diff(self, dim: Hashable, n: int = 1, label: Hashable = "upper") -> "DataArr difference : same type as caller The n-th order finite difference of this object. + .. note:: `n` matches numpy's behavior and is different from pandas' + Examples -------- >>> arr = xr.DataArray([5, 5, 6, 6], [[1, 2, 3, 4]], ['x'])