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

Projects
None yet
2 participants
@jlstevens
Copy link
Contributor

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

This comment has been minimized.

Copy link
Contributor Author

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]:

This comment has been minimized.

@philippjfr

philippjfr Feb 10, 2016

Contributor

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

This comment has been minimized.

@jlstevens

jlstevens Feb 10, 2016

Author Contributor

Good point. Fixed in the last commit.

@philippjfr

This comment has been minimized.

Copy link
Contributor

philippjfr commented Feb 10, 2016

Made one comment, looks fine otherwise.

@philippjfr

This comment has been minimized.

Copy link
Contributor

philippjfr commented Feb 10, 2016

Looks good, will merge as soon as tests pass.

philippjfr pushed a commit that referenced this pull request Feb 10, 2016

Philipp Rudiger Philipp Rudiger
Merge pull request #488 from ioam/dynamic_slicing
Implemented slicing semantics for bounded DynamicMaps

@philippjfr philippjfr merged commit d4e59a5 into master Feb 10, 2016

3 of 4 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.2%) to 69.245%
Details
s3-reference-data-cache Test data is cached.
Details

@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
You can’t perform that action at this time.