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

Implemented slicing semantics for bounded DynamicMaps #488

Merged
merged 2 commits into from
Feb 10, 2016

Conversation

jlstevens
Copy link
Contributor

If you start using slices in bounded mode, you have to use slices throughout.

Slicing sets/unsets the dimension soft_ranges which can be used to restrict the explorable region. I'll be documenting this in the new Dynamic Map tutorial.

@jlstevens
Copy link
Contributor Author

Seems to work fine in the examples I've tried. If it looks ok to you, could you please merge?

(start, stop) = slc.start, slc.stop
if start and start < cloned.kdims[i].range[0]:
raise Exception("Requested slice below defined dimension range.")
if stop and stop > cloned.kdims[i].range[1]:
Copy link
Member

Choose a reason for hiding this comment

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

Make sure you check start is not None and stop is not None explicitly otherwise it'll fall through for zeros.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. Fixed in the last commit.

@philippjfr
Copy link
Member

Made one comment, looks fine otherwise.

@philippjfr
Copy link
Member

Looks good, will merge as soon as tests pass.

philippjfr added a commit that referenced this pull request Feb 10, 2016
Implemented slicing semantics for bounded DynamicMaps
@philippjfr philippjfr merged commit d4e59a5 into master Feb 10, 2016
@jlstevens jlstevens deleted the dynamic_slicing branch February 11, 2016 12:37
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants