Hello,
I've attempted to calculate the Jacobian of a simple expression with
indexed variables, and it appears that the diff() function cannot
currently work with the IndexedBase class.
Running the sample code below results in the following traceback:
Traceback (most recent call last):
File
Hello,
I've attempted to calculate the Jacobian of a simple expression with
indexed variables, and it appears that the diff() function cannot
currently work with the IndexedBase class.
Running the sample code below results in the following traceback:
Traceback (most recent call last):
Fi
The easiest workaround that I can think of is to use subs() to
substitute variables p_1_1 and p_1_2 into the expressions so that the
Jacobian is not computed using indexed variables p[1,1] and p[1,2].
However, I can't seem to use subs() to substitute the variables
either! What am I doing
On Oct 12, 2010, at 10:53 AM, Nicholas Kinar wrote:
>
>>
>> The easiest workaround that I can think of is to use subs() to substitute
>> variables p_1_1 and p_1_2 into the expressions so that the Jacobian is not
>> computed using indexed variables p[1,1] and p[1,2]. However, I can't seem
>>
I have to admit that the documentation
(http://docs.sympy.org/modules/core.html?highlight=subs#sympy.core.basic.Basic.subs)
misled me into thinking that subs() works directly on the variable itself, and
there is no need to assign the output to another variable.
All expressions in SymP