[sympy] Possibility of calculating Jacobian of expression with IndexedBase

2010-10-09 Thread Nicholas Kinar
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

Re: [sympy] Possibility of calculating Jacobian of expression with IndexedBase

2010-10-11 Thread Nicholas Kinar
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

Re: [sympy] Possibility of calculating Jacobian of expression with IndexedBase

2010-10-12 Thread Nicholas Kinar
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

Re: [sympy] Possibility of calculating Jacobian of expression with IndexedBase

2010-10-12 Thread Aaron S. Meurer
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 >>

Re: [sympy] Possibility of calculating Jacobian of expression with IndexedBase

2010-10-12 Thread Nicholas Kinar
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