-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
More support of non-string dimension names #2373
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @fujiisoup !
xarray/core/common.py
Outdated
""" | ||
Rolling window object. | ||
|
||
Parameters | ||
---------- | ||
dim: dict, optional | ||
Mapping from the dimension name to create the rolling iterator | ||
along (e.g. `time`) to its moging window size. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small typo!
xarray/core/common.py
Outdated
@@ -290,19 +290,22 @@ def _calc_assign_results(self, kwargs): | |||
results[k] = v | |||
return results | |||
|
|||
def assign_coords(self, **kwargs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would actually keep this one as before. It’s designed to mirror ‘assign‘, which also only accepts ‘**kwargs‘.
xarray/core/common.py
Outdated
@@ -650,6 +654,8 @@ def resample(self, freq=None, dim=None, how=None, skipna=None, | |||
|
|||
.. [1] http://pandas.pydata.org/pandas-docs/stable/timeseries.html#offset-aliases | |||
""" | |||
# TODO support non-string indexer after deprecating the old API. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deprecating -> removing
I am also tempted to do this, but it’s probably safer not to. |
Thanks @max-sixty and @shoyer for your kind review. |
Following to #2174
In some methods, consistency of the dictionary arguments and keyword arguments are checked twice in
Dataset
andVariable
.Can we change the API of Variable so that it does not take kwargs-type argument for dimension names?