Hello:
I am using the following versions of Python and packages on Windows XP
(SP2):
Python 2.4.2
NumPy 0.9.4.win32-py2.4
SciPy 0.4.4 for Python 2.4 and Pentium 4/SSE2
In the Python Shell I am running the following:
[color=blue][color=green][color=darkred]
>>> from scipy.optimize import fmin
>>> def rosen(x):[/color][/color][/color]
return sum(100.0*(x[1:]-x[:-1]**2.0)**2.0 + (1-x[:-1])**2.0)
[color=blue][color=green][color=darkred]
>>> x0 = [1.3, 0.7, 0.8, 1.9, 1.2]
>>> xopt = fmin(rosen, x0)[/color][/color][/color]
I get the following error:
Traceback (most recent call last):
File "<pyshell#6 >", line 1, in -toplevel-
xopt = fmin(rosen, x0)
File "C:\Python24\Li b\site-packages\scipy\ optimize\optimi ze.py", line 191,
in fmin
sim = Num.zeros((N+1, N),x0.dtypechar )
AttributeError: 'numpy.ndarray' object has no attribute 'dtypechar'
Any idea what the problem might be?
Thanks.
I am using the following versions of Python and packages on Windows XP
(SP2):
Python 2.4.2
NumPy 0.9.4.win32-py2.4
SciPy 0.4.4 for Python 2.4 and Pentium 4/SSE2
In the Python Shell I am running the following:
[color=blue][color=green][color=darkred]
>>> from scipy.optimize import fmin
>>> def rosen(x):[/color][/color][/color]
return sum(100.0*(x[1:]-x[:-1]**2.0)**2.0 + (1-x[:-1])**2.0)
[color=blue][color=green][color=darkred]
>>> x0 = [1.3, 0.7, 0.8, 1.9, 1.2]
>>> xopt = fmin(rosen, x0)[/color][/color][/color]
I get the following error:
Traceback (most recent call last):
File "<pyshell#6 >", line 1, in -toplevel-
xopt = fmin(rosen, x0)
File "C:\Python24\Li b\site-packages\scipy\ optimize\optimi ze.py", line 191,
in fmin
sim = Num.zeros((N+1, N),x0.dtypechar )
AttributeError: 'numpy.ndarray' object has no attribute 'dtypechar'
Any idea what the problem might be?
Thanks.
Comment