[SciPy-User] Strange installation?

Groves, Randy randy.groves@boeing....
Thu Oct 29 19:36:22 CDT 2009


So - I'm a SciPy newbie, but not to Python.

I've got a Fedora 10, with Python 2.5.2, scipy-0.7.0-2.fc10.i386 installed (scipy using yum).

I try the following (never mind the values ...):

Python 2.5.2 (r252:60911, Sep 30 2008, 15:41:38)
[GCC 4.3.2 20080917 (Red Hat 4.3.2-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import scipy
>>> xnew = [1,2,3]
>>> ynew = [10, 20, 25]
>>> p0 = 17.0
>>> fitfunc = lambda p, x: p - x
>>> errfunc = lambda p, x, y: fitfunc(p, x) - y
>>> p0 = 17.0
>>> p1, success = scipy.optimize.leastsq(errfunc, p0, args=(xnew, ynew))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'optimize'
>>>

If I then run the unit tests with scipy.test(), afterwards the call to scipy.optimize.leastsq is just fine.

dir(scipy) before and after the unit test confirms that optimize is not available.

Just also determined that if I use:

import scipy.optimize as op

I can see the optimize package just fine.

-randy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20091029/09b82a7e/attachment.html 


More information about the SciPy-User mailing list