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

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
Copy link
Contributor

Choose a reason for hiding this comment

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

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Yea apparently not, bit annoying.

@jlstevens
Copy link
Contributor

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

@jlstevens jlstevens merged commit f501e47 into master Aug 18, 2016
@philippjfr philippjfr deleted the xarray_add_dimension branch September 2, 2016 00:57
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.

2 participants