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

Param 2: allow Dataset to have any number of kdims #626

Merged
merged 1 commit into from
Apr 27, 2023
Merged

Conversation

maximlt
Copy link
Member

@maximlt maximlt commented Apr 16, 2023

Fixes #624, in preparation of Param 2.

kdims.bounds was inherited from _Element with a value of (2, 2), which appeared not to be valid for Dataset. Running the notebooks pointed out in the issue, I saw that Dataset could have more kdims than 2. I was also slightly surprised to see that it could have less than 2, I got an error where kdims was just [Dimension('time')]. I decided to let kdims accept any number of dimensions, i.e. bounds=(0, None), as this anyway the default value in Param 1.

@hoxbro
Copy link
Member

hoxbro commented Apr 18, 2023

Does it make sense to have none kdims?

If it does, you can just merge this PR. If not, I suggest updating the bounds to (1, None).

@maximlt
Copy link
Member Author

maximlt commented Apr 18, 2023

kdims is configured this way on the Dimensioned object in HoloViews:

https://github.com/holoviz/holoviews/blob/main/holoviews/core/dimension.py#L815

I don't know if it makes sense though.

@hoxbro hoxbro merged commit 7709527 into main Apr 27, 2023
@hoxbro hoxbro deleted the params_update branch April 27, 2023 07:27
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.

Gridded dataset notebook raise ValueError
2 participants