Link a Play widget to a FloatSlider instead of an IntSlider

The example of the Play (animation) widget goes like this:

play = widgets.Play(
    value=50,
    min=0,
    max=100,
    step=1,
    interval=500,
    description="Press play",
    disabled=False
)
slider = widgets.IntSlider()
widgets.jslink((play, 'value'), (slider, 'value'))
widgets.HBox([play, slider])

In my case, I want to link the Play widget to a FloatSlider instead, like this:

play = widgets.Play(
    value=0.05,
    min=0,
    max=0.1,
    step=0.01,
    interval=500,
    description="Press play",
    disabled=False
)
slider = widgets.FloatSlider(
    value=0.05,
    min=0,
    max=0.1,
    step=0.01,
)
widgets.jslink((play, 'value'), (slider, 'value'))
widgets.HBox([play, slider])

However, this does not work. Is there a way to make it work? Thanks!

For the first code:
for x in range(0,100,1):
print(x)
you will get an output of the range 0 to 99 with step 1 in python so your first code is working.

For the second code:
for x in range(0,1/10,1/100):
print(x)
you are getting an error.So the second code doesn’t work.

you should numpy for your second code to work.


It’s just my perception .
@bollwyvl,@group correct me.