scipy.optimize.leastsq error estimates
Hi all, I want to fit a sinusoid of the form A*cos(2*pi*f*t) + B*sin(2*pi*f*t) to irregularly spaced data so that I can get a wave of the form C*cos(2*pi*f*t + phi) where C**2 = A**2 + B**2 and phi = arctan(-B/A). I have implemented this using the leastsq function but, I'd would like to also know the variances ( or standard errors ) of A,B and f. Is there a way I can get the variance-covariance matrix out from leastsq? or at least get a good estimate of the standard errors of my unknowns? -Ewald Zietsman
Ewald Zietsman wrote:
Hi all,
I want to fit a sinusoid of the form A*cos(2*pi*f*t) + B*sin(2*pi*f*t) to irregularly spaced data so that I can get a wave of the form C*cos(2*pi*f*t + phi) where C**2 = A**2 + B**2 and phi = arctan(-B/A). I have implemented this using the leastsq function but, I'd would like to also know the variances ( or standard errors ) of A,B and f. Is there a way I can get the variance-covariance matrix out from leastsq? or at least get a good estimate of the standard errors of my unknowns?
When setting full_output=True leastsq will return the covraiance matrix: cov_x -- uses the fjac and ipvt optional outputs to construct an estimate of the covariance matrix of the solution. None if a singular matrix encountered (indicates infinite covariance in some direction). However I recommend using scipy.sandbox.odr instead which returns confidence intervals for all parameters. Christian
Christian Kristukat wrote:
Ewald Zietsman wrote:
Hi all,
I want to fit a sinusoid of the form A*cos(2*pi*f*t) + B*sin(2*pi*f*t) to irregularly spaced data so that I can get a wave of the form C*cos(2*pi*f*t + phi) where C**2 = A**2 + B**2 and phi = arctan(-B/A). I have implemented this using the leastsq function but, I'd would like to also know the variances ( or standard errors ) of A,B and f. Is there a way I can get the variance-covariance matrix out from leastsq? or at least get a good estimate of the standard errors of my unknowns?
When setting full_output=True leastsq will return the covraiance matrix:
cov_x -- uses the fjac and ipvt optional outputs to construct an estimate of the covariance matrix of the solution. None if a singular matrix encountered (indicates infinite covariance in some direction).
However I recommend using scipy.sandbox.odr instead which returns confidence intervals for all parameters.
Christian _______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
AFAIK odr is directly available through scipy.odr. So I guess the odr directory in the sandbox is obsolete. Is that correct ? Nils
Nils Wagner wrote:
AFAIK odr is directly available through scipy.odr. So I guess the odr directory in the sandbox is obsolete. Is that correct ?
At least not in scipy 0.5.2.dev2299. Might be differnt in svn. Christian
Christian Kristukat wrote:
Nils Wagner wrote:
AFAIK odr is directly available through scipy.odr. So I guess the odr directory in the sandbox is obsolete. Is that correct ?
At least not in scipy 0.5.2.dev2299. Might be differnt in svn.
Christian _______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
I am using
scipy.__version__ '0.5.3.dev2667'
Nils
Nils Wagner wrote:
AFAIK odr is directly available through scipy.odr. So I guess the odr directory in the sandbox is obsolete. Is that correct ?
There is no more odr/ directory in the sandbox since it got moved into the main package. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco
Hi, I am also interested in having errors from the fit, and I tried to import the module scipy.odr as you said, but I got this errors: File "/usr/local/lib/python2.4/site-packages/scipy/odr/__init__.py", line 49, in ? import odrpack File "/usr/local/lib/python2.4/site-packages/scipy/odr/odrpack.py", line 103, in ? from scipy.sandbox.odr import __odrpack ImportError: No module named odr And the same is if I try to import sandbox.odr import scipy.sandbox.odr Traceback (most recent call last): File "<stdin>", line 1, in ? ImportError: No module named odr Where am I wrong? Thank you, Chiara
From: Robert Kern <robert.kern@gmail.com> Reply-To: SciPy Users List <scipy-user@scipy.org> To: SciPy Users List <scipy-user@scipy.org> Subject: Re: [SciPy-user] scipy.optimize.leastsq error estimates Date: Tue, 06 Feb 2007 03:47:17 -0600
Nils Wagner wrote:
AFAIK odr is directly available through scipy.odr. So I guess the odr directory in the sandbox is obsolete. Is that correct ?
There is no more odr/ directory in the sandbox since it got moved into the main package.
-- Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco _______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
_________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
Chiara Caronna wrote:
Hi, I am also interested in having errors from the fit, and I tried to import the module scipy.odr as you said, but I got this errors:
File "/usr/local/lib/python2.4/site-packages/scipy/odr/__init__.py", line 49, in ? import odrpack File "/usr/local/lib/python2.4/site-packages/scipy/odr/odrpack.py", line 103, in ? from scipy.sandbox.odr import __odrpack ImportError: No module named odr
And the same is if I try to import sandbox.odr
import scipy.sandbox.odr
Traceback (most recent call last): File "<stdin>", line 1, in ? ImportError: No module named odr
Where am I wrong? Thank you, Chiara
From: Robert Kern <robert.kern@gmail.com> Reply-To: SciPy Users List <scipy-user@scipy.org> To: SciPy Users List <scipy-user@scipy.org> Subject: Re: [SciPy-user] scipy.optimize.leastsq error estimates Date: Tue, 06 Feb 2007 03:47:17 -0600
Nils Wagner wrote:
AFAIK odr is directly available through scipy.odr. So I guess the odr directory in the sandbox is obsolete. Is that correct
?
There is no more odr/ directory in the sandbox since it got moved into the main package.
-- Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco _______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
_________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
odr is in the main tree. Python 2.4 (#1, Oct 13 2006, 16:43:49) [GCC 3.3.5 20050117 (prerelease) (SUSE Linux)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import scipy scipy.__version__ '0.5.3.dev2704' import scipy.odr
works fine for me. Nils
ok I have scipy 0.5.2... I guess this is the problem... How can I get the 0.5.3 version, It seems that 0.5.2 is the last version available on scipy.org...
From: Nils Wagner <nwagner@iam.uni-stuttgart.de> Reply-To: SciPy Users List <scipy-user@scipy.org> To: SciPy Users List <scipy-user@scipy.org> Subject: Re: [SciPy-user] scipy.optimize.leastsq error estimates Date: Wed, 14 Feb 2007 11:24:56 +0100
Hi, I am also interested in having errors from the fit, and I tried to import the module scipy.odr as you said, but I got this errors:
File "/usr/local/lib/python2.4/site-packages/scipy/odr/__init__.py",
49, in ? import odrpack File "/usr/local/lib/python2.4/site-packages/scipy/odr/odrpack.py",
103, in ? from scipy.sandbox.odr import __odrpack ImportError: No module named odr
And the same is if I try to import sandbox.odr
import scipy.sandbox.odr
Traceback (most recent call last): File "<stdin>", line 1, in ? ImportError: No module named odr
Where am I wrong? Thank you, Chiara
From: Robert Kern <robert.kern@gmail.com> Reply-To: SciPy Users List <scipy-user@scipy.org> To: SciPy Users List <scipy-user@scipy.org> Subject: Re: [SciPy-user] scipy.optimize.leastsq error estimates Date: Tue, 06 Feb 2007 03:47:17 -0600
Nils Wagner wrote:
AFAIK odr is directly available through scipy.odr. So I guess the odr directory in the sandbox is obsolete. Is that correct
?
There is no more odr/ directory in the sandbox since it got moved into
Chiara Caronna wrote: line line the
main package.
-- Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco _______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
_________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
odr is in the main tree.
Python 2.4 (#1, Oct 13 2006, 16:43:49) [GCC 3.3.5 20050117 (prerelease) (SUSE Linux)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import scipy scipy.__version__ '0.5.3.dev2704' import scipy.odr
works fine for me.
Nils
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
_________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
Chiara Caronna wrote:
ok I have scipy 0.5.2... I guess this is the problem... How can I get the 0.5.3 version, It seems that 0.5.2 is the last version available on scipy.org...
I guess Nils is using the svn version. So make a checkout as described here http://www.scipy.org/Download and edit the file Lib/sandbox/setup.py to make sure that the odr module will be built. Christian
Chiara Caronna wrote:
ok I have scipy 0.5.2... I guess this is the problem... How can I get the 0.5.3 version, It seems that 0.5.2 is the last version available on scipy.org...
You can get the latest version via svn co http://svn.scipy.org/svn/scipy/trunk scipy If you use 0.5.2 look into the directory scipy/Lib/sandbox and create a file called enabled_packages.txt which should contain odr in the first line (a new line for each package) Afterwards you have to reinstall scipy. Assuming that 0.5.2 has odr in the sandbox you can import odr from the sandbox afterwards. If you use the svn version you can import odr from the main tree. import scipy.odr Anyway there is an open ticket wrt odr http://projects.scipy.org/scipy/scipy/ticket/357 Nils
From: Nils Wagner <nwagner@iam.uni-stuttgart.de> Reply-To: SciPy Users List <scipy-user@scipy.org> To: SciPy Users List <scipy-user@scipy.org> Subject: Re: [SciPy-user] scipy.optimize.leastsq error estimates Date: Wed, 14 Feb 2007 11:24:56 +0100
Chiara Caronna wrote:
Hi, I am also interested in having errors from the fit, and I tried to
import
the module scipy.odr as you said, but I got this errors:
File "/usr/local/lib/python2.4/site-packages/scipy/odr/__init__.py",
line
49, in ? import odrpack File "/usr/local/lib/python2.4/site-packages/scipy/odr/odrpack.py",
line
103, in ? from scipy.sandbox.odr import __odrpack ImportError: No module named odr
And the same is if I try to import sandbox.odr
import scipy.sandbox.odr
Traceback (most recent call last): File "<stdin>", line 1, in ? ImportError: No module named odr
Where am I wrong? Thank you, Chiara
From: Robert Kern <robert.kern@gmail.com> Reply-To: SciPy Users List <scipy-user@scipy.org> To: SciPy Users List <scipy-user@scipy.org> Subject: Re: [SciPy-user] scipy.optimize.leastsq error estimates Date: Tue, 06 Feb 2007 03:47:17 -0600
Nils Wagner wrote:
AFAIK odr is directly available through scipy.odr. So I guess the odr directory in the sandbox is obsolete. Is that
correct
?
There is no more odr/ directory in the sandbox since it got moved into
the
main package.
-- Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though
it
had an underlying truth." -- Umberto Eco _______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
_________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
odr is in the main tree.
Python 2.4 (#1, Oct 13 2006, 16:43:49) [GCC 3.3.5 20050117 (prerelease) (SUSE Linux)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import scipy scipy.__version__
'0.5.3.dev2704'
import scipy.odr
works fine for me.
Nils
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
_________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
If you use 0.5.2
look into the directory scipy/Lib/sandbox and create a file called enabled_packages.txt which should contain
odr
in the first line (a new line for each package)
I did what you said, but when reinstalling scipy I got this error: File "Lib/sandbox/setup.py", line 22, in configuration config.add_subpackage(p) File "/usr/local/lib/python2.4/site-packages/numpy/distutils/misc_util.py", line 765, in add_subpackage caller_level = 2) File "/usr/local/lib/python2.4/site-packages/numpy/distutils/misc_util.py", line 741, in get_subpackage caller_level = caller_level+1) File "/usr/local/lib/python2.4/site-packages/numpy/distutils/misc_util.py", line 541, in __init__ raise ValueError("%r is not a directory" % (package_path,)) ValueError: 'Lib/sandbox/odr' is not a directory
Afterwards you have to reinstall scipy. Assuming that 0.5.2 has odr in the sandbox you can import odr from the sandbox afterwards. If you use the svn version you can import odr from the main tree.
import scipy.odr
Anyway there is an open ticket wrt odr http://projects.scipy.org/scipy/scipy/ticket/357
Nils
From: Nils Wagner <nwagner@iam.uni-stuttgart.de> Reply-To: SciPy Users List <scipy-user@scipy.org> To: SciPy Users List <scipy-user@scipy.org> Subject: Re: [SciPy-user] scipy.optimize.leastsq error estimates Date: Wed, 14 Feb 2007 11:24:56 +0100
Chiara Caronna wrote:
Hi, I am also interested in having errors from the fit, and I tried to
import
the module scipy.odr as you said, but I got this errors:
File "/usr/local/lib/python2.4/site-packages/scipy/odr/__init__.py",
line
49, in ? import odrpack File "/usr/local/lib/python2.4/site-packages/scipy/odr/odrpack.py",
line
103, in ? from scipy.sandbox.odr import __odrpack ImportError: No module named odr
And the same is if I try to import sandbox.odr
import scipy.sandbox.odr
Traceback (most recent call last): File "<stdin>", line 1, in ? ImportError: No module named odr
Where am I wrong? Thank you, Chiara
From: Robert Kern <robert.kern@gmail.com> Reply-To: SciPy Users List <scipy-user@scipy.org> To: SciPy Users List <scipy-user@scipy.org> Subject: Re: [SciPy-user] scipy.optimize.leastsq error estimates Date: Tue, 06 Feb 2007 03:47:17 -0600
Nils Wagner wrote:
AFAIK odr is directly available through scipy.odr. So I guess the odr directory in the sandbox is obsolete. Is that
correct
?
There is no more odr/ directory in the sandbox since it got moved into
the
main package.
-- Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though
it
had an underlying truth." -- Umberto Eco _______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
_________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
odr is in the main tree.
Python 2.4 (#1, Oct 13 2006, 16:43:49) [GCC 3.3.5 20050117 (prerelease) (SUSE Linux)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import scipy scipy.__version__
'0.5.3.dev2704'
import scipy.odr
works fine for me.
Nils
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
_________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
_________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
Chiara Caronna wrote:
If you use 0.5.2
look into the directory scipy/Lib/sandbox and create a file called enabled_packages.txt which should contain
odr
in the first line (a new line for each package)
I did what you said, but when reinstalling scipy I got this error:
File "Lib/sandbox/setup.py", line 22, in configuration config.add_subpackage(p) File "/usr/local/lib/python2.4/site-packages/numpy/distutils/misc_util.py", line 765, in add_subpackage caller_level = 2) File "/usr/local/lib/python2.4/site-packages/numpy/distutils/misc_util.py", line 741, in get_subpackage caller_level = caller_level+1) File "/usr/local/lib/python2.4/site-packages/numpy/distutils/misc_util.py", line 541, in __init__ raise ValueError("%r is not a directory" % (package_path,)) ValueError: 'Lib/sandbox/odr' is not a directory
What is the output of ls -l in your sandbox directory I have Lib/sandbox> ls -l total 17 drwxr-xr-x 5 root root 272 2006-09-03 11:30 ann drwxr-xr-x 6 root root 376 2006-11-21 08:45 arpack drwxr-xr-x 4 root root 184 2006-11-06 08:48 arraysetops drwxr-xr-x 3 root root 232 2006-06-27 08:32 buildgrid drwxr-xr-x 5 root root 344 2006-12-15 15:35 cdavid drwxr-xr-x 3 root root 192 2006-06-22 09:18 constants drwxr-xr-x 3 root root 248 2006-03-15 08:29 cow drwxr-xr-x 4 root root 544 2006-10-02 08:19 delaunay -rw-r--r-- 1 root root 40 2007-02-08 13:11 enabled_packages.txt drwxr-xr-x 5 root root 272 2006-03-15 08:29 exmplpackage drwxr-xr-x 6 root root 280 2006-04-24 08:41 fdfpack drwxr-xr-x 3 root root 600 2006-09-03 11:30 ga drwxr-xr-x 3 root root 360 2006-09-03 11:30 gplt drwxr-xr-x 3 root root 352 2006-09-03 11:30 image -rw-r--r-- 1 root root 0 2006-02-28 08:50 __init__.py drwxr-xr-x 4 root root 520 2007-02-12 08:33 maskedarray drwxr-xr-x 6 root root 688 2007-02-12 08:33 models drwxr-xr-x 5 root root 232 2006-11-23 08:29 montecarlo drwxr-xr-x 3 root root 320 2006-07-10 08:09 netcdf drwxr-xr-x 4 root root 264 2007-01-11 10:57 newoptimize drwxr-xr-x 4 root root 432 2006-11-17 09:02 numexpr drwxr-xr-x 3 root root 72 2006-10-05 08:30 oliphant drwxr-xr-x 3 root root 456 2006-09-03 11:30 plt drwxr-xr-x 6 root root 904 2006-12-07 09:05 pyem drwxr-xr-x 13 root root 592 2006-08-16 16:21 pysparse drwxr-xr-x 4 root root 232 2007-02-08 13:11 rbf drwxr-xr-x 3 root root 184 2006-09-03 11:30 rkern -rw-r--r-- 1 root root 2732 2007-02-08 13:07 setup.py -rw-r--r-- 1 root root 1028 2007-02-08 13:11 setup.pyc drwxr-xr-x 5 root root 360 2007-02-09 08:42 spline drwxr-xr-x 3 root root 192 2006-10-10 08:22 stats drwxr-xr-x 5 root root 464 2006-09-11 08:44 svm drwxr-xr-x 9 root root 576 2007-02-13 08:27 timeseries drwxr-xr-x 3 root root 72 2006-12-07 08:52 wavelet drwxr-xr-x 6 root root 1864 2007-01-23 08:35 xplt Note that I am using the svn version. So odr is not present in the sandbox. How about 0.5.2 ? Do you have a directory odr in the sandbox ? Nils
Ah. No, there is not an odr directory... :( Here is the output: drwxr-xr-x 28 root root 4096 2007-02-14 13:46 . drwxr-xr-x 22 root root 4096 2007-01-17 09:37 .. -rw-r--r-- 1 500 1000 0 2006-01-05 04:35 __init__.py drwxr-xr-x 4 root root 4096 2006-12-08 05:05 ann drwxr-xr-x 4 root root 4096 2006-12-08 05:05 arpack drwxr-xr-x 3 root root 4096 2006-12-08 05:05 arraysetops drwxr-xr-x 2 root root 4096 2006-12-08 05:05 buildgrid drwxr-xr-x 2 root root 4096 2006-12-08 05:05 constants drwxr-xr-x 2 root root 4096 2006-12-08 05:05 cow drwxr-xr-x 3 root root 4096 2006-12-08 05:05 delaunay -rw-r--r-- 1 root root 4 2007-02-14 13:46 enabled_packages.txt drwxr-xr-x 4 root root 4096 2006-12-08 05:05 exmplpackage drwxr-xr-x 5 root root 4096 2006-12-08 05:05 fdfpack drwxr-xr-x 2 root root 4096 2006-12-08 05:05 ga drwxr-xr-x 2 root root 4096 2006-12-08 05:05 gplt drwxr-xr-x 2 root root 4096 2006-12-08 05:05 image drwxr-xr-x 5 root root 4096 2006-12-08 05:05 models drwxr-xr-x 4 root root 4096 2006-12-08 05:05 montecarlo drwxr-xr-x 2 root root 4096 2006-12-08 05:05 netcdf drwxr-xr-x 2 root root 4096 2006-12-08 05:05 newoptimize drwxr-xr-x 3 root root 4096 2006-12-08 05:05 numexpr drwxr-xr-x 2 root root 4096 2006-12-08 05:05 plt drwxr-xr-x 5 root root 4096 2006-12-08 05:05 pyem drwxr-xr-x 12 root root 4096 2006-12-08 05:05 pysparse drwxr-xr-x 2 root root 4096 2006-12-08 05:05 rkern -rw-r--r-- 1 500 1000 2656 2006-12-02 04:24 setup.py -rw-r--r-- 1 root root 1028 2007-01-17 09:37 setup.pyc drwxr-xr-x 4 root root 4096 2006-12-08 05:05 spline drwxr-xr-x 2 root root 4096 2006-12-08 05:05 stats drwxr-xr-x 4 root root 4096 2006-12-08 05:05 svm drwxr-xr-x 3 root root 4096 2006-12-08 05:05 umfpack drwxr-xr-x 5 root root 4096 2006-12-08 05:05 xplt
From: Nils Wagner <nwagner@iam.uni-stuttgart.de> Reply-To: SciPy Users List <scipy-user@scipy.org> To: SciPy Users List <scipy-user@scipy.org> Subject: Re: [SciPy-user] scipy.optimize.leastsq error estimates Date: Wed, 14 Feb 2007 14:01:19 +0100
Chiara Caronna wrote:
If you use 0.5.2
look into the directory scipy/Lib/sandbox and create a file called enabled_packages.txt which should contain
odr
in the first line (a new line for each package)
I did what you said, but when reinstalling scipy I got this error:
File "Lib/sandbox/setup.py", line 22, in configuration config.add_subpackage(p) File "/usr/local/lib/python2.4/site-packages/numpy/distutils/misc_util.py",
765, in add_subpackage caller_level = 2) File "/usr/local/lib/python2.4/site-packages/numpy/distutils/misc_util.py",
741, in get_subpackage caller_level = caller_level+1) File "/usr/local/lib/python2.4/site-packages/numpy/distutils/misc_util.py",
line line line
541, in __init__ raise ValueError("%r is not a directory" % (package_path,)) ValueError: 'Lib/sandbox/odr' is not a directory
What is the output of ls -l in your sandbox directory I have Lib/sandbox> ls -l total 17 drwxr-xr-x 5 root root 272 2006-09-03 11:30 ann drwxr-xr-x 6 root root 376 2006-11-21 08:45 arpack drwxr-xr-x 4 root root 184 2006-11-06 08:48 arraysetops drwxr-xr-x 3 root root 232 2006-06-27 08:32 buildgrid drwxr-xr-x 5 root root 344 2006-12-15 15:35 cdavid drwxr-xr-x 3 root root 192 2006-06-22 09:18 constants drwxr-xr-x 3 root root 248 2006-03-15 08:29 cow drwxr-xr-x 4 root root 544 2006-10-02 08:19 delaunay -rw-r--r-- 1 root root 40 2007-02-08 13:11 enabled_packages.txt drwxr-xr-x 5 root root 272 2006-03-15 08:29 exmplpackage drwxr-xr-x 6 root root 280 2006-04-24 08:41 fdfpack drwxr-xr-x 3 root root 600 2006-09-03 11:30 ga drwxr-xr-x 3 root root 360 2006-09-03 11:30 gplt drwxr-xr-x 3 root root 352 2006-09-03 11:30 image -rw-r--r-- 1 root root 0 2006-02-28 08:50 __init__.py drwxr-xr-x 4 root root 520 2007-02-12 08:33 maskedarray drwxr-xr-x 6 root root 688 2007-02-12 08:33 models drwxr-xr-x 5 root root 232 2006-11-23 08:29 montecarlo drwxr-xr-x 3 root root 320 2006-07-10 08:09 netcdf drwxr-xr-x 4 root root 264 2007-01-11 10:57 newoptimize drwxr-xr-x 4 root root 432 2006-11-17 09:02 numexpr drwxr-xr-x 3 root root 72 2006-10-05 08:30 oliphant drwxr-xr-x 3 root root 456 2006-09-03 11:30 plt drwxr-xr-x 6 root root 904 2006-12-07 09:05 pyem drwxr-xr-x 13 root root 592 2006-08-16 16:21 pysparse drwxr-xr-x 4 root root 232 2007-02-08 13:11 rbf drwxr-xr-x 3 root root 184 2006-09-03 11:30 rkern -rw-r--r-- 1 root root 2732 2007-02-08 13:07 setup.py -rw-r--r-- 1 root root 1028 2007-02-08 13:11 setup.pyc drwxr-xr-x 5 root root 360 2007-02-09 08:42 spline drwxr-xr-x 3 root root 192 2006-10-10 08:22 stats drwxr-xr-x 5 root root 464 2006-09-11 08:44 svm drwxr-xr-x 9 root root 576 2007-02-13 08:27 timeseries drwxr-xr-x 3 root root 72 2006-12-07 08:52 wavelet drwxr-xr-x 6 root root 1864 2007-01-23 08:35 xplt
Note that I am using the svn version. So odr is not present in the sandbox. How about 0.5.2 ? Do you have a directory odr in the sandbox ?
Nils
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
_________________________________________________________________ FREE pop-up blocking with the new MSN Toolbar - get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
Chiara Caronna wrote:
Ah. No, there is not an odr directory... :(
Here is the output:
drwxr-xr-x 28 root root 4096 2007-02-14 13:46 . drwxr-xr-x 22 root root 4096 2007-01-17 09:37 .. -rw-r--r-- 1 500 1000 0 2006-01-05 04:35 __init__.py drwxr-xr-x 4 root root 4096 2006-12-08 05:05 ann drwxr-xr-x 4 root root 4096 2006-12-08 05:05 arpack drwxr-xr-x 3 root root 4096 2006-12-08 05:05 arraysetops drwxr-xr-x 2 root root 4096 2006-12-08 05:05 buildgrid drwxr-xr-x 2 root root 4096 2006-12-08 05:05 constants drwxr-xr-x 2 root root 4096 2006-12-08 05:05 cow drwxr-xr-x 3 root root 4096 2006-12-08 05:05 delaunay -rw-r--r-- 1 root root 4 2007-02-14 13:46 enabled_packages.txt drwxr-xr-x 4 root root 4096 2006-12-08 05:05 exmplpackage drwxr-xr-x 5 root root 4096 2006-12-08 05:05 fdfpack drwxr-xr-x 2 root root 4096 2006-12-08 05:05 ga drwxr-xr-x 2 root root 4096 2006-12-08 05:05 gplt drwxr-xr-x 2 root root 4096 2006-12-08 05:05 image drwxr-xr-x 5 root root 4096 2006-12-08 05:05 models drwxr-xr-x 4 root root 4096 2006-12-08 05:05 montecarlo drwxr-xr-x 2 root root 4096 2006-12-08 05:05 netcdf drwxr-xr-x 2 root root 4096 2006-12-08 05:05 newoptimize drwxr-xr-x 3 root root 4096 2006-12-08 05:05 numexpr drwxr-xr-x 2 root root 4096 2006-12-08 05:05 plt drwxr-xr-x 5 root root 4096 2006-12-08 05:05 pyem drwxr-xr-x 12 root root 4096 2006-12-08 05:05 pysparse drwxr-xr-x 2 root root 4096 2006-12-08 05:05 rkern -rw-r--r-- 1 500 1000 2656 2006-12-02 04:24 setup.py -rw-r--r-- 1 root root 1028 2007-01-17 09:37 setup.pyc drwxr-xr-x 4 root root 4096 2006-12-08 05:05 spline drwxr-xr-x 2 root root 4096 2006-12-08 05:05 stats drwxr-xr-x 4 root root 4096 2006-12-08 05:05 svm drwxr-xr-x 3 root root 4096 2006-12-08 05:05 umfpack drwxr-xr-x 5 root root 4096 2006-12-08 05:05 xplt
From: Nils Wagner <nwagner@iam.uni-stuttgart.de> Reply-To: SciPy Users List <scipy-user@scipy.org> To: SciPy Users List <scipy-user@scipy.org> Subject: Re: [SciPy-user] scipy.optimize.leastsq error estimates Date: Wed, 14 Feb 2007 14:01:19 +0100
Chiara Caronna wrote:
If you use 0.5.2
look into the directory scipy/Lib/sandbox and create a file called enabled_packages.txt which should contain
odr
in the first line (a new line for each package)
I did what you said, but when reinstalling scipy I got this error:
File "Lib/sandbox/setup.py", line 22, in configuration config.add_subpackage(p) File "/usr/local/lib/python2.4/site-packages/numpy/distutils/misc_util.py",
line
765, in add_subpackage caller_level = 2) File "/usr/local/lib/python2.4/site-packages/numpy/distutils/misc_util.py",
line
741, in get_subpackage caller_level = caller_level+1) File "/usr/local/lib/python2.4/site-packages/numpy/distutils/misc_util.py",
line
541, in __init__ raise ValueError("%r is not a directory" % (package_path,)) ValueError: 'Lib/sandbox/odr' is not a directory
What is the output of ls -l in your sandbox directory I have Lib/sandbox> ls -l total 17 drwxr-xr-x 5 root root 272 2006-09-03 11:30 ann drwxr-xr-x 6 root root 376 2006-11-21 08:45 arpack drwxr-xr-x 4 root root 184 2006-11-06 08:48 arraysetops drwxr-xr-x 3 root root 232 2006-06-27 08:32 buildgrid drwxr-xr-x 5 root root 344 2006-12-15 15:35 cdavid drwxr-xr-x 3 root root 192 2006-06-22 09:18 constants drwxr-xr-x 3 root root 248 2006-03-15 08:29 cow drwxr-xr-x 4 root root 544 2006-10-02 08:19 delaunay -rw-r--r-- 1 root root 40 2007-02-08 13:11 enabled_packages.txt drwxr-xr-x 5 root root 272 2006-03-15 08:29 exmplpackage drwxr-xr-x 6 root root 280 2006-04-24 08:41 fdfpack drwxr-xr-x 3 root root 600 2006-09-03 11:30 ga drwxr-xr-x 3 root root 360 2006-09-03 11:30 gplt drwxr-xr-x 3 root root 352 2006-09-03 11:30 image -rw-r--r-- 1 root root 0 2006-02-28 08:50 __init__.py drwxr-xr-x 4 root root 520 2007-02-12 08:33 maskedarray drwxr-xr-x 6 root root 688 2007-02-12 08:33 models drwxr-xr-x 5 root root 232 2006-11-23 08:29 montecarlo drwxr-xr-x 3 root root 320 2006-07-10 08:09 netcdf drwxr-xr-x 4 root root 264 2007-01-11 10:57 newoptimize drwxr-xr-x 4 root root 432 2006-11-17 09:02 numexpr drwxr-xr-x 3 root root 72 2006-10-05 08:30 oliphant drwxr-xr-x 3 root root 456 2006-09-03 11:30 plt drwxr-xr-x 6 root root 904 2006-12-07 09:05 pyem drwxr-xr-x 13 root root 592 2006-08-16 16:21 pysparse drwxr-xr-x 4 root root 232 2007-02-08 13:11 rbf drwxr-xr-x 3 root root 184 2006-09-03 11:30 rkern -rw-r--r-- 1 root root 2732 2007-02-08 13:07 setup.py -rw-r--r-- 1 root root 1028 2007-02-08 13:11 setup.pyc drwxr-xr-x 5 root root 360 2007-02-09 08:42 spline drwxr-xr-x 3 root root 192 2006-10-10 08:22 stats drwxr-xr-x 5 root root 464 2006-09-11 08:44 svm drwxr-xr-x 9 root root 576 2007-02-13 08:27 timeseries drwxr-xr-x 3 root root 72 2006-12-07 08:52 wavelet drwxr-xr-x 6 root root 1864 2007-01-23 08:35 xplt
Note that I am using the svn version. So odr is not present in the sandbox. How about 0.5.2 ? Do you have a directory odr in the sandbox ?
Nils
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
_________________________________________________________________ FREE pop-up blocking with the new MSN Toolbar - get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
And in scipy/Lib ? I have drwxr-xr-x 6 root root 280 2007-01-24 13:58 cluster drwxr-xr-x 7 root root 536 2007-01-11 09:16 fftpack drwxr-xr-x 2 root root 80 2006-03-20 11:42 image -rw-r--r-- 1 root root 2356 2007-01-11 09:16 __init__.py drwxr-xr-x 8 root root 656 2007-02-12 09:54 integrate drwxr-xr-x 5 root root 456 2007-02-12 09:54 interpolate drwxr-xr-x 6 root root 672 2007-02-12 09:54 io drwxr-xr-x 5 root root 232 2007-01-11 09:16 lib drwxr-xr-x 6 root root 1024 2007-01-25 09:35 linalg drwxr-xr-x 5 root root 552 2007-01-25 09:35 linsolve drwxr-xr-x 2 root root 80 2006-01-19 10:27 maxent drwxr-xr-x 5 root root 296 2007-01-11 09:16 maxentropy drwxr-xr-x 3 root root 392 2007-01-11 09:16 misc drwxr-xr-x 2 root root 80 2006-01-19 10:27 montecarlo drwxr-xr-x 5 root root 456 2007-02-12 09:54 ndimage drwxr-xr-x 2 root root 80 2006-03-17 10:51 nd_image drwxr-xr-x 5 root root 360 2007-01-24 14:00 odr drwxr-xr-x 10 root root 712 2007-01-29 10:06 optimize drwxr-xr-x 35 root root 1032 2007-02-12 09:54 sandbox -rw-r--r-- 1 root root 679 2005-12-01 10:57 scipy_version.pyc -rw-r--r-- 1 root root 1126 2006-11-28 16:59 setup.py -rw-r--r-- 1 root root 1141 2006-11-28 17:02 setup.pyc drwxr-xr-x 5 root root 744 2007-01-30 15:29 signal drwxr-xr-x 5 root root 272 2007-01-15 09:33 sparse drwxr-xr-x 12 root root 1056 2007-01-26 11:21 special drwxr-xr-x 5 root root 568 2007-01-11 09:16 stats drwxr-xr-x 5 root root 208 2006-08-04 09:02 stsci drwxr-xr-x 3 root root 232 2006-10-02 08:38 tests -rw-r--r-- 1 root root 485 2006-12-08 09:21 version.py -rw-r--r-- 1 root root 580 2006-12-08 09:23 version.pyc drwxr-xr-x 8 root root 1272 2007-01-22 09:42 weave Also look into your setup.py file in scipy/Lib def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('scipy',parent_package,top_path) config.add_subpackage('cluster') config.add_subpackage('fftpack') config.add_subpackage('integrate') config.add_subpackage('interpolate') config.add_subpackage('io') config.add_subpackage('lib') config.add_subpackage('linalg') config.add_subpackage('linsolve') config.add_subpackage('maxentropy') config.add_subpackage('misc') config.add_subpackage('odr') # This should be enabled !! config.add_subpackage('optimize') config.add_subpackage('sandbox') config.add_subpackage('signal') config.add_subpackage('sparse') config.add_subpackage('special') config.add_subpackage('stats') #config.add_subpackage('ndimage') config.add_subpackage('stsci') config.add_subpackage('weave') config.make_svn_version_py() # installs __svn_version__.py config.make_config_py() return config if __name__ == '__main__': from numpy.distutils.core import setup setup(**configuration(top_path='').todict()) Nils
Ok, I have an odr directory in Lib/scipy and the file setup.py looks ok: def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('scipy',parent_package,top_path) config.add_subpackage('cluster') config.add_subpackage('fftpack') config.add_subpackage('integrate') config.add_subpackage('interpolate') config.add_subpackage('io') config.add_subpackage('lib') config.add_subpackage('linalg') config.add_subpackage('linsolve') config.add_subpackage('maxentropy') config.add_subpackage('misc') config.add_subpackage('odr') config.add_subpackage('optimize') config.add_subpackage('sandbox') config.add_subpackage('signal') config.add_subpackage('sparse') config.add_subpackage('special') config.add_subpackage('stats') config.add_subpackage('ndimage') config.add_subpackage('stsci') config.add_subpackage('weave') config.make_svn_version_py() # installs __svn_version__.py config.make_config_py() return config if __name__ == '__main__': from numpy.distutils.core import setup setup(**configuration(top_path='').todict()) so.... why it doesn't work?!
From: Nils Wagner <nwagner@iam.uni-stuttgart.de> Reply-To: SciPy Users List <scipy-user@scipy.org> To: SciPy Users List <scipy-user@scipy.org> Subject: Re: [SciPy-user] scipy.optimize.leastsq error estimates Date: Wed, 14 Feb 2007 14:13:38 +0100
Chiara Caronna wrote:
Ah. No, there is not an odr directory... :(
Here is the output:
drwxr-xr-x 28 root root 4096 2007-02-14 13:46 . drwxr-xr-x 22 root root 4096 2007-01-17 09:37 .. -rw-r--r-- 1 500 1000 0 2006-01-05 04:35 __init__.py drwxr-xr-x 4 root root 4096 2006-12-08 05:05 ann drwxr-xr-x 4 root root 4096 2006-12-08 05:05 arpack drwxr-xr-x 3 root root 4096 2006-12-08 05:05 arraysetops drwxr-xr-x 2 root root 4096 2006-12-08 05:05 buildgrid drwxr-xr-x 2 root root 4096 2006-12-08 05:05 constants drwxr-xr-x 2 root root 4096 2006-12-08 05:05 cow drwxr-xr-x 3 root root 4096 2006-12-08 05:05 delaunay -rw-r--r-- 1 root root 4 2007-02-14 13:46 enabled_packages.txt drwxr-xr-x 4 root root 4096 2006-12-08 05:05 exmplpackage drwxr-xr-x 5 root root 4096 2006-12-08 05:05 fdfpack drwxr-xr-x 2 root root 4096 2006-12-08 05:05 ga drwxr-xr-x 2 root root 4096 2006-12-08 05:05 gplt drwxr-xr-x 2 root root 4096 2006-12-08 05:05 image drwxr-xr-x 5 root root 4096 2006-12-08 05:05 models drwxr-xr-x 4 root root 4096 2006-12-08 05:05 montecarlo drwxr-xr-x 2 root root 4096 2006-12-08 05:05 netcdf drwxr-xr-x 2 root root 4096 2006-12-08 05:05 newoptimize drwxr-xr-x 3 root root 4096 2006-12-08 05:05 numexpr drwxr-xr-x 2 root root 4096 2006-12-08 05:05 plt drwxr-xr-x 5 root root 4096 2006-12-08 05:05 pyem drwxr-xr-x 12 root root 4096 2006-12-08 05:05 pysparse drwxr-xr-x 2 root root 4096 2006-12-08 05:05 rkern -rw-r--r-- 1 500 1000 2656 2006-12-02 04:24 setup.py -rw-r--r-- 1 root root 1028 2007-01-17 09:37 setup.pyc drwxr-xr-x 4 root root 4096 2006-12-08 05:05 spline drwxr-xr-x 2 root root 4096 2006-12-08 05:05 stats drwxr-xr-x 4 root root 4096 2006-12-08 05:05 svm drwxr-xr-x 3 root root 4096 2006-12-08 05:05 umfpack drwxr-xr-x 5 root root 4096 2006-12-08 05:05 xplt
From: Nils Wagner <nwagner@iam.uni-stuttgart.de> Reply-To: SciPy Users List <scipy-user@scipy.org> To: SciPy Users List <scipy-user@scipy.org> Subject: Re: [SciPy-user] scipy.optimize.leastsq error estimates Date: Wed, 14 Feb 2007 14:01:19 +0100
Chiara Caronna wrote:
If you use 0.5.2
look into the directory scipy/Lib/sandbox and create a file called enabled_packages.txt which should contain
odr
in the first line (a new line for each package)
I did what you said, but when reinstalling scipy I got this error:
File "Lib/sandbox/setup.py", line 22, in configuration config.add_subpackage(p) File "/usr/local/lib/python2.4/site-packages/numpy/distutils/misc_util.py",
line
765, in add_subpackage caller_level = 2) File "/usr/local/lib/python2.4/site-packages/numpy/distutils/misc_util.py",
line
741, in get_subpackage caller_level = caller_level+1) File "/usr/local/lib/python2.4/site-packages/numpy/distutils/misc_util.py",
line
541, in __init__ raise ValueError("%r is not a directory" % (package_path,)) ValueError: 'Lib/sandbox/odr' is not a directory
What is the output of ls -l in your sandbox directory I have Lib/sandbox> ls -l total 17 drwxr-xr-x 5 root root 272 2006-09-03 11:30 ann drwxr-xr-x 6 root root 376 2006-11-21 08:45 arpack drwxr-xr-x 4 root root 184 2006-11-06 08:48 arraysetops drwxr-xr-x 3 root root 232 2006-06-27 08:32 buildgrid drwxr-xr-x 5 root root 344 2006-12-15 15:35 cdavid drwxr-xr-x 3 root root 192 2006-06-22 09:18 constants drwxr-xr-x 3 root root 248 2006-03-15 08:29 cow drwxr-xr-x 4 root root 544 2006-10-02 08:19 delaunay -rw-r--r-- 1 root root 40 2007-02-08 13:11 enabled_packages.txt drwxr-xr-x 5 root root 272 2006-03-15 08:29 exmplpackage drwxr-xr-x 6 root root 280 2006-04-24 08:41 fdfpack drwxr-xr-x 3 root root 600 2006-09-03 11:30 ga drwxr-xr-x 3 root root 360 2006-09-03 11:30 gplt drwxr-xr-x 3 root root 352 2006-09-03 11:30 image -rw-r--r-- 1 root root 0 2006-02-28 08:50 __init__.py drwxr-xr-x 4 root root 520 2007-02-12 08:33 maskedarray drwxr-xr-x 6 root root 688 2007-02-12 08:33 models drwxr-xr-x 5 root root 232 2006-11-23 08:29 montecarlo drwxr-xr-x 3 root root 320 2006-07-10 08:09 netcdf drwxr-xr-x 4 root root 264 2007-01-11 10:57 newoptimize drwxr-xr-x 4 root root 432 2006-11-17 09:02 numexpr drwxr-xr-x 3 root root 72 2006-10-05 08:30 oliphant drwxr-xr-x 3 root root 456 2006-09-03 11:30 plt drwxr-xr-x 6 root root 904 2006-12-07 09:05 pyem drwxr-xr-x 13 root root 592 2006-08-16 16:21 pysparse drwxr-xr-x 4 root root 232 2007-02-08 13:11 rbf drwxr-xr-x 3 root root 184 2006-09-03 11:30 rkern -rw-r--r-- 1 root root 2732 2007-02-08 13:07 setup.py -rw-r--r-- 1 root root 1028 2007-02-08 13:11 setup.pyc drwxr-xr-x 5 root root 360 2007-02-09 08:42 spline drwxr-xr-x 3 root root 192 2006-10-10 08:22 stats drwxr-xr-x 5 root root 464 2006-09-11 08:44 svm drwxr-xr-x 9 root root 576 2007-02-13 08:27 timeseries drwxr-xr-x 3 root root 72 2006-12-07 08:52 wavelet drwxr-xr-x 6 root root 1864 2007-01-23 08:35 xplt
Note that I am using the svn version. So odr is not present in the sandbox. How about 0.5.2 ? Do you have a directory odr in the sandbox ?
Nils
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
_________________________________________________________________ FREE pop-up blocking with the new MSN Toolbar - get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
And in scipy/Lib ? I have
drwxr-xr-x 6 root root 280 2007-01-24 13:58 cluster drwxr-xr-x 7 root root 536 2007-01-11 09:16 fftpack drwxr-xr-x 2 root root 80 2006-03-20 11:42 image -rw-r--r-- 1 root root 2356 2007-01-11 09:16 __init__.py drwxr-xr-x 8 root root 656 2007-02-12 09:54 integrate drwxr-xr-x 5 root root 456 2007-02-12 09:54 interpolate drwxr-xr-x 6 root root 672 2007-02-12 09:54 io drwxr-xr-x 5 root root 232 2007-01-11 09:16 lib drwxr-xr-x 6 root root 1024 2007-01-25 09:35 linalg drwxr-xr-x 5 root root 552 2007-01-25 09:35 linsolve drwxr-xr-x 2 root root 80 2006-01-19 10:27 maxent drwxr-xr-x 5 root root 296 2007-01-11 09:16 maxentropy drwxr-xr-x 3 root root 392 2007-01-11 09:16 misc drwxr-xr-x 2 root root 80 2006-01-19 10:27 montecarlo drwxr-xr-x 5 root root 456 2007-02-12 09:54 ndimage drwxr-xr-x 2 root root 80 2006-03-17 10:51 nd_image drwxr-xr-x 5 root root 360 2007-01-24 14:00 odr drwxr-xr-x 10 root root 712 2007-01-29 10:06 optimize drwxr-xr-x 35 root root 1032 2007-02-12 09:54 sandbox -rw-r--r-- 1 root root 679 2005-12-01 10:57 scipy_version.pyc -rw-r--r-- 1 root root 1126 2006-11-28 16:59 setup.py -rw-r--r-- 1 root root 1141 2006-11-28 17:02 setup.pyc drwxr-xr-x 5 root root 744 2007-01-30 15:29 signal drwxr-xr-x 5 root root 272 2007-01-15 09:33 sparse drwxr-xr-x 12 root root 1056 2007-01-26 11:21 special drwxr-xr-x 5 root root 568 2007-01-11 09:16 stats drwxr-xr-x 5 root root 208 2006-08-04 09:02 stsci drwxr-xr-x 3 root root 232 2006-10-02 08:38 tests -rw-r--r-- 1 root root 485 2006-12-08 09:21 version.py -rw-r--r-- 1 root root 580 2006-12-08 09:23 version.pyc drwxr-xr-x 8 root root 1272 2007-01-22 09:42 weave
Also look into your setup.py file in scipy/Lib
def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('scipy',parent_package,top_path) config.add_subpackage('cluster') config.add_subpackage('fftpack') config.add_subpackage('integrate') config.add_subpackage('interpolate') config.add_subpackage('io') config.add_subpackage('lib') config.add_subpackage('linalg') config.add_subpackage('linsolve') config.add_subpackage('maxentropy') config.add_subpackage('misc') config.add_subpackage('odr') # This should be enabled !! config.add_subpackage('optimize') config.add_subpackage('sandbox') config.add_subpackage('signal') config.add_subpackage('sparse') config.add_subpackage('special') config.add_subpackage('stats') #config.add_subpackage('ndimage') config.add_subpackage('stsci') config.add_subpackage('weave') config.make_svn_version_py() # installs __svn_version__.py config.make_config_py() return config
if __name__ == '__main__': from numpy.distutils.core import setup setup(**configuration(top_path='').todict())
Nils
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
_________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
Chiara Caronna wrote:
Ok, I have an odr directory in Lib/scipy and the file setup.py looks ok:
def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('scipy',parent_package,top_path) config.add_subpackage('cluster') config.add_subpackage('fftpack') config.add_subpackage('integrate') config.add_subpackage('interpolate') config.add_subpackage('io') config.add_subpackage('lib') config.add_subpackage('linalg') config.add_subpackage('linsolve') config.add_subpackage('maxentropy') config.add_subpackage('misc') config.add_subpackage('odr') config.add_subpackage('optimize') config.add_subpackage('sandbox') config.add_subpackage('signal') config.add_subpackage('sparse') config.add_subpackage('special') config.add_subpackage('stats') config.add_subpackage('ndimage') config.add_subpackage('stsci') config.add_subpackage('weave') config.make_svn_version_py() # installs __svn_version__.py config.make_config_py() return config
if __name__ == '__main__': from numpy.distutils.core import setup setup(**configuration(top_path='').todict())
so.... why it doesn't work?!
Sorry I am running out of ideas ? It works for me Python 2.4.1 (#1, Oct 13 2006, 16:51:58) [GCC 4.0.2 20050901 (prerelease) (SUSE Linux)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import scipy.odr import scipy scipy.__version__ '0.5.3.dev2707'
Nils
Ok, the error I got is this:
import scipy.odr Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/local/lib/python2.4/site-packages/scipy/odr/__init__.py", line 49, in ? import odrpack File "/usr/local/lib/python2.4/site-packages/scipy/odr/odrpack.py", line 103, in ? from scipy.sandbox.odr import __odrpack ImportError: No module named odr
can you check you file : "/usr/local/lib/python2.4/site-packages/scipy/odr/odrpack.py" at line 103? I think the problem is that it tries to import something from scipy.sandbox.odr that doesn't exist...
From: Nils Wagner <nwagner@iam.uni-stuttgart.de> Reply-To: SciPy Users List <scipy-user@scipy.org> To: SciPy Users List <scipy-user@scipy.org> Subject: Re: [SciPy-user] scipy.optimize.leastsq error estimates Date: Wed, 14 Feb 2007 14:27:30 +0100
Chiara Caronna wrote:
Ok, I have an odr directory in Lib/scipy and the file setup.py looks ok:
def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('scipy',parent_package,top_path) config.add_subpackage('cluster') config.add_subpackage('fftpack') config.add_subpackage('integrate') config.add_subpackage('interpolate') config.add_subpackage('io') config.add_subpackage('lib') config.add_subpackage('linalg') config.add_subpackage('linsolve') config.add_subpackage('maxentropy') config.add_subpackage('misc') config.add_subpackage('odr') config.add_subpackage('optimize') config.add_subpackage('sandbox') config.add_subpackage('signal') config.add_subpackage('sparse') config.add_subpackage('special') config.add_subpackage('stats') config.add_subpackage('ndimage') config.add_subpackage('stsci') config.add_subpackage('weave') config.make_svn_version_py() # installs __svn_version__.py config.make_config_py() return config
if __name__ == '__main__': from numpy.distutils.core import setup setup(**configuration(top_path='').todict())
so.... why it doesn't work?!
Sorry I am running out of ideas ? It works for me
Python 2.4.1 (#1, Oct 13 2006, 16:51:58) [GCC 4.0.2 20050901 (prerelease) (SUSE Linux)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import scipy.odr import scipy scipy.__version__ '0.5.3.dev2707'
Nils
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
_________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
Chiara Caronna wrote:
Ok, the error I got is this:
import scipy.odr
Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/local/lib/python2.4/site-packages/scipy/odr/__init__.py", line 49, in ? import odrpack File "/usr/local/lib/python2.4/site-packages/scipy/odr/odrpack.py", line 103, in ? from scipy.sandbox.odr import __odrpack ImportError: No module named odr
can you check you file : "/usr/local/lib/python2.4/site-packages/scipy/odr/odrpack.py" at line 103? I think the problem is that it tries to import something from scipy.sandbox.odr that doesn't exist...
I have from scipy.odr import __odrpack What is the output of scipy.__version__ on your machine ? I suggest to remove the build directory and scipy below site-packages with rm -rf build rm -rf scipy Afterwards reinstall everything from scratch with python setput.py install HTH Nils
From: Nils Wagner <nwagner@iam.uni-stuttgart.de> Reply-To: SciPy Users List <scipy-user@scipy.org> To: SciPy Users List <scipy-user@scipy.org> Subject: Re: [SciPy-user] scipy.optimize.leastsq error estimates Date: Wed, 14 Feb 2007 14:42:51 +0100
Ok, the error I got is this:
import scipy.odr
Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/local/lib/python2.4/site-packages/scipy/odr/__init__.py",
49, in ? import odrpack File "/usr/local/lib/python2.4/site-packages/scipy/odr/odrpack.py",
Chiara Caronna wrote: line line
103, in ? from scipy.sandbox.odr import __odrpack ImportError: No module named odr
can you check you file : "/usr/local/lib/python2.4/site-packages/scipy/odr/odrpack.py" at line 103? I think the problem is that it tries to import something from scipy.sandbox.odr that doesn't exist...
I have from scipy.odr import __odrpack
I changed my "from scipy.sandbox.odr import __odrpack" into "from scipy.odr import __odrpack" and now it works... I'll see if this works fine now, other wise I'll try to reinstall everything. Thank's a lot for your help! Chiara
What is the output of
scipy.__version__
on your machine ?
I suggest to remove the build directory and scipy below site-packages with
rm -rf build rm -rf scipy
Afterwards reinstall everything from scratch with
python setput.py install
HTH
Nils
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
_________________________________________________________________ FREE pop-up blocking with the new MSN Toolbar - get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
I changed my "from scipy.sandbox.odr import __odrpack" into "from scipy.odr import __odrpack" and now it works... I'll see if this works fine now, other wise I'll try to reinstall everything. Thank's a lot for your help!
You're welcome ! Nils
participants (5)
-
Chiara Caronna -
Christian Kristukat -
Ewald Zietsman -
Nils Wagner -
Robert Kern