You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added option to specify weights in xr.corr() and xr.cov() (#8527)
* Added function _weighted_cov_corr and modified cov and corr to call it if parameter weights is not None
* Correct two indentation errors
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Stupid typo
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Remove the min_count argument from mean
* Unified the code for weighted and unweighted _cov_corr
* Remove old _cov_corr function after checking that new version produces same results when weights=None or weights=xr.DataArray(1)
* Added examples that use weights for cov and corr
* Added two tests for weighted correlation and covariance
* Fix error in mypy, allow None as weights type.
* Update xarray/core/computation.py
Co-authored-by: Maximilian Roos <5635139+max-sixty@users.noreply.github.com>
* Update xarray/core/computation.py
Co-authored-by: Maximilian Roos <5635139+max-sixty@users.noreply.github.com>
* Info on new options for cov and corr in whatsnew
* Info on new options for cov and corr in whatsnew
* Fix typing
---------
Co-authored-by: Llorenc Lledo <Llorenc.Lledo@ecmwf.int>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Maximilian Roos <5635139+max-sixty@users.noreply.github.com>
Co-authored-by: Maximilian Roos <m@maxroos.com>
0 commit comments