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

Allowed NdMappings with no kdims #841

Merged
merged 1 commit into from
Aug 31, 2016
Merged

Allowed NdMappings with no kdims #841

merged 1 commit into from
Aug 31, 2016

Conversation

philippjfr
Copy link
Member

@philippjfr philippjfr commented Aug 31, 2016

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

@philippjfr
Copy link
Member Author

Ready to merge.

@jlstevens
Copy link
Contributor

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

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
@philippjfr philippjfr deleted the zero_kdim_ndmapping 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