Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions doc/whats-new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ Bug fixes

Documentation
~~~~~~~~~~~~~
- update the docstring of :py:meth:`Dataset.diff` and
:py:meth:`DataArray.diff` so it does document the ``dim``
parameter as required. (:issue:`1040`, :pull:`3909`)
By `Justus Magin <https://github.com/keewis>`_.


Internal Changes
Expand Down
2 changes: 1 addition & 1 deletion xarray/core/dataarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -2696,7 +2696,7 @@ def diff(self, dim: Hashable, n: int = 1, label: Hashable = "upper") -> "DataArr

Parameters
----------
dim : hashable, optional
dim : hashable
Dimension over which to calculate the finite difference.
n : int, optional
The number of times values are differenced.
Expand Down
2 changes: 1 addition & 1 deletion xarray/core/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -4901,7 +4901,7 @@ def diff(self, dim, n=1, label="upper"):

Parameters
----------
dim : str, optional
dim : str
Dimension over which to calculate the finite difference.
n : int, optional
The number of times values are differenced.
Expand Down