Ask Your Question

Revision history [back]

From the documentation of selector:

Apart from a simple list, "values" can be given as a list of 2-tuples "(value, label)"

SageMath interprets your input list like this, and as a consequence it can't find the default value.

So for Combinations you have to do the following:

anIndexL=[1..5]
anCoupleIndexL=[(v,str(v)) for v in Combinations(anIndexL,2)]

@interact
def _( nbStepMax=slider(1,20,1,default=20),anCouple = selector(anCoupleIndexL,default=anCoupleIndexL[0][0])):
    show(anCouple)