From nwagner at mecha.uni-stuttgart.de Fri Apr 2 05:15:33 2004 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Fri, 02 Apr 2004 12:15:33 +0200 Subject: [SciPy-user] scipy.linalg.basic.LinAlgError: generalized eig algorithm did not converge Message-ID: <406D3D45.87BBDE65@mecha.uni-stuttgart.de> Dear experts, How can I intercept this error. Traceback (most recent call last): File "himanshu.py", line 175, in ? w = linalg.eig(A,B,left=0,right=0) File "/usr/local/lib/python2.3/site-packages/scipy/linalg/decomp.py", line 109, in eig return _geneig(a1,b,left,right,overwrite_a,overwrite_b) File "/usr/local/lib/python2.3/site-packages/scipy/linalg/decomp.py", line 60, in _geneig if info>0: raise LinAlgError,"generalized eig algorithm did not converge" scipy.linalg.basic.LinAlgError: generalized eig algorithm did not converge I am using linalg.eig several times within a loop and I would like to continue the computation. A small scipy code would be appreciated. What is the reason for this convergence problem ? Thanks in advance Nils From bgue at hotmail.com Fri Apr 2 17:23:30 2004 From: bgue at hotmail.com (Brian Gue) Date: Fri, 02 Apr 2004 22:23:30 +0000 Subject: [SciPy-user] random variates Message-ID: Hi, Are there examples of usage of the statistics functions? I'm specifically looking for samples using scipy.stats.truncnorm and scipy.stats.triang. Thanks, Brian _________________________________________________________________ MSN Premium with Virus Guard and Firewall* from McAfee? Security : 2 months FREE* http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines From oliphant at ee.byu.edu Fri Apr 2 19:58:18 2004 From: oliphant at ee.byu.edu (Travis E. Oliphant) Date: Fri, 02 Apr 2004 17:58:18 -0700 Subject: [SciPy-user] random variates In-Reply-To: References: Message-ID: <406E0C2A.9060308@ee.byu.edu> Brian Gue wrote: > Hi, > > Are there examples of usage of the statistics functions? I'm > specifically looking for samples using scipy.stats.truncnorm and > scipy.stats.triang. > The help should be better now. ie. scipy.info(scipy.stats.triang) Basically, >>> info(stats.triang) Instance of class: triang_gen triang(*args, **kwds) Triangular Distribution up-sloping line from loc to (loc + c*scale) and then downsloping for (loc + c*scale) to (loc+scale). standard form is in range [0,1] with c the mode location parameter shifts the start to loc scale changes the width from 1 to scale Triangular distribution up-sloping line from loc to (loc + c*scale) and then downsloping for (loc + c*scale) to (loc+scale). - standard form is in the range [0,1] with c the mode. - location parameter shifts the start to loc - scale changes the width from 1 to scale Docstring still needs work here. Note that stats.triang has all the methods of stats.truncnorm as well (just enter c instead of a,b) stats.triang.pdf stats.triang.rvs etc. >>> info(stats.truncnorm) Instance of class: truncnorm_gen truncnorm(*args, **kwds) A truncated normal continuous random variable. Continuous random variables are defined from a standard form chosen for simplicity of representation. The standard form may require some shape parameters to complete its specification. The distributions also take optional location and scale parameters using loc= and scale= keywords (defaults: loc=0, scale=1) These shape, scale, and location parameters can be passed to any of the methods of the RV object such as the following: truncnorm.rvs(a,b,loc=0,scale=1) - random variates truncnorm.pdf(x,a,b,loc=0,scale=1) - probability density function truncnorm.cdf(x,a,b,loc=0,scale=1) - cumulative density function truncnorm.sf(x,a,b,loc=0,scale=1) - survival function (1-cdf --- sometimes more accurate) truncnorm.ppf(q,a,b,loc=0,scale=1) - percent point function (inverse of cdf --- percentiles) truncnorm.isf(q,a,b,loc=0,scale=1) - inverse survival function (inverse of sf) truncnorm.stats(a,b,loc=0,scale=1,moments='mv') - mean('m'), variance('v'), skew('s'), and/or kurtosis('k') truncnorm.entropy(a,b,loc=0,scale=1) - (differential) entropy of the RV. Alternatively, the object may be called (as a function) to fix the shape, location, and scale parameters returning a "frozen" continuous RV object: myrv = truncnorm(a,b,loc=0,scale=1) - frozen RV object with the same methods but holding the given shape, location, and scale fixed Truncated Normal distribution From bgue at hotmail.com Mon Apr 5 12:42:33 2004 From: bgue at hotmail.com (Brian Gue) Date: Mon, 05 Apr 2004 16:42:33 +0000 Subject: [SciPy-user] Re: random variates Message-ID: Thanks for the help; I downloaded the April 1 package and the docstrings are much better. Still having some problems, though. Triangular is straightforward: >>>from scipy import stats >>>triangRV = stats.triang(.7, loc=0, scale=2) >>>triangRV.rvs(10) array([ 0.6086996 , 1.30631752, 0.60636975, 0.8502878 , 1.2694698 , 0.79918653, 1.51063519, 1.12854753, 1.35386416, 0.63519953]) >>> But truncated normal is not: >>>truncnormRV = stats.truncnorm(0, 0.7, loc=0, scale=2) >>>truncnormRV.rvs(10) Traceback (most recent call last): File "", line 1, in ? File "C:\Python23\Lib\site-packages\scipy\stats\distributions.py", line 125, in rvs return self.dist.rvs(*self.args,**kwds) File "C:\Python23\Lib\site-packages\scipy\stats\distributions.py", line 440, in rvs vals = reshape(self._rvs(*args),size) TypeError: _rvs() takes exactly 1 argument (3 given) >>> Any idea where I'm going wrong? Brian --Travis E. Oliphant wrote: > >The help should be better now. > >ie. > >scipy.info(scipy.stats.triang) > >... _________________________________________________________________ Free yourself from those irritating pop-up ads with MSn Premium. Get 2months FREE* http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines From oliphant at ee.byu.edu Mon Apr 5 20:08:06 2004 From: oliphant at ee.byu.edu (Travis E. Oliphant) Date: Mon, 05 Apr 2004 18:08:06 -0600 Subject: [SciPy-user] Re: random variates In-Reply-To: References: Message-ID: <4071F4E6.4020302@ee.byu.edu> Brian Gue wrote: > Thanks for the help; I downloaded the April 1 package and the docstrings > are much better. Still having some problems, though. Triangular is > straightforward: > >>>> from scipy import stats >>>> triangRV = stats.triang(.7, loc=0, scale=2) >>>> triangRV.rvs(10) > > array([ 0.6086996 , 1.30631752, 0.60636975, 0.8502878 , 1.2694698 , > 0.79918653, > 1.51063519, 1.12854753, 1.35386416, 0.63519953]) > >>>> > > > But truncated normal is not: > >>>> truncnormRV = stats.truncnorm(0, 0.7, loc=0, scale=2) >>>> truncnormRV.rvs(10) You've found a bug. I've fixed the problem in CVS. You can fix it without downloading a new SciPy by changing the file stats/distributions.py so that the truncnorm_gen class does not inherit from norm_gen (but from rv_continuous). Then change all norm_gen. to norm. in the methods and remove the self argument. From nwagner at mecha.uni-stuttgart.de Tue Apr 6 07:14:40 2004 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Tue, 06 Apr 2004 13:14:40 +0200 Subject: [SciPy-user] Matlab function rem in scipy ?? Message-ID: <40729120.F9DA81E5@mecha.uni-stuttgart.de> Dear experts, R = rem(X,Y) if Y ~= 0, returns X - n.*Y where n = fix(X./Y). If Y is not an integer and the quotient X./Y is within roundoff error of an integer, then n is that integer. By convention, rem(X,0) is NaN. The inputs X and Y must be real arrays of the same size, or real scalars. So long as operands X and Y are of the same sign, the statement rem(X,Y) returns the same result as does mod(X,Y). However, for positive X and Y, rem(-X,Y) = mod(-X,Y)-Y The rem function returns a result that is between 0 and sign(X)*abs(Y). If Y is zero, rem returns NaN. Is there any comparable function in scipy ? Nils From claustre at esrf.fr Tue Apr 13 05:23:55 2004 From: claustre at esrf.fr (Laurent Claustre) Date: Tue, 13 Apr 2004 11:23:55 +0200 Subject: [SciPy-user] scipy.test failed! Message-ID: <407BB1AB.7020901@esrf.fr> I've installed SciPy-0.2.0_alpha_200.4161 which works fine, BUT the test failed: python -c "import scipy; scipy.test()" Traceback (most recent call last): File "", line 1, in ? File "__init__.py", line 109, in test File "__init__.py", line 116, in test_suite ImportError: No module named testing there is no file named testing.py available into scipy_test/ install directory but only a scipy_test module. Is the installation failed or some files are missing ? Cheers. -- /===============================================================\ | Laurent Claustre | eMail: claustre at esrf.fr | | BeamLine Instrument Software | Phone: +33 (0)476 88 29 12 | | Support Group (BLISS) | Fax : +33 (0)476 88 25 42 | | www.esrf.fr/computing/bliss | Web : www.esrf.fr | | Experiments Division | Central Building Room 150 | | ------------------------------------------------------------- | | European Synchrotron Radiation Facility | | 6 rue Jules Horowitz BP220 38042 Grenoble Cedex - France | \===============================================================/ From chris at fonnesbeck.org Tue Apr 13 10:07:48 2004 From: chris at fonnesbeck.org (Christopher Fonnesbeck) Date: Tue, 13 Apr 2004 10:07:48 -0400 Subject: [SciPy-user] corrupt png output from gplt Message-ID: I am using gplt to plot a number of traces and densities from my MCMC code; it seems to work well, but when the plots are saved to file many of them end up being zero-size files. Since I am producing a large number of plots sequentially, I am wondering if somehow the generation of the next plot interferes with saving the previous plot to a file? It is the only thing I can think of, since some plots save properly, while others do not. Has anyone else run into this problem? Is there a way of guaranteeing the file before the next plot is produced? Thanks, Chris -- Christopher J. Fonnesbeck ( c h r i s @ f o n n e s b e c k . o r g ) Georgia Cooperative Fish & Wildlife Research Unit, University of Georgia "More and more of our imports come from overseas." George W. Bush, 25 September 2000 -- Putting http://wecanstopspam.org in your email helps it pass through overzealous spam filters. From jdhunter at ace.bsd.uchicago.edu Tue Apr 13 10:21:12 2004 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Tue, 13 Apr 2004 09:21:12 -0500 Subject: [SciPy-user] problems finding fftw Message-ID: I am building scipy from CVS, checked out last night, and am having trouble getting it to find fftw. I built fftw 502 cd /usr/local/src/ 504 tar xvfz ~jdhunter/c/src/fftw-2.1.3.tar.gz 505 cd fftw-2.1.3/ 507 configure --enable-i386-hacks --enable-threadss 554 make clean 556 configure --enable-threads --enable-float --enable-i386-hacks 557 make 558 make install and it is installed to /usr/local peds-pc311:/var/tmp/builds/scipy> ls -l /usr/local/lib/libfftw* -rw-r--r-- 1 root root 952600 Apr 12 17:47 /usr/local/lib/libfftw3.a -rw-r--r-- 1 root root 950986 Apr 12 17:45 /usr/local/lib/libfftw3f.a -rwxr-xr-x 1 root root 664 Apr 12 17:45 /usr/local/lib/libfftw3f.la -rw-r--r-- 1 root root 26782 Apr 12 17:44 /usr/local/lib/libfftw3f_threads.a -rwxr-xr-x 1 root root 688 Apr 12 17:44 /usr/local/lib/libfftw3f_threads.la -rwxr-xr-x 1 root root 661 Apr 12 17:47 /usr/local/lib/libfftw3.la -rw-r--r-- 1 root root 26648 Apr 12 17:46 /usr/local/lib/libfftw3_threads.a -rwxr-xr-x 1 root root 685 Apr 12 17:46 /usr/local/lib/libfftw3_threads.la I set my fftw environment var and edited scipy_core/scipy_distutils/site.cfg peds-pc311:/var/tmp/builds/scipy> setenv | grep -i fftw FFTW=/usr/local/lib peds-pc311:/var/tmp/builds/scipy> grep fftw scipy_core/scipy_distutils/site.cfg [fftw] fftw_libs = fftw3, fftw3f fftw_opt_libs = fftw3_threads, fftw3f_threads # if the above aren't found, look for {s,d}fftw_libs and {s,d}fftw_opt_libs Is site.cfg supposed to remain in scipy_core/scipy_distutils? But when I build I get fftw not found peds-pc311:/var/tmp/builds/scipy> python setup.py clean fftw_info: NOT AVAILABLE dfftw_info: NOT AVAILABLE Any idea what is going wrong? John Hunter From pearu at scipy.org Tue Apr 13 11:32:41 2004 From: pearu at scipy.org (Pearu Peterson) Date: Tue, 13 Apr 2004 10:32:41 -0500 (CDT) Subject: [SciPy-user] problems finding fftw In-Reply-To: Message-ID: On Tue, 13 Apr 2004, John Hunter wrote: > > I am building scipy from CVS, checked out last night, and am having > trouble getting it to find fftw. I built fftw > > > 502 cd /usr/local/src/ > 504 tar xvfz ~jdhunter/c/src/fftw-2.1.3.tar.gz > 505 cd fftw-2.1.3/ > 507 configure --enable-i386-hacks --enable-threadss ^ - typo!! > 554 make clean > 556 configure --enable-threads --enable-float --enable-i386-hacks > 557 make > 558 make install > > and it is installed to /usr/local > > peds-pc311:/var/tmp/builds/scipy> ls -l /usr/local/lib/libfftw* > -rw-r--r-- 1 root root 952600 Apr 12 17:47 /usr/local/lib/libfftw3.a > But when I build I get fftw not found > Any idea what is going wrong? Well, you seem to installing fftw-2.1.3 but the file libfftw3.a, for instance, is of fftw-3.x. And at the moment support for fftw-3.x is unimplemented in scipy.fftpack. So, may be there is something wrong in your fftw building script. Pearu From jdhunter at ace.bsd.uchicago.edu Tue Apr 13 11:15:41 2004 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Tue, 13 Apr 2004 10:15:41 -0500 Subject: [SciPy-user] problems finding fftw In-Reply-To: (Pearu Peterson's message of "Tue, 13 Apr 2004 10:32:41 -0500 (CDT)") References: Message-ID: >>>>> "Pearu" == Pearu Peterson writes: Pearu> Well, you seem to installing fftw-2.1.3 but the file Pearu> libfftw3.a, for instance, is of fftw-3.x. And at the moment Pearu> support for fftw-3.x is unimplemented in scipy.fftpack. So, Pearu> may be there is something wrong in your fftw building Pearu> script. Oops, that was just a cut and paste from some old notes. The configure and make commands I posted are right but the version number I posted was incorrect. I built from fftw-3.0.1. I'll try backing down to the 2.x series and see if this helps. John Hunter From travis at enthought.com Tue Apr 13 12:29:10 2004 From: travis at enthought.com (Travis N. Vaught) Date: Tue, 13 Apr 2004 11:29:10 -0500 Subject: [SciPy-user] scipy.test failed! In-Reply-To: <407BB1AB.7020901@esrf.fr> References: <407BB1AB.7020901@esrf.fr> Message-ID: <407C1556.7050505@enthought.com> Laurent Claustre wrote: > I've installed SciPy-0.2.0_alpha_200.4161 which works fine, BUT the > test failed: > python -c "import scipy; scipy.test()" > Traceback (most recent call last): > File "", line 1, in ? > File "__init__.py", line 109, in test > File "__init__.py", line 116, in test_suite > ImportError: No module named testing > > there is no file named testing.py available into scipy_test/ install > directory but only a scipy_test module. > Is the installation failed or some files are missing ? > Cheers. > It looks like you have to install scipy_core as well. Scipy_core is integrated in the nightly build--now called SciPy_complete--if you're on windows. Looking at the version you are using it looks like you are using a source tarball, perhaps? What platform are you on? Regards, Travis From claustre at esrf.fr Wed Apr 14 02:34:21 2004 From: claustre at esrf.fr (Laurent Claustre) Date: Wed, 14 Apr 2004 08:34:21 +0200 Subject: [SciPy-user] scipy.test failed! In-Reply-To: <407C1556.7050505@enthought.com> References: <407BB1AB.7020901@esrf.fr> <407C1556.7050505@enthought.com> Message-ID: <407CDB6D.40905@esrf.fr> Travis N. Vaught wrote: > Laurent Claustre wrote: > >> I've installed SciPy-0.2.0_alpha_200.4161 which works fine, BUT the >> test failed: >> python -c "import scipy; scipy.test()" >> Traceback (most recent call last): >> File "", line 1, in ? >> File "__init__.py", line 109, in test >> File "__init__.py", line 116, in test_suite >> ImportError: No module named testing >> >> there is no file named testing.py available into scipy_test/ install >> directory but only a scipy_test module. >> Is the installation failed or some files are missing ? >> Cheers. >> > It looks like you have to install scipy_core as well. Scipy_core is > integrated in the nightly build--now called SciPy_complete--if you're > on windows. > > Looking at the version you are using it looks like you are using a > source tarball, perhaps? What platform are you on? > > Regards, > > Travis > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user I'm on linux and solaris as well, both of them are the same pb. Regards, Laurent From jdhunter at ace.bsd.uchicago.edu Wed Apr 14 07:00:55 2004 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Wed, 14 Apr 2004 06:00:55 -0500 Subject: [SciPy-user] problems finding fftw In-Reply-To: (John Hunter's message of "Tue, 13 Apr 2004 10:15:41 -0500") References: Message-ID: >>>>> "John" == John Hunter writes: John> I'll try backing down to the 2.x series and see if this John> helps. That fixed it, thanks for the help Pearu. JDH From ransom at physics.mcgill.ca Thu Apr 15 15:24:40 2004 From: ransom at physics.mcgill.ca (Scott Ransom) Date: Thu, 15 Apr 2004 15:24:40 -0400 Subject: [SciPy-user] optimize.leastsq fit errors? Message-ID: <200404151524.40983.ransom@physics.mcgill.ca> Hi all, Is it possible (or does anyone have any add-on functions available) to get error estimates on the fit parameters using optimize.leastq? (or alternatively, the resulting covariance matrix from the fit?) Thanks, Scott -- Scott M. Ransom Address: McGill Univ. Physics Dept. Phone: (514) 398-6492 3600 University St., Rm 338 email: ransom at physics.mcgill.ca Montreal, QC Canada H3A 2T8 GPG Fingerprint: 06A9 9553 78BE 16DB 407B FFCA 9BFA B6FF FFD3 2989 From strawman at astraw.com Thu Apr 15 18:11:45 2004 From: strawman at astraw.com (Andrew Straw) Date: Thu, 15 Apr 2004 15:11:45 -0700 Subject: [SciPy-user] optimize.leastsq fit errors? In-Reply-To: <200404151524.40983.ransom@physics.mcgill.ca> References: <200404151524.40983.ransom@physics.mcgill.ca> Message-ID: I couldn't find this in scipy. Here's what I use. I hereby place it in the public domain. import math import Numeric as na def leastsq(x,y, full_output=False): """find least-squares fit to y = a + bx inputs: x sequence of independent variable data y sequence of dependent variable data full_output (optional) return dictionary of all results and stats outputs (not using full_output): a y intercept of regression line b coeffecient (slope) of regression line full output (using full_output): stats dictionary containing statistics on fit key value --- ----------------------- a a in: y = a + bx b a in: y = a + bx ap a' in: x = a' + b'y bp b' in: x = a' + b'y r2 correlation coeffecient var_x variance of x (sigma**2) var_y variance of y (sigma**2) cov covariance SEa standard error for a SEb standard error for b """ # notation from http://mathworld.wolfram.com/CorrelationCoefficient.html # and http://mathworld.wolfram.com/LeastSquaresFitting.html x=na.asarray(x) y=na.asarray(y) n = len(x) assert n == len(y) mean_x = na.sum(x.astype(na.Float))/n mean_y = na.sum(y.astype(na.Float))/n SSxx = na.sum( (x-mean_x)**2 ) SSyy = na.sum( (y-mean_y)**2 ) SSxy = na.sum( x*y ) - n*mean_x*mean_y # y = a + b x # x = ap + bp y b = SSxy/SSxx bp = SSxy/SSyy a = mean_y - b*mean_x if not full_output: return a, b ap = mean_x - bp*mean_y s2 = (SSyy - b*SSxy)/(n-2) s = math.sqrt(s2) SEa = s*math.sqrt( 1/n + mean_x**2/SSxx ) SEb = s/math.sqrt(SSxx) stats = dict( r2 = b*bp, # correlation coefficient var_x = SSxx/n, # variance of x (sigma**2) var_y = SSyy/n, # variance of y (sigma**2) cov = SSxy/n, # covariance SEa = SEa, # standard error for a SEb = SEb, # standard error for b a = a, # a in: y = a + bx b = b, # b in: y = a + bx ap = ap, # a' in: x = a' + b'y bp = bp, # b' in: x = a' + b'y ) return stats On Apr 15, 2004, at 12:24 PM, Scott Ransom wrote: > Hi all, > > Is it possible (or does anyone have any add-on functions available) to > get > error estimates on the fit parameters using optimize.leastq? (or > alternatively, the resulting covariance matrix from the fit?) > > Thanks, > > Scott > > -- > Scott M. Ransom Address: McGill Univ. Physics Dept. > Phone: (514) 398-6492 3600 University St., Rm 338 > email: ransom at physics.mcgill.ca Montreal, QC Canada H3A 2T8 > GPG Fingerprint: 06A9 9553 78BE 16DB 407B FFCA 9BFA B6FF FFD3 2989 > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 155 bytes Desc: This is a digitally signed message part URL: From Fernando.Perez at colorado.edu Thu Apr 15 18:57:34 2004 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Thu, 15 Apr 2004 16:57:34 -0600 Subject: [SciPy-user] optimize.leastsq fit errors? In-Reply-To: References: <200404151524.40983.ransom@physics.mcgill.ca> Message-ID: <407F135E.7070406@colorado.edu> Just a quick note. Given: > n = len(x) you may want to note that in: > SEa = s*math.sqrt( 1/n + mean_x**2/SSxx ) your 1/n term is ==0 for all n>1. Python's integer division floors. It won't matter much for large n, but still. You can fix it by using 1.0/n instead. I think all other divisions (like the /(n-2) one) you have are OK, because they all use float denominators. Cheers, f From Fernando.Perez at colorado.edu Thu Apr 15 19:00:41 2004 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Thu, 15 Apr 2004 17:00:41 -0600 Subject: [SciPy-user] optimize.leastsq fit errors? In-Reply-To: <407F135E.7070406@colorado.edu> References: <200404151524.40983.ransom@physics.mcgill.ca> <407F135E.7070406@colorado.edu> Message-ID: <407F1419.5030108@colorado.edu> Fernando Perez wrote: > think all other divisions (like the /(n-2) one) you have are OK, because they > all use float denominators. ^^^^^^^^^^^^ Sorry, that should have read numerators. Cheers, f From rkern at ucsd.edu Sun Apr 18 06:35:07 2004 From: rkern at ucsd.edu (Robert Kern) Date: Sun, 18 Apr 2004 03:35:07 -0700 Subject: [SciPy-user] optimize.leastsq fit errors? In-Reply-To: <200404151524.40983.ransom@physics.mcgill.ca> References: <200404151524.40983.ransom@physics.mcgill.ca> Message-ID: <408259DB.2000703@ucsd.edu> Scott Ransom wrote: > Hi all, > > Is it possible (or does anyone have any add-on functions available) to get > error estimates on the fit parameters using optimize.leastq? (or > alternatively, the resulting covariance matrix from the fit?) If your problem is nonlinear, you can try my bindings to ODRPACK. It's main purpose for existence is to do orthogonal distance regression (errors in both input and output variables), but it can do ordinary least squares just fine. Just a quick note: the standard errors that are reported are scaled by the reduced chi-square value as is sometimes recommended. The full covariance matrix, however, is unscaled. http://starship.python.net/crew/kernr/source/odr-0.6.tar.gz > Thanks, > > Scott -- Robert Kern rkern at ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter From gazzar at email.com Sun Apr 18 09:17:49 2004 From: gazzar at email.com (Gary Ruben) Date: Sun, 18 Apr 2004 23:17:49 +1000 Subject: [SciPy-user] optimize.leastsq fit errors? Message-ID: <20040418131749.AFC6B1CE505@ws3-6.us4.outblaze.com> Hi Robert, I seem to remember you offered this for integration into scipy a while back and it was put on the backburner for some reason. Licensing or something? If my memory is correct, I'd just like to say to the scipy overlords that I think it would be nice to see it integrated. Gary ----- Original Message ----- From: Robert Kern Date: Sun, 18 Apr 2004 03:35:07 -0700 To: SciPy Users List Subject: Re: [SciPy-user] optimize.leastsq fit errors? > Scott Ransom wrote: > > Hi all, > > > > Is it possible (or does anyone have any add-on functions available) to get > > error estimates on the fit parameters using optimize.leastq? (or > > alternatively, the resulting covariance matrix from the fit?) > > If your problem is nonlinear, you can try my bindings to ODRPACK. It's > main purpose for existence is to do orthogonal distance regression > (errors in both input and output variables), but it can do ordinary > least squares just fine. Just a quick note: the standard errors that are > reported are scaled by the reduced chi-square value as is sometimes > recommended. The full covariance matrix, however, is unscaled. > > http://starship.python.net/crew/kernr/source/odr-0.6.tar.gz > > > Thanks, > > > > Scott > > -- > Robert Kern > rkern at ucsd.edu > > "In the fields of hell where the grass grows high > Are the graves of dreams allowed to die." > -- Richard Harter > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user -- ___________________________________________________________ Sign-up for Ads Free at Mail.com http://promo.mail.com/adsfreejump.htm From ransom at physics.mcgill.ca Sun Apr 18 11:13:11 2004 From: ransom at physics.mcgill.ca (Scott Ransom) Date: Sun, 18 Apr 2004 11:13:11 -0400 Subject: [SciPy-user] optimize.leastsq fit errors? In-Reply-To: <408259DB.2000703@ucsd.edu> References: <200404151524.40983.ransom@physics.mcgill.ca> <408259DB.2000703@ucsd.edu> Message-ID: <20040418151311.GA15260@spock.physics.mcgill.ca> Hi Robert, This sounds exactly like what I need. I'll take a look. Thanks a lot, SCott On Sun, Apr 18, 2004 at 03:35:07AM -0700, Robert Kern wrote: > Scott Ransom wrote: > >Hi all, > > > >Is it possible (or does anyone have any add-on functions available) to get > >error estimates on the fit parameters using optimize.leastq? (or > >alternatively, the resulting covariance matrix from the fit?) > > If your problem is nonlinear, you can try my bindings to ODRPACK. It's > main purpose for existence is to do orthogonal distance regression > (errors in both input and output variables), but it can do ordinary > least squares just fine. Just a quick note: the standard errors that are > reported are scaled by the reduced chi-square value as is sometimes > recommended. The full covariance matrix, however, is unscaled. > > http://starship.python.net/crew/kernr/source/odr-0.6.tar.gz > > >Thanks, > > > >Scott > > -- > Robert Kern > rkern at ucsd.edu > > "In the fields of hell where the grass grows high > Are the graves of dreams allowed to die." > -- Richard Harter > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user -- -- Scott M. Ransom Address: McGill Univ. Physics Dept. Phone: (514) 398-6492 3600 University St., Rm 338 email: ransom at physics.mcgill.ca Montreal, QC Canada H3A 2T8 GPG Fingerprint: 06A9 9553 78BE 16DB 407B FFCA 9BFA B6FF FFD3 2989 From rkern at ucsd.edu Mon Apr 19 04:50:31 2004 From: rkern at ucsd.edu (Robert Kern) Date: Mon, 19 Apr 2004 01:50:31 -0700 Subject: [SciPy-user] optimize.leastsq fit errors? In-Reply-To: <20040418131749.AFC6B1CE505@ws3-6.us4.outblaze.com> References: <20040418131749.AFC6B1CE505@ws3-6.us4.outblaze.com> Message-ID: <408392D7.3050302@ucsd.edu> Gary Ruben wrote: > Hi Robert, > I seem to remember you offered this for integration into scipy a while back and it was put on the backburner for some reason. Licensing or something? If my memory is correct, I'd just like to say to the scipy overlords that I think it would be nice to see it integrated. > Gary There was a feeling that, at least, integration should wait until the next point release. There was also some concern about maintenance of my handwritten wrappers as opposed to f2py wrappers. I think I know how to do the right thing with regard to an f2py wrapper of it now, so when I get a free weekend[1], I'll make an attempt. Licensing isn't a problem: everything is public domain. Oh, and it needs unittests. The ad-hoc tests I have aren't going to cut it. [1] To be fair, most of my weekends actually *are* free, but I live next to the beach now, and I have my priorities. :-) -- Robert Kern rkern at ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter From elidich at netvision.net.il Wed Apr 21 04:12:32 2004 From: elidich at netvision.net.il (Eli Dichterman) Date: Wed, 21 Apr 2004 10:12:32 +0200 Subject: [SciPy-user] sparse matrix Message-ID: <0HWI00B77EVWZH@mxout2.netvision.net.il> Does anybody know where I can find a manual on how to use the sparse matrix package? It does not seem to work on my Python 2.3 + Scipy. Thanks, Eli -------------- next part -------------- An HTML attachment was scrubbed... URL: From nwagner at mecha.uni-stuttgart.de Wed Apr 21 03:24:08 2004 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Wed, 21 Apr 2004 09:24:08 +0200 Subject: [SciPy-user] sparse matrix References: <0HWI00B77EVWZH@mxout2.netvision.net.il> Message-ID: <40862198.46594B12@mecha.uni-stuttgart.de> Eli Dichterman schrieb: > > Part 1.1.1 Type: Plain Text (text/plain) > Encoding: 7BIT > > Part 1.2 Type: Plain Text (text/plain) > Encoding: 7bit Some (short) examples can be found in scipy/Lib/sparse/Sparse.py Nils From elidich at netvision.net.il Wed Apr 21 07:40:48 2004 From: elidich at netvision.net.il (Eli Dichterman) Date: Wed, 21 Apr 2004 13:40:48 +0200 Subject: [SciPy-user] sparse matrix multiplication Message-ID: <0HWI004LEOIUC6@mxout5.netvision.net.il> Is it implemented in scipy.sparse ? sparse.matrixmultiply(a,b) does not seem to work. -------------- next part -------------- An HTML attachment was scrubbed... URL: From christoph.ortner at oriel.oxford.ac.uk Wed Apr 21 05:18:16 2004 From: christoph.ortner at oriel.oxford.ac.uk (Christoph Ortner) Date: Wed, 21 Apr 2004 10:18:16 +0100 Subject: [SciPy-user] Sparse Matrices Message-ID: <40863C58.9080009@oriel.ox.ac.uk> Dear All, I apologize for bringing up this question again. Has anybody so far succeeded in building the scipy.sparse library under windows or cygwin? Thanks, Christoph From travis at enthought.com Wed Apr 21 17:40:24 2004 From: travis at enthought.com (Travis N. Vaught) Date: Wed, 21 Apr 2004 16:40:24 -0500 Subject: [SciPy-user] ANN: SciPy 0.3 Released Message-ID: <4086EA48.4080105@enthought.com> Greetings, SciPy 0.3 has been released and binaries are available from the scipy.org site. http://www.scipy.org Changes since the 0.1 version (0.1 enjoyed a wide release, there was a version 0.2 that had limited exposure) include the following: - general improvements: Added utility functions for constructing arrays by concatenation, intended mainly for command-line use. Added bmat constructor for easy creation of block matrices. Added mat constructor for constructing matrices (where * is matrix multiplication). Added many PIL utility functions so that if the PIL is installed, image loading, saving, and other operations are available. Added scipy.info, which handles dynamic docstrings and class help better than python's help command. - documentation: much improved - sparse: superLU upgraded to 3.0 - optimize: Added non-linear conjugate gradient algorithm. Improvements to BFGS algorithm and Wolfe-condition line-search. Added two CONSTRAINED optimization techniques. Added simulated annealing and brute-force optimization strategies and Powell's method. Added many very good 1-D root-finding routines. - stats: Added many statistical distributions. Many continuous and discrete random variables are available with a simple mechanism for adding new ones. Added several statistical tests. - special: Added MANY new special functions. |general_function| renamed to |vectorize| and moved to scipy_base. Improved the way domain errors are handled (user specified display of problems). More tests on special functions added. - fftpack: replaced with fftpack2--can optionally be configured to support djbfft - io: Reading of MATLAB .mat files (version 4 and 5) supported. Writing version 4 .mat files supported. Added very flexible and general_purpose text file reader. Added shelving save operation to save variables into an importable module. Routines for reading and writing fortran-records. - linalg: Linear algebra is greatly improved over SciPy 0.1. ATLAS is now optional (but encouraged). Most lapack functions have simplified interfaces (all lapack and blas available). Matrix exponentials and other matrix functions added. - signal: Added support for filter design and LTI system analysis. - xplt: Updated xplt to use newer pygist so that Windows platform is supported. Addition of several plotting types. - integrate: added another ODE integrator. Added romberg integration and several other integration approaches. The complete release notes can be found here: http://www.scipy.org/download/scipy_release_notes_0.3.html You'll also notice that scipy.org is now a spanking new Plone portal (http://www.plone.org -- keep up the good work, plone folks). This is the first binary release in a long time and we hope to increase the frequency to every 6 months or so. If you'd like to follow or join the community, you can subscribe to the mailing lists here: http://www.scipy.org/mailinglists/ Best Regards, Travis BTW SciPy is: ------------- SciPy is an open source library of scientific tools for Python. SciPy supplements the popular Numeric module, gathering a variety of high level science and engineering modules together as a single package. SciPy includes modules for graphics and plotting, optimization, integration, special functions, signal and image processing, genetic algorithms, ODE solvers, and others. From chris at fonnesbeck.org Thu Apr 22 09:23:15 2004 From: chris at fonnesbeck.org (Christopher Fonnesbeck) Date: Thu, 22 Apr 2004 09:23:15 -0400 Subject: [SciPy-user] corrupt png output from gplt In-Reply-To: References: Message-ID: <361D6632-9460-11D8-904C-000A956FDAC0@fonnesbeck.org> On Apr 13, 2004, at 10:07 AM, Christopher Fonnesbeck wrote: > I am using gplt to plot a number of traces and densities from my MCMC > code; it seems to work well, but when the plots are saved to file many > of them end up being zero-size files. Since I am producing a large > number of plots sequentially, I am wondering if somehow the generation > of the next plot interferes with saving the previous plot to a file? > It is the only thing I can think of, since some plots save properly, > while others do not. Has anyone else run into this problem? Is there a > way of guaranteeing the file before the next plot is produced? > This also seems to be a platform-independent problem; it occurs on Linux and Windows as well as on OSX. There must be some problem with the gplot module, as I do not see how it would create the file, yet write no data to it. C. -- Christopher J. Fonnesbeck ( c h r i s @ f o n n e s b e c k . o r g ) Georgia Cooperative Fish & Wildlife Research Unit, University of Georgia "More and more of our imports come from overseas." George W. Bush, 25 September 2000 -- Putting http://wecanstopspam.org in your email helps it pass through overzealous spam filters. From jcazier at decode.is Thu Apr 22 13:01:01 2004 From: jcazier at decode.is (Jean-Baptiste Cazier) Date: Thu, 22 Apr 2004 17:01:01 +0000 Subject: [SciPy-user] Multiple regression Message-ID: <20040422170101.3858142d.jcazier@decode.is> S?l ! I saw in some post in comp.lang.python that Scipy is supposed to have multiple regression tools included However when I look at the stat_test I see that it is not the case. Am I looking at the wrong place ? Could anybody please point me out to a multiple regression module in python ? Thanks a lot Jean-Baptiste -- ----------------------------- Jean-Baptiste.Cazier at decode.is Department of Statistics deCODE genetics Sturlugata,8 570 2993 101 Reykjav?k From jdhunter at ace.bsd.uchicago.edu Thu Apr 22 13:01:26 2004 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Thu, 22 Apr 2004 12:01:26 -0500 Subject: [SciPy-user] Multiple regression In-Reply-To: <20040422170101.3858142d.jcazier@decode.is> (Jean-Baptiste Cazier's message of "Thu, 22 Apr 2004 17:01:01 +0000") References: <20040422170101.3858142d.jcazier@decode.is> Message-ID: >>>>> "Jean-Baptiste" == Jean-Baptiste Cazier writes: Jean-Baptiste> S?l ! I saw in some post in comp.lang.python that Jean-Baptiste> Scipy is supposed to have multiple regression tools Jean-Baptiste> included However when I look at the stat_test I see Jean-Baptiste> that it is not the case. Jean-Baptiste> Am I looking at the wrong place ? Jean-Baptiste> Could anybody please point me out to a multiple Jean-Baptiste> regression module in python ? Here is the algorithm I use, which I implemented from the discussion at mathworld. I validated this against matlab's regress function. # fcdf is in different places in different scipy versions try: from scipy.stats import fcdf except ImportError: from scipy.stats import f fcdf = f.cdf from Numeric import matrixmultiply, ones, Float, divide, transpose, reshape,\ array, sqrt from LinearAlgebra import linear_least_squares, inverse from MLab import randn, mean, sum, cov from Matrix import Matrix def regress(X,y): """ Perform a multiple linear regression of y onto X. X is a num observations by (num variables +1) array. X should contain a column of ones to generate the intercept. y is a num observations array of independent variables return value B, residuals, stats B: the regression coeffients; Ypred = B.T * X.T residuals: array( y - Ypred.T) stats = Rsquared, F, p """ # regression coeffs are given by (Xt*X)-1*Xt*y N = X.shape[0] y.shape = N, 1 X = Matrix(X) Y = Matrix(y) Xt = X.T Xt_X_i = Matrix(inverse(Xt*X) ) B = Xt_X_i*Xt*Y Ypred = B.T * Xt residuals = array(Y-Ypred.T) CF = N*mean(y)**2 # correction factor SStotal = float(Y.T*Y-CF) SSregress = float(B.T * Xt * Y - CF) SSerror = SStotal - SSregress Rsquared = SSregress/SStotal dfTotal = N-1 dfRegress = len(B)-1 dfError = dfTotal - dfRegress F = SSregress/dfRegress / (SSerror/dfError) prob = 1-fcdf(F, dfRegress, dfError) stats = Rsquared, F, prob return B, residuals, stats fhx = file('independent.dat', 'w') fhy = file('dependent.dat', 'w') # X is number observations by (number vars + constant) X = randn( 200,6 ) # The last column should be ones for the constant term X[:,5] = ones((200,), typecode=Float) y = randn( 200 ) # the dependent var #save the data to file for comparison with matlab's regress for row in X: print >>fhx, ' '.join([str(val) for val in row]) print >>fhy, '\n'.join([str(val) for val in y]) fhx.close() fhy.close() # c are the coeffiecients # ss is the sum of squared residuals # sv are the singular values of X c, ss, rank, sv = linear_least_squares(X,y) # below is just a demo to show how the results can be used to generate # a prediction p = matrixmultiply(X,c) ss1 = sum( (y-p)**2) # should equal 'ss' B, resid, stats = regress(X,y) print stats # validated against multiple_regress_demo.m From jdhunter at ace.bsd.uchicago.edu Thu Apr 22 13:15:36 2004 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Thu, 22 Apr 2004 12:15:36 -0500 Subject: [SciPy-user] import scipy mangles types Message-ID: Here's an interesting bug. from Matrix import Matrix import scipy Matrix([1,2,3]) produces the traceback Traceback (most recent call last): File "", line 1, in ? File "/usr/local/lib/python2.3/site-packages/Numeric/Matrix.py", line 69, in __init__ if type(data) is types.StringType: AttributeError: 'NoneType' object has no attribute 'StringType' The types module (used by Matrix) is being replaced by None if scipy is imported after Matrix. If I import scipy before I import Matrix, I have no troubles import scipy from Matrix import Matrix Matrix([1,2,3]) This is a CVS scipy, circa Feb 10 2004. Haven't checked against 0.3. JDH From pearu at scipy.org Thu Apr 22 14:06:31 2004 From: pearu at scipy.org (Pearu Peterson) Date: Thu, 22 Apr 2004 13:06:31 -0500 (CDT) Subject: [SciPy-user] import scipy mangles types In-Reply-To: Message-ID: On Thu, 22 Apr 2004, John Hunter wrote: > Here's an interesting bug. > > from Matrix import Matrix > import scipy > Matrix([1,2,3]) > > produces the traceback > Traceback (most recent call last): > File "", line 1, in ? > File "/usr/local/lib/python2.3/site-packages/Numeric/Matrix.py", line 69, in __init__ > if type(data) is types.StringType: > AttributeError: 'NoneType' object has no attribute 'StringType' > > The types module (used by Matrix) is being replaced by None if scipy > is imported after Matrix. Strange, scipy import should not need to touch types at all.. > If I import scipy before I import Matrix, I have no troubles > > import scipy > from Matrix import Matrix > Matrix([1,2,3]) > > This is a CVS scipy, circa Feb 10 2004. Haven't checked against 0.3. That is very old scipy. Anyway, with the recent CVS there are no troubles: >>> from Matrix import Matrix >>> import scipy >>> Matrix([1,2,3]) Matrix([ [1, 2, 3]]) Pearu From nwagner at mecha.uni-stuttgart.de Fri Apr 23 02:17:41 2004 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Fri, 23 Apr 2004 08:17:41 +0200 Subject: [SciPy-user] scipy.test() hang up Message-ID: <4088B505.278E24A5@mecha.uni-stuttgart.de> Dear experts, scipy.test() hang up in latest cvs 0.3.1_273.4274. ...Result may be inaccurate, approximate err = 1.60346233901e-11 .............................................Ties preclude use of exact statistic. ..Ties preclude use of exact statistic. ................ Any pointer for this behavior ? Nils From arnd.baecker at web.de Fri Apr 23 02:48:06 2004 From: arnd.baecker at web.de (Arnd Baecker) Date: Fri, 23 Apr 2004 08:48:06 +0200 (CEST) Subject: [SciPy-user] scipy.test() hang up In-Reply-To: <4088B505.278E24A5@mecha.uni-stuttgart.de> References: <4088B505.278E24A5@mecha.uni-stuttgart.de> Message-ID: Hi Nils, you could try scipy.test(verbosity=2) to get a bit more information (I haven't used this myself, but just remembered an e-mail from Pearu last year). Arnd On Fri, 23 Apr 2004, Nils Wagner wrote: > Dear experts, > > scipy.test() hang up in latest cvs 0.3.1_273.4274. > > ...Result may be inaccurate, approximate err = 1.60346233901e-11 > .............................................Ties preclude use of exact > statistic. > ..Ties preclude use of exact statistic. > ................ > > Any pointer for this behavior ? > > Nils > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From nwagner at mecha.uni-stuttgart.de Fri Apr 23 02:50:33 2004 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Fri, 23 Apr 2004 08:50:33 +0200 Subject: [SciPy-user] scipy.test() hang up References: <4088B505.278E24A5@mecha.uni-stuttgart.de> Message-ID: <4088BCB9.36792654@mecha.uni-stuttgart.de> Arnd Baecker schrieb: > > Hi Nils, > > you could try > scipy.test(verbosity=2) > to get a bit more information > (I haven't used this myself, but just remembered an > e-mail from Pearu last year). > > Arnd Hi Arnd, Thank you for the hint. This is the result Traceback (most recent call last): File "", line 1, in ? File "/usr/local/lib/python2.3/site-packages/scipy_test/testing.py", line 329, in test runner.run(all_tests) File "/usr/local/lib/python2.3/unittest.py", line 658, in run test(result) File "/usr/local/lib/python2.3/unittest.py", line 389, in __call__ test(result) File "/usr/local/lib/python2.3/site-packages/scipy_test/testing.py", line 142, in __call__ unittest.TestCase.__call__(self, result) File "/usr/local/lib/python2.3/unittest.py", line 245, in __call__ if ok: result.addSuccess(self) File "/usr/local/lib/python2.3/unittest.py", line 608, in addSuccess self.stream.writeln("ok") AttributeError: _dummy_stream instance has no attribute 'writeln' Nils > > On Fri, 23 Apr 2004, Nils Wagner wrote: > > > Dear experts, > > > > scipy.test() hang up in latest cvs 0.3.1_273.4274. > > > > ...Result may be inaccurate, approximate err = 1.60346233901e-11 > > .............................................Ties preclude use of exact > > statistic. > > ..Ties preclude use of exact statistic. > > ................ > > > > Any pointer for this behavior ? > > > > Nils > > > > _______________________________________________ > > SciPy-user mailing list > > SciPy-user at scipy.net > > http://www.scipy.net/mailman/listinfo/scipy-user > > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From pearu at scipy.org Fri Apr 23 03:04:02 2004 From: pearu at scipy.org (Pearu Peterson) Date: Fri, 23 Apr 2004 02:04:02 -0500 (CDT) Subject: [SciPy-user] scipy.test() hang up In-Reply-To: <4088B505.278E24A5@mecha.uni-stuttgart.de> Message-ID: On Fri, 23 Apr 2004, Nils Wagner wrote: > Dear experts, > > scipy.test() hang up in latest cvs 0.3.1_273.4274. > > ...Result may be inaccurate, approximate err = 1.60346233901e-11 > .............................................Ties preclude use of exact > statistic. > ..Ties preclude use of exact statistic. > ................ > > Any pointer for this behavior ? I think it is cobyla test that hangs here. The reason is that gcc over-optimizes trstlp function in cobyla causing infinite loop, with no optimization this test passes ok. Also, I thought I have fixed it in CVS (try rebuilding everything from scratch). Now it works ok with gcc 3.3.3 here. What g77 version are you using? Pearu From nwagner at mecha.uni-stuttgart.de Fri Apr 23 02:56:45 2004 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Fri, 23 Apr 2004 08:56:45 +0200 Subject: [SciPy-user] scipy.test() hang up References: Message-ID: <4088BE2D.16065F50@mecha.uni-stuttgart.de> Pearu Peterson schrieb: > > On Fri, 23 Apr 2004, Nils Wagner wrote: > > > Dear experts, > > > > scipy.test() hang up in latest cvs 0.3.1_273.4274. > > > > ...Result may be inaccurate, approximate err = 1.60346233901e-11 > > .............................................Ties preclude use of exact > > statistic. > > ..Ties preclude use of exact statistic. > > ................ > > > > Any pointer for this behavior ? > > I think it is cobyla test that hangs here. The reason is that gcc > over-optimizes trstlp function in cobyla causing infinite loop, with no > optimization this test passes ok. > Also, I thought I have fixed it in CVS (try rebuilding everything from > scratch). Now it works ok with gcc 3.3.3 here. What g77 version are you > using? > g77 -v Reading specs from /usr/lib/gcc-lib/i586-suse-linux/3.3.1/specs Konfiguriert mit: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib --enable-languages=c,c++,f77,objc,java,ada --disable-checking --enable-libgcj --with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib --with-system-zlib --enable-shared --enable-__cxa_atexit i586-suse-linux Thread model: posix gcc-Version 3.3.1 (SuSE Linux) Nils > Pearu > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From pearu at scipy.org Fri Apr 23 03:09:19 2004 From: pearu at scipy.org (Pearu Peterson) Date: Fri, 23 Apr 2004 02:09:19 -0500 (CDT) Subject: [SciPy-user] scipy.test() hang up In-Reply-To: <4088BCB9.36792654@mecha.uni-stuttgart.de> Message-ID: On Fri, 23 Apr 2004, Nils Wagner wrote: > Traceback (most recent call last): .. > self.stream.writeln("ok") > AttributeError: _dummy_stream instance has no attribute 'writeln' This is now fixed in CVS. Pearu From nwagner at mecha.uni-stuttgart.de Fri Apr 23 03:51:39 2004 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Fri, 23 Apr 2004 09:51:39 +0200 Subject: [SciPy-user] scipy.test() hang up References: Message-ID: <4088CB0B.CBA9FE7C@mecha.uni-stuttgart.de> Pearu Peterson schrieb: > > On Fri, 23 Apr 2004, Nils Wagner wrote: > > > Traceback (most recent call last): > .. > > self.stream.writeln("ok") > > AttributeError: _dummy_stream instance has no attribute 'writeln' > > This is now fixed in CVS. > But scipy.test(verbosity=2) hang up again. check_shape (scipy.common.test_common.test_randn) ... ok check_std (scipy.common.test_common.test_randn) ... ok check_basic (scipy.common.test_common.test_factorial) ... ok check_exact (scipy.common.test_common.test_factorial) ... ok check_basic (scipy.common.test_common.test_comb) ... ok check_exact (scipy.common.test_common.test_comb) ... ok Nils > Pearu > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From pearu at scipy.org Fri Apr 23 04:19:49 2004 From: pearu at scipy.org (Pearu Peterson) Date: Fri, 23 Apr 2004 03:19:49 -0500 (CDT) Subject: [SciPy-user] scipy.test() hang up In-Reply-To: <4088CB0B.CBA9FE7C@mecha.uni-stuttgart.de> Message-ID: On Fri, 23 Apr 2004, Nils Wagner wrote: > Pearu Peterson schrieb: > > > > On Fri, 23 Apr 2004, Nils Wagner wrote: > > > > > Traceback (most recent call last): > > .. > > > self.stream.writeln("ok") > > > AttributeError: _dummy_stream instance has no attribute 'writeln' > > > > This is now fixed in CVS. > > > But scipy.test(verbosity=2) hang up again. > > check_shape (scipy.common.test_common.test_randn) ... ok > check_std (scipy.common.test_common.test_randn) ... ok > check_basic (scipy.common.test_common.test_factorial) ... ok > check_exact (scipy.common.test_common.test_factorial) ... ok > check_basic (scipy.common.test_common.test_comb) ... ok > check_exact (scipy.common.test_common.test_comb) ... ok Try: >>> scipy.optimize.test(verbosity=2) If it hangs then do in scipy CVS tree cd Lib/optimize python setup_optimize.py build python tests/test_cobyla.py If that also hangs then do cd Lib/optimize rm -rf build python setup_optimize.py config_fc --noopt build python tests/test_cobyla.py Tell me what happened. Pearu From nwagner at mecha.uni-stuttgart.de Fri Apr 23 04:19:32 2004 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Fri, 23 Apr 2004 10:19:32 +0200 Subject: [SciPy-user] scipy.test() hang up References: Message-ID: <4088D194.8EECF809@mecha.uni-stuttgart.de> Pearu Peterson schrieb: > > On Fri, 23 Apr 2004, Nils Wagner wrote: > > > Pearu Peterson schrieb: > > > > > > On Fri, 23 Apr 2004, Nils Wagner wrote: > > > > > > > Traceback (most recent call last): > > > .. > > > > self.stream.writeln("ok") > > > > AttributeError: _dummy_stream instance has no attribute 'writeln' > > > > > > This is now fixed in CVS. > > > > > But scipy.test(verbosity=2) hang up again. > > > > check_shape (scipy.common.test_common.test_randn) ... ok > > check_std (scipy.common.test_common.test_randn) ... ok > > check_basic (scipy.common.test_common.test_factorial) ... ok > > check_exact (scipy.common.test_common.test_factorial) ... ok > > check_basic (scipy.common.test_common.test_comb) ... ok > > check_exact (scipy.common.test_common.test_comb) ... ok > > Try: > > >>> scipy.optimize.test(verbosity=2) > > If it hangs then do in scipy CVS tree > > cd Lib/optimize > python setup_optimize.py build > python tests/test_cobyla.py > > If that also hangs then do > > cd Lib/optimize > rm -rf build > python setup_optimize.py config_fc --noopt build > python tests/test_cobyla.py > > Tell me what happened. > Your last test works fine python tests/test_cobyla.py Found 1 tests for __main__ Result: [ 4.95535778 0.6666553 ] (exact result = 4.955356249106168, 0.666666666666666) . ---------------------------------------------------------------------- Ran 1 test in 0.015s OK Nils > Pearu > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From pearu at scipy.org Fri Apr 23 05:22:43 2004 From: pearu at scipy.org (Pearu Peterson) Date: Fri, 23 Apr 2004 04:22:43 -0500 (CDT) Subject: [SciPy-user] scipy.test() hang up In-Reply-To: <4088D194.8EECF809@mecha.uni-stuttgart.de> Message-ID: On Fri, 23 Apr 2004, Nils Wagner wrote: > > If it hangs then do in scipy CVS tree > > > > cd Lib/optimize > > python setup_optimize.py build > > python tests/test_cobyla.py > > > > If that also hangs then do > > > > cd Lib/optimize > > rm -rf build > > python setup_optimize.py config_fc --noopt build > > python tests/test_cobyla.py > > > > Tell me what happened. > > > Your last test works fine Ok, after CVS update try again cd Lib/optimize rm -rf build python setup_optimize.py build python tests/test_cobyla.py Pearu From nwagner at mecha.uni-stuttgart.de Fri Apr 23 05:22:48 2004 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Fri, 23 Apr 2004 11:22:48 +0200 Subject: [SciPy-user] scipy.test() hang up References: Message-ID: <4088E068.7273C5F4@mecha.uni-stuttgart.de> Pearu Peterson schrieb: > > On Fri, 23 Apr 2004, Nils Wagner wrote: > > > > If it hangs then do in scipy CVS tree > > > > > > cd Lib/optimize > > > python setup_optimize.py build > > > python tests/test_cobyla.py > > > > > > If that also hangs then do > > > > > > cd Lib/optimize > > > rm -rf build > > > python setup_optimize.py config_fc --noopt build > > > python tests/test_cobyla.py > > > > > > Tell me what happened. > > > > > Your last test works fine > > Ok, after CVS update try again > > cd Lib/optimize > rm -rf build > python setup_optimize.py build > python tests/test_cobyla.py > > Pearu > Pearu, Now, it works fine for me. python tests/test_cobyla.py Found 1 tests for __main__ Result: [ 4.957975 0.64690335] (exact result = 4.955356249106168, 0.666666666666666) . ---------------------------------------------------------------------- Ran 1 test in 0.002s OK Thank you again. Nils > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From chris at fonnesbeck.org Fri Apr 23 11:24:43 2004 From: chris at fonnesbeck.org (Christopher Fonnesbeck) Date: Fri, 23 Apr 2004 11:24:43 -0400 (EDT) Subject: [SciPy-user] Instructions for installing SciPy on OSX Message-ID: <51471.69.55.173.180.1082733883.squirrel@mail.zettai.net> I have created relatively detailed instructions for installing SciPy on OSX in my member's folder of the new SciPy site, borrowing heavily from Pearu's windows instructions. I have submitted this page for publication to the SciPy gods, so hopefully it will be made available soon. Please let me know if you find any errors or inconsistencies. Chris -- Christopher J. Fonnesbeck ( c h r i s @ f o n n e s b e c k . o r g ) Georgia Cooperative Fish & Wildlife Research Unit, University of Georgia From eric at enthought.com Fri Apr 23 11:52:25 2004 From: eric at enthought.com (eric jones) Date: Fri, 23 Apr 2004 10:52:25 -0500 Subject: [SciPy-user] Instructions for installing SciPy on OSX In-Reply-To: <51471.69.55.173.180.1082733883.squirrel@mail.zettai.net> References: <51471.69.55.173.180.1082733883.squirrel@mail.zettai.net> Message-ID: <40893BB9.6050205@enthought.com> Christopher Fonnesbeck wrote: >I have created relatively detailed instructions for installing SciPy on >OSX in my member's folder of the new SciPy site, borrowing heavily from >Pearu's windows instructions. I have submitted this page for publication >to the SciPy gods, so hopefully it will be made available soon. Please let >me know if you find any errors or inconsistencies. > >Chris > > > Very cool. Thanks Chris. Its published. JonEric or Janet, could you put links to his page in the appropriate places? Here's the page: http://www.scipy.org/Members/fonnesbeck/osx_build/ Also Travis or Joe, Is there anyway to see "pending" docs when I log in so that pages aren't sitting there waiting for a long time? see ya, eric From swisher at enthought.com Fri Apr 23 12:09:24 2004 From: swisher at enthought.com (Janet Swisher) Date: Fri, 23 Apr 2004 11:09:24 -0500 Subject: [SciPy-user] Instructions for installing SciPy on OSX In-Reply-To: <40893BB9.6050205@enthought.com> Message-ID: <003001c4294d$5b2d69e0$ab01a8c0@SWISHER> I made a few proof-edits, and linked it into the Documentation page, http://www.scipy.org/documentation/. Thanks Chris! ------------------------- Janet Swisher Senior Technical Writer Enthought, Inc. 1-512-536-1057 > -----Original Message----- > From: eric jones [mailto:eric at enthought.com] > Sent: Friday, April 23, 2004 10:52 AM > To: SciPy Users List; Janet Swisher; jon-eric steinbomer; > Travis Vaught; Joe Cooper > Subject: Re: [SciPy-user] Instructions for installing SciPy on OSX > > > Christopher Fonnesbeck wrote: > > >I have created relatively detailed instructions for > installing SciPy on > >OSX in my member's folder of the new SciPy site, borrowing > heavily from > >Pearu's windows instructions. I have submitted this page for > >publication to the SciPy gods, so hopefully it will be made > available > >soon. Please let me know if you find any errors or inconsistencies. > > > >Chris > > > > > > > Very cool. Thanks Chris. > > Its published. JonEric or Janet, could you put links to his > page in the > appropriate places? > > Here's the page: http://www.scipy.org/Members/fonnesbeck/osx_build/ > > > Also Travis or Joe, > > Is there anyway to see "pending" docs when I log in so that > pages aren't > sitting there waiting for a long time? > > > see ya, > eric > From stephen.walton at csun.edu Fri Apr 23 16:03:08 2004 From: stephen.walton at csun.edu (Stephen Walton) Date: Fri, 23 Apr 2004 13:03:08 -0700 Subject: [SciPy-user] RPMs of 0.3 Message-ID: <1082750587.22405.64.camel@sunspot.csun.edu> I just tried downloading and installing the prebuilt RPMs of SciPy 0.3. They are realy very handy, but of course I have some comments. SciPy-0.3.0_266.4239-1ee_py23_Linux_PIII_rh9.i386.rpm, and perhaps the others, have fftw as a dependency but this is not stated on the installation site. I was able to install them on a non-FFTW-equipped machine by using "--nodeps". Without fftw, scipy.test(level=1) fails. Installing FFTW allows it to pass all tests on FC1 at this level. YMMV. FYI, I find the simplest way to get fftw on FC1 is to put download.fedora.us in /etc/yum.conf and do "yum install fftw fftw-devel". -- Stephen Walton Dept. of Physics & Astronomy, Cal State Northridge From joe at enthought.com Fri Apr 23 16:22:59 2004 From: joe at enthought.com (Joe Cooper) Date: Fri, 23 Apr 2004 15:22:59 -0500 Subject: [SciPy-user] RPMs of 0.3 In-Reply-To: <1082750587.22405.64.camel@sunspot.csun.edu> References: <1082750587.22405.64.camel@sunspot.csun.edu> Message-ID: <40897B23.1090203@enthought.com> Stephen Walton wrote: > I just tried downloading and installing the prebuilt RPMs of SciPy 0.3. > They are realy very handy, but of course I have some comments. > > SciPy-0.3.0_266.4239-1ee_py23_Linux_PIII_rh9.i386.rpm, and perhaps the > others, have fftw as a dependency but this is not stated on the > installation site. I was able to install them on a non-FFTW-equipped > machine by using "--nodeps". Without fftw, scipy.test(level=1) fails. > Installing FFTW allows it to pass all tests on FC1 at this level. YMMV. > > FYI, I find the simplest way to get fftw on FC1 is to put > download.fedora.us in /etc/yum.conf and do "yum install fftw > fftw-devel". Oops. I intended to build non-FFTW packages, but I didn't explicitly make it happen. I'm rolling new packages right now, which will exclude this dependency. We also have a yum repository, that will provide all deps and also offer a meta-package that will install all of the stuff that we include with the Python Enthought Edition for Windows...but that will have to wait until I can fit it into my Copious Free Time(tm). Thanks for the heads up. Will be fixed by the end of today. From pascalbarbedor at free.fr Sat Apr 24 06:09:07 2004 From: pascalbarbedor at free.fr (pascal barbedor) Date: Sat, 24 Apr 2004 12:09:07 +0200 Subject: [SciPy-user] Fw: no __setitem__ in spmatrix class Message-ID: <001101c429e4$2ea19440$41a9933e@xykj7rzay2er1n> Hi I noticed there is no __setitem__ method in spmatrix class in scipy.sparse module but what if one needs to (sparsely) fill the matrix after __init__ time ? thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From chris at fonnesbeck.org Sun Apr 25 19:05:38 2004 From: chris at fonnesbeck.org (Christopher Fonnesbeck) Date: Sun, 25 Apr 2004 19:05:38 -0400 Subject: [SciPy-user] Re: Scipy help? In-Reply-To: <58488.203.208.240.102.1082869897.squirrel@webmail.aber.ac.uk> References: <58257.203.208.240.102.1082823759.squirrel@webmail.aber.ac.uk> <58488.203.208.240.102.1082869897.squirrel@webmail.aber.ac.uk> Message-ID: <10ED3C84-970D-11D8-A517-000A956FDAC0@fonnesbeck.org> On Apr 25, 2004, at 1:11 AM, Simon Garrett wrote: > As you can probably see, my installs were all from source tar-balls, if > that makes any difference, downloaded from the sites pointed at by the > Mac/SciPy webpage I mentioned. The setup.py file in the 0.3 release needs to be altered before compiling on OSX. In particular, lines 103 and 104 need to be uncommented in order for a successful build. These lines are uncommented in CVS, but not in the 0.3 source tarball. C. -- Christopher J. Fonnesbeck ( c h r i s @ f o n n e s b e c k . o r g ) Georgia Cooperative Fish & Wildlife Research Unit, University of Georgia "More and more of our imports come from overseas." George W. Bush, 25 September 2000 -- Putting http://wecanstopspam.org in your email helps it pass through overzealous spam filters. From Bob.Cowdery at CGI-Europe.com Mon Apr 26 08:33:51 2004 From: Bob.Cowdery at CGI-Europe.com (Bob.Cowdery at CGI-Europe.com) Date: Mon, 26 Apr 2004 13:33:51 +0100 Subject: [SciPy-user] Continuous sine wave Message-ID: <9B40DB5FBF7D2048AD79C2A91F862A51772FEB@STEVAPPS05.Stevenage.CGI-Europe.com> Anyone know the most efficient way to generate a continuous sine wave. What I actually need is single and dual tones at a frequency between 500Hz and 2KHz. This would be packed into an array representing 2048 samples at 44.1KHz sampling rate initially. The block size and sampling rate are variable so I need to be able to stitch blocks together correctly at any size and rate. Thanks Bob Bob Cowdery CGI Senior Technical Architect +44(0)1438 791517 Mobile: +44(0)7771 532138 bob.cowdery at cgi-europe.com *** Confidentiality Notice *** Proprietary/Confidential Information belonging to CGI Group Inc. and its affiliates may be contained in this message. If you are not a recipient indicated or intended in this message (or responsible for delivery of this message to such person), or you think for any reason that this message may have been addressed to you in error, you may not use or copy or deliver this message to anyone else. In such case, you should destroy this message and are asked to notify the sender by reply email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From chris at fonnesbeck.org Mon Apr 26 10:12:22 2004 From: chris at fonnesbeck.org (Christopher Fonnesbeck) Date: Mon, 26 Apr 2004 10:12:22 -0400 Subject: [SciPy-user] Instructions for installing SciPy on OSX In-Reply-To: <003001c4294d$5b2d69e0$ab01a8c0@SWISHER> References: <003001c4294d$5b2d69e0$ab01a8c0@SWISHER> Message-ID: Janet, I have a couple of corrections for the OSX install instructions for SciPy, based on feedback from users. I would make these changes myself, but I do not seem to have edit permissions for the file now that it is published. If you would like me to make the changes (I'd be happy to), I would need the status of the file changes, otherwise here are the corrections: 1. In the MacPython section: Change "Jack Jensesn's" to "Jack Jansen's" 2. In the Gnuplot and Aquaterm section: Change the fourth bullet to: Copy include files using the command: cp -rf ./include /usr/local/include/aquaterm 3. In the Building SciPy section: The first paragraph should be (using structured text): You may install SciPy either by checking them out from the CVS repository (see "CVS documentation":http://www.scipy.org/cvs/ ) or from a source archive file (see "Downloads":http://www.scipy.org/download/ ). IF you chose the latter, you must make a minor change to the setup.py file before installing. Open setup.py in a text editor and change:: ignore_packages = [ # 'sparse', # 'kiva','freetype','chaco','traits', ] to:: ignore_packages = [ 'sparse', 'kiva','freetype','chaco','traits', ] That is, simply remove the comment characters from these lines. You can then start the build process in the SciPy source directory as follows: etc. Thanks, Chris On Apr 23, 2004, at 12:09 PM, Janet Swisher wrote: > I made a few proof-edits, and linked it into the Documentation page, > http://www.scipy.org/documentation/. > > Thanks Chris! > > ------------------------- > Janet Swisher > Senior Technical Writer > Enthought, Inc. > 1-512-536-1057 > > >> -----Original Message----- >> From: eric jones [mailto:eric at enthought.com] >> Sent: Friday, April 23, 2004 10:52 AM >> To: SciPy Users List; Janet Swisher; jon-eric steinbomer; >> Travis Vaught; Joe Cooper >> Subject: Re: [SciPy-user] Instructions for installing SciPy on OSX >> >> >> Christopher Fonnesbeck wrote: >> >>> I have created relatively detailed instructions for >> installing SciPy on >>> OSX in my member's folder of the new SciPy site, borrowing >> heavily from >>> Pearu's windows instructions. I have submitted this page for >>> publication to the SciPy gods, so hopefully it will be made >> available >>> soon. Please let me know if you find any errors or inconsistencies. >>> >>> Chris >>> >>> >>> >> Very cool. Thanks Chris. >> >> Its published. JonEric or Janet, could you put links to his >> page in the >> appropriate places? >> >> Here's the page: http://www.scipy.org/Members/fonnesbeck/osx_build/ >> >> >> Also Travis or Joe, >> >> Is there anyway to see "pending" docs when I log in so that >> pages aren't >> sitting there waiting for a long time? >> >> >> see ya, >> eric >> > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > > -- Christopher J. Fonnesbeck ( c h r i s @ f o n n e s b e c k . o r g ) Georgia Cooperative Fish & Wildlife Research Unit, University of Georgia "More and more of our imports come from overseas." George W. Bush, 25 September 2000 -- Putting http://wecanstopspam.org in your email helps it pass through overzealous spam filters. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 3443 bytes Desc: not available URL: From pearu at scipy.org Mon Apr 26 10:23:01 2004 From: pearu at scipy.org (Pearu Peterson) Date: Mon, 26 Apr 2004 09:23:01 -0500 (CDT) Subject: [SciPy-user] Re: Scipy help? In-Reply-To: <10ED3C84-970D-11D8-A517-000A956FDAC0@fonnesbeck.org> Message-ID: On Sun, 25 Apr 2004, Christopher Fonnesbeck wrote: > > On Apr 25, 2004, at 1:11 AM, Simon Garrett wrote: > > > As you can probably see, my installs were all from source tar-balls, if > > that makes any difference, downloaded from the sites pointed at by the > > Mac/SciPy webpage I mentioned. > > The setup.py file in the 0.3 release needs to be altered before > compiling on OSX. In particular, lines 103 and 104 need to be > uncommented in order for a successful build. These lines are > uncommented in CVS, but not in the 0.3 source tarball. The setup.py file both in 0.3 tar-ball and CVS contains: ... 101 if __name__ == "__main__": 102 ignore_packages = [ 103 #'sparse', 104 #'kiva','freetype','chaco','traits', 105 ] 106 if sys.platform in ['win32','cygwin']: ... Uncommenting line #104 has not effect as scipy does not contain kiva,freetype,.. packages anymore. Uncommenting line #103 would disable building sparce module. What are the sparse building failures on OSX that you want to disable it? Pearu From chris at fonnesbeck.org Mon Apr 26 10:30:59 2004 From: chris at fonnesbeck.org (Christopher Fonnesbeck) Date: Mon, 26 Apr 2004 10:30:59 -0400 Subject: [SciPy-user] Re: Scipy help? In-Reply-To: References: Message-ID: <56228EC0-978E-11D8-A517-000A956FDAC0@fonnesbeck.org> On Apr 26, 2004, at 10:23 AM, Pearu Peterson wrote: > > > On Sun, 25 Apr 2004, Christopher Fonnesbeck wrote: > >> >> On Apr 25, 2004, at 1:11 AM, Simon Garrett wrote: >> >>> As you can probably see, my installs were all from source tar-balls, >>> if >>> that makes any difference, downloaded from the sites pointed at by >>> the >>> Mac/SciPy webpage I mentioned. >> >> The setup.py file in the 0.3 release needs to be altered before >> compiling on OSX. In particular, lines 103 and 104 need to be >> uncommented in order for a successful build. These lines are >> uncommented in CVS, but not in the 0.3 source tarball. > > The setup.py file both in 0.3 tar-ball and CVS contains: > > ... > 101 if __name__ == "__main__": > 102 ignore_packages = [ > 103 #'sparse', > 104 #'kiva','freetype','chaco','traits', > 105 ] > 106 if sys.platform in ['win32','cygwin']: > ... > > Uncommenting line #104 has not effect as scipy does not contain > kiva,freetype,.. packages anymore. > Uncommenting line #103 would disable building sparce module. What are > the > sparse building failures on OSX that you want to disable it? > Sorry, I didnt mean to send that to the list, but it sounds like its a good thing that I did. On OSX, building scipy without disabling the sparse module gives the following error: gcc -Wl,-F. -Wl,-F. -bundle -framework Python build/temp.darwin-7.3.0-Power_Macintosh-2.3/Lib/sparse/ _zsuperlumodule.o build/temp.darwin-7.3.0-Power_Macintosh-2.3/Lib/sparse/_superlu_utils.o build/temp.darwin-7.3.0-Power_Macintosh-2.3/Lib/sparse/_superluobject.o -Lbuild/temp.darwin-7.3.0-Power_Macintosh-2.3 -lsuperlu_src -o build/lib.darwin-7.3.0-Power_Macintosh-2.3/scipy/sparse/_zsuperlu.so -Wl,-framework -Wl,Accelerate ld: multiple definitions of symbol _scipy_superlu build/temp.darwin-7.3.0-Power_Macintosh-2.3/Lib/sparse/ _zsuperlumodule.o definition of _scipy_superlu in section (__DATA,__common) build/temp.darwin-7.3.0-Power_Macintosh-2.3/Lib/sparse/_superluobject.o definition of _scipy_superlu in section (__DATA,__common) ld: multiple definitions of symbol _scipy_superlu build/temp.darwin-7.3.0-Power_Macintosh-2.3/Lib/sparse/ _zsuperlumodule.o definition of _scipy_superlu in section (__DATA,__common) build/temp.darwin-7.3.0-Power_Macintosh-2.3/Lib/sparse/_superluobject.o definition of _scipy_superlu in section (__DATA,__common) error: Command "gcc -Wl,-F. -Wl,-F. -bundle -framework Python build/temp.darwin-7.3.0-Power_Macintosh-2.3/Lib/sparse/ _zsuperlumodule.o build/temp.darwin-7.3.0-Power_Macintosh-2.3/Lib/sparse/_superlu_utils.o build/temp.darwin-7.3.0-Power_Macintosh-2.3/Lib/sparse/_superluobject.o -Lbuild/temp.darwin-7.3.0-Power_Macintosh-2.3 -lsuperlu_src -o build/lib.darwin-7.3.0-Power_Macintosh-2.3/scipy/sparse/_zsuperlu.so -Wl,-framework -Wl,Accelerate" failed with exit status 1 Let me know if you have a fix for this, otherwise I was simply instructing OSX users to disable the module. Chris -- Christopher J. Fonnesbeck ( c h r i s @ f o n n e s b e c k . o r g ) Georgia Cooperative Fish & Wildlife Research Unit, University of Georgia "More and more of our imports come from overseas." George W. Bush, 25 September 2000 -- Putting http://wecanstopspam.org in your email helps it pass through overzealous spam filters. From danny_shevitz at yahoo.com Mon Apr 26 12:40:30 2004 From: danny_shevitz at yahoo.com (danny shevitz) Date: Mon, 26 Apr 2004 09:40:30 -0700 (PDT) Subject: [SciPy-user] errorbar plot in gplt Message-ID: <20040426164030.86213.qmail@web41003.mail.yahoo.com> Howdy, Can anyone post a simple snippet of code to get a working errorbar plot in gplt? I keep trying things but my machine keeps crashing hard (gnuplot burns 100% cpu). I've been looking at the new_plot code and I can't tell if asymmetric error bars are possible. Does anyone know? Thanks, Danny __________________________________ Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25? http://photos.yahoo.com/ph/print_splash From eric at enthought.com Mon Apr 26 12:40:41 2004 From: eric at enthought.com (eric jones) Date: Mon, 26 Apr 2004 11:40:41 -0500 Subject: [SciPy-user] Instructions for installing SciPy on OSX In-Reply-To: References: <003001c4294d$5b2d69e0$ab01a8c0@SWISHER> Message-ID: <408D3B89.4010701@enthought.com> Christopher Fonnesbeck wrote: > Janet, > > I have a couple of corrections for the OSX install instructions for > SciPy, based on feedback from users. I would make these changes > myself, but I do not seem to have edit permissions for the file now > that it is published. I think this has something to do with Zope/Plone's workflow. I haven't played with this much, but perhaps you have to retract it before editing it again? Anyway, this all seems to restrictive to me -- I think Plone's has a heavier duty workflow control "out of the box" than SciPy actually needs. Once something is published, the original author should certainly be able to edit it. Heck, I would really rather not have any central control for marking documents "published". Once an author is ready, they should be able to make it world visible. What are the chances for misuse here? We just don't want someone coming along and putting a lot of crass material up on the site. I don't see that as a major possibilty (am I wrong?), so lets figure out how to open up the publishing priveledges a lot more. thanks, eric > If you would like me to make the changes (I'd be happy to), I would > need the status of the file changes, otherwise here are the corrections: > > 1. In the MacPython section: > > Change "Jack Jensesn's" to "Jack Jansen's" > > 2. In the Gnuplot and Aquaterm section: > > Change the fourth bullet to: > > Copy include files using the command: cp -rf ./include > /usr/local/include/aquaterm > > 3. In the Building SciPy section: > > The first paragraph should be (using structured text): > > You may install SciPy either by checking them out from the CVS > repository (see "CVS documentation":http://www.scipy.org/cvs/ ) or > from a source archive file (see > "Downloads":http://www.scipy.org/download/ ). IF you chose the latter, > you must make a minor change to the setup.py file before installing. > Open setup.py in a text editor and change:: > > ignore_packages = [ > # 'sparse', > # 'kiva','freetype','chaco','traits', > ] > > to:: > > ignore_packages = [ > 'sparse', > 'kiva','freetype','chaco','traits', > ] > > That is, simply remove the comment characters from these lines. You > can then start the build process in the SciPy source directory as > follows: > > etc. > > > > Thanks, > Chris > > > On Apr 23, 2004, at 12:09 PM, Janet Swisher wrote: > > I made a few proof-edits, and linked it into the Documentation page, > http://www.scipy.org/documentation/. > > Thanks Chris! > > ------------------------- > Janet Swisher > Senior Technical Writer > Enthought, Inc. > 1-512-536-1057 > > > -----Original Message----- > From: eric jones [mailto:eric at enthought.com] > Sent: Friday, April 23, 2004 10:52 AM > To: SciPy Users List; Janet Swisher; jon-eric steinbomer; > Travis Vaught; Joe Cooper > Subject: Re: [SciPy-user] Instructions for installing SciPy on > OSX > > > Christopher Fonnesbeck wrote: > > I have created relatively detailed instructions for > > installing SciPy on > > OSX in my member's folder of the new SciPy site, borrowing > > heavily from > > Pearu's windows instructions. I have submitted this page for > publication to the SciPy gods, so hopefully it will be made > > available > > soon. Please let me know if you find any errors or > inconsistencies. > > Chris > > > > Very cool. Thanks Chris. > > Its published. JonEric or Janet, could you put links to his > page in the > appropriate places? > > Here's the page: > http://www.scipy.org/Members/fonnesbeck/osx_build/ > > > Also Travis or Joe, > > Is there anyway to see "pending" docs when I log in so that > pages aren't > sitting there waiting for a long time? > > > see ya, > eric > > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > > > -- > Christopher J. Fonnesbeck ( c h r i s @ f o n n e s b e c k . o r g ) > Georgia Cooperative Fish & Wildlife Research Unit, University of Georgia > > "More and more of our imports come from overseas." > George W. Bush, 25 September 2000 > -- > Putting http://wecanstopspam.org in your email helps it pass through > overzealous spam filters. > >------------------------------------------------------------------------ > >_______________________________________________ >SciPy-user mailing list >SciPy-user at scipy.net >http://www.scipy.net/mailman/listinfo/scipy-user > > From gpajer at rider.edu Mon Apr 26 13:39:31 2004 From: gpajer at rider.edu (Gary Pajer) Date: Mon, 26 Apr 2004 13:39:31 -0400 Subject: [SciPy-user] build on fink? In-Reply-To: <56228EC0-978E-11D8-A517-000A956FDAC0@fonnesbeck.org> References: <56228EC0-978E-11D8-A517-000A956FDAC0@fonnesbeck.org> Message-ID: <408D4953.4090407@rider.edu> Has anyone built 0.3 on OSX 10.2 / fink ? (and ... how??) -gary (having just requested a swap: my current Mac for a Wintel/Linux dual boot. Way fewer headaches.) From pearu at scipy.org Mon Apr 26 13:53:59 2004 From: pearu at scipy.org (Pearu Peterson) Date: Mon, 26 Apr 2004 12:53:59 -0500 (CDT) Subject: [SciPy-user] Re: Scipy help? In-Reply-To: <56228EC0-978E-11D8-A517-000A956FDAC0@fonnesbeck.org> Message-ID: On Mon, 26 Apr 2004, Christopher Fonnesbeck wrote: > Sorry, I didnt mean to send that to the list, but it sounds like its a > good thing that I did. On OSX, building scipy without disabling the > sparse module gives the following error: > > gcc -Wl,-F. -Wl,-F. -bundle -framework Python > build/temp.darwin-7.3.0-Power_Macintosh-2.3/Lib/sparse/ > _zsuperlumodule.o > build/temp.darwin-7.3.0-Power_Macintosh-2.3/Lib/sparse/_superlu_utils.o > build/temp.darwin-7.3.0-Power_Macintosh-2.3/Lib/sparse/_superluobject.o > -Lbuild/temp.darwin-7.3.0-Power_Macintosh-2.3 -lsuperlu_src -o > build/lib.darwin-7.3.0-Power_Macintosh-2.3/scipy/sparse/_zsuperlu.so > -Wl,-framework -Wl,Accelerate > ld: multiple definitions of symbol _scipy_superlu Could you try adding #define NO_IMPORT_ARRAY line to _superluobject.c, just before the following line: #include "_superluobject.h" ? Will linking work then? Thanks, Pearu From jdhunter at ace.bsd.uchicago.edu Mon Apr 26 14:00:52 2004 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Mon, 26 Apr 2004 13:00:52 -0500 Subject: [SciPy-user] errorbar plot in gplt In-Reply-To: <20040426164030.86213.qmail@web41003.mail.yahoo.com> (danny shevitz's message of "Mon, 26 Apr 2004 09:40:30 -0700 (PDT)") References: <20040426164030.86213.qmail@web41003.mail.yahoo.com> Message-ID: >>>>> "danny" == danny shevitz writes: danny> Howdy, Can anyone post a simple snippet of code to get a danny> working errorbar plot in gplt? I keep trying things but my danny> machine keeps crashing hard (gnuplot burns 100% cpu). I've danny> been looking at the new_plot code and I can't tell if danny> asymmetric error bars are possible. Does anyone know? Not an answer to your question ... but just wanted to point out that matplotlib does symmetric and asymmetric x and y error bars. See examples/errorbar_demo.py in the src distribution if you're interested http://matplotlib.sourceforge.net JDH From danny_shevitz at yahoo.com Mon Apr 26 15:37:33 2004 From: danny_shevitz at yahoo.com (danny shevitz) Date: Mon, 26 Apr 2004 12:37:33 -0700 (PDT) Subject: [SciPy-user] errorbar plot in gplt In-Reply-To: Message-ID: <20040426193733.47444.qmail@web41005.mail.yahoo.com> Thanks, for the tip. Your being the author and all, I won't do anything to insult you :-) My motivation for using gplot, was that the plot is for a piece of software which I will be writing and distributing to non-python users ( I know, I know, such people still exist...) so I am going to have to do their downloading and installing for them. Since the enthought distribution is a single package I was hoping to stay with that. I was evaluating Matplotlib and while it looked great, I shied away for that reason alone. I'm very used to Matlab, so the reduced learning curve may make me re-evaluate it. If no one can post a working snippet for gplot, then I'll have to use Matplotlib. D --- John Hunter wrote: > >>>>> "danny" == danny shevitz writes: > > danny> Howdy, Can anyone post a simple snippet of code to get a > danny> working errorbar plot in gplt? I keep trying things but my > danny> machine keeps crashing hard (gnuplot burns 100% cpu). I've > danny> been looking at the new_plot code and I can't tell if > danny> asymmetric error bars are possible. Does anyone know? > > Not an answer to your question ... but just wanted to point out that > matplotlib does symmetric and asymmetric x and y error bars. See > examples/errorbar_demo.py in the src distribution if you're > interested > > http://matplotlib.sourceforge.net > > JDH > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user __________________________________ Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25? http://photos.yahoo.com/ph/print_splash From jdhunter at ace.bsd.uchicago.edu Mon Apr 26 15:28:10 2004 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Mon, 26 Apr 2004 14:28:10 -0500 Subject: [SciPy-user] errorbar plot in gplt In-Reply-To: <20040426193733.47444.qmail@web41005.mail.yahoo.com> (danny shevitz's message of "Mon, 26 Apr 2004 12:37:33 -0700 (PDT)") References: <20040426193733.47444.qmail@web41005.mail.yahoo.com> Message-ID: >>>>> "danny" == danny shevitz writes: danny> looked great, I shied away for that reason alone. I'm very danny> used to Matlab, so the reduced learning curve may make me danny> re-evaluate it. If no one can post a working snippet for danny> gplot, then I'll have to use Matplotlib. Fair enough. Several fairly recent matplotlib additions -- namely a built-in font manager and the tkagg and wxagg backends make inter-operating with the enthought python a bit easier. Earlier versions of matplotlib brought along several additional dependencies (eg, GTK for GUI and FontTools/ttfquery for font finding). Now with the enthought edition and a recent matplotlib, you get the agg and postscript backends for pure image generation and the TkAgg and WXAgg backends for GUI interaction out of the box. So if you go this route, it should be just one additional windows installer for you to run. JDH From gyromagnetic at excite.com Mon Apr 26 14:49:26 2004 From: gyromagnetic at excite.com (Gyro Funch) Date: Mon, 26 Apr 2004 12:49:26 -0600 Subject: [SciPy-user] Thanks to developers Message-ID: <408D59B6.7030204@excite.com> Hi, I had tried SciPy about a year ago and was unable to install it owing to some incompatibilities with certain libraries (probably Atlas and/or lapack on Redhat Linux 8). I just installed SciPy v0.3 without a hitch. I would like to express my thanks to the SciPy developers for all of their hard work in developing this excellent package. -g From Jean-Baptiste.cazier at decode.is Thu Apr 22 12:36:41 2004 From: Jean-Baptiste.cazier at decode.is (Jean-Baptiste Cazier) Date: Thu, 22 Apr 2004 16:36:41 +0000 Subject: [SciPy-user] Multiple regression Message-ID: <20040422163641.723037b7.Jean-Baptiste.cazier@decode.is> S?l ! I saw in some post in comp.lang.python that Scipy is supposed to have multiple regression tools included However when I look at the stat_test I see that it is not the case. Am I looking at the wrong place ? Could anybody please point me out to a multiple regression module in python ? Thanks a lot Jean-Baptiste -- ----------------------------- Jean-Baptiste.Cazier at decode.is Department of Statistics deCODE genetics Sturlugata,8 570 2993 101 Reykjav?k From Jean-Baptiste.cazier at decode.is Thu Apr 22 12:52:58 2004 From: Jean-Baptiste.cazier at decode.is (Jean-Baptiste Cazier) Date: Thu, 22 Apr 2004 16:52:58 +0000 Subject: [SciPy-user] Multiple regression Message-ID: <20040422165258.20174e80.Jean-Baptiste.cazier@decode.is> S?l ! I saw in some post in comp.lang.python that Scipy is supposed to have multiple regression tools included However when I look at the stat_test I see that it is not the case. Am I looking at the wrong place ? Could anybody please point me out to a multiple regression module in python ? Thanks a lot Jean-Baptiste -- ----------------------------- Jean-Baptiste.Cazier at decode.is Department of Statistics deCODE genetics Sturlugata,8 570 2993 101 Reykjav?k From pascal.barbedor at laposte.net Sat Apr 24 05:35:02 2004 From: pascal.barbedor at laposte.net (pascal barbedor) Date: Sat, 24 Apr 2004 11:35:02 +0200 Subject: [SciPy-user] no __setitem__ in spmatrix class Message-ID: <000a01c429df$6bd8c270$41a9933e@xykj7rzay2er1n> Hi I noticed there is no __setitem__ method in spmatrix class in scipy.sparse module but what if one needs to (sparsely) fill the matrix after __init__ time ? thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From nadavh at visionsense.com Sun Apr 25 04:28:09 2004 From: nadavh at visionsense.com (Nadav Horesh) Date: Sun, 25 Apr 2004 10:28:09 +0200 Subject: [SciPy-user] Spline interpolation on unevenly spaced grid. Message-ID: <07C6A61102C94148B8104D42DE95F7E86DECE4@exchange2k.envision.co.il> I am trying to do spline interpolation on arbitrary 2D grids. I followed the tutorial example (p. 22), but it seems to work only on regular grids: >>> from scipy import * >>> from scipy import interpolate as SI >>> x,y = mgrid[-1:1:15j,-1:1:15j] >>> xx = x**1.2 >>> z = exp(-4*(x**2+y**2)) >>> tck = SI.bisplrep(x,y,z) /usr/local/lib/python2.3/site-packages/scipy/interpolate/fitpack.py:611: DeprecationWarning: integer argument expected, got float tx,ty,nxest,nyest,wrk,lwrk1,lwrk2) >>> tck = SI.bisplrep(x,y,z) >>> tck = SI.bisplrep(xx,y,z) >>> ================================ RESTART ================================ **** This is a seg fault 1. Can someone explain the warning message? 2. Is there a method in scipy to do spline interpolation on arbitrary grids? (scipy version: 0.3.0_266.4239) Nadav. From danny_shevitz at yahoo.com Mon Apr 26 16:02:06 2004 From: danny_shevitz at yahoo.com (danny shevitz) Date: Mon, 26 Apr 2004 13:02:06 -0700 (PDT) Subject: [SciPy-user] errorbar plot in gplt In-Reply-To: Message-ID: <20040426200206.7671.qmail@web41002.mail.yahoo.com> John, I just got, got your errorbar_demo working. Even I have to admit that was awefully easy :-). thanks, Danny --- John Hunter wrote: > >>>>> "danny" == danny shevitz writes: > > danny> Howdy, Can anyone post a simple snippet of code to get a > danny> working errorbar plot in gplt? I keep trying things but my > danny> machine keeps crashing hard (gnuplot burns 100% cpu). I've > danny> been looking at the new_plot code and I can't tell if > danny> asymmetric error bars are possible. Does anyone know? > > Not an answer to your question ... but just wanted to point out that > matplotlib does symmetric and asymmetric x and y error bars. See > examples/errorbar_demo.py in the src distribution if you're > interested > > http://matplotlib.sourceforge.net > > JDH > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user __________________________________ Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25? http://photos.yahoo.com/ph/print_splash From chris at fonnesbeck.org Mon Apr 26 17:30:11 2004 From: chris at fonnesbeck.org (Christopher Fonnesbeck) Date: Mon, 26 Apr 2004 17:30:11 -0400 Subject: [SciPy-user] Re: Scipy help? In-Reply-To: References: Message-ID: On Apr 26, 2004, at 1:53 PM, Pearu Peterson wrote: >> Sorry, I didnt mean to send that to the list, but it sounds like its a >> good thing that I did. On OSX, building scipy without disabling the >> sparse module gives the following error: >> >> gcc -Wl,-F. -Wl,-F. -bundle -framework Python >> build/temp.darwin-7.3.0-Power_Macintosh-2.3/Lib/sparse/ >> _zsuperlumodule.o >> build/temp.darwin-7.3.0-Power_Macintosh-2.3/Lib/sparse/ >> _superlu_utils.o >> build/temp.darwin-7.3.0-Power_Macintosh-2.3/Lib/sparse/ >> _superluobject.o >> -Lbuild/temp.darwin-7.3.0-Power_Macintosh-2.3 -lsuperlu_src -o >> build/lib.darwin-7.3.0-Power_Macintosh-2.3/scipy/sparse/_zsuperlu.so >> -Wl,-framework -Wl,Accelerate >> ld: multiple definitions of symbol _scipy_superlu > > Could you try adding > > #define NO_IMPORT_ARRAY > > line to _superluobject.c, just before the following line: > > #include "_superluobject.h" > > ? Will linking work then? > This appears to work! Thanks Pearu. I assume you will fix this in CVS? I will edit the OSX install document to reflect this fix. Chris -- Christopher J. Fonnesbeck ( c h r i s @ f o n n e s b e c k . o r g ) Georgia Cooperative Fish & Wildlife Research Unit, University of Georgia "More and more of our imports come from overseas." George W. Bush, 25 September 2000 -- Putting http://wecanstopspam.org in your email helps it pass through overzealous spam filters. From oliphant at ee.byu.edu Mon Apr 26 17:46:05 2004 From: oliphant at ee.byu.edu (Travis Oliphant) Date: Mon, 26 Apr 2004 15:46:05 -0600 Subject: ***[Possible UCE]*** [SciPy-user] no __setitem__ in spmatrix class In-Reply-To: <000a01c429df$6bd8c270$41a9933e@xykj7rzay2er1n> References: <000a01c429df$6bd8c270$41a9933e@xykj7rzay2er1n> Message-ID: <408D831D.6010903@ee.byu.edu> pascal barbedor wrote: > Hi > > I noticed there is no __setitem__ method in spmatrix class in > scipy.sparse module > but what if one needs to (sparsely) fill the matrix after __init__ time ? The sparse matrix module is currently incomplete. In a few days it should be much better (hopefully for Scipy 0.3.1). Apparently matrix multiplication is not working (don't know why as it uses sparsekit). Right now what does work is to use the dictmatrix type to build up a matrix and then use lu_factor and or solve to solve the linear system (I've been using that quite a bit). Things should be much better for sparse in a little while. -Travis O. From pearu at scipy.org Tue Apr 27 01:54:50 2004 From: pearu at scipy.org (Pearu Peterson) Date: Tue, 27 Apr 2004 00:54:50 -0500 (CDT) Subject: [SciPy-user] Re: Scipy help? In-Reply-To: Message-ID: On Mon, 26 Apr 2004, Christopher Fonnesbeck wrote: > This appears to work! Thanks Pearu. I assume you will fix this in CVS? > I will edit the OSX install document to reflect this fix. Very good. This is now fixed also in CVS. Pearu From pascalbarbedor at free.fr Tue Apr 27 02:01:11 2004 From: pascalbarbedor at free.fr (pascal barbedor) Date: Tue, 27 Apr 2004 08:01:11 +0200 Subject: ***[Possible UCE]*** [SciPy-user] no __setitem__ in spmatrix class References: <000a01c429df$6bd8c270$41a9933e@xykj7rzay2er1n> <408D831D.6010903@ee.byu.edu> Message-ID: <003c01c42c1d$0b097760$44b14052@xykj7rzay2er1n> ok thanks for the info I'll stick to using PySparse then as a user I have a request for a n-d sparse array class and not only 2d-matrix with possibility to take slices like in an ordinary nd array I have more or less built such a class based on PySparse if that can be of any interest thanks P ----- Original Message ----- From: "Travis Oliphant" To: "SciPy Users List" Sent: Monday, April 26, 2004 11:46 PM Subject: Re: ***[Possible UCE]*** [SciPy-user] no __setitem__ in spmatrix class > pascal barbedor wrote: > > > Hi > > > > I noticed there is no __setitem__ method in spmatrix class in > > scipy.sparse module > > but what if one needs to (sparsely) fill the matrix after __init__ time ? > > > The sparse matrix module is currently incomplete. In a few days it > should be much better (hopefully for Scipy 0.3.1). Apparently matrix > multiplication is not working (don't know why as it uses sparsekit). > Right now what does work is to use the dictmatrix type to build up a > matrix and then use lu_factor and or solve to solve the linear system > (I've been using that quite a bit). > > Things should be much better for sparse in a little while. > > -Travis O. > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From danny_shevitz at yahoo.com Tue Apr 27 13:43:03 2004 From: danny_shevitz at yahoo.com (danny shevitz) Date: Tue, 27 Apr 2004 10:43:03 -0700 (PDT) Subject: [SciPy-user] problems with stats Message-ID: <20040427174303.4784.qmail@web41015.mail.yahoo.com> Howdy, I've encountered two problems with the binomial distribution in the stats module. The first is trivial and I believe just an argument checking problem. >>> binom.pdf(0,3,.5) bdtr domain error 1.#QNAN (the answer should be .125 of course) The second is a little more significant. I'm trying to invert the binomial distribution using ppf. I looked at distributions.py class binom_gen(rv_discrete): . . . def _ppf(self, q, n, pr): vals = ceil(special.bdtrik(q,n,pr)) vals1 = vals-1 temp = special.bdtr(vals1,n,pr) return where(temp >= q, vals1, vals) and ppf is in fact implemented, but when I try to run it I get an error. >>> binom.ppf(3,4,.95) Traceback (most recent call last): File "", line 1, in ? File ".\site-packages\scipy\stats\distributions.py", line 2371, in ppf TypeError: _ppf() takes exactly 4 arguments (3 given) Does anyone know what's going on. Am I misusing something? thanks, Danny __________________________________ Do you Yahoo!? Win a $20,000 Career Makeover at Yahoo! HotJobs http://hotjobs.sweepstakes.yahoo.com/careermakeover From oliphant at ee.byu.edu Tue Apr 27 16:20:38 2004 From: oliphant at ee.byu.edu (Travis E. Oliphant) Date: Tue, 27 Apr 2004 14:20:38 -0600 Subject: [SciPy-user] problems with stats In-Reply-To: <20040427174303.4784.qmail@web41015.mail.yahoo.com> References: <20040427174303.4784.qmail@web41015.mail.yahoo.com> Message-ID: <408EC096.90503@ee.byu.edu> danny shevitz wrote: > Howdy, > > I've encountered two problems with the binomial distribution in the > stats module. The first is trivial and I believe just an argument > checking problem. > > >>>>binom.pdf(0,3,.5) > > > bdtr domain error > 1.#QNAN which version are you using? The current version 0.3 uses pmf (probability mass function) for discrete rvs. for me >>> binom.pmf(0,3,.5) 0.125 > > (the answer should be .125 of course) > > The second is a little more significant. I'm trying to invert the > binomial distribution using ppf. I looked at distributions.py > > class binom_gen(rv_discrete): > . > . > . > def _ppf(self, q, n, pr): > vals = ceil(special.bdtrik(q,n,pr)) > vals1 = vals-1 > temp = special.bdtr(vals1,n,pr) > return where(temp >= q, vals1, vals) > > and ppf is in fact implemented, but when I try to run it I get an > error. > > >>>>binom.ppf(3,4,.95) You uncovered a genuine bug here. But, by the way what you expect this to return seeing how 3 is bigger than 1. -Travis From danny_shevitz at yahoo.com Tue Apr 27 17:03:54 2004 From: danny_shevitz at yahoo.com (danny shevitz) Date: Tue, 27 Apr 2004 14:03:54 -0700 (PDT) Subject: [SciPy-user] problems with stats In-Reply-To: <408EC096.90503@ee.byu.edu> Message-ID: <20040427210354.12481.qmail@web41012.mail.yahoo.com> I'm using .2. I'm trying to get a release out the door and haven't had the chance to download .3 yet (it's only been out a week, so I beg for an indulgence). As for the binom.ppf(). Here's what I was trying to do. It's a fairly standard problem. I am running a monte carlo simulation to try to determinine the probability of an event happening and put confidence bounds on the answer. The probability is relatively low e.g. 10e-6. I'm running approximately 10^7 trials and getting approximately 10 events. There is a standard way to assign the error bars using the continuous F distribution, but when I looked at the stats documentation I noticed the binomial distribution could be inverted via ppf. That's not to say I was using it correctly, which you graciously pointed out I was not. Of course there is no documentation either so I had to guess from the code :-). In short I was just trying to play with the binomial distribution to see if I could get it do what I wanted directly. The short version of the problem that I was trying to solve is: Given N trials and n events, what is the specified confidence interval for the binomial probability p. The hypothetical argument call should therefore take 2 integers and a probability, e.g. f(10, 10000000, .95) The third number is a confidence, not the probability in the binomial distribution. Of course there would have to be a pair of such functions ( one for the lower bound, and one for the upper). Like I said, what I was doing, wasn't particularly well thought out. I was just playing around, and using the function wrong anyway... BTW I guess I have no idea what binom.ppf is supposed to do then. Why do you need two probilities? Is one a confidence and the other the probability. Also in case it wasn't obvious, I'm not a statistician by training :-) D > > The second is a little more significant. I'm trying to invert the > > binomial distribution using ppf. I looked at distributions.py > > > > class binom_gen(rv_discrete): > > . > > . > > . > > def _ppf(self, q, n, pr): > > vals = ceil(special.bdtrik(q,n,pr)) > > vals1 = vals-1 > > temp = special.bdtr(vals1,n,pr) > > return where(temp >= q, vals1, vals) > > > > and ppf is in fact implemented, but when I try to run it I get an > > error. > > > > > >>>>binom.ppf(3,4,.95) > > You uncovered a genuine bug here. > > But, by the way what you expect this to return seeing how 3 is bigger > > than 1. > > -Travis > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user __________________________________ Do you Yahoo!? Win a $20,000 Career Makeover at Yahoo! HotJobs http://hotjobs.sweepstakes.yahoo.com/careermakeover From rkern at ucsd.edu Tue Apr 27 18:17:54 2004 From: rkern at ucsd.edu (Robert Kern) Date: Tue, 27 Apr 2004 15:17:54 -0700 Subject: [SciPy-user] problems with stats In-Reply-To: <20040427210354.12481.qmail@web41012.mail.yahoo.com> References: <20040427210354.12481.qmail@web41012.mail.yahoo.com> Message-ID: <408EDC12.9080005@ucsd.edu> danny shevitz wrote: > The short version of the problem that I was trying to solve is: Given N > trials and n events, what is the specified confidence interval for the > binomial probability p. > > The hypothetical argument call should therefore take 2 integers and a > probability, e.g. f(10, 10000000, .95) The third number is a > confidence, not the probability in the binomial distribution. Of course > there would have to be a pair of such functions ( one for the lower > bound, and one for the upper). What you are looking for is the beta distribution. Here's the Bayesian analysis: We have n Bernoulli trials and r successes with an unknown chance (theta) of success on any given trial. The likelihood is P(n,r|theta) = theta**r * (1-theta)**(n-r) The posterior probability is P(theta|n,r) = A * P(n,r|theta) * P(theta) A is a normalizing constant and P(theta) is your prior probability for theta. For now, let's use a minimally informative prior in order to make the fewest assumptions. P(theta) o< 1/(theta*(1-theta)) The o< symbol is the proportionality symbol. This prior is improper and cannot be normalized as it stands. When we put it together with the likelihood, as long as r does not equal either 0 or n, the posterior will come out normalized. There are good reasons which I won't go into now to use this instead of P(theta)=1, but you can use that instead and redo the math that leads to the following (easy!). So, P(theta|n,r) = A * theta**(r-1) * (1-theta)**(n-r-1) We can recognize this as the Beta distribution, Beta(r,n-r) (or Beta(r+1,n-r+1) if you're queasy about improper priors). special.bdtri(10, 10000000, 0.95) will give you the one-sided 95% credible interval (like a confidence interval, only Bayesian). Since this distribution isn't symmetric, I'm not entirely sure how to get the highest posterior density (HPD) credible interval around the peak. And I'm not entirely sure how accurate the function is with those extreme inputs. This analysis is lifted straight from Chapter 6 of the excellent book _Probability Theory: The Logic of Science_ by E. T. Jaynes (Cambridge Press, 2003). > Like I said, what I was doing, wasn't particularly well thought out. I > was just playing around, and using the function wrong anyway... > > BTW I guess I have no idea what binom.ppf is supposed to do then. Why > do you need two probilities? Is one a confidence and the other the > probability. The random variable in the binomial distribution is the number of successes given the probability p of individual success and the number of trials. The point mass function would invert for n, the number of successes that, by summing the probability masses for each number of successes between 0 and n, gives you 0.95 (for example). So yes, one input is the confidence level, one is the probability of individual success, and you also need the number of trials. > Also in case it wasn't obvious, I'm not a statistician by training :-) > > D -- Robert Kern rkern at ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter From rkern at ucsd.edu Tue Apr 27 18:24:56 2004 From: rkern at ucsd.edu (Robert Kern) Date: Tue, 27 Apr 2004 15:24:56 -0700 Subject: [SciPy-user] problems with stats In-Reply-To: <408EDC12.9080005@ucsd.edu> References: <20040427210354.12481.qmail@web41012.mail.yahoo.com> <408EDC12.9080005@ucsd.edu> Message-ID: <408EDDB8.5090307@ucsd.edu> Robert Kern wrote: > The random variable in the binomial distribution is the number of > successes given the probability p of individual success and the number > of trials. The point mass function would invert for n, the number of ^^^^^^^^^^^^^^^^^^^ That's "percent point function", you silly idiot! -- Robert Kern rkern at ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter From scottbray83 at hotmail.com Wed Apr 28 01:16:35 2004 From: scottbray83 at hotmail.com (Scott Bray) Date: Wed, 28 Apr 2004 15:16:35 +1000 Subject: [SciPy-user] marginal distributions Message-ID: An HTML attachment was scrubbed... URL: From nadavh at visionsense.com Wed Apr 28 05:03:50 2004 From: nadavh at visionsense.com (Nadav Horesh) Date: Wed, 28 Apr 2004 12:03:50 +0300 Subject: [SciPy-user] xplt documentation Message-ID: <408F7376.5050206@visionsense.com> I just started to play with xplt under linux. The package seems to fill some of the missing features in gnuplot(gplt) 4.0. The problem I have is that I can not use it interactively unless I run a loop of xplt.pyg_pending(). Is there a "decent" way to make an interactive xplt session? Where can I find some useful documentation beside the plotting tutorial? Nadav. From arnd.baecker at web.de Wed Apr 28 06:59:36 2004 From: arnd.baecker at web.de (Arnd Baecker) Date: Wed, 28 Apr 2004 12:59:36 +0200 (CEST) Subject: [SciPy-user] xplt documentation In-Reply-To: <408F7376.5050206@visionsense.com> References: <408F7376.5050206@visionsense.com> Message-ID: Hi Nadav, First you can try help("scipy.xplt") help("scipy.xplt.plot") to get further information. As xplt is based on pygist this document http://bonsai.ims.u-tokyo.ac.jp/~mdehoon/software/python/pygist_html/pygist.html might help you further. You wrote that you would like to use xplt interactively - I am not sure what you mean, e.g. the following works nicely In [1]: from scipy.xplt import * In [2]: x=arange(0.0,1.0,0.1) In [3]: plg(x*x,x) (the prompt is from Ipython, but the normal python will do as well, though you'll miss all the nice features of Ipython ;-). You can still use the mouse to zoom in and such. To capture a mouse click you can use the mouse function of xplt. Hope this helps. Arnd On Wed, 28 Apr 2004, Nadav Horesh wrote: > I just started to play with xplt under linux. The package seems to fill > some of the missing features in gnuplot(gplt) 4.0. The problem I have is > that I can not use it interactively unless I run a loop of > xplt.pyg_pending(). Is there a "decent" way to make an interactive xplt > session? Where can I find some useful documentation beside the plotting > tutorial? > > Nadav. > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From srinath at fastmail.fm Wed Apr 28 13:18:30 2004 From: srinath at fastmail.fm (Srinath Avadhanula) Date: Wed, 28 Apr 2004 10:18:30 -0700 (Pacific Standard Time) Subject: [SciPy-user] Problem plotting with scipy 0.3 Message-ID: Hello, I recently downloaded scipy and tried to run the following according to the "Plotting tutorial" page on the scipy home-page: >> import gui_thread >> gui_thread.start() >> >> from scipy import plt >> plt.plot((1,2,3)) A window pops up and I get the following error: (this error in fact repeats itself infinitely on the console till I interrupt it). Traceback (most recent call last): File "C:\Python23\Lib\site-packages\scipy\plt\wxplt.py", line 143, in on_paint self.draw(wx.wxPaintDC(self)) File "C:\Python23\Lib\site-packages\scipy\plt\wxplt.py", line 424, in draw self.draw_graph_area(dc) File "C:\Python23\Lib\site-packages\scipy\plt\wxplt.py", line 379, in draw_graph_area int(gb.width()+2),int(gb.height()+2)) File "C:\Python23\Lib\site-packages\wx\gdi.py", line 2597, in SetClippingRegion return _gdi.DC_SetClippingRegion(*args, **kwargs) TypeError: DC_SetClippingRegion() takes exactly 3 arguments (5 given) The versions of the various packages I am using are: wxPython: 2.5.1.5u Numeric: 23.1 Python: 2.3 scipy: 0.3.0_265.4219 Thanks, Srinath From danny_shevitz at yahoo.com Wed Apr 28 16:25:53 2004 From: danny_shevitz at yahoo.com (danny shevitz) Date: Wed, 28 Apr 2004 13:25:53 -0700 (PDT) Subject: [SciPy-user] wassup with histogram? Message-ID: <20040428202553.59120.qmail@web41002.mail.yahoo.com> So I tried to use stats.histogram and I believe I found a bug, but I also have a bigger wtf with the algorithm. If I create a random vector in [0,1). I get uneven counts. Here it is: #################################################### import scipy from scipy.stats import histogram from random import random n = 100 randArray = [random() for i in range(n)] answer = histogram(randArray) print answer #################################################### gives (array([15, 17, 22, 20, 20, 6, 0, 0, 0, 0]), -0.094840236656285076, 0.20868271373704711, 0) Notice that the last entries in the histogram are all zeros. This is always the case. Also notice the bin width is about .2 which is approximately double what it should be. I have traced the error and in the stats.py module the code estbinwidth = float(Max - Min)/float(numbins) + 1 binsize = (Max-Min+estbinwidth)/float(numbins) computes the bin size incorrectly. In particular the +1 in estbinwidth needs to be in parentheses. You would only notice this for small data ranges which is perhaps why it was never noticed. Personally, I would just compute the binsize in one step as binsize = (numbins+1)(Max-Min+estbinwidth)/numbins**2. But now for the wtf part. The histogram centers the lowest and highest bins around the lowest and highest point in the data as witnessed in the code lowerreallimit = Min - binsize/2.0 and the fact that the bin size isn't just (max - min)/n. Why would you possibly want to do this? With this technique, if you histogram a sample of uniform random variates, then the outer two bins will have half the counts of the other bins because only half the bin is within range. There must be a reason for doing this, but I sure don't know what it is. D __________________________________ Do you Yahoo!? Win a $20,000 Career Makeover at Yahoo! HotJobs http://hotjobs.sweepstakes.yahoo.com/careermakeover From danny_shevitz at yahoo.com Wed Apr 28 18:18:51 2004 From: danny_shevitz at yahoo.com (danny shevitz) Date: Wed, 28 Apr 2004 15:18:51 -0700 (PDT) Subject: [SciPy-user] matplotlib question Message-ID: <20040428221851.4342.qmail@web41004.mail.yahoo.com> So this isn't a scipy question, but since it came up during a gplt question I'll ask anyway. I started using matplotlib for plotting my histograms and a python.exe shell always opens. Is there any way to get rid of this, e.g. run pythonw.exe instead. thanks, Danny __________________________________ Do you Yahoo!? Win a $20,000 Career Makeover at Yahoo! HotJobs http://hotjobs.sweepstakes.yahoo.com/careermakeover From pajer at iname.com Thu Apr 29 08:18:05 2004 From: pajer at iname.com (Gary Pajer) Date: Thu, 29 Apr 2004 08:18:05 -0400 Subject: [SciPy-user] matplotlib question References: <20040428221851.4342.qmail@web41004.mail.yahoo.com> Message-ID: <004001c42de4$09402a50$01fd5644@playroom> FYI, there is a matplotlib discussion list, too. I'm sending this there. http://sourceforge.net/mail/?group_id=80706 -g ----- Original Message ----- From: "danny shevitz" To: "scipy" Sent: Wednesday, April 28, 2004 6:18 PM Subject: [SciPy-user] matplotlib question > So this isn't a scipy question, but since it came up during a gplt > question I'll ask anyway. > > I started using matplotlib for plotting my histograms and a python.exe > shell always opens. Is there any way to get rid of this, e.g. run > pythonw.exe instead. > > thanks, > Danny > > > > > __________________________________ > Do you Yahoo!? > Win a $20,000 Career Makeover at Yahoo! HotJobs > http://hotjobs.sweepstakes.yahoo.com/careermakeover > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From gazzar at email.com Thu Apr 29 09:24:53 2004 From: gazzar at email.com (Gary Ruben) Date: Thu, 29 Apr 2004 23:24:53 +1000 Subject: [SciPy-user] matplotlib question Message-ID: <20040429132453.207F71CE30D@ws3-6.us4.outblaze.com> A. Same as for any Python script, just give your script a .pyw extension - it works on my Win98 system. I have matplotlib configured to use the GTKAgg backend. Gary Ruben > > So this isn't a scipy question, but since it came up during a gplt > > question I'll ask anyway. > > > > I started using matplotlib for plotting my histograms and a python.exe > > shell always opens. Is there any way to get rid of this, e.g. run > > pythonw.exe instead. > > > > thanks, > > Danny -- ___________________________________________________________ Sign-up for Ads Free at Mail.com http://promo.mail.com/adsfreejump.htm From nadavh at visionsense.com Thu Apr 29 12:07:07 2004 From: nadavh at visionsense.com (Nadav Horesh) Date: Thu, 29 Apr 2004 19:07:07 +0300 Subject: [SciPy-user] Re: xplt documentation Message-ID: <4091282B.2050202@visionsense.com> >First you can try > help("scipy.xplt") > help("scipy.xplt.plot") >to get further information. >As xplt is based on pygist this document > http://bonsai.ims.u-tokyo.ac.jp/~mdehoon/software/python/pygist_html/pygist.html >might help you further. > >You wrote that you would like to use xplt interactively - >I am not sure what you mean, e.g. the following works nicely > >In [1]: from scipy.xplt import * >In [2]: x=arange(0.0,1.0,0.1) >In [3]: plg(x*x,x) > >(the prompt is from Ipython, but the normal python will do as well, >though you'll miss all the nice features of Ipython ;-). >You can still use the mouse to zoom in and such. >To capture a mouse click you can use the mouse function of xplt. > >Hope this helps. > >Arnd > > >On Wed, 28 Apr 2004, Nadav Horesh wrote: > >> I just started to play with xplt under linux. The package seems to fill >> some of the missing features in gnuplot(gplt) 4.0. The problem I have is >> that I can not use it interactively unless I run a loop of >> xplt.pyg_pending(). Is there a "decent" way to make an interactive xplt >> session? Where can I find some useful documentation beside the plotting >> tutorial? >> >> Nadav. >> >> _______________________________________________ >> SciPy-user mailing list >> SciPy-user at scipy.net >> http://www.scipy.net/mailman/listinfo/scipy-user >> Thank you for the references.. The problem with the need to loop over xplt.pyg_pending(), is specific to IDLE. The problem with plt and xplt is that they don't leave happily with IDLE, which is my favorite (I have experience with with pycrust and Ipython). Is there any workaround or this is a fundamental issue of Tkinter? Nadav. From christianson2 at llnl.gov Thu Apr 29 19:51:17 2004 From: christianson2 at llnl.gov (George B. Christianson) Date: Thu, 29 Apr 2004 16:51:17 -0700 Subject: [SciPy-user] Drivers for gplt distributed with scipy? Message-ID: <5.0.0.25.2.20040429163759.02b5a738@poptop.llnl.gov> Greetings to all from a new user of scipy! My environment for scipy consists of a PC running Windows 2000 with Cygwin (full installation, in the last month) & its Python2.3, and scipy and f2py2e installed from the CVS repositories. Here's my question: I'm using the scipy.gplt routines to visualize some 3d data sets, and getting pretty good plots on the Xwindows terminal, but I don't appear to be able to write plots to files. For example, the fragment ... plotting commands... gplt.output(filename, 'epslatex color') gplt.close() with filename "myfile.eps" does generate a file "myfile.eps" in my working directory, which I can open with Adobe PhotoShop, but there is no graph in it. I get similar results with a png file. The documentation refers to drivers needed gnuplot -- how can I tell whether I have any installed, and how can I obtain and install them if I need to? Thanks very much in advance for any help! George Christianson -------------- next part -------------- An HTML attachment was scrubbed... URL: From arnd.baecker at web.de Fri Apr 30 02:41:43 2004 From: arnd.baecker at web.de (Arnd Baecker) Date: Fri, 30 Apr 2004 08:41:43 +0200 (CEST) Subject: [SciPy-user] Re: xplt documentation In-Reply-To: <4091282B.2050202@visionsense.com> References: <4091282B.2050202@visionsense.com> Message-ID: On Thu, 29 Apr 2004, Nadav Horesh wrote: [...] > Thank you for the references.. The problem with the need to loop over > xplt.pyg_pending(), is > specific to IDLE. Hmm - you did not mention IDLE in your original post - did you ? ;-) A year ago or so we evaluated several of the interactive shells and because of what you observed we had to leave IDLE aside (in addition to the fact that several copies of IDLE could not run simultantiously one one linux box ...). So I am happy to hear that there is a work-around ;-) > The problem with plt and xplt is that they don't leave > happily with IDLE, which > is my favorite (I have experience with with pycrust and Ipython). Is > there any workaround > or this is a fundamental issue of Tkinter? I don't know - maybe there is a way to do this (maybe you will find something under `gui_thread` or in the context of matplotlib, http://matplotlib.sourceforge.net/ where the use of plotting packages from the interactive prompt is discussed (though I don't remember that IDLE was mentioned there) Good luck, Arnd From jdhunter at ace.bsd.uchicago.edu Fri Apr 30 07:37:17 2004 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Fri, 30 Apr 2004 06:37:17 -0500 Subject: [SciPy-user] Re: xplt documentation In-Reply-To: (Arnd Baecker's message of "Fri, 30 Apr 2004 08:41:43 +0200 (CEST)") References: <4091282B.2050202@visionsense.com> Message-ID: >>>>> "Arnd" == Arnd Baecker writes: >> The problem with plt and xplt is that they don't leave happily >> with IDLE, which is my favorite (I have experience with with >> pycrust and Ipython). Is there any workaround or this is a >> fundamental issue of Tkinter? Arnd> I don't know - maybe there is a way to do this (maybe you Arnd> will find something under `gui_thread` or in the context of Arnd> matplotlib, http://matplotlib.sourceforge.net/ where the use Arnd> of plotting packages from the interactive prompt is Arnd> discussed (though I don't remember that IDLE was mentioned Arnd> there) With the Tkinter backend, we have some luck if idle is launched with -n. There is some discussion of IDE/Tkinter (at least TkAgg) compatibility at http://matplotlib.sourceforge.net/backends.html#TkAgg. The issue of GUI conflicts and interactive use is discussed more generally at http://matplotlib.sourceforge.net/interactive.html. On http://www.ferg.org/thinking_in_tkinter, the effbot talks a little bit about tkinter gui conflicts. JDH