Ask Your Question

Revision history [back]

This is likely a case of SymPy expecting Python integers and getting Sage integers.

Are you running this in both cases in a Jupyter sheet?

Is it using the SageMath Jupyter kernel in both cases?

Is it using the same version of SageMath?

Does it help to force some of the integers to be Python integers as below?

l = sp.symbols('l')
rhs_arr = []
for vals in mat_high_dim:
    vals = list(map(sp.sympify, vals))
        {A11: int(1),
         U11: vals[0],
         A21: int(0),
         U21: vals[1],
         b: int(1),
         v: vals[2],
         C11: int(1),
         W11: vals[3],
         C12: int(-2),
         W12: vals[4],
         d: int(3),
         r: vals[5],
         mylambda: l}))