2 Apr
2008
2 Apr
'08
8 p.m.
Hi Doreen,
def residuals(p,y,t): return [V - S(t,p) for i in xrange(len(t))]
Minpack expects an array type to be returned. You're returning a python list. So try this: def residuals(p,y,t): return array([V - S(t_val,p) for t_val in t]) Here I've also removed the unnecessary i index variable -- Python lets you iterate directly over the contents of the list t. -Rob -- Robert H. Clewley, Ph. D. Assistant Professor Department of Mathematics and Statistics Georgia State University 720 COE, 30 Pryor St Atlanta, GA 30303, USA tel: 404-413-6420 fax: 404-651-2246 http://www.mathstat.gsu.edu/~matrhc http://brainsbehavior.gsu.edu/