问题 I have a python function which generates a sympy.Matrix with symbolic entries. It works effectively like: import sympy as sp M = sp.Matrix([[1,0,2],[0,1,2],[1,2,0]]) def make_symbolic_matrix(M): M_sym = sp.zeros(3) syms = ['a0:3'] for i in xrange(3): for j in xrange(3): if M[i,j] == 1: M_sym = syms[i] elif M[i,j] == 2: M_sym = 1 - syms[i] return M_sym This works just fine. I get a matrix out, which I can use for all the symbolical calculations I need. My issue is that now I want to evaluate