Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to use matrices with @interact

I found the following example here.

@interact
def _(m=('matrix', identity_matrix(2))):
    print m.eigenvalues()

Unlike the other examples I've tried, this one does not work when evaluated in SageMathCell. But it works well in a SageMathCloud Worksheet.

What am I supposed to do to produce such a matrix interact that works when I embed it in an html page?

How to use matrices with @interact

I found the following example here.

@interact
def _(m=('matrix', identity_matrix(2))):
    print m.eigenvalues()

Unlike the other examples I've tried, this one does not work when evaluated in SageMathCell. But it works well in a SageMathCloud Worksheet.

What am I supposed to do to produce such a matrix interact that works when I embed it in an html pagepages?

How to use matrices with @interact

I found the following example here.

@interact
def _(m=('matrix', identity_matrix(2))):
    print m.eigenvalues()

Unlike the other examples I've tried, this one does not work when evaluated in SageMathCell. But it works well in a SageMathCloud Worksheet.

What am I supposed to do to produce such a matrix interact that works when I embed it in html pages?