File tree 1 file changed +11
-8
lines changed
1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change 8
8
import scipy .linalg as spl
9
9
10
10
11
- def detrend (da , dim , detrend_type = "constant" ):
11
+ def detrend (da , dim = None , detrend_type = "constant" ):
12
12
"""
13
- Detrend a DataArray
13
+ Detrend a :class:`~xarray. DataArray`.
14
14
15
15
Parameters
16
16
----------
17
17
da : xarray.DataArray
18
18
The data to detrend.
19
19
dim : str or sequence of str, optional
20
20
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`.
24
27
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
27
30
from the data.
28
31
29
32
Returns
30
33
-------
31
- da : xarray.DataArray
34
+ da_dt : xarray.DataArray
32
35
The detrended data.
33
36
34
37
Notes
You can’t perform that action at this time.
0 commit comments