Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Same problem here (9.7.beta5 sompiled from Git on Deban testing). But this :

@interact
def _(v=input_grid(1, 3, 
                   default=[[1,2,3]],
                   to_value=lambda x: vector(SR, flatten(x)),
                   label='vector')):
    print(v.norm())

works as expected using either Jupyter or Jupyterlab and on Sagecell.

One may note that Sagecell automatically adds an auto_update=False argument. (This button, BTW, avoids the constant update during edition of the values, as well the error messages occurring when a value isn't evalable during edition, and might be a valuable addition to your controls...).

This implies that the interact engines of Jupyter and Sagecell aren't identical, which could explain that the form def _((<somelabel>, <somecontrol>),...) is no longer accepted by Sage's Jupyter and Jupyterlab, while still being acceptable by Sagecell.

But I am anything but familiar with interacts ; a question on sage-support would be in order...

HTH,