Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Agreed that the error is a little mysterious. Here is what is going on, in a simpler case where I just made the matrix matrix(2,[1,2,3,4]).

sage: A*exp(-E_A/(R*temp))
array([A*e^(-0.06013618199229246*E_A), A*e^(-0.03006809099614623*E_A)], dtype=object)

So far, so good.

sage: model(conc) = A*exp(-E_A/(R*temp))
<boom>

When we do this, as you can see at the top of the traceback, it creates a symbolic expression from the thing you put in it. Unfortunately, what symbolic expression would that be? Even

sage: symbolic_expression(temp)

yields the same error. We don't create symbolic expressions from arrays. (I've opened Trac 16761 for this.)

However, I'm not sure what the "right" thing here is. The documentation examples all have single-output functions, not vector-valued functions. That this may not have a well-defined one-size-fits-all solution is suggested by this question on the Mathematica list.