From 2e7f9ee8f809f0ee106ace74d1cd237c9fdc4f9f Mon Sep 17 00:00:00 2001 From: Maximilian Roos <5635139+max-sixty@users.noreply.github.com> Date: Wed, 26 Feb 2020 18:41:11 -0500 Subject: [PATCH] Add note on diff differing from pandas --- xarray/core/dataarray.py | 2 ++ 1 file changed, 2 insertions(+) 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'])