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
Merged

Conversation

@jlstevens
Copy link
Contributor

@jlstevens jlstevens commented Feb 10, 2016

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

@jlstevens jlstevens commented Feb 10, 2016

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

@philippjfr philippjfr Feb 10, 2016

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

@jlstevens jlstevens Feb 10, 2016

Good point. Fixed in the last commit.

@philippjfr
Copy link
Member

@philippjfr philippjfr commented Feb 10, 2016

Made one comment, looks fine otherwise.

@philippjfr
Copy link
Member

@philippjfr philippjfr commented Feb 10, 2016

Looks good, will merge as soon as tests pass.

philippjfr pushed a commit that referenced this issue Feb 10, 2016
Implemented slicing semantics for bounded DynamicMaps
@philippjfr philippjfr merged commit d4e59a5 into master Feb 10, 2016
3 of 4 checks passed
@jlstevens jlstevens deleted the dynamic_slicing branch Feb 11, 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