Skip to content

Commit 7d73dab

Browse files
committed
Tweak detrend docstring
1 parent 79a2ba8 commit 7d73dab

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

xrft/detrend.py

+11-8
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,30 @@
88
import scipy.linalg as spl
99

1010

11-
def detrend(da, dim, detrend_type="constant"):
11+
def detrend(da, dim=None, detrend_type="constant"):
1212
"""
13-
Detrend a DataArray
13+
Detrend a :class:`~xarray.DataArray`.
1414
1515
Parameters
1616
----------
1717
da : xarray.DataArray
1818
The data to detrend.
1919
dim : str or sequence of str, optional
2020
Dimensions along which to apply detrend.
21-
Can be either one dimension or a list with two dimensions.
22-
Higher-dimensional detrending is not supported.
23-
If Dask data are passed, the array must be chunked along `dim`.
21+
Default: :attr:`da.dims <xarray.DataArray.dims>`.
22+
23+
.. note::
24+
- Can be either **one** dimension or a list with **two** dimensions.
25+
Higher-dimensional detrending is not supported.
26+
- If Dask data are passed, the array must be chunked along `dim`.
2427
detrend_type : {'constant', 'linear'}
25-
If ``constant``, a constant offset will be removed from each dim.
26-
If ``linear``, a linear least squares fit will be estimated and removed
28+
If ``'constant'``, a constant offset will be removed from each dim.
29+
If ``'linear'``, a linear least squares fit will be estimated and removed
2730
from the data.
2831
2932
Returns
3033
-------
31-
da : xarray.DataArray
34+
da_dt : xarray.DataArray
3235
The detrended data.
3336
3437
Notes

0 commit comments

Comments
 (0)