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
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.
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