Ask Your Question

Revision history [back]

The problem seems to be that par should only take integer inputs. Even outside of the interact, par(2.5) does not show a picture but returns a number. You can restrict the possible inputs to integers by giving a step size for the parameters in the interact:

@interact
def _(x=(0,10,1)):
    par(x)

This now shows pictures for each (integer) value of x.