[sage-support] odeint solver script works in IPython but gets 'array cannot be safely cast to required type' error in Sage

2009-02-16 Thread slybro
Hi All: Sage Version: 3.2.1 OS: Windows Vista Home I have tried the following script in IPthyon using the Python(x,y) distribution. It calculates the temperature profile in a set of three continuously stirred tank reactors starting from an initial condition and runs fine in Python 2.5, except t

[sage-support] Having difficulty using polyfit function

2009-01-10 Thread slybro
I am having trouble using the polyfit function. Here are the commands: import numpy as np import scipy as sc vp = np.array([1.0, 5.0, 10.0, 20.0, 40.0, 60.0, 100.0, 200.0, 400.0, 760.0]) T = np.array([-36.7, -19.6, -11.5, -2.6, 7.6, 15.4, 26.1, 42.2, 60.6, 80.1]) (a,b,c,d) = np.polyfit(vp,T,3