-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add dtype support for reduce methods. #1841
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.
Looks great, thanks!
xarray/core/duck_array_ops.py
Outdated
kwargs.pop('dtype', None) | ||
kwargs.pop('out', None) | ||
if kwargs.pop('out', None) is not None: | ||
raise ValueError('`out` is not valid for {}'.format(name)) |
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.
This should probably be TypeError
for invalid argument names.
xarray/tests/test_dataarray.py
Outdated
'c': -999} | ||
orig = DataArray([[-1, 0, 1], [-3, 0, 3]], coords, dims=['x', 'y']) | ||
|
||
for dtype in [np.float32, np.float64, np.float128]: |
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.
Looks like you'll need to remove np.float128
. It appears that it's not available on Windows, which is triggering this test failure.
git diff upstream/master **/*py | flake8 --diff
whats-new.rst
for all changes andapi.rst
for new APIFixes #1838.
The new rule for reduce is
as suggested in this comments.