From 50d57d9d53fb8f0897cf54bc338e5f044d2282b8 Mon Sep 17 00:00:00 2001 From: AS Date: Wed, 10 Mar 2021 12:12:52 +0100 Subject: [PATCH 1/4] add polyval to polyfit see also --- xarray/core/dataarray.py | 2 ++ xarray/core/dataset.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/xarray/core/dataarray.py b/xarray/core/dataarray.py index dd871eb21bc..29619b2599e 100644 --- a/xarray/core/dataarray.py +++ b/xarray/core/dataarray.py @@ -3781,6 +3781,8 @@ def polyfit( See Also -------- numpy.polyfit + numpy.polyval + DataArray.polyval """ return self._to_temp_dataset().polyfit( dim, deg, skipna=skipna, rcond=rcond, w=w, full=full, cov=cov diff --git a/xarray/core/dataset.py b/xarray/core/dataset.py index db45157e7c1..3980aa4c871 100644 --- a/xarray/core/dataset.py +++ b/xarray/core/dataset.py @@ -6399,6 +6399,8 @@ def polyfit( See Also -------- numpy.polyfit + numpy.polyval + Dataset.polyval """ variables = {} skipna_da = skipna From 5f93b122630f5100bbdf5cb5b1d34e22f30a7bc1 Mon Sep 17 00:00:00 2001 From: AS Date: Wed, 10 Mar 2021 12:32:05 +0100 Subject: [PATCH 2/4] whatsnew --- doc/whats-new.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/whats-new.rst b/doc/whats-new.rst index cbafe4d5999..e84084542be 100644 --- a/doc/whats-new.rst +++ b/doc/whats-new.rst @@ -55,7 +55,9 @@ Documentation ~~~~~~~~~~~~~ - New section on :ref:`add_a_backend` in the "Internals" chapter aimed to backend developers (:issue:`4803`, :pull:`4810`). By `Aureliana Barghini `_. - +- Add :py:meth:`Dataset.polyfit` and :py:meth:`DataArray.polyfit` under "See also" in + the docstrings of :py:meth:`Dataset.polyfit` and :py:meth:`DataArray.polyfit` + (:issue:`5016`, :pull:`5020`). By `Aaron Spring `_. Internal Changes ~~~~~~~~~~~~~~~~ From a65a221aa3f18e76424280d1a452cd0e7c6f6f80 Mon Sep 17 00:00:00 2001 From: AS Date: Wed, 10 Mar 2021 12:58:34 +0100 Subject: [PATCH 3/4] link polyval to docs --- doc/whats-new.rst | 1 + xarray/core/dataarray.py | 2 +- xarray/core/dataset.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/whats-new.rst b/doc/whats-new.rst index e84084542be..5826211923a 100644 --- a/doc/whats-new.rst +++ b/doc/whats-new.rst @@ -59,6 +59,7 @@ Documentation the docstrings of :py:meth:`Dataset.polyfit` and :py:meth:`DataArray.polyfit` (:issue:`5016`, :pull:`5020`). By `Aaron Spring `_. + Internal Changes ~~~~~~~~~~~~~~~~ diff --git a/xarray/core/dataarray.py b/xarray/core/dataarray.py index 29619b2599e..185e691ef54 100644 --- a/xarray/core/dataarray.py +++ b/xarray/core/dataarray.py @@ -3782,7 +3782,7 @@ def polyfit( -------- numpy.polyfit numpy.polyval - DataArray.polyval + xarray.DataArray.polyval """ return self._to_temp_dataset().polyfit( dim, deg, skipna=skipna, rcond=rcond, w=w, full=full, cov=cov diff --git a/xarray/core/dataset.py b/xarray/core/dataset.py index 3980aa4c871..04f50c80aa4 100644 --- a/xarray/core/dataset.py +++ b/xarray/core/dataset.py @@ -6400,7 +6400,7 @@ def polyfit( -------- numpy.polyfit numpy.polyval - Dataset.polyval + xarray.Dataset.polyval """ variables = {} skipna_da = skipna From 13df82fa699ceb4c0bb8157875ae2ece16efbb6d Mon Sep 17 00:00:00 2001 From: AS Date: Wed, 10 Mar 2021 13:24:21 +0100 Subject: [PATCH 4/4] link polyval to docs --- xarray/core/dataarray.py | 2 +- xarray/core/dataset.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xarray/core/dataarray.py b/xarray/core/dataarray.py index 185e691ef54..5f944354901 100644 --- a/xarray/core/dataarray.py +++ b/xarray/core/dataarray.py @@ -3782,7 +3782,7 @@ def polyfit( -------- numpy.polyfit numpy.polyval - xarray.DataArray.polyval + xarray.polyval """ return self._to_temp_dataset().polyfit( dim, deg, skipna=skipna, rcond=rcond, w=w, full=full, cov=cov diff --git a/xarray/core/dataset.py b/xarray/core/dataset.py index 04f50c80aa4..d76d136be8b 100644 --- a/xarray/core/dataset.py +++ b/xarray/core/dataset.py @@ -6400,7 +6400,7 @@ def polyfit( -------- numpy.polyfit numpy.polyval - xarray.Dataset.polyval + xarray.polyval """ variables = {} skipna_da = skipna