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

cast 'value' in range sliders to a tuple #2441

Merged
merged 5 commits into from
Jan 9, 2020

Conversation

lheagy
Copy link
Contributor

@lheagy lheagy commented Jun 13, 2019

Following up from the conversation in #2435, this would allow numpy arrays (or lists) to be past as the value to an IntRangeSlider or a FloatRangeSlider by trying to cast the value input to a tuple when the slider is instantiated. This can be really handy when you want to specify a symmetric value about zero, e.g.

image

See if you think this is an appropriate place to do this. If so, I can also add a test to the pr

@SylvainCorlay
Copy link
Member

Would CTuple do the job?

@vidartf
Copy link
Member

vidartf commented Jan 9, 2020

CTuple does not exists :)

@vidartf vidartf added this to the 8.0 milestone Jan 9, 2020
@vidartf vidartf self-assigned this Jan 9, 2020
@vidartf vidartf merged commit 6667f81 into jupyter-widgets:master Jan 9, 2020
@lock lock bot added the resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label May 20, 2020
@lock lock bot locked as resolved and limited conversation to collaborators May 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants