python: changing symbol variable and assign numerical value
<p>In order to calculate derivatives and other expressions I used the sympy package and said that <code>T = sy.Symbol('T')</code> now that I have calculated the right expression:</p>

<pre><code>E= -T**2*F_deriv_T(T,rho)
</code></pre>

<p>where </p>

<pre><code>def F_deriv_rho(T,rho):
    ret = 0
    for n in range(5):
        for m in range(4):
            inner= c[n,m]*g_rho_deriv_rho_np*g_T_np
        ret += inner
    return ret
</code></pre>

<p>that looks like this:</p>

<p><code>F_deriv_rho: [0.0 7.76971e-5*T 0.0001553942*T**2*rho
T*(-5.14488e-5*log(rho) - 5.14488e-5)*log(T) + T*(1.22574e-5*log(rho)+1.22574e-5)*log(T) + T*(1.89488e-5*log(rho) + 1.89488e-5)*log(T) + T(2.29441e-5*log(rho) + 2.29441e-5)*log(T) + T*(7.49956e-5*log(rho) + 7.49956e-5)*log(T)
 T**2*(-0.0001028976*rho*log(rho) - 5.14488e-5*rho)*log(T) + T**2*(2.45148e-5*rho*log(rho) + 1.22574e-5*rho)*log(T) + T**2*(3.78976e-5*rho*log(rho) + 1.89488e-5*rho)*log(T) + T**2*(4.58882e-5*rho*log(rho) + 2.29441e-5*rho)*log(T) + T**2*(0.0001499912*rho*log(rho) + 7.49956e 5*rho)*log(T)]</code></p>

<p>with python I would like to change T (and rho) as a symbol to a value. How could I do that?</p>

<p>So, I would like to create 10 numbers like <code>T_def = np.arange(2000, 10000, 800)</code>and exchange all my <code>sy.symbol(</code>T<code>)</code> by iterating through the 10 values I created in the array.</p>

<p>Thanks for your help</p>