ipywidgets icon indicating copy to clipboard operation
ipywidgets copied to clipboard

Bounded Float / Int text defaults

Open lheagy opened this issue 5 years ago • 4 comments

When providing only one bound to either a float or int text widget, I intuitively expect the other bound to be open e.g. if I want a variable to be non-negative, I used:

widgets.BoundedFloatText(min=0.)

Which I expected the to behave the same as

widgets.BoundedFloatText(min=0., max=float('inf'))

However, if the max is not set by the user, a default value of 100 is set. Would if make sense to others if we update the default bounds for the float / int text widgets to behave as -inf / +inf?

lheagy avatar Jun 13 '19 18:06 lheagy

Thanks! I think it would totally make sense!

However we would need to make this change in a major release since it would be a breaking change.

SylvainCorlay avatar Jun 13 '19 19:06 SylvainCorlay

Hi @SylvainCorlay , I was facing the same issue which @lheagy faced. Please let me know if this is fixed in some version ? Thanks.

ishankjain1407 avatar Mar 05 '22 19:03 ishankjain1407

Still not fixed as of now, So there is no way to impose restrictions on only one end while taking int or float input, cool.

bISTP avatar Oct 25 '23 12:10 bISTP