Skip to content
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

Fix for xarray interface add_dimension implementation #820

Merged
merged 1 commit into from Aug 18, 2016

Conversation

@philippjfr
Copy link
Member

@philippjfr philippjfr commented Aug 18, 2016

Fixes bug in handling add_dimension on xarray based datasets. Also fixes small bug when slicing dataset with no upper bound.

@@ -191,7 +191,8 @@ def select(cls, dataset, selection_mask=None, **selection):
if isinstance(v, set):
validated[k] = list(v)
elif isinstance(v, tuple):
validated[k] = slice(v[0], v[1]-sys.float_info.epsilon*10)
upper = None if v[1] is None else v[1]-sys.float_info.epsilon*10

This comment has been minimized.

@jlstevens

jlstevens Aug 18, 2016
Contributor

Why sys.float_info.epsilon*10? Is sys.float_info.epsilon not enough of a difference?

This comment has been minimized.

@philippjfr

philippjfr Aug 18, 2016
Author Member

Yea apparently not, bit annoying.

@jlstevens
Copy link
Contributor

@jlstevens jlstevens commented Aug 18, 2016

Looks fine. I made one comment about sys.float_info.epsilon. Ready to merge?

@jlstevens jlstevens merged commit f501e47 into master Aug 18, 2016
4 checks passed
4 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.004%) to 46.699%
Details
@philippjfr
s3-reference-data-cache Test data is cached.
Details
@philippjfr philippjfr deleted the xarray_add_dimension branch Sep 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants