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

Allowed NdMappings with no kdims #841

Merged
merged 1 commit into from Aug 31, 2016

Conversation

Projects
None yet
2 participants
@philippjfr
Member

philippjfr commented Aug 31, 2016

This fixes indexing for 0D NdMappings and allows displaying them as a single frame.

@philippjfr

This comment has been minimized.

Member

philippjfr commented Aug 31, 2016

Ready to merge.

@jlstevens

This comment has been minimized.

Member

jlstevens commented Aug 31, 2016

I think it might be worth using param to ensure the length of the kdim list is one or more for all NdMapping types except DynamicMap where we can override it and allow an empty list.

That can then make use of this PR without also making things more flexible elsewhere where it isn't needed. I think we do expect more than one kdim in general (except for DynamicMap) so it is worth enforcing this as it might cause confusion otherwise (even if it only happens accidentally).

Otherwise, looks fine.

@jlstevens

This comment has been minimized.

Member

jlstevens commented Aug 31, 2016

Just to summarize a discussion I had with Philipp:

This PR allows some fairly odd things such as 0D HoloMaps. As it turns out, they are now needed to allow 0D DynamicMaps to display.

In the end, we decided to allow these odd but semantically valid HoloMaps because they are semantically valid, used in the plotting code and it seems unlikely that users will ever encounter them. For instance, to declare one, you would need to explicit use an empty tuple key and then declare kdims=[] (because a single kdim is declared by default).

@jlstevens jlstevens merged commit b9f15eb into master Aug 31, 2016

3 of 4 checks passed

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

@jlstevens jlstevens removed the in progress label Aug 31, 2016

@philippjfr philippjfr deleted the zero_kdim_ndmapping branch Sep 2, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment