I am using an IPython Jupyter notebook. In the following situation, I call a function using interact()
, which in turns calls a second function again using interact()
.
def fun1(dataset_id):
dataset = read_dataset(dataset_id)
interact(fun2, data=dataset, var=(0,dataset.property,0.1))
def fun2(data, var):
# something
interact(fun1, dataset_id=(0,5,1))
When first running this, it display 2 slider widgets: one for dataset_id
, and one for the variable var
. But if I vary the dataset_id
slider once, a second slider for var
is added below the first var
slider, so now I have 3 sliders in total. How can I avoid this?