-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
rolling_exp (nee ewm) #2650
rolling_exp (nee ewm) #2650
Conversation
max-sixty
commented
Jan 4, 2019
•
edited
Loading
edited
- Duplicate groupby / rolling interface
- Integrate with apply_ufunc, including orientation and coords
- Define com / span / alpha interface
- Implement for Variable & Dataset
- Docs
I know the name |
Before we add even an optional dependency on numbagg in xarray, we should probably do a bit of cleanup (e.g., making sure we're happy with its public interface, and putting a release up on pypi) |
👍
Yes, that works. I'm fairly balanced between them - others' thoughts? |
I like BTW, does |
I would lean towards a dedicated method, since there are method specific options. It's pretty awkward to reuse a single interface for that. |
Index, currently. Would be great to have an algo that dealt with coord value, and I think not too difficult |
Tests seem to be failing on a different issue? https://travis-ci.org/pydata/xarray/jobs/479042667#L7759 |
see #2669 for the tests issue
…On Sun, Jan 13, 2019 at 6:12 PM Maximilian Roos ***@***.***> wrote:
Tests seem to be failing on a different issue?
https://travis-ci.org/pydata/xarray/jobs/479042667#L7759
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2650 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABKS1qKW-0elts0N53ojvQWe1oO3PoRIks5vC1rrgaJpZM4Zt5Sw>
.
|
I think this is in a reasonable state for DataArray, excluding docs. Let me know any feedback on the APi Does anyone have a view on the canonical way to implement these for Dataset, given potentially only a subset of the variables will have the dimension? |
You could probably copy the logic from |
The error is when applying over a dimension on a dataset where only some of the variables have the dimension; e.g. applying over <xarray.Dataset>
Dimensions: (time: 10, x: 8, y: 2)
Coordinates:
* x (x) float64 0.0 0.1429 0.2857 0.4286 0.5714 0.7143 0.8571 1.0
* time (time) float64 0.0 0.1111 0.2222 0.3333 ... 0.7778 0.8889 1.0
c (y) <U1 'a' 'b'
* y (y) int64 0 1
Data variables:
z1 (y, x) float64 -0.1035 -0.8153 -1.583 ... 1.447 0.7768 -0.2699
z2 (time, y) float64 0.968 0.7156 -1.64 ... 0.1889 -1.142 0.7172 ...rather than any issues applying on If it's helpful to add that functionality directly to |
I remember I faced the same issue in implementing
I think it would make the code much cleaner at least for these methods. |
I made an attempt to add the "skip variables without the dimension" to I may be missing something - let me know if there's an reasonable approach Otherwise I'll do the close thing for this PR, and potentially we can have a look at the general solution later |
This is updated! Could put an "Experimental" label on if we want (or maybe that's implicit). Let me know any final changes. Will be good to get this merged at last. |
# Conflicts: # xarray/tests/__init__.py # xarray/tests/test_dataset.py
The gentlest of reminders that I think this is ready to merge (mea culpa for leaving it at 90% for so long) |
Hello @max-sixty! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2019-06-24 03:44:56 UTC |
Great - updated! Let me know any final comments! |
Updated! Let me know any final changes! |
OK, in it goes. Thanks @max-sixty ! |
Thanks for all the help! |
* master: (31 commits) Add quantile method to GroupBy (pydata#2828) rolling_exp (nee ewm) (pydata#2650) Ensure explicitly indexed arrays are preserved (pydata#3027) add back dask-dev tests (pydata#3025) ENH: keepdims=True for xarray reductions (pydata#3033) Revert cmap fix (pydata#3038) Add "errors" keyword argument to drop() and drop_dims() (pydata#2994) (pydata#3028) More consistency checks (pydata#2859) Check types in travis (pydata#3024) Update issue templates (pydata#3019) Add pytest markers to avoid warnings (pydata#3023) Feature/merge errormsg (pydata#2971) More support for missing_value. (pydata#2973) Use flake8 rather than pycodestyle (pydata#3010) Pandas labels deprecation (pydata#3016) Pytest capture uses match, not message (pydata#3011) dask-dev tests to allowed failures in travis (pydata#3014) Fix 'to_masked_array' computing dask arrays twice (pydata#3006) str accessor (pydata#2991) fix safe_cast_to_index (pydata#3001) ...