Skip to content

Add weighted mean docs. #2012

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 23, 2018
Merged

Add weighted mean docs. #2012

merged 3 commits into from
Mar 23, 2018

Conversation

dcherian
Copy link
Contributor

I like @fujiisoup's weighted mean demo in this stack overflow example:
https://stackoverflow.com/questions/48510784/xarray-rolling-mean-with-weights

I thought it'd be a useful addition to the docs on rolling.

@@ -185,6 +185,12 @@ windowed rolling, convolution, short-time FFT, etc.

Because the ``DataArray`` given by ``r.construct('window_dim')`` is a view
of the original array, it is memory efficient.
One can also use ``construct`` to compute a weighted mean:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

weighted rolling
And nit: we've used You or We throughout - let's not add another voice

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I missed that

@@ -185,7 +185,7 @@ windowed rolling, convolution, short-time FFT etc.

Because the ``DataArray`` given by ``r.construct('window_dim')`` is a view
of the original array, it is memory efficient.
One can also use ``construct`` to compute a weighted mean:
You can also use ``construct`` to compute a weighted mean:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do think this should explicitly say weighted rolling mean, may have got lost from #2012 (comment)

@max-sixty max-sixty merged commit 7c2c43c into pydata:master Mar 23, 2018
@max-sixty
Copy link
Collaborator

Thanks a lot @dcherian !
And @fujiisoup for the feature and SO post!

@dcherian dcherian deleted the docs/rolling branch March 23, 2018 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants