From ravi_lanka at acusim.com Wed Jun 1 08:48:37 2005 From: ravi_lanka at acusim.com (Ravi Lanka) Date: Wed, 1 Jun 2005 08:48:37 -0400 (EDT) Subject: [SciPy-user] undefined symbol import_array Message-ID: <32998.68.42.183.218.1117630117.squirrel@webmail1.pair.com> Hi all, I am new to PyTables. I am running Python 2.3.2 on Linux FC2 with PyTables version 0.8. When I tried to run the example in the distribution, array1.py, I get the following error. ===================================== Traceback (most recent call last): File "array1.py", line 4, in ? from tables import * File "/usr/local/acusim/BASE/LINUX/latest/lib/python2.3/site-packages/tables/__init__.py", line 33, in ? from hdf5Extension import getHDF5Version, \ ImportError: /usr/local/acusim/BASE/LINUX/latest/lib/python2.3/site-packages/tables/hdf5Extension.so: undefined symbol: import_array ===================================== I have the latest numarray, 1.3.2. Ravi From falted at pytables.org Wed Jun 1 12:30:22 2005 From: falted at pytables.org (falted at pytables.org) Date: Wed, 01 Jun 2005 18:30:22 +0200 (CEST) Subject: [SciPy-user] undefined symbol import_array In-Reply-To: <32998.68.42.183.218.1117630117.squirrel@webmail1.pair.com> References: <32998.68.42.183.218.1117630117.squirrel@webmail1.pair.com> Message-ID: <1117643422.429de29e4f2a5@webmail.imk.es> Quoting Ravi Lanka : > I am new to PyTables. I am running Python 2.3.2 on Linux FC2 with > PyTables version 0.8. When I tried to run the example in the > distribution, array1.py, I get the following error. > /usr/local/acusim/BASE/LINUX/latest/lib/python2.3/site-packages/tables/hdf5Extension.so: > undefined symbol: import_array > ===================================== > I have the latest numarray, 1.3.2. You need to use a more recent version of PyTables if you are using latest numarray. Try with PyTables 1.0, it should work just fine. Cheers, -- Francesc Altet From Lowell.Vaughn at enthought.com Wed Jun 1 18:04:32 2005 From: Lowell.Vaughn at enthought.com (Lowell Vaughn) Date: Wed, 01 Jun 2005 17:04:32 -0500 Subject: [SciPy-user] 2D Interpolation Message-ID: <429E30F0.8060005@enthought.com> Hi, I'm trying to interpolate a variable over a plane. I have a reasonably small number of points (approx. 4 to 10) and I'm looking for a way to interpolate these points over a region. An ideal technique would: * Not have "wild" values away from points where I have data * Work well with small number of points (e.g., 4, I can handle 1-3 points with other mechanisms) * Lead to continuous values (no strange jumps in the data if you plotted the interpolated values on a grid) * Honor all data points * Be fast * Already be in scipy :-) I tried using bisplrep and bisplev from scipy.interpolate, but the results were poor (wild values when away from control points). This may have been due to user error, but my impression was this wouldn't work well with out lots of points. Does anyone have any idea/pointers on this? Thanks, Lowell -------------- next part -------------- An HTML attachment was scrubbed... URL: From meesters at uni-mainz.de Fri Jun 3 05:21:15 2005 From: meesters at uni-mainz.de (Christian Meesters) Date: Fri, 3 Jun 2005 11:21:15 +0200 Subject: [SciPy-user] 'linear regression' Message-ID: Hi I'm wondering whether there is a tool in scipy which can do a line fit ('linear regression') fit for me. (Preferably something which can work with and without given error arrays in x and/or y.) Else I'd have to code it myself ... Well, I couldn't find such a function described in the manual: Could anyone pleas point it out to me where I can find this in scipy - in case it really exists? Thanks, Christian From rkern at ucsd.edu Fri Jun 3 05:40:09 2005 From: rkern at ucsd.edu (Robert Kern) Date: Fri, 03 Jun 2005 02:40:09 -0700 Subject: [SciPy-user] 'linear regression' In-Reply-To: References: Message-ID: <42A02579.9030708@ucsd.edu> Christian Meesters wrote: > Hi > > I'm wondering whether there is a tool in scipy which can do a line fit > ('linear regression') fit for me. (Preferably something which can work > with and without given error arrays in x and/or y.) Else I'd have to > code it myself ... > Well, I couldn't find such a function described in the manual: Could > anyone pleas point it out to me where I can find this in scipy - in case > it really exists? x = array([1., 2, ...]) y = array([3., 4, ...]) # standard error of the y-variable: sy = array([0.1, 0.2, ...]) N = len(x) A = ones((2, N), x.typecode()) A[1] = x A /= sy A = transpose(A) y /= sy sol, res, rank, s = scipy.linalg.lstsq(A, y) # y = sol[0] + sol[1]*x I forget the linear implementation of total least squares (errors in both variables); I always use the full-blown nonlinear implementation, which is not yet integrated into scipy. http://starship.python.net/crew/kernr/source/odr-0.6.1.tar.gz -- 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 zunzun at zunzun.com Fri Jun 3 06:03:41 2005 From: zunzun at zunzun.com (zunzun at zunzun.com) Date: Fri, 3 Jun 2005 06:03:41 -0400 Subject: [SciPy-user] 'linear regression' In-Reply-To: <42A02579.9030708@ucsd.edu> References: <42A02579.9030708@ucsd.edu> Message-ID: <20050603100340.GA5905@localhost.members.linode.com> On Fri, Jun 03, 2005 at 02:40:09AM -0700, Robert Kern wrote: > > I always use the full-blown nonlinear implementation, > which is not yet integrated into scipy. > > http://starship.python.net/crew/kernr/source/odr-0.6.1.tar.gz Say, that is very interesting work. May I add it to my web site as a fitting method? I'm also curious as to when it might make it into the SciPy distribution. James Phillips http://zunzun.com From rkern at ucsd.edu Fri Jun 3 06:16:58 2005 From: rkern at ucsd.edu (Robert Kern) Date: Fri, 03 Jun 2005 03:16:58 -0700 Subject: [SciPy-user] 'linear regression' In-Reply-To: <20050603100340.GA5905@localhost.members.linode.com> References: <42A02579.9030708@ucsd.edu> <20050603100340.GA5905@localhost.members.linode.com> Message-ID: <42A02E1A.50809@ucsd.edu> zunzun at zunzun.com wrote: > On Fri, Jun 03, 2005 at 02:40:09AM -0700, Robert Kern wrote: > >>I always use the full-blown nonlinear implementation, >>which is not yet integrated into scipy. >> >>http://starship.python.net/crew/kernr/source/odr-0.6.1.tar.gz > > Say, that is very interesting work. May I add it to my > web site as a fitting method? Please do. > I'm also curious as to when > it might make it into the SciPy distribution. When someone f2py's it. It's been on my list for years, but I've never accumulated enough tuits. If anyone wants to make a stab at it, I can point them to some of ODRPACK's ideosyncrasies. -- 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 meesters at uni-mainz.de Sat Jun 4 16:41:21 2005 From: meesters at uni-mainz.de (Christian Meesters) Date: Sat, 4 Jun 2005 22:41:21 +0200 Subject: [SciPy-user] 'linear regression' In-Reply-To: <42A02E1A.50809@ucsd.edu> References: <42A02579.9030708@ucsd.edu> <20050603100340.GA5905@localhost.members.linode.com> <42A02E1A.50809@ucsd.edu> Message-ID: <3e4101fc108f2c5cfaa4e29f6c77724e@uni-mainz.de> Thank you, Robert. Sometimes I'm wondering how blind I am, since actually all I was looking for is in the user guide. However, your example snipped made it a snap to write the rest. Christian From david.grant at telus.net Mon Jun 6 01:30:27 2005 From: david.grant at telus.net (David Grant) Date: Sun, 05 Jun 2005 22:30:27 -0700 Subject: [SciPy-user] 'linear regression' In-Reply-To: References: Message-ID: <200506052230.27312.david.grant@telus.net> This uses the Scientific.Functions.LeastSquares.leastSquaresFit function from the Scientific python package: http://www.davidgrant.ca/python/bestFitLine.py Just call bestFitLine(x, y) with your data in x and y. It will return newy, slope, intercept, chisquared as a tuple of size 4. Dave On June 3, 2005 02:21 am, Christian Meesters wrote: > Hi > > I'm wondering whether there is a tool in scipy which can do a line fit > ('linear regression') fit for me. (Preferably something which can work > with and without given error arrays in x and/or y.) Else I'd have to > code it myself ... > Well, I couldn't find such a function described in the manual: Could > anyone pleas point it out to me where I can find this in scipy - in > case it really exists? > > Thanks, > Christian > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user -- David J. Grant http://www.davidandnasha.ca From guillem at torroja.dmt.upm.es Mon Jun 6 11:53:43 2005 From: guillem at torroja.dmt.upm.es (Guillem Borrell Nogueras) Date: Mon, 06 Jun 2005 15:53:43 +0000 Subject: [SciPy-user] help needed using optimize.fsolve Message-ID: <42A47187.9000801@torroja.dmt.upm.es> I've seen that the scipy's fsolve function has the option to pass optional arguments to the function one wants to solve. fsolve(func, x0, args=(), fprime=None, full_output=0, col_deriv=0, xtol=1.49012e-08, maxfev=0, band=None, epsfcn=0.0, factor=100, diag=None) ... args -- Any extra arguments to func are placed in this tuple. I need to solve a set of non-linear equations changing some parameters. The way i use in matlab and fortran is to write a file with the parameter and read it when the function is evaluated. This is slow and annoying. I've tried unsuccessfully to pass the arguments this way. ?Anyone can help? -- Guillem Borrell Nogueras website http://torroja.dmt.upm.es/~guillem/ guillemborrell at gmail.com guillem at torroja.dmt.upm.es tf. 655388683 From rkern at ucsd.edu Mon Jun 6 10:08:37 2005 From: rkern at ucsd.edu (Robert Kern) Date: Mon, 06 Jun 2005 07:08:37 -0700 Subject: [SciPy-user] help needed using optimize.fsolve In-Reply-To: <42A47187.9000801@torroja.dmt.upm.es> References: <42A47187.9000801@torroja.dmt.upm.es> Message-ID: <42A458E5.1020501@ucsd.edu> Guillem Borrell Nogueras wrote: > I've seen that the scipy's fsolve function has the option to pass > optional arguments to the function one wants to solve. > > fsolve(func, x0, args=(), fprime=None, full_output=0, col_deriv=0, > xtol=1.49012e-08, > maxfev=0, band=None, epsfcn=0.0, factor=100, diag=None) > ... > args -- Any extra arguments to func are placed in this tuple. > > > I need to solve a set of non-linear equations changing some parameters. > The way i use in matlab and fortran is to write a file with the > parameter and read it when the function is evaluated. This is slow and > annoying. > > I've tried unsuccessfully to pass the arguments this way. ?Anyone can help? In [1]:def func(x, some, other, args): ...: print some, other, args ...: return x*x*some + x*other + args ...: In [2]:optimize.fsolve(func, 0.0, args=(1,2,3)) 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 [etc.] -- 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 stephen.walton at csun.edu Mon Jun 6 15:03:25 2005 From: stephen.walton at csun.edu (Stephen Walton) Date: Mon, 06 Jun 2005 12:03:25 -0700 Subject: [SciPy-user] 2D Interpolation In-Reply-To: <429E30F0.8060005@enthought.com> References: <429E30F0.8060005@enthought.com> Message-ID: <42A49DFD.6000300@csun.edu> No one seems to have responded, so I'll try: > I'm trying to interpolate a variable over a plane. I have a > reasonably small number of points (approx. 4 to 10) and I'm looking > for a way to interpolate these points over a region. That's a really small number of points. You probably can't do better than a simple bilinear interpolation. Spline interpolations have known odd behavior; among other things, an interpolant of monotonic data is not guaranteed to be monotonic. Global polynomial fits have similar problems. For an extensive discussion of interpolation in one dimension, see chapter 4 of Kahaner, Moler, and Nash, "Numerical Methods and Software". From aisaac at american.edu Mon Jun 6 15:30:09 2005 From: aisaac at american.edu (Alan G Isaac) Date: Mon, 6 Jun 2005 15:30:09 -0400 (Eastern Daylight Time) Subject: [SciPy-user] 2D Interpolation In-Reply-To: <42A49DFD.6000300@csun.edu> References: <429E30F0.8060005@enthought.com><42A49DFD.6000300@csun.edu> Message-ID: On Mon, 06 Jun 2005, Stephen Walton apparently wrote: > For an extensive discussion of interpolation in one > dimension, see chapter 4 of Kahaner, Moler, and Nash, "Numerical Methods > and Software". Is that substantially different from http://www.mathworks.com/moler/interp.pdf ? Thank you, Alan Isaac From stephen.walton at csun.edu Mon Jun 6 18:25:34 2005 From: stephen.walton at csun.edu (Stephen Walton) Date: Mon, 06 Jun 2005 15:25:34 -0700 Subject: [SciPy-user] 2D Interpolation In-Reply-To: References: <429E30F0.8060005@enthought.com><42A49DFD.6000300@csun.edu> Message-ID: <42A4CD5E.4040307@csun.edu> Alan G Isaac wrote: >On Mon, 06 Jun 2005, Stephen Walton apparently wrote: > > >>For an extensive discussion of interpolation in one >>dimension, see chapter 4 of Kahaner, Moler, and Nash, "Numerical Methods >>and Software". >> >> > >Is that substantially different from >http://www.mathworks.com/moler/interp.pdf ? > > Well, the overall approach is similar, of course, but I'd say the Kahaner, Moler and Nash book is a bit heavier on theory, and also predates MATLAB so the ideas aren't illustrated with MATLAB scripts. Still, Figure 3.8 of the above document nicely illustrates what can go wrong with spline interpolation. From ruchi2204 at yahoo.com Tue Jun 7 00:30:19 2005 From: ruchi2204 at yahoo.com (Ruchi Mittal) Date: Mon, 6 Jun 2005 21:30:19 -0700 (PDT) Subject: [SciPy-user] Scipy for Python2.4 Message-ID: <20050607043019.19823.qmail@web33106.mail.mud.yahoo.com> Is there any updated Scipy version available to use with python 2.4.1. Regards RM __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rkern at ucsd.edu Tue Jun 7 02:41:00 2005 From: rkern at ucsd.edu (Robert Kern) Date: Mon, 06 Jun 2005 23:41:00 -0700 Subject: [SciPy-user] Scipy for Python2.4 In-Reply-To: <20050607043019.19823.qmail@web33106.mail.mud.yahoo.com> References: <20050607043019.19823.qmail@web33106.mail.mud.yahoo.com> Message-ID: <42A5417C.5070008@ucsd.edu> Ruchi Mittal wrote: > Is there any updated Scipy version available to use with python 2.4.1. There are no binaries distributed from scipy.org for Python 2.4.1, yet. However, Scipy builds from source just fine with Python 2.4.1. You didn't mention what platform you are on. If you are using a distribution of Linux or some other UNIX-alike with a package management system, then it is possible that someone has already built a Scipy binary package against Python 2.4.1. You will have to look for it where you usually look for such packages. -- 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 JeanClaude.Razafindrakoto at axa-cessions.com Tue Jun 7 03:42:59 2005 From: JeanClaude.Razafindrakoto at axa-cessions.com (Razafindrakoto Jean Claude) Date: Tue, 07 Jun 2005 09:42:59 +0200 Subject: [SciPy-user] Scipy for Python2.4 Message-ID: I am running Python on Windows XP. Is it OK to build Scipy from source on this platform ? As I didn't do it for previous versions, is there any pointers to build procedure on Windows XP. Thanks. ? ?? ______________________________________________________________ AXA CESSIONS ? Jean-Claude RAZAFINDRAKOTO ? Re-ARMS Reinsurance - Actuarial and Risk Management Services ? 109 rue La Bo?tie 75008 Paris ? Tel. : +33 1 56 43 78 54 Fax. : +33 1 56 43 78 70 E-mail : jeanclaude.razafindrakoto at axa-cessions.com _______________________________________________________________ |-----Message d'origine----- |De?: Robert Kern [mailto:rkern at ucsd.edu] |Envoy??: mardi 7 juin 2005 08:41 |??: SciPy Users List |Objet?: Re: [SciPy-user] Scipy for Python2.4 | |Ruchi Mittal wrote: |> Is there any updated Scipy version available to use with python 2.4.1. | |There are no binaries distributed from scipy.org for Python 2.4.1, yet. |However, Scipy builds from source just fine with Python 2.4.1. | |You didn't mention what platform you are on. If you are using a |distribution of Linux or some other UNIX-alike with a package management |system, then it is possible that someone has already built a Scipy |binary package against Python 2.4.1. You will have to look for it where |you usually look for such packages. | |-- |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 From stephen.walton at csun.edu Tue Jun 7 17:43:18 2005 From: stephen.walton at csun.edu (Stephen Walton) Date: Tue, 07 Jun 2005 14:43:18 -0700 Subject: [SciPy-user] probplot problem Message-ID: <42A614F6.1010102@csun.edu> I've hit a problem with probplot. The following code fails: import scipy as S s=S.stats.norm.rvs(0,size=1000) (osm,osr)=S.stats.probplot(x,fit=0) Tracing a bit finds the problem at line 197 of morestats.py. Running the following scriptlet: import scipy.stats.distributions as distributions import inspect ppf_func=eval('distributions.norm.ppf') res=inspect.getargspec(ppf_func) print res gives (['self', 'q'], 'args', 'kwds', None) while line 195 of morestats.py makes a bunch of tests against res which fail for this form. From stephen.walton at csun.edu Tue Jun 7 18:11:48 2005 From: stephen.walton at csun.edu (Stephen Walton) Date: Tue, 07 Jun 2005 15:11:48 -0700 Subject: [SciPy-user] probplot problem In-Reply-To: <42A614F6.1010102@csun.edu> References: <42A614F6.1010102@csun.edu> Message-ID: <42A61BA4.90503@csun.edu> Stephen Walton wrote: > I've hit a problem with probplot. I fixed it for now by commenting out the argument testing code in both probplot and ppcc_max. Seems to work well now; I can recover the shape parameter in a test set of lognormal distributed points I generated. Unified diff attached. -------------- next part -------------- A non-text attachment was scrubbed... Name: morestats.diff Type: text/x-patch Size: 1267 bytes Desc: not available URL: From ruchi2204 at yahoo.com Tue Jun 7 20:42:31 2005 From: ruchi2204 at yahoo.com (Ruchi Mittal) Date: Tue, 7 Jun 2005 17:42:31 -0700 (PDT) Subject: [SciPy-user] Scipy for Python2.4 In-Reply-To: <42A5417C.5070008@ucsd.edu> Message-ID: <20050608004231.47544.qmail@web33115.mail.mud.yahoo.com> Thanks for your response. I am using Windows XP SP2. Can I still use scipy. I need some of its modules like weave and other stuff for running my codes. Regards Ruchi --- Robert Kern wrote: > Ruchi Mittal wrote: > > Is there any updated Scipy version available to use with python 2.4.1. > > There are no binaries distributed from scipy.org for Python 2.4.1, yet. > However, Scipy builds from source just fine with Python 2.4.1. > > You didn't mention what platform you are on. If you are using a > distribution of Linux or some other UNIX-alike with a package management > > system, then it is possible that someone has already built a Scipy > binary package against Python 2.4.1. You will have to look for it where > you usually look for such packages. > > -- > 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 > __________________________________ Discover Yahoo! Find restaurants, movies, travel and more fun for the weekend. Check it out! http://discover.yahoo.com/weekend.html From niklas.papathanasiou at hmi.de Wed Jun 8 09:02:21 2005 From: niklas.papathanasiou at hmi.de (Niklas Papathanasiou) Date: Wed, 08 Jun 2005 15:02:21 +0200 Subject: [SciPy-user] NewBie: Fit Data to an implicit function Message-ID: <6.2.1.2.0.20050608145602.02d91658@mail.hmi.de> Hi! I like to fit data to an implicit function. I(U)=I0*exp((U-I*Rs)/(A*k*T)-1)+(U-IRs)/Rp I,U are data I0,Rs,Rp,A are Parameter k,T are physical constants Did anyone did this before or do I have to start from the scratch? Many thanks for any help yours Beeble ************************************************* Dr. Niklas Papathanasiou Abt. SE 2 Hahn-Meitner-Institut Berlin (Solar Energie Forschung) Glienickerstra?e 100 14 109 Berlin Tel: 0049-30-8062 3285 Fax: 0049-30-8062 3199 ************************************************* From dd55 at cornell.edu Wed Jun 8 09:10:05 2005 From: dd55 at cornell.edu (Darren Dale) Date: Wed, 8 Jun 2005 09:10:05 -0400 Subject: [SciPy-user] NewBie: Fit Data to an implicit function In-Reply-To: <6.2.1.2.0.20050608145602.02d91658@mail.hmi.de> References: <6.2.1.2.0.20050608145602.02d91658@mail.hmi.de> Message-ID: <200506080910.05800.dd55@cornell.edu> On Wednesday 08 June 2005 9:02 am, Niklas Papathanasiou wrote: > Hi! > > I like to fit data to an implicit function. > I(U)=I0*exp((U-I*Rs)/(A*k*T)-1)+(U-IRs)/Rp > I,U are data > I0,Rs,Rp,A are Parameter > k,T are physical constants > > Did anyone did this before or do I have to start from the scratch? Check the SciPy users guide, about least squares fits. You want to write a function that returns the residuals: residuals = I-I0*exp((U-I*Rs)/(A*k*T)-1)+(U-IRs)/Rp and then pass that function to scipy.optimize.leastsq Darren -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From B.P.S.Thurin at city.ac.uk Wed Jun 8 09:47:46 2005 From: B.P.S.Thurin at city.ac.uk (Brice Thurin) Date: Wed, 8 Jun 2005 14:47:46 +0100 Subject: [SciPy-user] gui_thread trouble Message-ID: Hello, I have just finished installing scipy and I am trying to run the demo, unfortunately it doesn't work. I have got macpython2.4 installed on panther. I have been trying with several version of Numeric and apparentely wxPython is working properly, I executed the demo samples without trouble. I have been trying to launch the following command >>> import gui_thread >>> gui_thread.start() with IDLE, python IDE, PYcrust and the terminal and I always get the same problem: error message with pycrust: import gui_thread numerix Numeric 24.0b2 gui_thread.start() Traceback (most recent call last): File "", line 1, in ? File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site- packages/gui_thread/__init__.py", line 73, in start wxPython_thread() File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site- packages/gui_thread/wxPython_thread.py", line 156, in wxPython_thread for name in get_extmodules(pexec): File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site- packages/gui_thread/wxPython_thread.py", line 25, in get_extmodules _do_import(pexec) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site- packages/gui_thread/wxPython_thread.py", line 104, in _do_import assert not sys.modules.has_key('wx'), \ AssertionError: wx is already imported, cannot proceed error message with terminal [optopc186:~/desktop/Numeric-24.0b2] bricethu% python2.4 Python 2.4.1 (#2, Mar 31 2005, 00:05:10) [GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import numeric Traceback (most recent call last): File "", line 1, in ? ImportError: No module named numeric >>> import Numeric >>> [optopc186:~/desktop/Numeric-24.0b2] bricethu% python2.4 Python 2.4.1 (#2, Mar 31 2005, 00:05:10) [GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import gui_thread numerix Numeric 24.0b2 >>> gui_thread.start() Traceback (most recent call last): File "", line 1, in ? File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site- packages/gui_thread/__init__.py", line 73, in start wxPython_thread() File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site- packages/gui_thread/wxPython_thread.py", line 160, in wxPython_thread sys.modules[name] = wrap_extmodule(module,call_holder) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site- packages/gui_thread/wxPython_thread.py", line 61, in wrap_extmodule raise NotImplementedError,`t` NotImplementedError: Many thanks for anyhelp Brice Brice Thurin Department of Optometry and Visual Science City University, Northampton Square London, EC1V 0HB, UK. http://www.city.ac.uk/optometry/Luis/myresearch/Research/ scatteringproper.html http://www.sharpeye.org/ Tel: +44 (0)20 7040 4157 Fax: +44(0)20 7040 8355 e-mail: B.P.S.Thurin at city.ac.uk From nwagner at mecha.uni-stuttgart.de Wed Jun 8 10:00:46 2005 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Wed, 08 Jun 2005 16:00:46 +0200 Subject: [SciPy-user] Usage of integrate.quadrature Message-ID: <42A6FA0E.4030309@mecha.uni-stuttgart.de> Hi all, Is it possible to use integrate.quadrature with respect to a function that returns a two-dimensional array ? from scipy import * l=0.1 def h(zeta): # # Shape functions # tmp = zeros(4,Float) tmp[0] = 1-3*zeta**2+2*zeta**3 tmp[1] = (-zeta+2*zeta**2-zeta**3)*l tmp[2] = 3*zeta**2-2*zeta**3 tmp[3] = (zeta**2-zeta**3)*l return tmp def hd(zeta): tmp = zeros(4,Float) tmp[0] = -6*zeta+6*zeta**2 tmp[1] = (-1+4*zeta-3*zeta**2)*l tmp[2] = 6*zeta-6*zeta**2 tmp[3] = (2*zeta-3*zeta**2)*l return tmp def hdd(zeta): tmp = zeros(4,Float) tmp[0] = -6+12*zeta tmp[1] = (4-6*zeta)*l tmp[2] = 6-12*zeta tmp[3] = (2-6*zeta)*l return tmp def func(zeta): # print outerproduct(h(zeta),h(zeta)) return outerproduct(h(zeta),h(zeta)) # # This version doesn't work # val,err= integrate.quadrature(func, 0.0,1.0) Nils From nwagner at mecha.uni-stuttgart.de Wed Jun 8 12:00:09 2005 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Wed, 08 Jun 2005 18:00:09 +0200 Subject: [SciPy-user] Usage of integrate.quadrature In-Reply-To: <42A6FA0E.4030309@mecha.uni-stuttgart.de> References: <42A6FA0E.4030309@mecha.uni-stuttgart.de> Message-ID: <42A71609.1020004@mecha.uni-stuttgart.de> Nils Wagner wrote: > Hi all, > > Is it possible to use integrate.quadrature with respect to a function > that > returns a two-dimensional array ? > > from scipy import * > > l=0.1 > > def h(zeta): > # > # Shape functions > # > tmp = zeros(4,Float) > tmp[0] = 1-3*zeta**2+2*zeta**3 > tmp[1] = (-zeta+2*zeta**2-zeta**3)*l > tmp[2] = 3*zeta**2-2*zeta**3 > tmp[3] = (zeta**2-zeta**3)*l > return tmp > > def hd(zeta): > tmp = zeros(4,Float) > tmp[0] = -6*zeta+6*zeta**2 > tmp[1] = (-1+4*zeta-3*zeta**2)*l > tmp[2] = 6*zeta-6*zeta**2 > tmp[3] = (2*zeta-3*zeta**2)*l > return tmp > > def hdd(zeta): > tmp = zeros(4,Float) > tmp[0] = -6+12*zeta > tmp[1] = (4-6*zeta)*l > tmp[2] = 6-12*zeta > tmp[3] = (2-6*zeta)*l > return tmp > > def func(zeta): > # print outerproduct(h(zeta),h(zeta)) > return outerproduct(h(zeta),h(zeta)) > > # > # This version doesn't work > # > val,err= integrate.quadrature(func, 0.0,1.0) > > > Nils > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user The version below works fine, but I am quite sure that it can be improved. Any pointer would be appreciated. :-) Nils def h(zeta): # # Shape functions # tmp = zeros(4,Float) tmp[0] = 1-3*zeta**2+2*zeta**3 tmp[1] = (-zeta+2*zeta**2-zeta**3)*l tmp[2] = 3*zeta**2-2*zeta**3 tmp[3] = (zeta**2-zeta**3)*l return tmp def func(zeta,i,j): h0 = h(zeta) return h0[i]*h0[j] for i in arange(0,4): for j in arange(0,4): val,err = integrate.quadrature(func, 0.0,1.0, args=(i,j)) From prabhu_r at users.sf.net Wed Jun 8 13:47:56 2005 From: prabhu_r at users.sf.net (Prabhu Ramachandran) Date: Wed, 8 Jun 2005 23:17:56 +0530 Subject: [SciPy-user] gui_thread trouble In-Reply-To: References: Message-ID: <17063.12108.473235.14353@monster.linux.in> >>>>> "Brice" == Brice Thurin writes: [...] Brice> without trouble. I have been trying to launch the following Brice> command >>>> import gui_thread gui_thread.start() Brice> with IDLE, python IDE, PYcrust and the terminal and I Brice> always get the same problem: I would suggest that you don't use scipy.plt and instead use matplotlib along with IPython via pylab. cheers, prabhu From zhiwen.chong at elf.mcgill.ca Wed Jun 8 16:26:42 2005 From: zhiwen.chong at elf.mcgill.ca (Zhiwen Chong) Date: Wed, 8 Jun 2005 16:26:42 -0400 Subject: [SciPy-user] Installing SciPy on Mac OS X Tiger Message-ID: <2418CFC0-F952-4AD4-A70B-4BAC076748AF@elf.mcgill.ca> Hi folks, I was wondering if anyone could help me with my little problem here. I can't seem to get latest SciPy to build on my Apple machine. I suspect it's because I am running Tiger. I've looked on the web for solutions, but none of them work, so I am writing to see if anyone has any idea what's going on. 1) I'm building SciPy 0.3.2 from the tarball, with the following components: - Numeric 24.0 - Apple Developer Tools with X11 developer libraries (Xcode 2.0) - gcc 3.3 (I did a 'sudo gcc_select 3.3' because Mac OS X comes with gcc 4.0) - g77 3.4 (from Guarav Khanna's HPC webpage) - FFTW 2.1.5 - F2PY 2.45.241_1926 2) I wanted the sparse package, so I left this block as it was: ignore_packages = [ # ] The #define NO_IMPORT_ARRAY was already in the _superluobject.c, so I left it as it was. 3) With that, I ran 'python setup.py build' 4) I got an error which somehow seems related to the g77 linker. So I downloaded cctools-528.dmg and installed that. 5) It didn't work. The critical error seems to be this one: /usr/local/bin/g77 -lcc_dynamic -bundle build/temp.darwin-8.1.0- Power_Macintosh-2.4/build/src/Lib/fftpack/_fftpackmodule.o build/ temp.darwin-8.1.0-Power_Macintosh-2.4/Lib/fftpack/src/zfft.o build/ temp.darwin-8.1.0-Power_Macintosh-2.4/Lib/fftpack/src/drfft.o build/ temp.darwin-8.1.0-Power_Macintosh-2.4/Lib/fftpack/src/zrfft.o build/ temp.darwin-8.1.0-Power_Macintosh-2.4/Lib/fftpack/src/zfftnd.o build/ temp.darwin-8.1.0-Power_Macintosh-2.4/build/src/fortranobject.o -L/ usr/local/lib -L/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.2 - Lbuild/temp.darwin-8.1.0-Power_Macintosh-2.4 -ldfftpack -lrfftw - lfftw -lg2c -o build/lib.darwin-8.1.0-Power_Macintosh-2.4/scipy/ fftpack/_fftpack.so /usr/bin/ld: can't locate file for: -lcc_dynamic collect2: ld returned 1 exit status /usr/bin/ld: can't locate file for: -lcc_dynamic collect2: ld returned 1 exit status error: Command "/usr/local/bin/g77 -lcc_dynamic -bundle build/ temp.darwin-8.1.0-Power_Macintosh-2.4/build/src/Lib/fftpack/ _fftpackmodule.o build/temp.darwin-8.1.0-Power_Macintosh-2.4/Lib/ fftpack/src/zfft.o build/temp.darwin-8.1.0-Power_Macintosh-2.4/Lib/ fftpack/src/drfft.o build/temp.darwin-8.1.0-Power_Macintosh-2.4/Lib/ fftpack/src/zrfft.o build/temp.darwin-8.1.0-Power_Macintosh-2.4/Lib/ fftpack/src/zfftnd.o build/temp.darwin-8.1.0-Power_Macintosh-2.4/ build/src/fortranobject.o -L/usr/local/lib -L/usr/local/lib/gcc/ powerpc-apple-darwin6.8/3.4.2 -Lbuild/temp.darwin-8.1.0- Power_Macintosh-2.4 -ldfftpack -lrfftw -lfftw -lg2c -o build/ lib.darwin-8.1.0-Power_Macintosh-2.4/scipy/fftpack/_fftpack.so" failed with exit status 1 I can't figure out what it means. It seems related to this problem: http://sourceforge.net/mailarchive/message.php?msg_id=11853060 But I already did a gcc_select 3.3, and I'm not using fink. I checked my build path -- no spaces in directory names or anything like that (which sometimes cause builds to fail). I also tried building SciPy from the CVS sources, but same deal. If anyone has any insights into this problem, I'd appreciate it if you could share it with me. Thanks a lot for your time! Zhiwen Dept. of Chemical Engineering McMaster University Hamilton, ON, Canada L8S 4L7 Tel: (905) 525-9140 Ext. 24951 FAX: (905) 521-1350 macc.mcmaster.ca From rkern at ucsd.edu Wed Jun 8 17:04:45 2005 From: rkern at ucsd.edu (Robert Kern) Date: Wed, 08 Jun 2005 14:04:45 -0700 Subject: [SciPy-user] Installing SciPy on Mac OS X Tiger In-Reply-To: <2418CFC0-F952-4AD4-A70B-4BAC076748AF@elf.mcgill.ca> References: <2418CFC0-F952-4AD4-A70B-4BAC076748AF@elf.mcgill.ca> Message-ID: <42A75D6D.1000104@ucsd.edu> Zhiwen Chong wrote: [snippity] > 5) It didn't work. The critical error seems to be this one: > > /usr/local/bin/g77 -lcc_dynamic -bundle build/temp.darwin-8.1.0- > Power_Macintosh-2.4/build/src/Lib/fftpack/_fftpackmodule.o build/ > temp.darwin-8.1.0-Power_Macintosh-2.4/Lib/fftpack/src/zfft.o build/ > temp.darwin-8.1.0-Power_Macintosh-2.4/Lib/fftpack/src/drfft.o build/ > temp.darwin-8.1.0-Power_Macintosh-2.4/Lib/fftpack/src/zrfft.o build/ > temp.darwin-8.1.0-Power_Macintosh-2.4/Lib/fftpack/src/zfftnd.o build/ > temp.darwin-8.1.0-Power_Macintosh-2.4/build/src/fortranobject.o -L/ > usr/local/lib -L/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.2 - > Lbuild/temp.darwin-8.1.0-Power_Macintosh-2.4 -ldfftpack -lrfftw - lfftw > -lg2c -o build/lib.darwin-8.1.0-Power_Macintosh-2.4/scipy/ > fftpack/_fftpack.so > > /usr/bin/ld: can't locate file for: -lcc_dynamic > collect2: ld returned 1 exit status /usr/lib/libcc_dynamic.a should be a symbolic link to /usr/lib/gcc/darwin/default/libgcc.a . Can you check both of these paths? When did you download g77 from hpc.sourceforge.net? I am successfully using one downloaded today. -lcc_dynamic seems to be coming at the end of the linker arguments for me (using CVS). > I can't figure out what it means. It seems related to this problem: > http://sourceforge.net/mailarchive/message.php?msg_id=11853060 > But I already did a gcc_select 3.3, and I'm not using fink. > > I checked my build path -- no spaces in directory names or anything > like that (which sometimes cause builds to fail). > > I also tried building SciPy from the CVS sources, but same deal. CVS builds fine for me. I know that I've fiddled with the OS X linking since the last release, so you will want to use CVS. -- 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 zhiwen.chong at elf.mcgill.ca Wed Jun 8 18:10:43 2005 From: zhiwen.chong at elf.mcgill.ca (Zhiwen Chong) Date: Wed, 8 Jun 2005 18:10:43 -0400 Subject: [SciPy-user] Installing SciPy on Mac OS X Tiger In-Reply-To: <42A75D6D.1000104@ucsd.edu> References: <2418CFC0-F952-4AD4-A70B-4BAC076748AF@elf.mcgill.ca> <42A75D6D.1000104@ucsd.edu> Message-ID: <0E87D5DA-3ABE-4167-B942-6C5B785A4A94@elf.mcgill.ca> Hi, On 8-Jun-05, at 5:04 PM, Robert Kern wrote: > /usr/lib/libcc_dynamic.a should be a symbolic link to /usr/lib/gcc/ > darwin/default/libgcc.a . Can you check both of these paths? No problems there. > When did you download g77 from hpc.sourceforge.net? I am > successfully using one downloaded today. I downloaded my copy a last week. > CVS builds fine for me. I know that I've fiddled with the OS X > linking since the last release, so you will want to use CVS. I took your advice and checked out a CVS copy and downloaded hpc's g77 again just now. It builds okay now! When I ran scipy.test(), it reported "no test file found" for many of the modules, but as far as actual failures go, there was only one (out of 1174): FAIL: check_round (scipy.special.basic.test_basic.test_round) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/scipy/special/tests/test_basic.py", line 1789, in check_round assert_array_equal(rnd,rndrl) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/scipy_test/testing.py", line 715, in assert_array_equal assert cond,\ AssertionError: Arrays are not equal (mismatch 25.0%): Array 1: [10 10 10 11] Array 2: [10 10 11 11] I take it that's normal on OS X? At any rate, I'm happy it builds. Thanks! Zhiwen From rkern at ucsd.edu Wed Jun 8 18:59:54 2005 From: rkern at ucsd.edu (Robert Kern) Date: Wed, 08 Jun 2005 15:59:54 -0700 Subject: [SciPy-user] special.round(10.5) [was: Installing SciPy on Mac OS X Tiger] In-Reply-To: <0E87D5DA-3ABE-4167-B942-6C5B785A4A94@elf.mcgill.ca> References: <2418CFC0-F952-4AD4-A70B-4BAC076748AF@elf.mcgill.ca> <42A75D6D.1000104@ucsd.edu> <0E87D5DA-3ABE-4167-B942-6C5B785A4A94@elf.mcgill.ca> Message-ID: <42A7786A.50207@ucsd.edu> Zhiwen Chong wrote: > I took your advice and checked out a CVS copy and downloaded hpc's g77 > again just now. It builds okay now! /me does the Happy Build Dance. > When I ran scipy.test(), it reported "no test file found" for many of > the modules, Those are normal. They are reminders to us developers to actually write those tests. > but as far as actual failures go, there was only one (out > of 1174): > > FAIL: check_round (scipy.special.basic.test_basic.test_round) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ > python2.4/site-packages/scipy/special/tests/test_basic.py", line 1789, > in check_round > assert_array_equal(rnd,rndrl) > File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ > python2.4/site-packages/scipy_test/testing.py", line 715, in > assert_array_equal > assert cond,\ > AssertionError: > Arrays are not equal (mismatch 25.0%): > Array 1: [10 10 10 11] > Array 2: [10 10 11 11] > > I take it that's normal on OS X? It's an incorrect test, I believe. Other devs: special.round() has different behavior than scipy.round() (which is just an alias to Numeric.around()). In [15]:scipy.round(10.5) Out[15]:11.0 In [16]:scipy.round(11.5) Out[16]:12.0 In [17]:scipy.special.round(10.5) Out[17]:10.0 In [18]:scipy.special.round(11.5) Out[18]:12.0 I submit that "round-to-nearest-even" is desirable (and in any case comes part and parcel with using the cephes implementation), and we should adjust our test case accordingly. Or rather, I already have. -- 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 d.howey at imperial.ac.uk Fri Jun 10 07:06:29 2005 From: d.howey at imperial.ac.uk (Howey, David A) Date: Fri, 10 Jun 2005 12:06:29 +0100 Subject: [SciPy-user] Problems installing scipy with activepython 2.4 Message-ID: <056D32E9B2D93B49B01256A88B3EB218766D67@icex2.ic.ac.uk> Hi, I've downloaded the windows binary for scipy 0.3.2 and when I try to install (I have activepython 2.4 already installed) it just bombs out with the message 'Python version 2.3 required, which was not found in the registry'. Any ideas? Thanks very much, Dave From rkern at ucsd.edu Fri Jun 10 07:46:23 2005 From: rkern at ucsd.edu (Robert Kern) Date: Fri, 10 Jun 2005 04:46:23 -0700 Subject: [SciPy-user] Problems installing scipy with activepython 2.4 In-Reply-To: <056D32E9B2D93B49B01256A88B3EB218766D67@icex2.ic.ac.uk> References: <056D32E9B2D93B49B01256A88B3EB218766D67@icex2.ic.ac.uk> Message-ID: <42A97D8F.9050108@ucsd.edu> Howey, David A wrote: > Hi, > > I've downloaded the windows binary for scipy 0.3.2 and when I try to > install (I have activepython 2.4 already installed) it just bombs out > with the message 'Python version 2.3 required, which was not found in > the registry'. As the download page notes, the Windows binaries are only for Python 2.3.x and 2.2.x at this time. Extension modules are not compatible across minor releases ("minor" as in major.minor.micro). -- 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 d.howey at imperial.ac.uk Fri Jun 10 09:06:43 2005 From: d.howey at imperial.ac.uk (Howey, David A) Date: Fri, 10 Jun 2005 14:06:43 +0100 Subject: [SciPy-user] Problems installing scipy with activepython 2.4 Message-ID: <056D32E9B2D93B49B01256A88B3EB218766D6A@icex2.ic.ac.uk> Thanks - now sorted with python 2.3 However, a further problem... When I run "from scipy import *" activepython crashes with the result 'the instruction "0x6d3caed9" referenced memory at "0x00000030". The memory could not be "read".' This is indeed a weird one. I hope it's a software rather than hardware (bad memory) problem. Any further thoughts would be appreciated. Dave -----Original Message----- From: scipy-user-bounces at scipy.net [mailto:scipy-user-bounces at scipy.net] On Behalf Of Robert Kern Sent: 10 June 2005 12:46 To: SciPy Users List Subject: Re: [SciPy-user] Problems installing scipy with activepython 2.4 Howey, David A wrote: > Hi, > > I've downloaded the windows binary for scipy 0.3.2 and when I try to > install (I have activepython 2.4 already installed) it just bombs out > with the message 'Python version 2.3 required, which was not found in > the registry'. As the download page notes, the Windows binaries are only for Python 2.3.x and 2.2.x at this time. Extension modules are not compatible across minor releases ("minor" as in major.minor.micro). -- 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 From rkern at ucsd.edu Fri Jun 10 09:33:24 2005 From: rkern at ucsd.edu (Robert Kern) Date: Fri, 10 Jun 2005 06:33:24 -0700 Subject: [SciPy-user] Problems installing scipy with activepython 2.4 In-Reply-To: <056D32E9B2D93B49B01256A88B3EB218766D6A@icex2.ic.ac.uk> References: <056D32E9B2D93B49B01256A88B3EB218766D6A@icex2.ic.ac.uk> Message-ID: <42A996A4.9030807@ucsd.edu> Howey, David A wrote: > Thanks - now sorted with python 2.3 > > However, a further problem... When I run "from scipy import *" > activepython crashes with the result 'the instruction "0x6d3caed9" > referenced memory at "0x00000030". The memory could not be "read".' > > This is indeed a weird one. I hope it's a software rather than hardware > (bad memory) problem. The binaries have been compiled against the standard python.org distribution of the interpreter. It is possible that extensions compiled for the one don't necessarily work on the other, but I'm not sure. The Scipy binaries are compiled using mingw, which I have heard is not necessarily compatible with the latest Microsoft compilers. ActivePython might be built with such a compiler. This is just speculation, of course, and I welcome correction from people who use that platform. -- 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 joe at enthought.com Fri Jun 10 18:19:19 2005 From: joe at enthought.com (Joe Cooper) Date: Fri, 10 Jun 2005 17:19:19 -0500 Subject: [SciPy-user] SciPy intermittently offline tonight Message-ID: <42AA11E7.7060006@enthought.com> Hi all, I will be migrating SciPy.org to a new server tonight (barring problems, in which case it will happen over the weekend). Thus, there will be periods of downtime, possibly as long as an hour or two but more likely a few 5-10 minute periods and one ~30 minute period as each service is shutdown, rsynced and brought back up on the new machine. Please let me know if this will cause any serious hardship for anyone. This will all begin in an hour or so and I'll ping the lists when I believe things are back to normal. BTW-For those of you who have services running on SciPy.org, you will be receiving a new setup email which explains how you can access all of the newly available services (you'll be able to create your own Subversion repos, manage users, create email accounts, mailman mailing lists, etc.). Thanks! From a.bangura1 at physics.ox.ac.uk Sat Jun 11 09:46:41 2005 From: a.bangura1 at physics.ox.ac.uk (Alimamy Bangura) Date: Sat, 11 Jun 2005 14:46:41 +0100 Subject: [SciPy-user] Problems with Scipy on OS X Message-ID: Hi, I hope someone can help me. I have tried to install scipy on a clean install of OS X 10.3. I have the full installation of the Developer tools and followed the instructions at http://www.scipy.org/documentation/Members/fonnesbeck/osx_build.txt I seemed to have successfully installed all the components and I then tried the scipy.test and got this. bangura$ python Python 2.3 (#1, Sep 13 2003, 00:49:11) [GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import scipy >>> from scipy import * >>> t=scipy.test() Fatal Python error: Interpreter not initialized (version mismatch?) Abort trap Any ideas about how to go about fixing this problem. cheers, Ali From zhiwen.chong at elf.mcgill.ca Sat Jun 11 14:04:42 2005 From: zhiwen.chong at elf.mcgill.ca (Zhiwen Chong) Date: Sat, 11 Jun 2005 14:04:42 -0400 Subject: [SciPy-user] Problems with Scipy on OS X In-Reply-To: References: Message-ID: Hi Ali, On 11-Jun-05, at 9:46 AM, Alimamy Bangura wrote: > I have tried to install scipy on a clean install of OS X 10.3. I > have the full installation of the Developer tools and followed the > instructions at http://www.scipy.org/documentation/Members/ > fonnesbeck/osx_build.txt > > I seemed to have successfully installed all the components and I > then tried the scipy.test and got this. > Fatal Python error: Interpreter not initialized (version mismatch?) > Abort trap This might help: http://www.scipy.net/pipermail/scipy-user/2004-March/002661.html Cheers! Zhiwen From d.howey at imperial.ac.uk Mon Jun 13 06:09:48 2005 From: d.howey at imperial.ac.uk (Howey, David A) Date: Mon, 13 Jun 2005 11:09:48 +0100 Subject: [SciPy-user] help! Problems installing scipy Message-ID: <056D32E9B2D93B49B01256A88B3EB218766D6E@icex2.ic.ac.uk> I've just tried installing python 2.3.5 straight (rather than active python) from python.org and I get the same error on running from scipy import *" Please, if anyone has any thoughts (or recommendations for how the heck you get scipy and python to run on windows, easily!) I would love to hear from you Thanks Dave -----Original Message----- From: Howey, David A Sent: 10 June 2005 14:07 To: 'SciPy Users List' Subject: RE: [SciPy-user] Problems installing scipy with activepython 2.4 Thanks - now sorted with python 2.3 However, a further problem... When I run "from scipy import *" activepython crashes with the result 'the instruction "0x6d3caed9" referenced memory at "0x00000030". The memory could not be "read".' This is indeed a weird one. I hope it's a software rather than hardware (bad memory) problem. Any further thoughts would be appreciated. Dave -----Original Message----- From: scipy-user-bounces at scipy.net [mailto:scipy-user-bounces at scipy.net] On Behalf Of Robert Kern Sent: 10 June 2005 12:46 To: SciPy Users List Subject: Re: [SciPy-user] Problems installing scipy with activepython 2.4 Howey, David A wrote: > Hi, > > I've downloaded the windows binary for scipy 0.3.2 and when I try to > install (I have activepython 2.4 already installed) it just bombs out > with the message 'Python version 2.3 required, which was not found in > the registry'. As the download page notes, the Windows binaries are only for Python 2.3.x and 2.2.x at this time. Extension modules are not compatible across minor releases ("minor" as in major.minor.micro). -- 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 From pearu at scipy.org Mon Jun 13 05:15:22 2005 From: pearu at scipy.org (Pearu Peterson) Date: Mon, 13 Jun 2005 04:15:22 -0500 (CDT) Subject: [SciPy-user] help! Problems installing scipy In-Reply-To: <056D32E9B2D93B49B01256A88B3EB218766D6E@icex2.ic.ac.uk> References: <056D32E9B2D93B49B01256A88B3EB218766D6E@icex2.ic.ac.uk> Message-ID: On Mon, 13 Jun 2005, Howey, David A wrote: > I've just tried installing python 2.3.5 straight (rather than active > python) from python.org and I get the same error on running from scipy > import *" > > Please, if anyone has any thoughts (or recommendations for how the heck > you get scipy and python to run on windows, easily!) I would love to > hear from you Instructions in http://www.scipy.org/documentation/buildscipywin32.txt worked for me. Pearu From t.zito at biologie.hu-berlin.de Mon Jun 13 08:15:47 2005 From: t.zito at biologie.hu-berlin.de (Tiziano Zito) Date: Mon, 13 Jun 2005 14:15:47 +0200 Subject: [SciPy-user] ANN: MDP 1.1.0 Message-ID: <20050613121547.GB28566@itb.biologie.hu-berlin.de> MDP 1.1.0 --------- http://mdp-toolkit.sourceforge.net/ Modular toolkit for Data Processing (MDP) is a Python library to perform data processing. Already implemented algorithms include: Principal Component Analysis (PCA), Independent Component Analysis (ICA), Slow Feature Analysis (SFA), and Growing Neural Gas (GNG). MDP allows to combine different algorithms and other data processing elements (nodes) into data processing sequences (flows). Moreover, it provides a framework that makes the implementation of new algorithms easy and intuitive. MDP supports the most common numerical extensions to Python, currently Numeric, Numarray, SciPy. When used together with SciPy and the symeig package, MDP gives to the scientific programmer the full power of well-known C and FORTRAN data processing libraries. MDP helps the programmer to exploit Python object oriented design with C and FORTRAN efficiency. MDP has been written for research in neuroscience, but it has been designed to be helpful in any context where trainable data processing algorithms are used. Its simplicity on the user side together with the reusability of the implemented nodes could make it also a valid educational tool. Requirements: * Python >= 2.3 * one of the following Python numerical extensions: Numeric, Numarray, or SciPy. For optimal performance we recommend to use SciPy with LAPACK and ATLAS libraries, and to install the symeig module. Most important changes since version 1.1.0: - MDP now runs with Numeric or Numarray. Of course we still recommend SciPy for maximal performance. - Migration to new-style classes. - Flow are now container type objects and share many methods with built-in list objects. - A comprehensive tutorial has been written, that should introduce the novice to basic and advanced features of the package. - Refactoring and cleaning up. - symeig is now distributed as an independent package (no compilation is needed to install MDP). (sorry for multiple posting) -- Tiziano Zito Institute for Theoretical Biology Humboldt-Universitaet zu Berlin Invalidenstrasse, 43 D-10115 Berlin, Germany http://itb.biologie.hu-berlin.de/~zito/ From ryanfedora at comcast.net Mon Jun 13 11:04:22 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Mon, 13 Jun 2005 11:04:22 -0400 Subject: [SciPy-user] symbolic variables Message-ID: <42ADA076.9080403@comcast.net> Is there a way within SciPy to do symbolic math - sort of like the symbolic toolbox of Matlab that interfaces with Maple? I need to be able to work with matrices that have at least one symbolic variable in them. Most of the time, all of the variables will be assigned numeric values, but occasionally I need symbolic output. It would be great not to have to do all of this twice in two different pieces of software - one for numeric and one for symbolic. If this can't be done in SciPy, can anyone recommend a good symbolic program that can do matrices? Thanks, Ryan From rkern at ucsd.edu Mon Jun 13 15:17:41 2005 From: rkern at ucsd.edu (Robert Kern) Date: Mon, 13 Jun 2005 12:17:41 -0700 Subject: [SciPy-user] symbolic variables In-Reply-To: <42ADA076.9080403@comcast.net> References: <42ADA076.9080403@comcast.net> Message-ID: <42ADDBD5.7010106@ucsd.edu> Ryan Krauss wrote: > Is there a way within SciPy to do symbolic math - sort of like the > symbolic toolbox of Matlab that interfaces with Maple? > > I need to be able to work with matrices that have at least one symbolic > variable in them. Most of the time, all of the variables will be > assigned numeric values, but occasionally I need symbolic output. It > would be great not to have to do all of this twice in two different > pieces of software - one for numeric and one for symbolic. No, Scipy does not have any symbolic capabilities. Pearu does have Python bindings to GiNaC (PyGiNaC), but I believe it is unmaintained at this time. > If this can't be done in SciPy, can anyone recommend a good symbolic > program that can do matrices? I usually use Maxima when I have to do such things. YACAS might also do what you need. -- 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 aisaac at american.edu Mon Jun 13 23:38:32 2005 From: aisaac at american.edu (Alan G Isaac) Date: Mon, 13 Jun 2005 23:38:32 -0400 (Eastern Daylight Time) Subject: [SciPy-user] symbolic variables In-Reply-To: <42ADDBD5.7010106@ucsd.edu> References: <42ADA076.9080403@comcast.net><42ADDBD5.7010106@ucsd.edu> Message-ID: On Mon, 13 Jun 2005, Robert Kern apparently wrote: > I usually use Maxima when I have to do such things. YACAS might also do > what you need. Axiom also sounds promising: http://page.axiom-developer.org/zope/mathaction/FrontPage fwiw, Alan Isaac From gruben at bigpond.net.au Tue Jun 14 01:21:59 2005 From: gruben at bigpond.net.au (Gary Ruben) Date: Tue, 14 Jun 2005 15:21:59 +1000 Subject: [SciPy-user] symbolic variables In-Reply-To: References: <42ADA076.9080403@comcast.net><42ADDBD5.7010106@ucsd.edu> Message-ID: <42AE6977.5080706@bigpond.net.au> Another possibility is the free version of MuPAD for Windows and Linux users; MuPAD Light from here: http://www.mupad.de/download.html Personally, I'd recommend Maxima over it though. Gary R. Alan G Isaac wrote: > On Mon, 13 Jun 2005, Robert Kern apparently wrote: > >>I usually use Maxima when I have to do such things. YACAS might also do >>what you need. > > > Axiom also sounds promising: > http://page.axiom-developer.org/zope/mathaction/FrontPage > > fwiw, > Alan Isaac From ryanfedora at comcast.net Tue Jun 14 06:40:16 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Tue, 14 Jun 2005 06:40:16 -0400 Subject: [SciPy-user] symbolic variables In-Reply-To: <42AE6977.5080706@bigpond.net.au> References: <42ADA076.9080403@comcast.net><42ADDBD5.7010106@ucsd.edu> <42AE6977.5080706@bigpond.net.au> Message-ID: <42AEB410.7030006@comcast.net> I have had some success with MuPAD in the past, but was hoping for something Python based. Thanks for your thoughts. Ryan Gary Ruben wrote: > Another possibility is the free version of MuPAD for Windows and Linux > users; MuPAD Light from here: > http://www.mupad.de/download.html > > Personally, I'd recommend Maxima over it though. > > Gary R. > > Alan G Isaac wrote: > >> On Mon, 13 Jun 2005, Robert Kern apparently wrote: >> >>> I usually use Maxima when I have to do such things. YACAS might also >>> do what you need. >> >> >> >> Axiom also sounds promising: >> http://page.axiom-developer.org/zope/mathaction/FrontPage >> >> fwiw, >> Alan Isaac > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From bryan.cole at teraview.com Tue Jun 14 06:47:12 2005 From: bryan.cole at teraview.com (Bryan Cole) Date: Tue, 14 Jun 2005 11:47:12 +0100 Subject: [SciPy-user] compiling SciPy with gcc-4.0 Message-ID: Anyone know if this is possible? (i.e. using gfortran / f95, rather than g77). Bryan From Jim.Vickroy at noaa.gov Tue Jun 14 12:36:08 2005 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue, 14 Jun 2005 10:36:08 -0600 Subject: [SciPy-user] symbolic variables In-Reply-To: <42AEB410.7030006@comcast.net> References: <42ADA076.9080403@comcast.net> <42ADDBD5.7010106@ucsd.edu> <42AE6977.5080706@bigpond.net.au> <42AEB410.7030006@comcast.net> Message-ID: <42AF0778.7070804@noaa.gov> Apologies if this has already been mentioned ... http://home.arcor.de/mulk/projects/mascyma/index.xhtml.en which is a frontend for MAXIMA (http://maxima.sourceforge.net/) Don't know anything about it though. -- jv Ryan Krauss wrote: > I have had some success with MuPAD in the past, but was hoping for > something Python based. Thanks for your thoughts. > > Ryan > > Gary Ruben wrote: > >> Another possibility is the free version of MuPAD for Windows and >> Linux users; MuPAD Light from here: >> http://www.mupad.de/download.html >> >> Personally, I'd recommend Maxima over it though. >> >> Gary R. >> >> Alan G Isaac wrote: >> >>> On Mon, 13 Jun 2005, Robert Kern apparently wrote: >>> >>>> I usually use Maxima when I have to do such things. YACAS might >>>> also do what you need. >>> >>> >>> >>> >>> Axiom also sounds promising: >>> http://page.axiom-developer.org/zope/mathaction/FrontPage >>> >>> fwiw, >>> Alan Isaac >> >> >> >> _______________________________________________ >> 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 Fernando.Perez at colorado.edu Tue Jun 14 15:08:15 2005 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Tue, 14 Jun 2005 13:08:15 -0600 Subject: [SciPy-user] special.round(10.5) [was: Installing SciPy on Mac OS X Tiger] In-Reply-To: <42A7786A.50207@ucsd.edu> References: <2418CFC0-F952-4AD4-A70B-4BAC076748AF@elf.mcgill.ca> <42A75D6D.1000104@ucsd.edu> <0E87D5DA-3ABE-4167-B942-6C5B785A4A94@elf.mcgill.ca> <42A7786A.50207@ucsd.edu> Message-ID: <42AF2B1F.1060401@colorado.edu> Robert Kern wrote: > It's an incorrect test, I believe. > > Other devs: special.round() has different behavior than scipy.round() > (which is just an alias to Numeric.around()). > > In [15]:scipy.round(10.5) > Out[15]:11.0 > > In [16]:scipy.round(11.5) > Out[16]:12.0 > > In [17]:scipy.special.round(10.5) > Out[17]:10.0 > > In [18]:scipy.special.round(11.5) > Out[18]:12.0 > > I submit that "round-to-nearest-even" is desirable (and in any case > comes part and parcel with using the cephes implementation), and we > should adjust our test case accordingly. > > Or rather, I already have. Have you? With a fresh CVS checkout, I still get this: ====================================================================== FAIL: check_round (scipy.special.basic.test_basic.test_round) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/scipy/special/tests/test_basic.py", line 1789, in check_round assert_array_equal(rnd,rndrl) File "/usr/lib/python2.3/site-packages/scipy_test/testing.py", line 715, in assert_array_equal assert cond,\ AssertionError: Arrays are not equal (mismatch 25.0%): Array 1: [10 10 11 11] Array 2: [10 10 10 11] ---------------------------------------------------------------------- Ran 1279 tests in 80.186s FAILED (failures=1) I was running with a clean checkout to see if my other weave-related changes didn't break anything, before I think about committing them. It seems my stuff is OK, as this (not weave-related) remains the only failure after a level 10 test. Cheers, f From rkern at ucsd.edu Tue Jun 14 16:02:43 2005 From: rkern at ucsd.edu (Robert Kern) Date: Tue, 14 Jun 2005 13:02:43 -0700 Subject: [SciPy-user] special.round(10.5) [was: Installing SciPy on Mac OS X Tiger] In-Reply-To: <42AF2B1F.1060401@colorado.edu> References: <2418CFC0-F952-4AD4-A70B-4BAC076748AF@elf.mcgill.ca> <42A75D6D.1000104@ucsd.edu> <0E87D5DA-3ABE-4167-B942-6C5B785A4A94@elf.mcgill.ca> <42A7786A.50207@ucsd.edu> <42AF2B1F.1060401@colorado.edu> Message-ID: <42AF37E3.5050300@ucsd.edu> Fernando Perez wrote: > Robert Kern wrote: > >> It's an incorrect test, I believe. >> >> Other devs: special.round() has different behavior than scipy.round() >> (which is just an alias to Numeric.around()). >> >> In [15]:scipy.round(10.5) >> Out[15]:11.0 >> >> In [16]:scipy.round(11.5) >> Out[16]:12.0 >> >> In [17]:scipy.special.round(10.5) >> Out[17]:10.0 >> >> In [18]:scipy.special.round(11.5) >> Out[18]:12.0 >> >> I submit that "round-to-nearest-even" is desirable (and in any case >> comes part and parcel with using the cephes implementation), and we >> should adjust our test case accordingly. >> >> Or rather, I already have. > > Have you? With a fresh CVS checkout, I still get this: > > ====================================================================== > FAIL: check_round (scipy.special.basic.test_basic.test_round) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/usr/lib/python2.3/site-packages/scipy/special/tests/test_basic.py", > line 1789, in check_round > assert_array_equal(rnd,rndrl) > File "/usr/lib/python2.3/site-packages/scipy_test/testing.py", line > 715, in assert_array_equal > assert cond,\ > AssertionError: > Arrays are not equal (mismatch 25.0%): > Array 1: [10 10 11 11] > Array 2: [10 10 10 11] Yes, it's been checked in. However, it appears that on your machine, scipy.special.round(10.5) == 11. Bugger. Can you give me the repr(scipy.special.round) like this: In [1]: scipy.special.round Out[1]: -- 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 Fernando.Perez at colorado.edu Tue Jun 14 17:00:27 2005 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Tue, 14 Jun 2005 15:00:27 -0600 Subject: [SciPy-user] special.round(10.5) [was: Installing SciPy on Mac OS X Tiger] In-Reply-To: <42AF37E3.5050300@ucsd.edu> References: <2418CFC0-F952-4AD4-A70B-4BAC076748AF@elf.mcgill.ca> <42A75D6D.1000104@ucsd.edu> <0E87D5DA-3ABE-4167-B942-6C5B785A4A94@elf.mcgill.ca> <42A7786A.50207@ucsd.edu> <42AF2B1F.1060401@colorado.edu> <42AF37E3.5050300@ucsd.edu> Message-ID: <42AF456B.4000106@colorado.edu> Robert Kern wrote: > Yes, it's been checked in. However, it appears that on your machine, > scipy.special.round(10.5) == 11. Bugger. Can you give me the > repr(scipy.special.round) like this: > > In [1]: scipy.special.round > Out[1]: Yup: In [8]: scipy.special.round Out[8]: In [9]: scipy.special.round(10.5) Out[9]: 11.0 calderon[~]> uname -a Linux calderon.colorado.edu 2.6.10-1.741_FC3 #1 Thu Jan 13 16:38:22 EST 2005 i686 i686 i386 GNU/Linux calderon[~]> python -V Python 2.3.4 What should we do here? f From rkern at ucsd.edu Tue Jun 14 17:25:27 2005 From: rkern at ucsd.edu (Robert Kern) Date: Tue, 14 Jun 2005 14:25:27 -0700 Subject: [SciPy-user] special.round(10.5) [was: Installing SciPy on Mac OS X Tiger] In-Reply-To: <42AF456B.4000106@colorado.edu> References: <2418CFC0-F952-4AD4-A70B-4BAC076748AF@elf.mcgill.ca> <42A75D6D.1000104@ucsd.edu> <0E87D5DA-3ABE-4167-B942-6C5B785A4A94@elf.mcgill.ca> <42A7786A.50207@ucsd.edu> <42AF2B1F.1060401@colorado.edu> <42AF37E3.5050300@ucsd.edu> <42AF456B.4000106@colorado.edu> Message-ID: <42AF4B47.1050305@ucsd.edu> Fernando Perez wrote: > Robert Kern wrote: > >> Yes, it's been checked in. However, it appears that on your machine, >> scipy.special.round(10.5) == 11. Bugger. Can you give me the >> repr(scipy.special.round) like this: >> >> In [1]: scipy.special.round >> Out[1]: > > > Yup: > > In [8]: scipy.special.round > Out[8]: > > In [9]: scipy.special.round(10.5) > Out[9]: 11.0 > > calderon[~]> uname -a > Linux calderon.colorado.edu 2.6.10-1.741_FC3 #1 Thu Jan 13 16:38:22 EST > 2005 i686 i686 i386 GNU/Linux > > calderon[~]> python -V > Python 2.3.4 > > What should we do here? Figure out why cephes' round doesn't behave as documented on your machine. In [1]: scipy.special.round? Type: ufunc String Form: Namespace: Interactive Docstring: y=Returns the nearest integer to x as a double precision floating point result. If x ends in 0.5 exactly, the nearest even integer is chosen. Can you compile the attached C program and give the results (you might need -lm to link)? On my Mac, I get: [~] kern$ ./testround 10.4 -> 10 10.5 -> 10 10.6 -> 11 11.4 -> 11 11.5 -> 12 11.6 -> 12 -- 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 -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: testround.c URL: From nvf at MIT.EDU Tue Jun 14 17:35:46 2005 From: nvf at MIT.EDU (Nickolas Fotopoulos) Date: Tue, 14 Jun 2005 17:35:46 -0400 (EDT) Subject: [SciPy-user] scipy.io.loadmat bug? Message-ID: There are parts of a Matlab pipeline I don't want to port to Python, but I'd like to use Python for some post-processing. I am trying to load a MatlabR14-generated .mat file into python using scipy.io.loadmat. With the following code: from scipy.io import loadmat loadmat('H1H2_DARM_ERR_avetfcoh.mat') I get the following error: Traceback (most recent call last): File "mattest.py", line 2, in ? loadmat('H1H2_DARM_ERR_avetfcoh.mat') File "/usr/lib/python2.3/site-packages/scipy/io/mio.py", line 692, in loadmat thisdict = _loadv5(fid,basename) File "/usr/lib/python2.3/site-packages/scipy/io/mio.py", line 631, in _loadv5 el, varname = _get_element(fid) File "/usr/lib/python2.3/site-packages/scipy/io/mio.py", line 611, in _get_element raise ValueError, "Unknown data type: %d" % raw_tag ValueError: Unknown data type: 15 (I modified mio.py to return the value of raw_tag in the ValueError exception.) I've verified that my MAT file opens in matlab and it has the following header (copied and pasted from the first line of 'less H1H2_DARM_ERR_avetfcoh.mat'): MATLAB 5.0 MAT-file, Platform: GLNX86, Created on: Thu Jun 9 17:38:55 2005 Digging into the Mathworks documentation on the MAT-file format, I see that data type 15 (in the last line of the Traceback) stands for Compressed data, which the mio.py source code claims to support, but yet lacks handling for data type 15 (it stops at 14). It uses some other criterion for determining that a file is compressed. Does anyone know anything more on this subject? Is this a bug or has MatlabR14 just decided to change the rules of that game? MAT-file specification: http://www.mathworks.com/access/helpdesk/help/pdf_doc/matlab/matfile_format.pdf Any help would be appreciated. Thanks. Take care, Nick From Fernando.Perez at colorado.edu Tue Jun 14 17:47:29 2005 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Tue, 14 Jun 2005 15:47:29 -0600 Subject: [SciPy-user] special.round(10.5) [was: Installing SciPy on Mac OS X Tiger] In-Reply-To: <42AF4B47.1050305@ucsd.edu> References: <2418CFC0-F952-4AD4-A70B-4BAC076748AF@elf.mcgill.ca> <42A75D6D.1000104@ucsd.edu> <0E87D5DA-3ABE-4167-B942-6C5B785A4A94@elf.mcgill.ca> <42A7786A.50207@ucsd.edu> <42AF2B1F.1060401@colorado.edu> <42AF37E3.5050300@ucsd.edu> <42AF456B.4000106@colorado.edu> <42AF4B47.1050305@ucsd.edu> Message-ID: <42AF5071.4030503@colorado.edu> Robert Kern wrote: >>What should we do here? > > > Figure out why cephes' round doesn't behave as documented on your machine. > > In [1]: scipy.special.round? > Type: ufunc > String Form: > Namespace: Interactive > Docstring: > y=Returns the nearest integer to x as a double precision > floating point result. If x ends in 0.5 exactly, the > nearest even integer is chosen. > > Can you compile the attached C program and give the results (you might > need -lm to link)? On my Mac, I get: > > [~] kern$ ./testround > 10.4 -> 10 > 10.5 -> 10 > 10.6 -> 11 > 11.4 -> 11 > 11.5 -> 12 > 11.6 -> 12 calderon[round]> gcc -lm testround.c -o testround calderon[round]> ./testround 10.4 -> 10 10.5 -> 10 10.6 -> 11 11.4 -> 11 11.5 -> 12 11.6 -> 12 Same as on yours... This is gcc on my box: calderon[round]> gcc --version gcc (GCC) 3.4.3 20050227 (Red Hat 3.4.3-22.fc3) Copyright (C) 2004 Free Software Foundation, Inc. Well, I'll live with that failure for now. I just had a hard disk die, so I'm going to have to deal with that. BTW, if you have any complaints on my patch from this morning, let me know. Otherwise, I can commit all that later. I also fixed all the spurious gcc warnings which were being caused by blitz/array.h showing up before Python.h in the weave-generated sources. At python-dev, they pointed me to the refs where they sternly warn against any header pulling in system headers before Python.h. I fixed the weave header-generation code and also fastumath.c by hand to avoid this. If you're OK, I can commit all that later. Cheers, f From rkern at ucsd.edu Tue Jun 14 18:34:26 2005 From: rkern at ucsd.edu (Robert Kern) Date: Tue, 14 Jun 2005 15:34:26 -0700 Subject: [SciPy-user] special.round(10.5) [was: Installing SciPy on Mac OS X Tiger] In-Reply-To: <42AF5071.4030503@colorado.edu> References: <2418CFC0-F952-4AD4-A70B-4BAC076748AF@elf.mcgill.ca> <42A75D6D.1000104@ucsd.edu> <0E87D5DA-3ABE-4167-B942-6C5B785A4A94@elf.mcgill.ca> <42A7786A.50207@ucsd.edu> <42AF2B1F.1060401@colorado.edu> <42AF37E3.5050300@ucsd.edu> <42AF456B.4000106@colorado.edu> <42AF4B47.1050305@ucsd.edu> <42AF5071.4030503@colorado.edu> Message-ID: <42AF5B72.3040600@ucsd.edu> Fernando Perez wrote: > BTW, if you have any complaints on my patch from this morning, let me > know. Otherwise, I can commit all that later. I also fixed all the > spurious gcc warnings which were being caused by blitz/array.h showing > up before Python.h in the weave-generated sources. At python-dev, they > pointed me to the refs where they sternly warn against any header > pulling in system headers before Python.h. I fixed the weave > header-generation code and also fastumath.c by hand to avoid this. > > If you're OK, I can commit all that later. The patch looks fine to me, but I don't have any deep experience with the code in question. Also, yes, Python.h before any other header is the right thing to do. -- 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 yichunwe at usc.edu Wed Jun 15 15:36:06 2005 From: yichunwe at usc.edu (Yichun Wei) Date: Wed, 15 Jun 2005 12:36:06 -0700 Subject: [SciPy-user] Enthought Python, build 1069, atlas? In-Reply-To: <20050614190319.05CF83EB83@www.scipy.com> References: <20050614190319.05CF83EB83@www.scipy.com> Message-ID: <42B08326.80200@usc.edu> Hello List, I'm using enthought python 1069 build downloaded from enthought. One thing I am wondering about is whether or not I need to install (or compile) an atlas for it. python scipy_distutils/system_info.py shows as follows, seems it does not find any atlas library: - yichun _pkg_config_info: Could not locate executable pkg-config File not found: pkg-config. Cannot determine None info. NOT AVAILABLE agg2_info: ( src_dirs = . ) NOT AVAILABLE atlas_blas_info: ( library_dirs = c:\Python23\lib:C:\ ) NOT AVAILABLE atlas_blas_threads_info: Setting PTATLAS=ATLAS ( library_dirs = c:\Python23\lib:C:\ ) NOT AVAILABLE atlas_info: ( library_dirs = c:\Python23\lib:C:\ ) system_info.atlas_info NOT AVAILABLE atlas_threads_info: Setting PTATLAS=ATLAS ( library_dirs = c:\Python23\lib:C:\ ) system_info.atlas_threads_info NOT AVAILABLE blas_info: ( library_dirs = c:\Python23\lib:C:\ ) NOT AVAILABLE blas_opt_info: c:\Python23\Lib\site-packages\scipy_distutils\system_info.py:1035: UserWarning: Atlas (http://math-atlas.sourceforge.net/) libraries not found. Directories to search for the libraries can be specified in the scipy_distutils/site.cfg file (section [atlas]) or by setting the ATLAS environment variable. warnings.warn(AtlasNotFoundError.__doc__) c:\Python23\Lib\site-packages\scipy_distutils\system_info.py:1044: UserWarning: Blas (http://www.netlib.org/blas/) libraries not found. Directories to search for the libraries can be specified in the scipy_distutils/site.cfg file (section [blas]) or by setting the BLAS environment variable. warnings.warn(BlasNotFoundError.__doc__) blas_src_info: NOT AVAILABLE c:\Python23\Lib\site-packages\scipy_distutils\system_info.py:1047: UserWarning: Blas (http://www.netlib.org/blas/) sources not found. Directories to search for the sources can be specified in the scipy_distutils/site.cfg file (section [blas_src]) or by setting the BLAS_SRC environment variable. warnings.warn(BlasSrcNotFoundError.__doc__) NOT AVAILABLE boost_python_info: ( src_dirs = . ) NOT AVAILABLE dfftw_info: ( library_dirs = c:\Python23\lib:C:\ ) ( include_dirs = c:\Python23\include ) NOT AVAILABLE dfftw_threads_info: ( library_dirs = c:\Python23\lib:C:\ ) ( include_dirs = c:\Python23\include ) NOT AVAILABLE djbfft_info: ( library_dirs = c:\Python23\lib:C:\ ) ( include_dirs = c:\Python23\include ) NOT AVAILABLE fftw_info: ( library_dirs = c:\Python23\lib:C:\ ) ( include_dirs = c:\Python23\include ) NOT AVAILABLE fftw_threads_info: ( library_dirs = c:\Python23\lib:C:\ ) ( include_dirs = c:\Python23\include ) NOT AVAILABLE freetype2_info: Could not locate executable pkg-config File not found: pkg-config. Cannot determine freetype2 info. NOT AVAILABLE gdk_2_info: Could not locate executable pkg-config File not found: pkg-config. Cannot determine gdk_2 info. NOT AVAILABLE gdk_info: Could not locate executable pkg-config File not found: pkg-config. Cannot determine gdk info. NOT AVAILABLE gdk_pixbuf_2_info: Could not locate executable pkg-config File not found: pkg-config. Cannot determine gdk_pixbuf_2 info. NOT AVAILABLE gdk_pixbuf_xlib_2_info: Could not locate executable pkg-config File not found: pkg-config. Cannot determine gdk_pixbuf_xlib_2 info. NOT AVAILABLE gdk_x11_2_info: Could not locate executable pkg-config File not found: pkg-config. Cannot determine gdk_x11_2 info. NOT AVAILABLE gtkp_2_info: Could not locate executable pkg-config File not found: pkg-config. Cannot determine gtkp_2 info. NOT AVAILABLE gtkp_x11_2_info: Could not locate executable pkg-config File not found: pkg-config. Cannot determine gtkp_x11_2 info. NOT AVAILABLE lapack_atlas_info: ( library_dirs = c:\Python23\lib:C:\ ) system_info.lapack_atlas_info NOT AVAILABLE lapack_atlas_threads_info: Setting PTATLAS=ATLAS ( library_dirs = c:\Python23\lib:C:\ ) system_info.lapack_atlas_threads_info NOT AVAILABLE lapack_info: ( library_dirs = c:\Python23\lib:C:\ ) NOT AVAILABLE lapack_opt_info: c:\Python23\Lib\site-packages\scipy_distutils\system_info.py:963: UserWarning: Atlas (http://math-atlas.sourceforge.net/) libraries not found. Directories to search for the libraries can be specified in the scipy_distutils/site.cfg file (section [atlas]) or by setting the ATLAS environment variable. warnings.warn(AtlasNotFoundError.__doc__) c:\Python23\Lib\site-packages\scipy_distutils\system_info.py:974: UserWarning: Lapack (http://www.netlib.org/lapack/) libraries not found. Directories to search for the libraries can be specified in the scipy_distutils/site.cfg file (section [lapack]) or by setting the LAPACK environment variable. warnings.warn(LapackNotFoundError.__doc__) lapack_src_info: NOT AVAILABLE c:\Python23\Lib\site-packages\scipy_distutils\system_info.py:977: UserWarning: Lapack (http://www.netlib.org/lapack/) sources not found. Directories to search for the sources can be specified in the scipy_distutils/site.cfg file (section [lapack_src]) or by setting the LAPACK_SRC environment variable. warnings.warn(LapackSrcNotFoundError.__doc__) NOT AVAILABLE numarray_info: NOT AVAILABLE numpy_info: ( include_dirs = c:\Python23\include ) ( paths: c:\Python23\include\Numeric\arrayobject.h ) ( library_dirs = ) FOUND: define_macros = [('NUMERIC_VERSION', '"\\"23.8\\""')] include_dirs = ['c:\\Python23\\include'] sfftw_info: ( library_dirs = c:\Python23\lib:C:\ ) ( include_dirs = c:\Python23\include ) NOT AVAILABLE sfftw_threads_info: ( library_dirs = c:\Python23\lib:C:\ ) ( include_dirs = c:\Python23\include ) NOT AVAILABLE wx_info: Could not locate executable wx-config File not found: wx-config. Cannot determine wx info. NOT AVAILABLE x11_info: NOT AVAILABLE xft_info: Could not locate executable pkg-config File not found: pkg-config. Cannot determine xft info. NOT AVAILABLE From joe at enthought.com Wed Jun 15 16:16:03 2005 From: joe at enthought.com (Joe Cooper) Date: Wed, 15 Jun 2005 15:16:03 -0500 Subject: [SciPy-user] Enthought Python, build 1069, atlas? In-Reply-To: <42B08326.80200@usc.edu> References: <20050614190319.05CF83EB83@www.scipy.com> <42B08326.80200@usc.edu> Message-ID: <42B08C83.7020805@enthought.com> Hi Yichun, Atlas is not included in the the Enthought Edition Python. SciPy and most other components that support it, are built using atlas, but the libraries/headers themselves are not included. It's a difficult project to distribute (and to use for building in general) because its performance is closely tied to the platform it is built on. Most folks using the Enthought Edition Python are not building software, but want an "everything I need is already built, so I just write in Python" package, so I've never had a request to include it and it would be difficult to convince me to include it. ;-) It's probably best if you do build your own atlas, if you're building software that depends on it. The Atlas developers seem to believe very strongly that a tuned atlas can make huge differences in the performance of the software you build. Yichun Wei wrote: > Hello List, > > I'm using enthought python 1069 build downloaded from enthought. One > thing I am wondering about is whether or not I need to install (or > compile) an atlas for it. > > python scipy_distutils/system_info.py shows as follows, seems it does > not find any atlas library: > > - yichun > > _pkg_config_info: > Could not locate executable pkg-config > File not found: pkg-config. Cannot determine None info. > NOT AVAILABLE > > agg2_info: > ( src_dirs = . ) > NOT AVAILABLE > > atlas_blas_info: > ( library_dirs = c:\Python23\lib:C:\ ) > NOT AVAILABLE > > atlas_blas_threads_info: > Setting PTATLAS=ATLAS > ( library_dirs = c:\Python23\lib:C:\ ) > NOT AVAILABLE > > atlas_info: > ( library_dirs = c:\Python23\lib:C:\ ) > system_info.atlas_info > NOT AVAILABLE > > atlas_threads_info: > Setting PTATLAS=ATLAS > ( library_dirs = c:\Python23\lib:C:\ ) > system_info.atlas_threads_info > NOT AVAILABLE > > blas_info: > ( library_dirs = c:\Python23\lib:C:\ ) > NOT AVAILABLE > > blas_opt_info: > c:\Python23\Lib\site-packages\scipy_distutils\system_info.py:1035: > UserWarning: > > Atlas (http://math-atlas.sourceforge.net/) libraries not found. > Directories to search for the libraries can be specified in the > scipy_distutils/site.cfg file (section [atlas]) or by setting > the ATLAS environment variable. > warnings.warn(AtlasNotFoundError.__doc__) > c:\Python23\Lib\site-packages\scipy_distutils\system_info.py:1044: > UserWarning: > > Blas (http://www.netlib.org/blas/) libraries not found. > Directories to search for the libraries can be specified in the > scipy_distutils/site.cfg file (section [blas]) or by setting > the BLAS environment variable. > warnings.warn(BlasNotFoundError.__doc__) > blas_src_info: > NOT AVAILABLE > > c:\Python23\Lib\site-packages\scipy_distutils\system_info.py:1047: > UserWarning: > > Blas (http://www.netlib.org/blas/) sources not found. > Directories to search for the sources can be specified in the > scipy_distutils/site.cfg file (section [blas_src]) or by setting > the BLAS_SRC environment variable. > warnings.warn(BlasSrcNotFoundError.__doc__) > NOT AVAILABLE > > boost_python_info: > ( src_dirs = . ) > NOT AVAILABLE > > dfftw_info: > ( library_dirs = c:\Python23\lib:C:\ ) > ( include_dirs = c:\Python23\include ) > NOT AVAILABLE > > dfftw_threads_info: > ( library_dirs = c:\Python23\lib:C:\ ) > ( include_dirs = c:\Python23\include ) > NOT AVAILABLE > > djbfft_info: > ( library_dirs = c:\Python23\lib:C:\ ) > ( include_dirs = c:\Python23\include ) > NOT AVAILABLE > > fftw_info: > ( library_dirs = c:\Python23\lib:C:\ ) > ( include_dirs = c:\Python23\include ) > NOT AVAILABLE > > fftw_threads_info: > ( library_dirs = c:\Python23\lib:C:\ ) > ( include_dirs = c:\Python23\include ) > NOT AVAILABLE > > freetype2_info: > Could not locate executable pkg-config > File not found: pkg-config. Cannot determine freetype2 info. > NOT AVAILABLE > > gdk_2_info: > Could not locate executable pkg-config > File not found: pkg-config. Cannot determine gdk_2 info. > NOT AVAILABLE > > gdk_info: > Could not locate executable pkg-config > File not found: pkg-config. Cannot determine gdk info. > NOT AVAILABLE > > gdk_pixbuf_2_info: > Could not locate executable pkg-config > File not found: pkg-config. Cannot determine gdk_pixbuf_2 info. > NOT AVAILABLE > > gdk_pixbuf_xlib_2_info: > Could not locate executable pkg-config > File not found: pkg-config. Cannot determine gdk_pixbuf_xlib_2 info. > NOT AVAILABLE > > gdk_x11_2_info: > Could not locate executable pkg-config > File not found: pkg-config. Cannot determine gdk_x11_2 info. > NOT AVAILABLE > > gtkp_2_info: > Could not locate executable pkg-config > File not found: pkg-config. Cannot determine gtkp_2 info. > NOT AVAILABLE > > gtkp_x11_2_info: > Could not locate executable pkg-config > File not found: pkg-config. Cannot determine gtkp_x11_2 info. > NOT AVAILABLE > > lapack_atlas_info: > ( library_dirs = c:\Python23\lib:C:\ ) > system_info.lapack_atlas_info > NOT AVAILABLE > > lapack_atlas_threads_info: > Setting PTATLAS=ATLAS > ( library_dirs = c:\Python23\lib:C:\ ) > system_info.lapack_atlas_threads_info > NOT AVAILABLE > > lapack_info: > ( library_dirs = c:\Python23\lib:C:\ ) > NOT AVAILABLE > > lapack_opt_info: > c:\Python23\Lib\site-packages\scipy_distutils\system_info.py:963: > UserWarning: > Atlas (http://math-atlas.sourceforge.net/) libraries not found. > Directories to search for the libraries can be specified in the > scipy_distutils/site.cfg file (section [atlas]) or by setting > the ATLAS environment variable. > warnings.warn(AtlasNotFoundError.__doc__) > c:\Python23\Lib\site-packages\scipy_distutils\system_info.py:974: > UserWarning: > Lapack (http://www.netlib.org/lapack/) libraries not found. > Directories to search for the libraries can be specified in the > scipy_distutils/site.cfg file (section [lapack]) or by setting > the LAPACK environment variable. > warnings.warn(LapackNotFoundError.__doc__) > lapack_src_info: > NOT AVAILABLE > > c:\Python23\Lib\site-packages\scipy_distutils\system_info.py:977: > UserWarning: > Lapack (http://www.netlib.org/lapack/) sources not found. > Directories to search for the sources can be specified in the > scipy_distutils/site.cfg file (section [lapack_src]) or by setting > the LAPACK_SRC environment variable. > warnings.warn(LapackSrcNotFoundError.__doc__) > NOT AVAILABLE > > numarray_info: > NOT AVAILABLE > > numpy_info: > ( include_dirs = c:\Python23\include ) > ( paths: c:\Python23\include\Numeric\arrayobject.h ) > ( library_dirs = ) > FOUND: > define_macros = [('NUMERIC_VERSION', '"\\"23.8\\""')] > include_dirs = ['c:\\Python23\\include'] > > sfftw_info: > ( library_dirs = c:\Python23\lib:C:\ ) > ( include_dirs = c:\Python23\include ) > NOT AVAILABLE > > sfftw_threads_info: > ( library_dirs = c:\Python23\lib:C:\ ) > ( include_dirs = c:\Python23\include ) > NOT AVAILABLE > > wx_info: > Could not locate executable wx-config > File not found: wx-config. Cannot determine wx info. > NOT AVAILABLE > > x11_info: > NOT AVAILABLE > > xft_info: > Could not locate executable pkg-config > File not found: pkg-config. Cannot determine xft info. > NOT AVAILABLE > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From rkern at ucsd.edu Wed Jun 15 16:26:57 2005 From: rkern at ucsd.edu (Robert Kern) Date: Wed, 15 Jun 2005 13:26:57 -0700 Subject: [SciPy-user] Enthought Python, build 1069, atlas? In-Reply-To: <42B08C83.7020805@enthought.com> References: <20050614190319.05CF83EB83@www.scipy.com> <42B08326.80200@usc.edu> <42B08C83.7020805@enthought.com> Message-ID: <42B08F11.5070706@ucsd.edu> Joe Cooper wrote: > Hi Yichun, > > Atlas is not included in the the Enthought Edition Python. SciPy and > most other components that support it, are built using atlas, but the > libraries/headers themselves are not included. It's a difficult project > to distribute (and to use for building in general) because its > performance is closely tied to the platform it is built on. Most folks > using the Enthought Edition Python are not building software, but want > an "everything I need is already built, so I just write in Python" > package, so I've never had a request to include it and it would be > difficult to convince me to include it. ;-) > > It's probably best if you do build your own atlas, if you're building > software that depends on it. The Atlas developers seem to believe very > strongly that a tuned atlas can make huge differences in the performance > of the software you build. There are binaries available if you can live with the slightly out-of-tune: http://www.scipy.org/download/atlasbinaries/winnt/ -- 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 joe at enthought.com Wed Jun 15 18:28:18 2005 From: joe at enthought.com (Joe Cooper) Date: Wed, 15 Jun 2005 17:28:18 -0500 Subject: [SciPy-user] SciPy.org system user purge Message-ID: <42B0AB82.7090906@enthought.com> Hi all, In the process of moving SciPy.org to a new server, I've noticed a large number of system accounts that have not been used in over a year. Due to the fact that there have been an increasing number of brute force password attacks on SciPy and other servers in our network, I would like to simply remove the accounts that are not being used. Please let me know if you are, or plan to, actively use your system account on SciPy.org for anything other than source code repository write access. Because we are moving to Subversion for revision control, we no longer need user accounts for access to the source code repository. If you use your scipy account for email, Linux shell access, website maintenance, or anything else, please let me know. I think I know who all of you are, but I want to make sure I don't kill any accounts that people make use of. The most important thing to me is that you are aware you have a system account and are taking reasonable precautions in insuring your password is strong and changed periodically. Note that I am /not/ talking about mailing list accounts or SciPy.org community accounts on the Plone/Zope website. Both have separate user databases and will not be altered at all during the migration. Odds are good that if you don't know what I'm talking about, you don't need to do anything or respond in any way. From nwagner at mecha.uni-stuttgart.de Thu Jun 16 03:03:21 2005 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Thu, 16 Jun 2005 09:03:21 +0200 Subject: [SciPy-user] Solving constrained optimization problems with fmin_cobyla Message-ID: <42B12439.60501@mecha.uni-stuttgart.de> Hi all, Is there someone on the list who can send me a small example program illustrating the usage of fmin_cobyla for solving constrained optimization problems ? Thanks in advance Nils From nwagner at mecha.uni-stuttgart.de Thu Jun 16 05:07:04 2005 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Thu, 16 Jun 2005 11:07:04 +0200 Subject: [SciPy-user] Problems with fmin_cobyla Message-ID: <42B14138.7000902@mecha.uni-stuttgart.de> Hi all, I am going to solve a constrained optimization problem. However I am running into trouble due to several eigenvalue constraints. and I don't know how to invoke cobyla in that case. Any poimter how to resolve this problem would be appreciated. I have attached the source for completeness. Thanks in advance Nils -------------- next part -------------- A non-text attachment was scrubbed... Name: opti.py Type: text/x-python Size: 3517 bytes Desc: not available URL: From tom.denniston at gmail.com Fri Jun 17 10:14:17 2005 From: tom.denniston at gmail.com (Tom Denniston) Date: Fri, 17 Jun 2005 09:14:17 -0500 Subject: [SciPy-user] ATLAS and Regression in SciPY Message-ID: It seems that people have begun exposing atlas functions to scipy but the work is incomplete. I did: help(scipy.stats.glm) for instance and got back the following: glm(data, para) Calculates a linear model fit ... anova/ancova/lin-regress/t-test/etc. Taken from: Peterson et al. Statistical limitations in functional neuroimaging I. Non-inferential methods and statistical models. Phil Trans Royal Soc Lond B 354: 1239-1260. Returns: statistic, p-value ??? It seems like if the routines were exposed more thoroughly and the doc was a little better it would be a strong competitor to the excel regression functionality and the matlab stats package. Is anyone working on this? Is there another package I should be looking at instead? From nwagner at mecha.uni-stuttgart.de Fri Jun 17 11:03:44 2005 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Fri, 17 Jun 2005 17:03:44 +0200 Subject: [SciPy-user] Handling of constraints in cobyla Message-ID: <42B2E650.3020203@mecha.uni-stuttgart.de> Hi all, How can I replace the first two constraints (con1 and con2) in my program (see below) ? In general the constraints con1 and con2 are not given explicitely in my problem, but they follow from an eigenvalue analysis. w = linalg.eigvals(K,M) w[0].real - xi0 w[1].real - xi0 If I have more constraints like con3 and con4 is there a way to simplify the procedure ? I would be grateful for your help Thanks in advance Nils from scipy import * def test2(x,xi0): function = lambda x: dot(c,x) con1 = lambda x: (4*x[0]+2*x[1])/3-xi0 # First Eigenvalue is no lower than xi0 con2 = lambda x: 4*x[0]-xi0 # Second eigenvalue is no lower than xi0 con3 = lambda x: x[0] # Stiffness parameter >= 0 con4 = lambda x: x[1] # Stiffness parameter >= 0 x = optimize.fmin_cobyla(function, x0, [con1, con2, con3, con4], rhobeg=0.1, rhoend=1e-5, iprint=0, maxfun=1400) return x c = array(([3,1])) # # Initial stiffness parameters # x0 = array(([1.3,1])) # # Parameter-dependent stiffness matrix # K = array(([4*x0[0]+x0[1],x0[1]],[x0[1],4*x0[0]+x0[1]])) # # Constant mass matrix # M = array(([2,1],[1,2])) w = linalg.eigvals(K,M) print 'Eigenvalues of the initial design',w print 'Exakt eigenvalues',(4*x0[0]+2*x0[1])/3, 4*x0[0] # # Find the smallest eigenvalue # ind = argsort(w.real) ws = take(w,ind) xi0 = ws[0].real x = test2(x0,xi0) print 'Optimal stiffness parameters',x M = array(([2,1],[1,2])) K = array(([4*x[0]+x[1],x[1]],[x[1],4*x[0]+x[1]])) w = linalg.eigvals(K,M) print 'Eigenvalues of the optimal design',w From zhiwen.chong at elf.mcgill.ca Fri Jun 17 15:08:25 2005 From: zhiwen.chong at elf.mcgill.ca (Zhiwen Chong) Date: Fri, 17 Jun 2005 15:08:25 -0400 Subject: [SciPy-user] SciPy and gui_thread() Message-ID: <91604EFA-A775-4F69-BE6C-8F662EC38613@elf.mcgill.ca> Hello everyone, I was trying to do a bit of plotting but was stymied by this: >>> import gui_thread numerix Numeric 24.0b2 >>> gui_thread.start() Traceback (most recent call last): File "", line 1, in ? File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/gui_thread/__init__.py", line 73, in start wxPython_thread() File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/gui_thread/wxPython_thread.py", line 160, in wxPython_thread sys.modules[name] = wrap_extmodule(module,call_holder) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/gui_thread/wxPython_thread.py", line 61, in wrap_extmodule raise NotImplementedError,`t` NotImplementedError: >>> I did a search on Google but did not find much: http://tinyurl.com/dmqep I suspect the problem might be wxPython, because when I tried this: >>> from wxPython.wx import * Traceback (most recent call last): File "", line 1, in ? File "//Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/wx-2.6-mac-unicode/wxPython/__init__.py", line 10, in ? import _wx File "//Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/wx-2.6-mac-unicode/wxPython/_wx.py", line 3, in ? from _core import * File "//Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/wx-2.6-mac-unicode/wxPython/_core.py", line 15, in ? import wx._core ImportError: No module named _core But the dashed odd thing is, applications like Boa Constructor and others which rely on wxPython work fine. I have Python 2.4.1, wxPython 2.6.1 and Mac OS X 10.4.1. I've applied the TigerPython24Fix and TigerPython23Compat (which I don't think is necessary, but anyway....) patches. I'm not extremely familiar with the gui_thread() package, so I'd appreciate any help on this! Zhiwen Chong -------------------------------- McMaster Advanced Control Consortium Dept. of Chemical Engineering McMaster University Hamilton ON L8S 4L7 Tel: (905) 525-9140 Ext. 22008 FAX: (905) 521-1350 macc.mcmaster.ca -------------------------------- From rkern at ucsd.edu Fri Jun 17 15:31:11 2005 From: rkern at ucsd.edu (Robert Kern) Date: Fri, 17 Jun 2005 12:31:11 -0700 Subject: [SciPy-user] SciPy and gui_thread() In-Reply-To: <91604EFA-A775-4F69-BE6C-8F662EC38613@elf.mcgill.ca> References: <91604EFA-A775-4F69-BE6C-8F662EC38613@elf.mcgill.ca> Message-ID: <42B324FF.6030701@ucsd.edu> Zhiwen Chong wrote: > Hello everyone, > > I was trying to do a bit of plotting but was stymied by this: > > >>> import gui_thread > numerix Numeric 24.0b2 > >>> gui_thread.start() > Traceback (most recent call last): > File "", line 1, in ? > File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ > python2.4/site-packages/gui_thread/__init__.py", line 73, in start > wxPython_thread() > File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ > python2.4/site-packages/gui_thread/wxPython_thread.py", line 160, in > wxPython_thread > sys.modules[name] = wrap_extmodule(module,call_holder) > File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ > python2.4/site-packages/gui_thread/wxPython_thread.py", line 61, in > wrap_extmodule > raise NotImplementedError,`t` > NotImplementedError: > >>> I don't think that gui_thread has been updated for wxPython 2.6. gui_thread has mostly been obsoleted by ipython. I highly recommend using ipython for this and many other reasons. http://ipython.scipy.org -- 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 jdhunter at ace.bsd.uchicago.edu Fri Jun 17 15:43:04 2005 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Fri, 17 Jun 2005 14:43:04 -0500 Subject: [SciPy-user] SciPy and gui_thread() In-Reply-To: <42B324FF.6030701@ucsd.edu> (Robert Kern's message of "Fri, 17 Jun 2005 12:31:11 -0700") References: <91604EFA-A775-4F69-BE6C-8F662EC38613@elf.mcgill.ca> <42B324FF.6030701@ucsd.edu> Message-ID: <87k6ksahx3.fsf@peds-pc311.bsd.uchicago.edu> >>>>> "Robert" == Robert Kern writes: Robert> I don't think that gui_thread has been updated for Robert> wxPython 2.6. gui_thread has mostly been obsoleted by Robert> ipython. I highly recommend using ipython for this and Robert> many other reasons. To provide a little context to Robert's comments. gui_thread was designed to allow you to run the wx mainloop in a separate thread so you could continue to type commands from an arbitrary python shell while controlling wx plot windows (eg figures). ipython, which is an enhanced python shell, also has support for controlling GUIs from it if you launch ipython with a special flag (eg -gthread for gtk apps, -wthread for wx apps, and so on). As Robert Suggests, ipython has lots of other nifty features that make it preferable over a standard python shell. JDH From zhiwen.chong at elf.mcgill.ca Fri Jun 17 17:47:05 2005 From: zhiwen.chong at elf.mcgill.ca (Zhiwen Chong) Date: Fri, 17 Jun 2005 17:47:05 -0400 Subject: [SciPy-user] Scipy and ipython and Aquaterm In-Reply-To: <42B324FF.6030701@ucsd.edu> References: <91604EFA-A775-4F69-BE6C-8F662EC38613@elf.mcgill.ca> <42B324FF.6030701@ucsd.edu> Message-ID: > I don't think that gui_thread has been updated for wxPython 2.6. > gui_thread has mostly been obsoleted by ipython. I highly recommend > using ipython for this and many other reasons. Just downloaded ipython -- it's a nifty little environment! (tab completion for methods, shell access, explicit display of exception names etc.) Thanks for the recommendation. What I want is this: 1) a means of plotting a graph from the interactive environment; and, 2) a means of doing the same from within a series of Python scripts that I plan to distribute to others. Currently, that means using py2exe (for Windows). I'm doing my development on Mac OS X (and deploying on Windows), so I'm constrained to using a cross-platform framework like wxWidgets through wxPython. How do you do your plotting in ipython? How do I get my Python program to plot using wxPython without using ipython? On a completely different note, has anyone tried Aquaterm? I'm testing Aquaterm but I haven't been able to figure out how to point to it from SciPy. A test on plain old GNUPlot gave me this error: Terminal type set to 'unknown' gnuplot> set terminal aqua Terminal type set to 'aqua' Options are '0 title 'Figure 0' size 846 594 fname 'Times- Roman' fsize 14' gnuplot> plot sin(x) 2005-06-17 17:16:34.035 gnuplot[14992] *** Uncaught exception: [NOTE: this exception originated in the server.] *** -[AQTModel dirtyRect]: selector not recognized [self = 0x3a9340] Trace/BPT trap This was on GNUPlot 4.0.0 patchlevel 0, compiled from sources. Zhiwen Chong -------------------------------- McMaster Advanced Control Consortium Dept. of Chemical Engineering McMaster University Hamilton ON L8S 4L7 Canada Tel: (905) 525-9140 Ext. 22008 FAX: (905) 521-1350 macc.mcmaster.ca -------------------------------- From jdhunter at ace.bsd.uchicago.edu Fri Jun 17 17:52:16 2005 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Fri, 17 Jun 2005 16:52:16 -0500 Subject: [SciPy-user] Scipy and ipython and Aquaterm In-Reply-To: (Zhiwen Chong's message of "Fri, 17 Jun 2005 17:47:05 -0400") References: <91604EFA-A775-4F69-BE6C-8F662EC38613@elf.mcgill.ca> <42B324FF.6030701@ucsd.edu> Message-ID: <877jgsd52n.fsf@peds-pc311.bsd.uchicago.edu> >>>>> "Zhiwen" == Zhiwen Chong writes: Zhiwen> What I want is this: 1) a means of plotting a graph from Zhiwen> the interactive environment; and, 2) a means of doing the Zhiwen> same from within a series of Python scripts that I plan to Zhiwen> distribute to others. Currently, that means using py2exe Zhiwen> (for Windows). I'm doing my development on Mac OS X (and Zhiwen> deploying on Windows), so I'm constrained to using a Zhiwen> cross-platform framework like wxWidgets through wxPython. Zhiwen> How do you do your plotting in ipython? How do I get my Zhiwen> Python program to plot using wxPython without using Zhiwen> ipython? You may want to look at matplotlib * Plotting with ipython with wxagg backend works by setting backend : WxAgg in your matplotlib rc file. And then start ipython with > ipython -pylab You'll be able to start plotting right out of the box In[0]: plot(rand(100)) because ipython pylab mode imports everything you need * Embedding matplotlib in wx apps -- follow the examples/wmbedding_in_wx*.py in the matplotlib src distribution * Freezing wx apps with py2exe -- see http://matplotlib.sourceforge.net/faq.html#PY2EXE, in particular the simple_plot_wxagg directory in the zip file that is linked. JDH From zhiwen.chong at elf.mcgill.ca Sat Jun 18 19:53:59 2005 From: zhiwen.chong at elf.mcgill.ca (Zhiwen Chong) Date: Sat, 18 Jun 2005 19:53:59 -0400 Subject: [SciPy-user] Scipy and ipython and Aquaterm In-Reply-To: <877jgsd52n.fsf@peds-pc311.bsd.uchicago.edu> References: <91604EFA-A775-4F69-BE6C-8F662EC38613@elf.mcgill.ca> <42B324FF.6030701@ucsd.edu> <877jgsd52n.fsf@peds-pc311.bsd.uchicago.edu> Message-ID: <3B02E032-D0C6-418E-ACD9-DD966B7061B0@elf.mcgill.ca> Hi John Thanks for your matplotlib recommendation. And I really appreciate the bits of info about wx and ipython. I was trying to get matplotlib to install earlier today but was having a lot of trouble, because: 1) I decided I didn't want to use Fink. Fink almost NEVER works for any of the programs I need, and it coexists badly with Apple's bundled libraries, compilers etc. 2) So I downloaded the .mpkg on http://pythonmac.org/packages/ which Chris Barker kindly provided, but that didn't work because the installer assumed I had Python 2.3 (I am using Python 2.4.1) and insisted on putting stuff in Library/Python/2.3 and /System/Library/ Frameworks/Python.framework/Versions/2.3/share/matplotlib. (These paths were hard-coded into the Info.plists in the .mpkg). I thought of doing a 'grep -r "2.3" *' inside the .mpkg's directory to find all references to Python 2.3 and change them to 2.4, but I finally decided this was perhaps not the best way to go about doing it. 3) So this leaves one option: compiling matplotlib manually (which I'm dreading because I'll need to manually find and compile all the dependencies like libpng, freetype etc.). Fortunately, Chris Barker wrote a included a nice set of detailed instructions for compiling matplotlib in his package, so I'm going to have to go through that slowly when I have the time. Either that, or I'm going to have to look into Darwinports. Zhiwen Chong -------------------------------- McMaster Advanced Control Consortium Dept. of Chemical Engineering McMaster University Hamilton ON L8S 4L7 Canada Tel: (905) 525-9140 Ext. 22008 FAX: (905) 521-1350 macc.mcmaster.ca -------------------------------- From rkern at ucsd.edu Sat Jun 18 20:09:43 2005 From: rkern at ucsd.edu (Robert Kern) Date: Sat, 18 Jun 2005 17:09:43 -0700 Subject: [SciPy-user] Scipy and ipython and Aquaterm In-Reply-To: <3B02E032-D0C6-418E-ACD9-DD966B7061B0@elf.mcgill.ca> References: <91604EFA-A775-4F69-BE6C-8F662EC38613@elf.mcgill.ca> <42B324FF.6030701@ucsd.edu> <877jgsd52n.fsf@peds-pc311.bsd.uchicago.edu> <3B02E032-D0C6-418E-ACD9-DD966B7061B0@elf.mcgill.ca> Message-ID: <42B4B7C7.5050802@ucsd.edu> Zhiwen Chong wrote: > Hi John > > Thanks for your matplotlib recommendation. And I really appreciate the > bits of info about wx and ipython. > > I was trying to get matplotlib to install earlier today but was having > a lot of trouble, because: > > 1) I decided I didn't want to use Fink. Fink almost NEVER works for any > of the programs I need, and it coexists badly with Apple's bundled > libraries, compilers etc. Indeed. > 2) So I downloaded the .mpkg on http://pythonmac.org/packages/ which > Chris Barker kindly provided, but that didn't work because the > installer assumed I had Python 2.3 (I am using Python 2.4.1) and > insisted on putting stuff in Library/Python/2.3 and /System/Library/ > Frameworks/Python.framework/Versions/2.3/share/matplotlib. (These paths > were hard-coded into the Info.plists in the .mpkg). > I thought of doing a 'grep -r "2.3" *' inside the .mpkg's directory to > find all references to Python 2.3 and change them to 2.4, but I finally > decided this was perhaps not the best way to go about doing it. That wouldn't work anyways. Python extension modules aren't compatible between 2.3 and 2.4. > 3) So this leaves one option: compiling matplotlib manually (which I'm > dreading because I'll need to manually find and compile all the > dependencies like libpng, freetype etc.). Fortunately, Chris Barker > wrote a included a nice set of detailed instructions for compiling > matplotlib in his package, so I'm going to have to go through that > slowly when I have the time. > > Either that, or I'm going to have to look into Darwinports. That is what I do to get libpng et al. Works like a charm. -- 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 zhiwen.chong at elf.mcgill.ca Sun Jun 19 15:23:10 2005 From: zhiwen.chong at elf.mcgill.ca (Zhiwen Chong) Date: Sun, 19 Jun 2005 15:23:10 -0400 Subject: [SciPy-user] Scipy and ipython and Aquaterm In-Reply-To: <42B4B7C7.5050802@ucsd.edu> References: <91604EFA-A775-4F69-BE6C-8F662EC38613@elf.mcgill.ca> <42B324FF.6030701@ucsd.edu> <877jgsd52n.fsf@peds-pc311.bsd.uchicago.edu> <3B02E032-D0C6-418E-ACD9-DD966B7061B0@elf.mcgill.ca> <42B4B7C7.5050802@ucsd.edu> Message-ID: On 18-Jun-05, at 8:09 PM, Robert Kern wrote: >> Either that, or I'm going to have to look into Darwinports. > That is what I do to get libpng et al. Works like a charm. Unfortunately, the ports are broken. Only the zlib port built properly. It's very frustrating... it appears that very few things seem to *just work* on Mac OS X's UNIX side, especially those things that I need. Darwinports 1.0. (did a port -d selfupdate to get the latest ports tree) libpng: ----- make: *** [libpng12.0.1.2.8.dylib] Error 1 Error: Target com.apple.build returned: shell command "cd "/opt/local/ var/db/dports/build/ file._opt_local_var_db_dports_sources_rsync.rsync.opendarwin.org_dpupdat e_dports_graphics_libpng/work/libpng-1.2.8" && make all" returned error 2 Command output: /usr/bin/libtool: for architecture: cputype (16777234) cpusubtype (0) file: -lSystemStubs(s_verr.o) is not an object file (not allowed in a library) Freetype: ------- pc-chongz1:/ usual$ sudo port install freetype ---> Fetching freetype ---> Attempting to fetch freetype-2.1.9.tar.bz2 from http:// voxel.dl.sourceforge.net/freetype ---> Attempting to fetch freetype-2.1.9.tar.bz2 from http:// kent.dl.sourceforge.net/freetype ---> Verifying checksum(s) for freetype ---> Extracting freetype ---> Applying patches to freetype ---> Configuring freetype ---> Building freetype with target all Error: Target com.apple.build returned: shell command "cd "/opt/local/ var/db/dports/build/ file._opt_local_var_db_dports_sources_rsync.rsync.opendarwin.org_dpupdat e_dports_print_freetype/work/freetype-2.1.9" && make all" returned error 2 Command output: /usr/bin/libtool: for architecture: cputype (16777234) cpusubtype (0) file: -lSystemStubs(s_verr.o) is not an object file (not allowed in a library) /usr/bin/libtool: for architecture: cputype (16777234) cpusubtype (0) file: -lSystemStubs(s_verrc.o) is not an object file (not allowed in a library) And blah.... Zhiwen Chong -------------------------------- McMaster Advanced Control Consortium Dept. of Chemical Engineering McMaster University Hamilton ON L8S 4L7 Canada Tel: (905) 525-9140 Ext. 22008 FAX: (905) 521-1350 macc.mcmaster.ca -------------------------------- From rkern at ucsd.edu Sun Jun 19 17:33:35 2005 From: rkern at ucsd.edu (Robert Kern) Date: Sun, 19 Jun 2005 14:33:35 -0700 Subject: [SciPy-user] Scipy and ipython and Aquaterm In-Reply-To: References: <91604EFA-A775-4F69-BE6C-8F662EC38613@elf.mcgill.ca> <42B324FF.6030701@ucsd.edu> <877jgsd52n.fsf@peds-pc311.bsd.uchicago.edu> <3B02E032-D0C6-418E-ACD9-DD966B7061B0@elf.mcgill.ca> <42B4B7C7.5050802@ucsd.edu> Message-ID: <42B5E4AF.9000905@ucsd.edu> Zhiwen Chong wrote: > On 18-Jun-05, at 8:09 PM, Robert Kern wrote: > >>> Either that, or I'm going to have to look into Darwinports. >> >> That is what I do to get libpng et al. Works like a charm. > > Unfortunately, the ports are broken. Only the zlib port built properly. > It's very frustrating... it appears that very few things seem to *just > work* on Mac OS X's UNIX side, especially those things that I need. > > Darwinports 1.0. (did a port -d selfupdate to get the latest ports tree) > > libpng: > ----- > make: *** [libpng12.0.1.2.8.dylib] Error 1 > Error: Target com.apple.build returned: shell command "cd "/opt/local/ > var/db/dports/build/ > file._opt_local_var_db_dports_sources_rsync.rsync.opendarwin.org_dpupdat > e_dports_graphics_libpng/work/libpng-1.2.8" && make all" returned error 2 > Command output: /usr/bin/libtool: for architecture: cputype (16777234) > cpusubtype (0) file: -lSystemStubs(s_verr.o) is not an object file (not > allowed in a library) That's utterly bizarre. It works just fine on my system. The port isn't broken, but something on your system is. You could try installing Darwinports' libtool. You could also try changing the default gcc version to 3.3 using $ sudo gcc_select 3.3 OTOH, I am using the system libtool and successfully used gcc 4.0 to build it. -- 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 rajb at cs.rice.edu Mon Jun 20 11:45:55 2005 From: rajb at cs.rice.edu (rajb) Date: Mon, 20 Jun 2005 10:45:55 -0500 Subject: [SciPy-user] Scalapack interface? Message-ID: Hi all I keep seeing references in the docs regarding a Python interface to Scalapack, but it does not seem to actually exist. Can anyone please tell me if there is one around or in development stage? I need such an interface for my research, and I was thinking of writing one myself, but it would be great if someone is already working on it. Please reply asap. Thanks a lot. Raj From stephen.walton at csun.edu Mon Jun 20 16:12:18 2005 From: stephen.walton at csun.edu (Stephen Walton) Date: Mon, 20 Jun 2005 13:12:18 -0700 Subject: [SciPy-user] S.stats broken? Message-ID: <42B72322.3030201@csun.edu> In the below, I've done "import scipy as S" and "import scipy.special as special" In [272]:S.stats.norm.cdf(0,-4.) Out[272]:0.999999713348 In [273]:special.ndtr(-4.) Out[273]:3.1671241833119884e-05 If I'm reading the code correctly, S.stats.norm.cdf(0,-4) should be equal to special.ndtr(-4). It is not. Why? lognorm.cdf is even worse. S.stats.lognorm.cdf(1,x) returns 0.5 for any value of x from a small value up to and including inf. What am I missing here? This package can't possibly be this badly broken. scipy.__version__ is 0.3.3_309.4624. From rkern at ucsd.edu Mon Jun 20 16:41:55 2005 From: rkern at ucsd.edu (Robert Kern) Date: Mon, 20 Jun 2005 13:41:55 -0700 Subject: [SciPy-user] S.stats broken? In-Reply-To: <42B72322.3030201@csun.edu> References: <42B72322.3030201@csun.edu> Message-ID: <42B72A13.7010709@ucsd.edu> Stephen Walton wrote: > In the below, I've done "import scipy as S" and "import scipy.special as > special" > > In [272]:S.stats.norm.cdf(0,-4.) > Out[272]:0.999999713348 In [5]: stats.norm.cdf(-4.) Out[5]: 3.16712418331e-05 The value you want to evaluate at comes first. Location and scale or any other such parameters come after. > In [273]:special.ndtr(-4.) > Out[273]:3.1671241833119884e-05 > > If I'm reading the code correctly, S.stats.norm.cdf(0,-4) should be > equal to special.ndtr(-4). It is not. Why? > > lognorm.cdf is even worse. S.stats.lognorm.cdf(1,x) returns 0.5 for any > value of x from a small value up to and including inf. Same here. You want scipy.stats.lognorm(x, 1). > What am I missing here? This package can't possibly be this badly > broken. scipy.__version__ is 0.3.3_309.4624. -- 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 stephen.walton at csun.edu Mon Jun 20 17:53:59 2005 From: stephen.walton at csun.edu (Stephen Walton) Date: Mon, 20 Jun 2005 14:53:59 -0700 Subject: [SciPy-user] S.stats broken? In-Reply-To: <42B72A13.7010709@ucsd.edu> References: <42B72322.3030201@csun.edu> <42B72A13.7010709@ucsd.edu> Message-ID: <42B73AF7.3030704@csun.edu> Robert Kern wrote: > In [5]: stats.norm.cdf(-4.) > Out[5]: 3.16712418331e-05 > > The value you want to evaluate at comes first. Whoops. Thanks. From joe at enthought.com Mon Jun 20 21:30:17 2005 From: joe at enthought.com (Joe Cooper) Date: Mon, 20 Jun 2005 20:30:17 -0500 Subject: [SciPy-user] SciPy.org server migration tonight Message-ID: <42B76DA9.9060204@enthought.com> Hi all, I've been threatening a server migration of SciPy.org for a couple of weeks now, and tonight's the night on which at least some services will move (whether they like it or not). I will be shutting down CVS access in a few minutes, as the cvs2svn conversion takes a while to process and I will definitely move SciPy to Subversion tonight. Throughout the evening, other services will probably disappear for a bit, hopefully to reappear on the new server soon after. I'm certain there will be issues, as we're moving to much newer versions of all software, removing a bunch of old users, switching from CVS to Subversion, and a couple dozen other changes that don't come to mind right now. Please let me know if you see any such problems in the coming days. I'll notify the list when things are back to sanity as best as I can figure. Thanks! From joe at enthought.com Tue Jun 21 00:07:29 2005 From: joe at enthought.com (Joe Cooper) Date: Mon, 20 Jun 2005 23:07:29 -0500 Subject: [SciPy-user] SciPy.org server migration tonight In-Reply-To: <42B76DA9.9060204@enthought.com> References: <42B76DA9.9060204@enthought.com> Message-ID: <42B79281.4060607@enthought.com> Hi again, It was a nice dream, but SciPy will remain in CVS for the time being. cvs2svn choked on our repository. It's been brought up with the developers, and hopefully there will soon be a solution. CVS is back to normal. I'll try again tomorrow...Sigh. Joe Cooper wrote: > Hi all, > > I've been threatening a server migration of SciPy.org for a couple of > weeks now, and tonight's the night on which at least some services will > move (whether they like it or not). > > I will be shutting down CVS access in a few minutes, as the cvs2svn > conversion takes a while to process and I will definitely move SciPy to > Subversion tonight. Throughout the evening, other services will > probably disappear for a bit, hopefully to reappear on the new server > soon after. > > I'm certain there will be issues, as we're moving to much newer versions > of all software, removing a bunch of old users, switching from CVS to > Subversion, and a couple dozen other changes that don't come to mind > right now. Please let me know if you see any such problems in the > coming days. > > I'll notify the list when things are back to sanity as best as I can > figure. > > Thanks! > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From zhiwen.chong at elf.mcgill.ca Tue Jun 21 02:29:37 2005 From: zhiwen.chong at elf.mcgill.ca (Zhiwen Chong) Date: Tue, 21 Jun 2005 02:29:37 -0400 Subject: [SciPy-user] Scipy and ipython and Aquaterm In-Reply-To: <42B5E4AF.9000905@ucsd.edu> References: <91604EFA-A775-4F69-BE6C-8F662EC38613@elf.mcgill.ca> <42B324FF.6030701@ucsd.edu> <877jgsd52n.fsf@peds-pc311.bsd.uchicago.edu> <3B02E032-D0C6-418E-ACD9-DD966B7061B0@elf.mcgill.ca> <42B4B7C7.5050802@ucsd.edu> <42B5E4AF.9000905@ucsd.edu> Message-ID: <1CD5FDFC-69FE-463F-A3BC-3F8E13D98B95@elf.mcgill.ca> On 19-Jun-05, at 5:33 PM, Robert Kern wrote: > That's utterly bizarre. It works just fine on my system. The port > isn't broken, but something on your system is. Yeah, tell me about it. I've been pulling my hair out all weekend. But it seems I'm not alone. http://tinyurl.com/d398j Apparently my problems may have had to do with the fact that I selected "upgrade" when I installed Tiger over my existing Panther installation (although I do remember uninstalling all my development tools before upgrading). People with virgin Tiger installations reported having no problems compiling the ports. Grr... this means I may have to uninstall and reinstall the dev tools packages. > You could try installing Darwinports' libtool. Didn't work -- error in libtool prevented Darwinports' libtool from building. > You could also try changing the default gcc version to 3.3 using > $ sudo gcc_select 3.3 First thing I tried. Thanks for your suggestions though. I guess I just have to fiddle with my installation a bit. Zhiwen Chong -------------------------------- McMaster Advanced Control Consortium Dept. of Chemical Engineering McMaster University Hamilton ON L8S 4L7 Canada Tel: (905) 525-9140 Ext. 22008 FAX: (905) 521-1350 macc.mcmaster.ca -------------------------------- From bgranger at scu.edu Wed Jun 22 02:59:26 2005 From: bgranger at scu.edu (Brian Granger) Date: Tue, 21 Jun 2005 23:59:26 -0700 Subject: [SciPy-user] Tiger and scipy Message-ID: <7A1C8DE6-0CB2-4633-8FD7-9BEE9FB7ADE3@scu.edu> Hello all, I wanted to see what the status of scipy on Mac OS X, 10.4 was. I just installed the CVS version of scipy on Tiger, but I had to use gcc 3.3 (sudo gcc_select 3.3). I got the same error that others have seen when I used gcc4.0. Any word on how to resolve this problem with gcc4.0? Also, I have been playing with the bdist_mpkg command that comes with py2app (from the PyObjC project). This makes it nearly trivial to build a double clickable Mac installer for scipy. Has anyone else done this yet? Also, has anyone made installer packages for the other dependencies (g77 and fftw) yet? With a little work, it should be possible to have a single metapackage for scipy that make installation on a Mac trivial. Anyone else interested in helping with this? Cheers Brian From rkern at ucsd.edu Wed Jun 22 03:53:09 2005 From: rkern at ucsd.edu (Robert Kern) Date: Wed, 22 Jun 2005 00:53:09 -0700 Subject: [SciPy-user] Tiger and scipy In-Reply-To: <7A1C8DE6-0CB2-4633-8FD7-9BEE9FB7ADE3@scu.edu> References: <7A1C8DE6-0CB2-4633-8FD7-9BEE9FB7ADE3@scu.edu> Message-ID: <42B918E5.5030608@ucsd.edu> Brian Granger wrote: > Hello all, > > I wanted to see what the status of scipy on Mac OS X, 10.4 was. I just > installed the CVS version of scipy on Tiger, but I had to use gcc 3.3 > (sudo gcc_select 3.3). I got the same error that others have seen when > I used gcc4.0. Any word on how to resolve this problem with gcc4.0? I gave up since many other non-Scipy things didn't compile with gcc4.0. I don't know if anyone is seeing gcc4.0 problems on other systems. > Also, I have been playing with the bdist_mpkg command that comes with > py2app (from the PyObjC project). This makes it nearly trivial to > build a double clickable Mac installer for scipy. Has anyone else done > this yet? Have I *ever*! http://download.enthought.com/MacEnthon/ReadMe.html http://download.enthought.com/MacEnthon/MacEnthon-0.1.dmg I probably won't update this until I get my build environment set up on my Panther machine so that I can create packages compatible with both Tiger and Panther. > Also, has anyone made installer packages for the other > dependencies (g77 and fftw) yet? No. > With a little work, it should be > possible to have a single metapackage for scipy that make installation > on a Mac trivial. Anyone else interested in helping with this? -- 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 bgranger at scu.edu Wed Jun 22 05:29:01 2005 From: bgranger at scu.edu (Brian Granger) Date: Wed, 22 Jun 2005 02:29:01 -0700 Subject: [SciPy-user] Tiger and scipy In-Reply-To: <42B918E5.5030608@ucsd.edu> References: <7A1C8DE6-0CB2-4633-8FD7-9BEE9FB7ADE3@scu.edu> <42B918E5.5030608@ucsd.edu> Message-ID: <5B564C37-627C-42EB-AA8A-A3D422EF97C5@scu.edu> On Jun 22, 2005, at 12:53 AM, Robert Kern wrote: > Brian Granger wrote: > >> Hello all, >> I wanted to see what the status of scipy on Mac OS X, 10.4 was. >> I just installed the CVS version of scipy on Tiger, but I had to >> use gcc 3.3 (sudo gcc_select 3.3). I got the same error that >> others have seen when I used gcc4.0. Any word on how to resolve >> this problem with gcc4.0? >> > > I gave up since many other non-Scipy things didn't compile with > gcc4.0. I don't know if anyone is seeing gcc4.0 problems on other > systems. > > OK >> Also, I have been playing with the bdist_mpkg command that comes >> with py2app (from the PyObjC project). This makes it nearly >> trivial to build a double clickable Mac installer for scipy. Has >> anyone else done this yet? >> > > Have I *ever*! > > http://download.enthought.com/MacEnthon/ReadMe.html > http://download.enthought.com/MacEnthon/MacEnthon-0.1.dmg > > I probably won't update this until I get my build environment set > up on my Panther machine so that I can create packages compatible > with both Tiger and Panther. > Ahh yes. Fernando Perez mentioned you were working on something like this. I hadn't seen these links though. Thanks. > From bob at redivi.com Wed Jun 22 22:46:21 2005 From: bob at redivi.com (Bob Ippolito) Date: Wed, 22 Jun 2005 22:46:21 -0400 Subject: [SciPy-user] Tiger and scipy In-Reply-To: <42B918E5.5030608@ucsd.edu> References: <7A1C8DE6-0CB2-4633-8FD7-9BEE9FB7ADE3@scu.edu> <42B918E5.5030608@ucsd.edu> Message-ID: <3B49D223-C256-433A-AB82-D563E3CC8270@redivi.com> On Jun 22, 2005, at 3:53 AM, Robert Kern wrote: > Brian Granger wrote: > >> Hello all, >> I wanted to see what the status of scipy on Mac OS X, 10.4 was. >> I just installed the CVS version of scipy on Tiger, but I had to >> use gcc 3.3 (sudo gcc_select 3.3). I got the same error that >> others have seen when I used gcc4.0. Any word on how to resolve >> this problem with gcc4.0? >> > > I gave up since many other non-Scipy things didn't compile with > gcc4.0. I don't know if anyone is seeing gcc4.0 problems on other > systems. Yeah, they are. >> Also, I have been playing with the bdist_mpkg command that comes >> with py2app (from the PyObjC project). This makes it nearly >> trivial to build a double clickable Mac installer for scipy. Has >> anyone else done this yet? >> > > Have I *ever*! > > http://download.enthought.com/MacEnthon/ReadMe.html > http://download.enthought.com/MacEnthon/MacEnthon-0.1.dmg > > I probably won't update this until I get my build environment set > up on my Panther machine so that I can create packages compatible > with both Tiger and Panther. In theory you can compile Panther.. or even Jaguar.. compatible stuff on Tiger if you try hard enough. Something like this is enough to convince py2app and distutils to compile Jaguar compatible stuff on Python 2.3 (though I needed to patch distutils to use LDSHARED correctly): import os # There's a deps/Python.framework which was built on 10.2. Since I don't have it # installed in the correct place, I need to set DYLD_FRAMEWORK_PATH in order # to run it correctly. This setup.py must be run with the target Python. if os.path.abspath('deps') not in os.environ.get ('DYLD_FRAMEWORK_PATH', ''): raise RuntimeError, 'This is the wrong Python' # Try and compile in a 10.2 compatible manner os.environ['CC'] = '/usr/bin/gcc-3.3' deps = os.path.abspath('deps').replace(' ', '\\ ') # I had to patch distutils in order for it to pick up LDSHARED. Python 2.4 doesn't have this problem. # This is only necessary because Python.framework isn't in the expected place. os.environ['LDSHARED'] = '/usr/bin/gcc-3.3 -Wl,-x -Wl,-F%s -bundle - framework Python' % (deps,) os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.2' JAGUAR_SDK = '/Developer/SDKs/MacOSX10.2.8.sdk' if os.path.exists(JAGUAR_SDK): # This tells Apple GCC (anything before 4.0, anyway) to use the SDKs. os.environ['NEXT_ROOT'] = JAGUAR_SDK # These are for py2app's macholib. Should fix py2app to use NEXT_ROOT instead of this ugly hack. # You probably shouldn't use this. os.environ['DYLD_LIBRARY_PATH'] = JAGUAR_SDK + '/usr/lib' + ':' + JAGUAR_SDK + '/usr/lib/system' os.environ['DYLD_FRAMEWORK_PATH'] += ':' + JAGUAR_SDK + '/System/ Library/Frameworks' Composed-in-mail, the equivalent for Panther compatibility would be: # Try and compile in a 10.2 compatible manner os.environ['CC'] = '/usr/bin/gcc-3.3' os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.3' PANTHER_SDK = '/Developer/SDKs/MacOSX10.3.9.sdk' if os.path.exists(PANTHER_SDK): os.environ['NEXT_ROOT'] = PANTHER_SDK A more general solution would probably be this instead (again composed-in-mail): #!/bin/sh # # sdkenv-macosx10.3 # export MACOSX_DEPLOYMENT_TARGET=10.3 export NEXT_ROOT=/Developer/SDKs/MacOSX10.3.9.sdk export CC=/usr/bin/gcc-3.3 # I guess a few more things might need to be set for C++, etc. # but I'm not familiar with those env vars $@ Then you would do: sdkenv-macosx10.3 bdist_mpkg ... or even sdkenv-macosx10.3 sh -c './configure && make' -bob From abhiman at gmail.com Thu Jun 23 10:26:27 2005 From: abhiman at gmail.com (Abhiman Chatra) Date: Thu, 23 Jun 2005 19:56:27 +0530 Subject: [SciPy-user] Bug in optimize.leastsq when Jacobian matrix is provided Message-ID: <3ae3d52905062307265625959c@mail.gmail.com> Hi, I am new to Python, SciPy and optimization. So excuse me if I have make mistakes. My Problem : ------------------- I want to use optimize.leastsq function of scipy to find a least square fit. But my function in the parametric form is quite complicated. Hence I want to provide the Jacobian matrix to the leastsquare optimizer to improve its performance. But when I provide the function for calculating the Jacobian matrix, I get a windows error saying "python.exe has generated errors and will be closed by Windows. You will need to restart the program. An error log is being created " Since this error cannot be caught I cannot trace the cause of this error. But my feeling is that this is some memory error. This error is not reproducible if I do not provide the function for calculating the Jacobian matrix. My Configutration : -------------------------- Machine : P4 OS : Windows 2000 Professional Python : Python 2.3.3 Numeric : Numeric-23.5.win32-py2.3 Scipy : SciPy_complete-0.3.2.win32-py2.3-num23.5 ( I have also tryed with the following configuration : Python : Python 2.2.3 Numeric : Numeric-23.0.win32-py2.2 SciPy : SciPy_complete-0.3.2.win32-py2.2-num22.0 -- Abhiman Chatra B, Technical Analyst, Trilogy India, Mobile # : 9845358165 ---------------------------------------------------- "If only your programs would be correct if you simply typed them three times" -------------- next part -------------- An HTML attachment was scrubbed... URL: From abhiman at gmail.com Thu Jun 23 10:33:14 2005 From: abhiman at gmail.com (Abhiman Chatra) Date: Thu, 23 Jun 2005 20:03:14 +0530 Subject: [SciPy-user] Bug(?) in optimize.leastsq when Jacobian matrix is provided (Complete) Message-ID: <3ae3d52905062307334fe1e20a@mail.gmail.com> (Sorry my previous mail was incomplete) Hi, I am new to Python, SciPy and optimization. So excuse me if I have make mistakes. My Problem : ------------------- I want to use optimize.leastsq function of scipy to find a least square fit. But my function in the parametric form is quite complicated. Hence I want to provide the Jacobian matrix to the leastsquare optimizer to improve its performance. But when I provide the function for calculating the Jacobian matrix, I get a windows error saying "python.exe has generated errors and will be closed by Windows. You will need to restart the program. An error log is being created " Since this error cannot be caught I cannot trace the cause of this error. But my feeling is that this is some memory error. This error is not reproducible if I do not provide the function for calculating the Jacobian matrix. My Configutration : -------------------------- Machine : P4 OS : Windows 2000 Professional Python : Python 2.3.3 Numeric : Numeric-23.5.win32-py2.3 Scipy : SciPy_complete-0.3.2.win32-py2.3-num23.5 ( I have also tryed with the following configuration : Python : Python 2.2.3 Numeric : Numeric-23.0.win32-py2.2 SciPy : SciPy_complete-0.3.2.win32-py2.2-num22.0 - Again my code fails) Code : --------------------------------------------------------------------------------------------------------------------------------- #This is not my actual code but a simplified version for simple linear regression fit from scipy import * import random import pprint inputs = [ [ 1.0 , 2.0 ], [ 2.0 , 2.0 ], [ 3.0 , 1.0 ], [ 2.0 , 4.0 ]] answers = [ 4.05 , 6.1 , 6.9 , 8.0 ] def residual_values(betas, inp , ans) : ret = [0.0] * len(inp) for i in range(len(inp)) : ret[i] = 1.0 * betas[len(inp[i])] - ans[i] for j in range(len(inp[0])) : ret[i] += betas[j] * inp[i][j] print "In residual_values" #print "Betas : " #pprint.pprint(betas) #print "return value : " #pprint.pprint(ret) return ret def jacobian(betas, inp , ans) : print "In jacobian" J = [[0.0] * len(betas)] * len(inp) for i in range(len(inp)) : J[i][0] = inp[i][0] J[i][1] = inp[i][1] J[i][2] = 1.0 return J try: for i in range(100): print("---------------- %d -----------------" % (i)) initial = [0.0] * 3 #random.shuffle(initial) for i in range(3) : initial[i] = 1.0 opt = optimize.leastsq(residual_values, initial, args = (inputs, answers), Dfun=jacobian, maxfev=10000) #opt = optimize.leastsq(residual_values, initial, args = (inputs, answers), maxfev=10000) pprint.pprint(opt) except: print "Error regression fitting model..." pprint.pprint(locals()) raise --------------------------------------------------------------------------------------------------------------------------------- Can someone please let me know what is causing the crash? My feeling is that this is a bug in SciPy. Any help is greatly appreciated. Thanks, Abhiman -- Abhiman Chatra B, Technical Analyst, Trilogy India, Mobile # : 9845358165 ---------------------------------------------------- "If only your programs would be correct if you simply typed them three times" -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhunter at ace.bsd.uchicago.edu Thu Jun 23 10:37:30 2005 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Thu, 23 Jun 2005 09:37:30 -0500 Subject: [SciPy-user] Bug(?) in optimize.leastsq when Jacobian matrix is provided (Complete) In-Reply-To: <3ae3d52905062307334fe1e20a@mail.gmail.com> (Abhiman Chatra's message of "Thu, 23 Jun 2005 20:03:14 +0530") References: <3ae3d52905062307334fe1e20a@mail.gmail.com> Message-ID: <87u0jpjg0l.fsf@peds-pc311.bsd.uchicago.edu> >>>>> "Abhiman" == Abhiman Chatra writes: Abhiman> #This is not my actual code but a simplified version for Abhiman> simple linear regression fit from scipy import * import Abhiman> random import pprint Does this code also reproduce the segfault? Please repost your example code in a way that preserves indentation so we can run it w/o heavily editing it. One option is to attach it. JDH From ckkart at hoc.net Thu Jun 23 10:46:49 2005 From: ckkart at hoc.net (Christian Kristukat) Date: Thu, 23 Jun 2005 16:46:49 +0200 Subject: [SciPy-user] Bug(?) in optimize.leastsq when Jacobian matrix is provided (Complete) In-Reply-To: <87u0jpjg0l.fsf@peds-pc311.bsd.uchicago.edu> References: <3ae3d52905062307334fe1e20a@mail.gmail.com> <87u0jpjg0l.fsf@peds-pc311.bsd.uchicago.edu> Message-ID: <42BACB59.6030906@hoc.net> John Hunter wrote: >>>>>>"Abhiman" == Abhiman Chatra writes: > > Abhiman> #This is not my actual code but a simplified version for > Abhiman> simple linear regression fit from scipy import * import > Abhiman> random import pprint > > Does this code also reproduce the segfault? Please repost your > example code in a way that preserves indentation so we can run it w/o > heavily editing it. One option is to attach it. I just tried the code on linux, python 2.3, scipy 0.3.2 and it segfaults too. But I remember having used leastsq providing a custom jacobian though I can't find any example code now. Regards, Christian -------------- next part -------------- A non-text attachment was scrubbed... Name: tes.py Type: application/x-python Size: 1348 bytes Desc: not available URL: From abhiman at gmail.com Thu Jun 23 10:47:40 2005 From: abhiman at gmail.com (Abhiman Chatra) Date: Thu, 23 Jun 2005 20:17:40 +0530 Subject: [SciPy-user] Bug(?) in optimize.leastsq when Jacobian matrix is provided (Complete) In-Reply-To: <87u0jpjg0l.fsf@peds-pc311.bsd.uchicago.edu> References: <3ae3d52905062307334fe1e20a@mail.gmail.com> <87u0jpjg0l.fsf@peds-pc311.bsd.uchicago.edu> Message-ID: <3ae3d5290506230747617e92e1@mail.gmail.com> John, Yes, this code also results in the Windows error. I am attaching the source code along this mail. Let me know if you need more info. Thanks for the quick reply, Abhiman On 6/23/05, John Hunter wrote: > > >>>>> "Abhiman" == Abhiman Chatra writes: > Abhiman> #This is not my actual code but a simplified version for > Abhiman> simple linear regression fit from scipy import * import > Abhiman> random import pprint > > Does this code also reproduce the segfault? Please repost your > example code in a way that preserves indentation so we can run it w/o > heavily editing it. One option is to attach it. > > JDH > -- Abhiman Chatra B, Technical Analyst, Trilogy India, Mobile # : 9845358165 ---------------------------------------------------- "If only your programs would be correct if you simply typed them three times" -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Jac.py URL: From abhiman at gmail.com Thu Jun 23 11:11:30 2005 From: abhiman at gmail.com (Abhiman Chatra) Date: Thu, 23 Jun 2005 20:41:30 +0530 Subject: [SciPy-user] Bug(?) in optimize.leastsq when Jacobian matrix is provided (Complete) In-Reply-To: <3ae3d5290506230747617e92e1@mail.gmail.com> References: <3ae3d52905062307334fe1e20a@mail.gmail.com> <87u0jpjg0l.fsf@peds-pc311.bsd.uchicago.edu> <3ae3d5290506230747617e92e1@mail.gmail.com> Message-ID: <3ae3d52905062308111f35015@mail.gmail.com> > I am attaching the source code along this mail. Let me know if you need more info. In my previous code , uncomment the 42nd line to get the test case : opt = optimize.leastsq(residual_values, initial, args = (inputs, answers), Dfun=jacobian, maxfev=10000) Abhiman > > -- > Abhiman Chatra B, > Technical Analyst, > Trilogy India, > Mobile # : 9845358165 > ---------------------------------------------------- > "If only your programs would be correct if you simply typed them three > times" > > -- Abhiman Chatra B, Technical Analyst, Trilogy India, Mobile # : 9845358165 ---------------------------------------------------- "If only your programs would be correct if you simply typed them three times" -------------- next part -------------- An HTML attachment was scrubbed... URL: From strawman at astraw.com Thu Jun 23 11:59:28 2005 From: strawman at astraw.com (Andrew Straw) Date: Thu, 23 Jun 2005 08:59:28 -0700 Subject: [SciPy-user] Bug in optimize.leastsq when Jacobian matrix is provided In-Reply-To: <3ae3d52905062307265625959c@mail.gmail.com> References: <3ae3d52905062307265625959c@mail.gmail.com> Message-ID: Hi Abhiman, Can you provide a simple script which demonstrates the problem? People will be able to help you much more easily this way. Cheers! Andrew On Jun 23, 2005, at 7:26 AM, Abhiman Chatra wrote: > Hi, > > I am new to Python, SciPy and optimization. So excuse me if I have > make mistakes. > > My Problem : > ------------------- > I want to use optimize.leastsq function of scipy to find a least > square fit. But my function in the parametric form is quite > complicated. Hence I want to provide the Jacobian matrix to the > leastsquare optimizer to improve its performance. But when I provide > the function for calculating the Jacobian matrix, I get a windows > error saying "python.exe has generated errors and will be closed by > Windows. You will need to restart the program. An error log is being > created " > > Since this error cannot be caught I cannot trace the cause of this > error. But my feeling is that this is some memory error. This error is > not reproducible if I do not provide the function for calculating the > Jacobian matrix. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1077 bytes Desc: not available URL: From strawman at astraw.com Thu Jun 23 18:44:11 2005 From: strawman at astraw.com (Andrew Straw) Date: Thu, 23 Jun 2005 15:44:11 -0700 Subject: [SciPy-user] ANN: PyUniversalLibrary version 20050623 Message-ID: <42BB3B3B.9010808@astraw.com> I would like to announce PyUniversalLibrary version 20050623. PyUniversalLibrary is a Python wrapper for Measurement Computing's Universal Library for data acquisition on Microsoft Windows operating systems. http://www.its.caltech.edu/~astraw/pyul.html Work in Progress ---------------- Currently PyUniversalLibrary is incomplete. I have only wrapped the functions which I have personally needed, primarily buffered analog input. If you need more functionality, you will hopefully find that the start I have made in wrapping this library useful. I welcome your changes and additions. I will include them with the next release with appropriate credit. From simon at arrowtheory.com Fri Jun 24 00:47:55 2005 From: simon at arrowtheory.com (Simon Burton) Date: Fri, 24 Jun 2005 14:47:55 +1000 Subject: [SciPy-user] Scalapack interface? In-Reply-To: References: Message-ID: <20050624144755.12dd9140.simon@arrowtheory.com> On Mon, 20 Jun 2005 10:45:55 -0500 rajb wrote: > Hi all > > I keep seeing references in the docs regarding a Python interface to > Scalapack, but > it does not seem to actually exist. Can anyone please tell me if > there is one around or > in development stage? I need such an interface for my research, and I > was thinking of writing one myself, but it would be great if someone > is already working on it. Please reply asap. > We have been looking at this. And considering PLAPACK aswell. http://sml.nicta.com.au/ If there are no wrappers, it is likely that we will write them. Do you have a preference between PLAPACK and ScaLAPACK ? I think we are leaning towards PLAPACK, but have not done any benchmarking. Simon. -- Simon Burton, B.Sc. Licensed PO Box 8066 ANU Canberra 2601 Australia Ph. 61 02 6249 6940 http://arrowtheory.com From stephen.walton at csun.edu Fri Jun 24 15:24:12 2005 From: stephen.walton at csun.edu (Stephen Walton) Date: Fri, 24 Jun 2005 12:24:12 -0700 Subject: [SciPy-user] LiveDocs? Message-ID: <42BC5DDC.7000102@csun.edu> I thought this was asked before but perhaps it was my imagination: when will the Scipy LiveDocs be back up? From joe at enthought.com Fri Jun 24 15:36:43 2005 From: joe at enthought.com (Joe Cooper) Date: Fri, 24 Jun 2005 14:36:43 -0500 Subject: [SciPy-user] LiveDocs? In-Reply-To: <42BC5DDC.7000102@csun.edu> References: <42BC5DDC.7000102@csun.edu> Message-ID: <42BC60CB.20307@enthought.com> Stephen Walton wrote: > I thought this was asked before but perhaps it was my imagination: when > will the Scipy LiveDocs be back up? It was discussed a week or so ago. Travis Oliphant was maintaining the server on which livedocs was running, but BYU changed policy such that his server is no longer accessible. I will be setting up livedocs on the new SciPy.org server as soon as migration is complete. I'm hoping to wrap it up this weekend. I will remove the link, so that there will be no more confusion about its availability. From fishburn at MIT.EDU Fri Jun 24 16:15:47 2005 From: fishburn at MIT.EDU (Matt Fishburn) Date: Fri, 24 Jun 2005 16:15:47 -0400 Subject: [SciPy-user] scipy tutorials Message-ID: <42BC69F3.702@mit.edu> Hello all, I've written some basic scipy tutorials, located at: http://scipy.mit.edu/ The tutorials are meant to be a resource to people starting to work with scipy/matplotlib/ipython. A few more tutorials should be coming over the next month or so. Please let me have any feedback - if you find the tutorials useful, if you thought something wasn't explained well, etc. -Matt Fishburn From swisher at enthought.com Fri Jun 24 16:42:08 2005 From: swisher at enthought.com (Janet M. Swisher) Date: Fri, 24 Jun 2005 15:42:08 -0500 Subject: [SciPy-user] scipy tutorials In-Reply-To: <42BC69F3.702@mit.edu> References: <42BC69F3.702@mit.edu> Message-ID: <42BC7020.9000909@enthought.com> Matt Fishburn wrote: > Hello all, > > I've written some basic scipy tutorials, located at: > > http://scipy.mit.edu/ > > The tutorials are meant to be a resource to people starting to work > with scipy/matplotlib/ipython. A few more tutorials should be coming > over the next month or so. Please let me have any feedback - if you > find the tutorials useful, if you thought something wasn't explained > well, etc. > Wonderful! Feel free to post these on scipy.org (e.g., in a user folder). Mind if link to them (either on scipy or mit) from the Documentation page? -- Janet Swisher --- Senior Technical Writer Enthought, Inc. http://www.enthought.com From aisaac at american.edu Fri Jun 24 17:45:06 2005 From: aisaac at american.edu (Alan G Isaac) Date: Fri, 24 Jun 2005 17:45:06 -0400 Subject: [SciPy-user] scipy tutorials In-Reply-To: <42BC69F3.702@mit.edu> References: <42BC69F3.702@mit.edu> Message-ID: On Fri, 24 Jun 2005, Matt Fishburn apparently wrote: > http://scipy.mit.edu/ Useful fun! Cheers, Alan Isaac From gruben at bigpond.net.au Fri Jun 24 22:19:26 2005 From: gruben at bigpond.net.au (Gary Ruben) Date: Sat, 25 Jun 2005 12:19:26 +1000 Subject: [SciPy-user] scipy tutorials In-Reply-To: <42BC69F3.702@mit.edu> References: <42BC69F3.702@mit.edu> Message-ID: <42BCBF2E.7050904@bigpond.net.au> Hi Matt, First, thanks for producing and advertising the existence of these. I thought I'd try your Echo Cancellation tute. A few problems I found: The comment "the python sound docs at python.org are an excellent resource." isn't enough info for me to easily find the docs you're talking about - in fact I quickly gave up. Perhaps adding a "search for 'foo'" would help. You need to add a line to make it stand-alone: >>> from scipy import * The first time I tried this: >>> original_signal[i] = struct.unpack('B',osf.readframes(1))[0] I got a traceback Traceback (most recent call last): File "", line 2, in -toplevel- original_signal[i] = struct.unpack('B',osf.readframes(1))[0] error: unpack str size does not match format so presumably there are restrictions on the .wav file format. I tried a different .wav file and it worked fine. Perhaps providing a short .wav file of the correct format would be a good idea. In fact, I found that the .wav I use locks up at the correlation step, presumably because it's too big (65k ~ 5 seconds), so at least put a comment in to keep the .wav of the order of a second. I'll try again later. Half-way through you change from using original_signal to osig This needs fixing. You haven't shown the commands to produce the waveform plots. Something simple like >>> from pylab import * >>> plot(csig) [] >>> show() unless you want to assume usage with Ipython in interactive mode. I had a quick look at the DTMF tute. Since, this contains plotting instructions, I assume it is intended to be done before the Echo Cancellation tute. This needs commenting or at a minimum reordering of the links on the webpage. I haven't run through it, but I noticed there's a syntax-error generating typo: >>> From scipy import * ^ lower case Hope this helps, Gary R. Matt Fishburn wrote: > Hello all, > > I've written some basic scipy tutorials, located at: > > http://scipy.mit.edu/ > > The tutorials are meant to be a resource to people starting to work with > scipy/matplotlib/ipython. A few more tutorials should be coming over > the next month or so. Please let me have any feedback - if you find the > tutorials useful, if you thought something wasn't explained well, etc. > > -Matt Fishburn From fishburn at MIT.EDU Mon Jun 27 07:46:07 2005 From: fishburn at MIT.EDU (Matt Fishburn) Date: Mon, 27 Jun 2005 07:46:07 -0400 Subject: [SciPy-user] scipy tutorials In-Reply-To: <42BC7020.9000909@enthought.com> References: <42BC69F3.702@mit.edu> <42BC7020.9000909@enthought.com> Message-ID: <42BFE6FF.2020805@mit.edu> Janet M. Swisher wrote: > Matt Fishburn wrote: > >> Hello all, >> >> I've written some basic scipy tutorials, located at: >> > Wonderful! Feel free to post these on scipy.org (e.g., in a user > folder). Mind if link to them (either on scipy or mit) from the > Documentation page? > For now, please feel free to link to the main page. A copyright/linking section should be going up within the week that has information on linking to various sub-pages (I'll e-mail you when it goes up). I need to check with another person about linking directly to the tutorials, but I believe it should be okay. Gary Ruben wrote: >> >> Hi Matt, >> First, thanks for producing and advertising the existence of these. >> >> I thought I'd try your Echo Cancellation tute. A few problems I found: ... >> >> I had a quick look at the DTMF tute. Since, this contains plotting >> instructions, I assume it is intended to be done before the Echo >> Cancellation tute. This needs commenting or at a minimum reordering of >> the links on the webpage. >> ... >> >> Hope this helps, >> Gary R. >> Thank you for looking over both of the tutorials. I've fixed the errors in the echo cancellation tutorial, the typo in the DTMF tutorial and reordered the two tutorials on the site. I'm starting to write a wave tutorial about importing and exporting sound files that I hope to post later this week. This is complicated enough to warrant its own tutorial. -Matt Fishburn From aurelien.gourrier at free.fr Tue Jun 28 03:55:20 2005 From: aurelien.gourrier at free.fr (aurelien.gourrier at free.fr) Date: Tue, 28 Jun 2005 09:55:20 +0200 Subject: [SciPy-user] Re: SciPy-user Digest, Vol 22, Issue 3 In-Reply-To: <20050608125011.C3A983EBA3@www.scipy.com> References: <20050608125011.C3A983EBA3@www.scipy.com> Message-ID: <1119945320.42c10268ce890@imp6-q.free.fr> Hi all, Can anyone tell me if there is a possibility to use constraints on the leastsq method ? I need to do some bounded minimization of gaussians or lorentzians on 1-D data and couldn't find any way out so far... Aure From ckkart at hoc.net Tue Jun 28 06:22:31 2005 From: ckkart at hoc.net (Christian Kristukat) Date: Tue, 28 Jun 2005 12:22:31 +0200 Subject: [SciPy-user] Re: SciPy-user Digest, Vol 22, Issue 3 In-Reply-To: <1119945320.42c10268ce890@imp6-q.free.fr> References: <20050608125011.C3A983EBA3@www.scipy.com> <1119945320.42c10268ce890@imp6-q.free.fr> Message-ID: <42C124E7.2030903@hoc.net> aurelien.gourrier at free.fr wrote: > Hi all, > > Can anyone tell me if there is a possibility to use constraints on the leastsq > method ? I need to do some bounded minimization of gaussians or lorentzians on > 1-D data and couldn't find any way out so far... One method I'm using to add simple bounds is to map the parameters to some limits before calculating the residuals. def residuals(a): # mapping +/-inf to +/-1 t = a/(abs(a)+1.0) # amin/amax are 1D arrays containing the bounds # map -1/+1 to amin/amax a = (amin+amax)/2.0+(amax-amin)/2.0*t # avealuate the function newy = func(a) return y-newy Regards, Christian From elcorto at gmx.net Tue Jun 28 08:23:45 2005 From: elcorto at gmx.net (Steve Schmerler) Date: Tue, 28 Jun 2005 14:23:45 +0200 Subject: [SciPy-user] Re: SciPy-user Digest, Vol 22, Issue 3 In-Reply-To: <42C124E7.2030903@hoc.net> References: <20050608125011.C3A983EBA3@www.scipy.com> <1119945320.42c10268ce890@imp6-q.free.fr> <42C124E7.2030903@hoc.net> Message-ID: <42C14151.5060007@gmx.net> Hi, or you can use mpfit for constrained optimization which is a (quite fast) pure Python implementation of MINPACK's LMFIT routine. http://cars9.uchicago.edu/software/python/index.html -> mpfit.py http://www.scipy.org/mailinglists/mailman?fn=scipy-user/2005-February/004104.html I did some little bugfixes in this code (see attachment) and used it for some time without problems. cheers, steve Christian Kristukat wrote: > aurelien.gourrier at free.fr wrote: > >> Hi all, >> >> Can anyone tell me if there is a possibility to use constraints on the >> leastsq >> method ? I need to do some bounded minimization of gaussians or >> lorentzians on >> 1-D data and couldn't find any way out so far... > > > One method I'm using to add simple bounds is to map the parameters to > some limits before calculating the residuals. > > def residuals(a): > # mapping +/-inf to +/-1 > t = a/(abs(a)+1.0) > > # amin/amax are 1D arrays containing the bounds > # map -1/+1 to amin/amax > a = (amin+amax)/2.0+(amax-amin)/2.0*t > > # avealuate the function > newy = func(a) > > return y-newy > > Regards, Christian > > _______________________________________________ > 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: mpfit.py Type: text/x-python Size: 91220 bytes Desc: not available URL: From jdhunter at ace.bsd.uchicago.edu Tue Jun 28 09:32:42 2005 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Tue, 28 Jun 2005 08:32:42 -0500 Subject: [SciPy-user] Re: SciPy-user Digest, Vol 22, Issue 3 In-Reply-To: <1119945320.42c10268ce890@imp6-q.free.fr> (aurelien.gourrier@free.fr's message of "Tue, 28 Jun 2005 09:55:20 +0200") References: <20050608125011.C3A983EBA3@www.scipy.com> <1119945320.42c10268ce890@imp6-q.free.fr> Message-ID: <87fyv21u9x.fsf@peds-pc311.bsd.uchicago.edu> >>>>> "aurelien" == aurelien gourrier writes: aurelien> Hi all, Can anyone tell me if there is a possibility to aurelien> use constraints on the leastsq method ? I need to do aurelien> some bounded minimization of gaussians or lorentzians on aurelien> 1-D data and couldn't find any way out so far... scipy.optimize.fmin_l_bfgs_b takes an optional bounds argument, which is a list of min/max values for each parameter, and you can use None to specify unbounded, eg guess = 1.0, -.4, 0.01 bounds = [ (0., 4.), (None, 0.), (0., .2) ] best, val, d = fmin_l_bfgs_b(func, guess, bounds=bounds) JDH From aurelien.gourrier at free.fr Tue Jun 28 11:36:21 2005 From: aurelien.gourrier at free.fr (aurelien.gourrier at free.fr) Date: Tue, 28 Jun 2005 17:36:21 +0200 Subject: [SciPy-user] Re: SciPy-user Digest, Vol 22, Issue 3 In-Reply-To: <87fyv21u9x.fsf@peds-pc311.bsd.uchicago.edu> References: <20050608125011.C3A983EBA3@www.scipy.com> <1119945320.42c10268ce890@imp6-q.free.fr> <87fyv21u9x.fsf@peds-pc311.bsd.uchicago.edu> Message-ID: <1119972981.42c16e75a64a5@imp6-q.free.fr> OK, I'll try the different suggested ways, Many thanks to all :-) Cheers, Aure Quoting John Hunter : > >>>>> "aurelien" == aurelien gourrier writes: > > aurelien> Hi all, Can anyone tell me if there is a possibility to > aurelien> use constraints on the leastsq method ? I need to do > aurelien> some bounded minimization of gaussians or lorentzians on > aurelien> 1-D data and couldn't find any way out so far... > > > scipy.optimize.fmin_l_bfgs_b takes an optional bounds argument, which > is a list of min/max values for each parameter, and you can use None > to specify unbounded, eg > > guess = 1.0, -.4, 0.01 > bounds = [ (0., 4.), (None, 0.), (0., .2) ] > best, val, d = fmin_l_bfgs_b(func, guess, bounds=bounds) > > JDH > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From aisaac at american.edu Tue Jun 28 09:23:58 2005 From: aisaac at american.edu (Alan G Isaac) Date: Tue, 28 Jun 2005 09:23:58 -0400 Subject: [SciPy-user] Re: SciPy-user Digest, Vol 22, Issue 3 In-Reply-To: <42C14151.5060007@gmx.net> References: <20050608125011.C3A983EBA3@www.scipy.com><1119945320.42c10268ce890@imp6-q.free.fr> <42C124E7.2030903@hoc.net><42C14151.5060007@gmx.net> Message-ID: On Tue, 28 Jun 2005, Steve Schmerler apparently wrote: > I did some little bugfixes in this code (see attachment) > and used it for some time without problems. Are you saying that the attached code differs from that on Rivers's website? Or not? Thanks, Alan Isaac From favilac at cosmos.astro.uson.mx Tue Jun 28 20:55:54 2005 From: favilac at cosmos.astro.uson.mx (Fernando Avila Castro) Date: Tue, 28 Jun 2005 17:55:54 -0700 (MST) Subject: [SciPy-user] chi square value on leastsq Message-ID: Hi, i'm using leastsq to fit a set of data and it works quite well. However, i would like to get the chi square value of this fit, or at least any indication of how good the fit was. Thanks. From rkern at ucsd.edu Tue Jun 28 21:23:41 2005 From: rkern at ucsd.edu (Robert Kern) Date: Tue, 28 Jun 2005 18:23:41 -0700 Subject: [SciPy-user] chi square value on leastsq In-Reply-To: References: Message-ID: <42C1F81D.9040705@ucsd.edu> Fernando Avila Castro wrote: > > Hi, i'm using leastsq to fit a set of data and it works quite well. > However, i would like to get the chi square value of this fit, or at > least any indication of how good the fit was. x, mesg = optimize.leastsq(f, x0, ...) chi2 = sum(power(f(x), 2)) -- 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 nwagner at mecha.uni-stuttgart.de Wed Jun 29 05:43:55 2005 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Wed, 29 Jun 2005 11:43:55 +0200 Subject: [SciPy-user] Getting started with optimize.fmin_l_bfgs_b Message-ID: <42C26D5B.40901@mecha.uni-stuttgart.de> Hi all, How can I solve the following LP problem with scipy ? Minimize f(x_1,x_2) = x_1-x_2 subject to -2 \le x_1 \le 2 -2 \le x_2 \le 2 The solution is x_1 = -2 , x_2 = 2 My implementation fails from scipy import * def func(x): return x[0]-x[1] guess = 1.2, 1.0 bounds = [(-2.0,2.0), (-2.0,2.0) ] best, val, d = optimize.fmin_l_bfgs_b(func, guess, bounds=bounds) Traceback (most recent call last): File "bfgs_b.py", line 8, in ? best, val, d = optimize.fmin_l_bfgs_b(func, guess, bounds=bounds) File "/usr/local/lib/python2.4/site-packages/scipy/optimize/lbfgsb.py", line 183, in fmin_l_bfgs_b f[0], g = func_and_grad(x) File "/usr/local/lib/python2.4/site-packages/scipy/optimize/lbfgsb.py", line 135, in func_and_grad f, g = func(x, *args) TypeError: unpack non-sequence How can I resolve the problem ? Nils From ckkart at hoc.net Wed Jun 29 05:54:13 2005 From: ckkart at hoc.net (Christian Kristukat) Date: Wed, 29 Jun 2005 11:54:13 +0200 Subject: [SciPy-user] Getting started with optimize.fmin_l_bfgs_b In-Reply-To: <42C26D5B.40901@mecha.uni-stuttgart.de> References: <42C26D5B.40901@mecha.uni-stuttgart.de> Message-ID: <42C26FC5.5050807@hoc.net> Nils Wagner wrote: > Traceback (most recent call last): > File "bfgs_b.py", line 8, in ? > best, val, d = optimize.fmin_l_bfgs_b(func, guess, bounds=bounds) > File "/usr/local/lib/python2.4/site-packages/scipy/optimize/lbfgsb.py", > line 183, in fmin_l_bfgs_b > f[0], g = func_and_grad(x) > File "/usr/local/lib/python2.4/site-packages/scipy/optimize/lbfgsb.py", > line 135, in func_and_grad > f, g = func(x, *args) > TypeError: unpack non-sequence > > How can I resolve the problem ? Look at the docstring of l_bfgs_b - func is expected to return the function and its gradient! Regards, Christian From nwagner at mecha.uni-stuttgart.de Wed Jun 29 07:27:40 2005 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Wed, 29 Jun 2005 13:27:40 +0200 Subject: [SciPy-user] Getting started with optimize.fmin_l_bfgs_b In-Reply-To: <42C26FC5.5050807@hoc.net> References: <42C26D5B.40901@mecha.uni-stuttgart.de> <42C26FC5.5050807@hoc.net> Message-ID: <42C285AC.20507@mecha.uni-stuttgart.de> Christian Kristukat wrote: > Nils Wagner wrote: > >> Traceback (most recent call last): >> File "bfgs_b.py", line 8, in ? >> best, val, d = optimize.fmin_l_bfgs_b(func, guess, bounds=bounds) >> File >> "/usr/local/lib/python2.4/site-packages/scipy/optimize/lbfgsb.py", >> line 183, in fmin_l_bfgs_b >> f[0], g = func_and_grad(x) >> File >> "/usr/local/lib/python2.4/site-packages/scipy/optimize/lbfgsb.py", >> line 135, in func_and_grad >> f, g = func(x, *args) >> TypeError: unpack non-sequence >> >> How can I resolve the problem ? > > > Look at the docstring of l_bfgs_b - func is expected to return the > function and its gradient! > > Regards, Christian > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user Hi Christian, This my modified program from scipy import * def func(x): return x[0]-x[1] def fprime(x): return array(([1,-1])) guess = 1.2, 1.3 bounds = [(-2.0,2.0), (-2.0,2.0) ] best, val, d = optimize.fmin_l_bfgs_b(func, guess, fprime, approx_grad=True, bounds=bounds, iprint=2) print 'Position of the minimum',best, 'and its value',val Is it somehow possible to visualize (e.g. by matplotlib) the history of the optimization process ? Nils From ckkart at hoc.net Wed Jun 29 07:46:22 2005 From: ckkart at hoc.net (Christian Kristukat) Date: Wed, 29 Jun 2005 13:46:22 +0200 Subject: [SciPy-user] Getting started with optimize.fmin_l_bfgs_b In-Reply-To: <42C285AC.20507@mecha.uni-stuttgart.de> References: <42C26D5B.40901@mecha.uni-stuttgart.de> <42C26FC5.5050807@hoc.net> <42C285AC.20507@mecha.uni-stuttgart.de> Message-ID: <42C28A0E.3000107@hoc.net> Nils Wagner wrote: > Christian Kristukat wrote: > >> Nils Wagner wrote: >> >>> Traceback (most recent call last): >>> File "bfgs_b.py", line 8, in ? >>> best, val, d = optimize.fmin_l_bfgs_b(func, guess, bounds=bounds) >>> File >>> "/usr/local/lib/python2.4/site-packages/scipy/optimize/lbfgsb.py", >>> line 183, in fmin_l_bfgs_b >>> f[0], g = func_and_grad(x) >>> File >>> "/usr/local/lib/python2.4/site-packages/scipy/optimize/lbfgsb.py", >>> line 135, in func_and_grad >>> f, g = func(x, *args) >>> TypeError: unpack non-sequence >>> >>> How can I resolve the problem ? >> >> >> >> Look at the docstring of l_bfgs_b - func is expected to return the >> function and its gradient! >> >> Regards, Christian >> >> _______________________________________________ >> SciPy-user mailing list >> SciPy-user at scipy.net >> http://www.scipy.net/mailman/listinfo/scipy-user > > > > Hi Christian, > > This my modified program > > from scipy import * > > def func(x): > return x[0]-x[1] > > def fprime(x): > return array(([1,-1])) It has to be a float array, otherwise l_bgfs_b will complain. > guess = 1.2, 1.3 > bounds = [(-2.0,2.0), (-2.0,2.0) ] > best, val, d = optimize.fmin_l_bfgs_b(func, guess, fprime, > approx_grad=True, bounds=bounds, iprint=2) Now, because of 'approx_grad=True', the gradient is approximated and fprime is not evaluated. You should always prefer to calculate the gradient analytically, especially if it's as simple as in your example. > print 'Position of the minimum',best, 'and its value',val > > Is it somehow possible to visualize (e.g. by matplotlib) the history of > the optimization process ? You could collect the values of x at each call of 'func' in a global list and plot them later. Regards, Christian From nwagner at mecha.uni-stuttgart.de Wed Jun 29 08:00:55 2005 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Wed, 29 Jun 2005 14:00:55 +0200 Subject: [SciPy-user] Getting started with optimize.fmin_l_bfgs_b In-Reply-To: <42C28A0E.3000107@hoc.net> References: <42C26D5B.40901@mecha.uni-stuttgart.de> <42C26FC5.5050807@hoc.net> <42C285AC.20507@mecha.uni-stuttgart.de> <42C28A0E.3000107@hoc.net> Message-ID: <42C28D77.5000704@mecha.uni-stuttgart.de> Christian Kristukat wrote: > Nils Wagner wrote: > >> Christian Kristukat wrote: >> >>> Nils Wagner wrote: >>> >>>> Traceback (most recent call last): >>>> File "bfgs_b.py", line 8, in ? >>>> best, val, d = optimize.fmin_l_bfgs_b(func, guess, bounds=bounds) >>>> File >>>> "/usr/local/lib/python2.4/site-packages/scipy/optimize/lbfgsb.py", >>>> line 183, in fmin_l_bfgs_b >>>> f[0], g = func_and_grad(x) >>>> File >>>> "/usr/local/lib/python2.4/site-packages/scipy/optimize/lbfgsb.py", >>>> line 135, in func_and_grad >>>> f, g = func(x, *args) >>>> TypeError: unpack non-sequence >>>> >>>> How can I resolve the problem ? >>> >>> >>> >>> >>> Look at the docstring of l_bfgs_b - func is expected to return the >>> function and its gradient! >>> >>> Regards, Christian >>> >>> _______________________________________________ >>> SciPy-user mailing list >>> SciPy-user at scipy.net >>> http://www.scipy.net/mailman/listinfo/scipy-user >> >> >> >> >> Hi Christian, >> >> This my modified program >> >> from scipy import * >> >> def func(x): >> return x[0]-x[1] >> >> def fprime(x): >> return array(([1,-1])) > > > It has to be a float array, otherwise l_bgfs_b will complain. > >> guess = 1.2, 1.3 >> bounds = [(-2.0,2.0), (-2.0,2.0) ] >> best, val, d = optimize.fmin_l_bfgs_b(func, guess, fprime, >> approx_grad=True, bounds=bounds, iprint=2) > > > Now, because of 'approx_grad=True', the gradient is approximated and > fprime is not evaluated. You should always prefer to calculate the > gradient analytically, especially if it's as simple as in your example. > BTW, are you aware of the paper by Martins "The complex-step derivative approximation" ACM Trans. Math. Soft. 29 (3) 2003 pp. 245-262 This might be an option instead of using finite differences. from scipy import * def func(x): return x[0]-x[1], array(([1.0,-1.0])) def fprime(x): return array(([1.0,-1.0])) guess = 1.2, 1.3 bounds = [(-2.0,2.0), (-2.0,2.0) ] #best, val, d = optimize.fmin_l_bfgs_b(func, guess, fprime, approx_grad=True, bounds=bounds, iprint=2) best, val, d = optimize.fmin_l_bfgs_b(func, guess, bounds=bounds, iprint=-1) print 'Position of the minimum',best, 'and its value',val >> print 'Position of the minimum',best, 'and its value',val >> >> Is it somehow possible to visualize (e.g. by matplotlib) the history >> of the optimization process ? > > > You could collect the values of x at each call of 'func' in a global > list and plot them later. > Please can you send me an example how to realize this task in my case. Thanks in advance. Best regards, Nils > Regards, Christian > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From ckkart at hoc.net Wed Jun 29 08:17:13 2005 From: ckkart at hoc.net (Christian Kristukat) Date: Wed, 29 Jun 2005 14:17:13 +0200 Subject: [SciPy-user] Getting started with optimize.fmin_l_bfgs_b In-Reply-To: <42C28D77.5000704@mecha.uni-stuttgart.de> References: <42C26D5B.40901@mecha.uni-stuttgart.de> <42C26FC5.5050807@hoc.net> <42C285AC.20507@mecha.uni-stuttgart.de> <42C28A0E.3000107@hoc.net> <42C28D77.5000704@mecha.uni-stuttgart.de> Message-ID: <42C29149.7050103@hoc.net> Nils Wagner wrote: >> You could collect the values of x at each call of 'func' in a global >> list and plot them later. >> > Please can you send me an example how to realize this task in my case. > Thanks in advance. > from scipy import * import pylab data = [] def func(x): global data data.append(x*1) # to force a copy return x[0]-x[1], array(([1.0,-1.0])) guess = 1.2, 1.3 bounds = [(-2.0,2.0), (-2.0,2.0) ] best, val, d = optimize.fmin_l_bfgs_b(func, guess, bounds=bounds, iprint=-1) print 'Position of the minimum',best, 'and its value',val data = transpose(data) pylab.plot(range(len(data[0])),data[0]) pylab.plot(range(len(data[0])),data[1]) pylab.show() Regards, Christian From aurelien.gourrier at free.fr Wed Jun 29 09:53:30 2005 From: aurelien.gourrier at free.fr (aurelien.gourrier at free.fr) Date: Wed, 29 Jun 2005 15:53:30 +0200 Subject: [SciPy-user] Re: SciPy-user Digest, Vol 22, Issue 3 In-Reply-To: <42C14151.5060007@gmx.net> References: <20050608125011.C3A983EBA3@www.scipy.com> <1119945320.42c10268ce890@imp6-q.free.fr> <42C124E7.2030903@hoc.net> <42C14151.5060007@gmx.net> Message-ID: <1120053210.42c2a7daad0ca@imp3-q.free.fr> Hi Steve, I tried to use mpfit as it looks quite good but could get very far... I did the following (extremely) basic test (have to start somewhere...): ---- import mpfit2 import Numeric from Numeric import * from RandomArray import randint def linear(p,x=None,y=None,fjac=None,err=None): line = p[0]+p[1]*x status = 0 return [status, (y-line)] if __name__ == '__main__': #simulated experimental data x = Numeric.arange(10.) p = [3.,2.] y = (p[0] + p[1]*x)+ randint(1,3,(10,))/10. #estimated initial params p0 = [5.7, 1.2] #actual call to mpfit fa = {'x':x,'y':y} m = mpfit2.mpfit('linear',p0, functkw=fa, parinfo=None) print 'status', m.status if (m.status <= 0): print 'error message', m.errmsg print 'parameters = ',m.params --- but I get blocked at line 957 of your modified code with the following message --- Traceback (most recent call last): File "D:\Boulot\Software\Python\My_modules\MpfitTest01.py", line 28, in -toplevel- m = mpfit2.mpfit('linear',p0, functkw=fa, parinfo=None) File "C:\Program Files\Logiciels\Python24\lib\site-packages\mpfit2.py", line 960, in __init__ whatever1 = ((limited[:,0] & (xall < limits[:,0])) | TypeError: list indices must be integers --- I addded several print lines to try and get a bit further with this and I have : limited = [0, 0] limits = [0.0, 0.0] which means, e.g. that limited[:,0] cannot give a correct output... Would you (or anyone else) be able to tell me if I am missing something out in my script ? Cheers, Aure Selon Steve Schmerler : > Hi, > > or you can use mpfit for constrained optimization which is a (quite > fast) pure Python implementation of MINPACK's LMFIT routine. > > http://cars9.uchicago.edu/software/python/index.html -> mpfit.py > > http://www.scipy.org/mailinglists/mailman?fn=scipy-user/2005-February/004104.html > > > I did some little bugfixes in this code (see attachment) and used it for > some time without problems. > > cheers, > steve > > > Christian Kristukat wrote: > > aurelien.gourrier at free.fr wrote: > > > >> Hi all, > >> > >> Can anyone tell me if there is a possibility to use constraints on the > >> leastsq > >> method ? I need to do some bounded minimization of gaussians or > >> lorentzians on > >> 1-D data and couldn't find any way out so far... > > > > > > One method I'm using to add simple bounds is to map the parameters to > > some limits before calculating the residuals. > > > > def residuals(a): > > # mapping +/-inf to +/-1 > > t = a/(abs(a)+1.0) > > > > # amin/amax are 1D arrays containing the bounds > > # map -1/+1 to amin/amax > > a = (amin+amax)/2.0+(amax-amin)/2.0*t > > > > # avealuate the function > > newy = func(a) > > > > return y-newy > > > > Regards, Christian > > > > _______________________________________________ > > SciPy-user mailing list > > SciPy-user at scipy.net > > http://www.scipy.net/mailman/listinfo/scipy-user > > > > > From nwagner at mecha.uni-stuttgart.de Wed Jun 29 10:43:49 2005 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Wed, 29 Jun 2005 16:43:49 +0200 Subject: [SciPy-user] Bug(?) in optimize.fmin_powell Message-ID: <42C2B3A5.8020808@mecha.uni-stuttgart.de> Hi all, I have used several optimization procedures to minimize the Rayleigh quotient. Here are the results of rayleigh.py (see attachment): Optimization terminated successfully. Current function value: 0.022338 Iterations: 648 Function evaluations: 924 fmin 924 Approximated smallest eigenvalue 0.0223383478603 Optimization terminated successfully. Current function value: 0.022338 Iterations: 7 Function evaluations: 569 Powell 790 Approximated smallest eigenvalue 0.0223384381901 Optimization terminated successfully. Current function value: 0.022338 Iterations: 17 Function evaluations: 420 Gradient evaluations: 0 fmin_cg 420 Approximated smallest eigenvalue 0.0223383476402 Optimization terminated successfully. Current function value: 0.022338 Iterations: 22 Function evaluations: 276 Gradient evaluations: 0 fmin_bfgs 276 Approximated smallest eigenvalue 0.0223383475942 smallest eigenvalue by linalg.eigvals 0.0223383475497 The number of function evaluations differs in case of fmin_powell, that is 790 is given by len(data) and 569 is given in the output of fmin_powell. Is that a bug in fmin_powell ? Moreover, the evolution of the Rayleigh quotient is quite different in case of fmin_powell. For what reason ? Nils -------------- next part -------------- A non-text attachment was scrubbed... Name: rayleigh.py Type: text/x-python Size: 1107 bytes Desc: not available URL: From nwagner at mecha.uni-stuttgart.de Wed Jun 29 11:22:37 2005 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Wed, 29 Jun 2005 17:22:37 +0200 Subject: [SciPy-user] Bug(?) in optimize.fmin_ncg Message-ID: <42C2BCBD.6090009@mecha.uni-stuttgart.de> Hi all, I have obtained a runtime error depending on the order n. The test program is attached. It works fine for n = 10 Optimization terminated successfully. Current function value: 0.022338 Iterations: 7 Function evaluations: 8 Gradient evaluations: 69 Hessian evaluations: 0 fmin_ncg 8 Approximated smallest eigenvalue 0.0223383475497 smallest eigenvalue by linalg.eigvals 0.0223383475497 Any idea how to fix this problem would be appreciated. Thanks in advance. Nils numerix Numeric 24.0b2 Traceback (most recent call last): File "ncg.py", line 25, in ? xopt4 = optimize.fmin_ncg(func,x0, fprime) File "/usr/lib/python2.3/site-packages/scipy/optimize/optimize.py", line 978, in fmin_ncg xsupi = xsupi + dri0/curv * psupi ZeroDivisionError: float division -------------- next part -------------- A non-text attachment was scrubbed... Name: ncg.py Type: text/x-python Size: 771 bytes Desc: not available URL: From favilac at cosmos.astro.uson.mx Wed Jun 29 13:52:25 2005 From: favilac at cosmos.astro.uson.mx (Fernando Avila Castro) Date: Wed, 29 Jun 2005 10:52:25 -0700 (MST) Subject: [SciPy-user] chi square value on leastsq In-Reply-To: <42C1F81D.9040705@ucsd.edu> References: <42C1F81D.9040705@ucsd.edu> Message-ID: > > x, mesg = optimize.leastsq(f, x0, ...) > > chi2 = sum(power(f(x), 2)) > Thanks, but i'm unable to adapt it to my code: >>def residuals(p, y, x): >> A,B,C = p >> err = y - (A-B*(x**C)) >> return err >> >>def peval(x, p): >> return (p[0] - p[1]*(x**p[2])) >> >>p0 = [ 1, 1, 1] >> >>from scipy.optimize import leastsq >>plsq = leastsq(residuals, p0, args=(y_meas, x)) my guess is that the last line should be changed to >>p, plsq = leastsq(residuals, p0, args=(y_meas, x)) >>chi2 =sum(power(residuals,2)) but it doesn't work. What I'm doing wrong? From rkern at ucsd.edu Wed Jun 29 14:35:24 2005 From: rkern at ucsd.edu (Robert Kern) Date: Wed, 29 Jun 2005 11:35:24 -0700 Subject: [SciPy-user] chi square value on leastsq In-Reply-To: References: <42C1F81D.9040705@ucsd.edu> Message-ID: <42C2E9EC.4070704@ucsd.edu> Fernando Avila Castro wrote: > >>p, plsq = leastsq(residuals, p0, args=(y_meas, x)) > >>chi2 =sum(power(residuals,2)) > > but it doesn't work. > > What I'm doing wrong? chi2 = sum(power(residuals(p), 2)) You have to actually evaluate the function. -- 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 swisher at enthought.com Wed Jun 29 14:36:00 2005 From: swisher at enthought.com (Janet M. Swisher) Date: Wed, 29 Jun 2005 13:36:00 -0500 Subject: [SciPy-user] ANN: SciPy 2005 Conference - Python for Scientific Computing Message-ID: <42C2EA10.5070406@enthought.com> Greetings, The 2nd annual *SciPy Conference* on Python for Scientific Computing will be held again this year at Caltech, September 22-23, 2005. History: -------- This event started as SciPy "Workshops" held in 2002 and 2003, with great participation by the ~70 people attending. In 2004, it became a "conference", with attendance jumping to 87 participants. Registration: ------------- Registration is now open. More information can be found here: http://www.scipy.org/wikis/scipy05 You may register early online for $100.00. Registration includes breakfast and lunch Thursday & Friday and a very nice dinner Thursday night. After July 29, registration will cost $150.00. Call for Presenters: -------------------- If you are interested in presenting at the conference, you can submit an abstract in Plain Text, PDF or MS Word formats to abstracts at scipy.org -- the deadline for abstract submission is July 29, 2005. Papers or presentation slides are acceptable and are due by August 26, 2005. Feedback: --------- If you have any feedback from last year's conference or suggestions for this year, please discuss via the scipy mailing list: list signup: http://www.scipy.org/mailinglists/ list address: scipy-user at scipy.org Please forward this announcement to anyone/list that might be interested. Best Regards, -- Janet Swisher --- Senior Technical Writer Enthought, Inc. http://www.enthought.com From ryanfedora at comcast.net Wed Jun 29 14:54:45 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Wed, 29 Jun 2005 14:54:45 -0400 Subject: [SciPy-user] null space of a matrix Message-ID: <42C2EE75.3090004@comcast.net> This is probably a Numeric question, but is there an easy way to find the null space of a matrix in SciPy? Ryan From rkern at ucsd.edu Wed Jun 29 15:15:24 2005 From: rkern at ucsd.edu (Robert Kern) Date: Wed, 29 Jun 2005 12:15:24 -0700 Subject: [SciPy-user] null space of a matrix In-Reply-To: <42C2EE75.3090004@comcast.net> References: <42C2EE75.3090004@comcast.net> Message-ID: <42C2F34C.6020401@ucsd.edu> Ryan Krauss wrote: > This is probably a Numeric question, but is there an easy way to find > the null space of a matrix in SciPy? The SVD is one way. u, s, vh = linalg.svd(A) null_mask = (s <= eps) null_space = compress(null_mask, vh, axis=0) The rows in null_space span the null space of A. -- 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 nwagner at mecha.uni-stuttgart.de Wed Jun 29 15:26:20 2005 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Wed, 29 Jun 2005 21:26:20 +0200 Subject: [SciPy-user] null space of a matrix In-Reply-To: <42C2F34C.6020401@ucsd.edu> References: <42C2EE75.3090004@comcast.net> <42C2F34C.6020401@ucsd.edu> Message-ID: On Wed, 29 Jun 2005 12:15:24 -0700 Robert Kern wrote: > Ryan Krauss wrote: >> This is probably a Numeric question, but is there an >>easy way to find >> the null space of a matrix in SciPy? > > The SVD is one way. > > u, s, vh = linalg.svd(A) > null_mask = (s <= eps) > null_space = compress(null_mask, vh, axis=0) > > The rows in null_space span the null space of A. > Is it a great effort to add this as a built-in function e.g. null(A) similar to Matlab's function ? Nils > -- > 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 From ryanfedora at comcast.net Wed Jun 29 15:31:29 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Wed, 29 Jun 2005 15:31:29 -0400 Subject: [SciPy-user] null space of a matrix In-Reply-To: <42C2F34C.6020401@ucsd.edu> References: <42C2EE75.3090004@comcast.net> <42C2F34C.6020401@ucsd.edu> Message-ID: <42C2F711.3030107@comcast.net> Thanks Robert. This works very well. You seem to always submit high quality input to the list. Ryan Robert Kern wrote: > Ryan Krauss wrote: > >> This is probably a Numeric question, but is there an easy way to find >> the null space of a matrix in SciPy? > > > The SVD is one way. > > u, s, vh = linalg.svd(A) > null_mask = (s <= eps) > null_space = compress(null_mask, vh, axis=0) > > The rows in null_space span the null space of A. > From ryanfedora at comcast.net Wed Jun 29 15:59:57 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Wed, 29 Jun 2005 15:59:57 -0400 Subject: [SciPy-user] null space of a matrix In-Reply-To: <42C2F711.3030107@comcast.net> References: <42C2EE75.3090004@comcast.net> <42C2F34C.6020401@ucsd.edu> <42C2F711.3030107@comcast.net> Message-ID: <42C2FDBD.6040106@comcast.net> This is a completely trivial addition to Richard's submission, but here is the function I am using to implement the null function if anyone wants to copy and paste it into there own code: def null(A, eps=1e-15): u, s, vh = scipy.linalg.svd(A) null_mask = (s <= eps) null_space = scipy.compress(null_mask, vh, axis=0) return scipy.transpose(null_space) (this assumes you have already got an import scipy somewhere in the file) (It made more sense to me to return column vectors.) Ryan Ryan Krauss wrote: > Thanks Robert. This works very well. You seem to always submit high > quality input to the list. > > Ryan > > Robert Kern wrote: > >> Ryan Krauss wrote: >> >>> This is probably a Numeric question, but is there an easy way to >>> find the null space of a matrix in SciPy? >> >> >> >> The SVD is one way. >> >> u, s, vh = linalg.svd(A) >> null_mask = (s <= eps) >> null_space = compress(null_mask, vh, axis=0) >> >> The rows in null_space span the null space of A. >> > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From ryanfedora at comcast.net Wed Jun 29 16:03:47 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Wed, 29 Jun 2005 16:03:47 -0400 Subject: [SciPy-user] null space of a matrix - correction In-Reply-To: <42C2FDBD.6040106@comcast.net> References: <42C2EE75.3090004@comcast.net> <42C2F34C.6020401@ucsd.edu> <42C2F711.3030107@comcast.net> <42C2FDBD.6040106@comcast.net> Message-ID: <42C2FEA3.2050904@comcast.net> Sorry, I meant Robert's submission. I hope that doesn't confuse anyone trying to follow this thread. Ryan Krauss wrote: > This is a completely trivial addition to Robert's submission, but here > is the function I am using to implement the null function if anyone > wants to copy and paste it into there own code: > > def null(A, eps=1e-15): > u, s, vh = scipy.linalg.svd(A) > null_mask = (s <= eps) > null_space = scipy.compress(null_mask, vh, axis=0) > return scipy.transpose(null_space) > > (this assumes you have already got an import scipy somewhere in the file) > (It made more sense to me to return column vectors.) > > Ryan > > > Ryan Krauss wrote: > >> Thanks Robert. This works very well. You seem to always submit high >> quality input to the list. >> >> Ryan >> >> Robert Kern wrote: >> >>> Ryan Krauss wrote: >>> >>>> This is probably a Numeric question, but is there an easy way to >>>> find the null space of a matrix in SciPy? >>> >>> >>> >>> >>> The SVD is one way. >>> >>> u, s, vh = linalg.svd(A) >>> null_mask = (s <= eps) >>> null_space = compress(null_mask, vh, axis=0) >>> >>> The rows in null_space span the null space of A. >>> >> >> _______________________________________________ >> 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 rkern at ucsd.edu Wed Jun 29 16:08:44 2005 From: rkern at ucsd.edu (Robert Kern) Date: Wed, 29 Jun 2005 13:08:44 -0700 Subject: [SciPy-user] null space of a matrix In-Reply-To: <42C2FDBD.6040106@comcast.net> References: <42C2EE75.3090004@comcast.net> <42C2F34C.6020401@ucsd.edu> <42C2F711.3030107@comcast.net> <42C2FDBD.6040106@comcast.net> Message-ID: <42C2FFCC.7080807@ucsd.edu> Ryan Krauss wrote: > This is a completely trivial addition to Richard's submission, but here > is the function I am using to implement the null function if anyone > wants to copy and paste it into there own code: > > def null(A, eps=1e-15): > u, s, vh = scipy.linalg.svd(A) > null_mask = (s <= eps) > null_space = scipy.compress(null_mask, vh, axis=0) > return scipy.transpose(null_space) > > (this assumes you have already got an import scipy somewhere in the file) > (It made more sense to me to return column vectors.) Point. You may also need to conjugate() that return value when you happen to be dealing with complex values; I'm not sure. -- 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 nwagner at mecha.uni-stuttgart.de Wed Jun 29 16:23:05 2005 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Wed, 29 Jun 2005 22:23:05 +0200 Subject: [SciPy-user] null space of a matrix In-Reply-To: <42C2FFCC.7080807@ucsd.edu> References: <42C2EE75.3090004@comcast.net> <42C2F34C.6020401@ucsd.edu> <42C2F711.3030107@comcast.net> <42C2FDBD.6040106@comcast.net> <42C2FFCC.7080807@ucsd.edu> Message-ID: On Wed, 29 Jun 2005 13:08:44 -0700 Robert Kern wrote: > Ryan Krauss wrote: >> This is a completely trivial addition to Richard's >>submission, but here >> is the function I am using to implement the null >>function if anyone >> wants to copy and paste it into there own code: >> >> def null(A, eps=1e-15): >> u, s, vh = scipy.linalg.svd(A) >> null_mask = (s <= eps) >> null_space = scipy.compress(null_mask, vh, axis=0) >> return scipy.transpose(null_space) >> >> (this assumes you have already got an import scipy >>somewhere in the file) >> (It made more sense to me to return column vectors.) > > Point. You may also need to conjugate() that return >value when you happen to be dealing with complex values; >I'm not sure. Robert, Your exception is correct from scipy import * A = array(([1+0.1j,2,3],[1+0.1j,2,3],[1+0.1j,2+0j,3])) u, s, vh = linalg.svd(A) eps = 1.e-10 null_mask = (s <= eps) null_space = compress(null_mask, vh, axis=0) print dot(A,transpose(conjugate(null_space))) print dot(A,transpose(null_space)) Nils > > -- > 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 From ryanfedora at comcast.net Wed Jun 29 16:45:25 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Wed, 29 Jun 2005 16:45:25 -0400 Subject: [SciPy-user] null space of a matrix In-Reply-To: References: <42C2EE75.3090004@comcast.net> <42C2F34C.6020401@ucsd.edu> <42C2F711.3030107@comcast.net> <42C2FDBD.6040106@comcast.net> <42C2FFCC.7080807@ucsd.edu> Message-ID: <42C30865.2020006@comcast.net> Thanks to Nils and Robert for catching the complex conjugate thing. I am going to be working with complex matrices and not knowing that may have caused me a bit of pain. When you transpose a complex matrix in Matlab it always takes the complex conjugate transpose. Is this desirable behavior for SciPy/Numeric? Ryan Nils Wagner wrote: > On Wed, 29 Jun 2005 13:08:44 -0700 > Robert Kern wrote: > >> Ryan Krauss wrote: >> >>> This is a completely trivial addition to Richard's submission, but >>> here >>> is the function I am using to implement the null function if anyone >>> wants to copy and paste it into there own code: >>> >>> def null(A, eps=1e-15): >>> u, s, vh = scipy.linalg.svd(A) >>> null_mask = (s <= eps) >>> null_space = scipy.compress(null_mask, vh, axis=0) >>> return scipy.transpose(null_space) >>> >>> (this assumes you have already got an import scipy somewhere in the >>> file) >>> (It made more sense to me to return column vectors.) >> >> >> Point. You may also need to conjugate() that return value when you >> happen to be dealing with complex values; I'm not sure. > > > Robert, > > Your exception is correct > > from scipy import * > A = array(([1+0.1j,2,3],[1+0.1j,2,3],[1+0.1j,2+0j,3])) > u, s, vh = linalg.svd(A) > eps = 1.e-10 > null_mask = (s <= eps) > null_space = compress(null_mask, vh, axis=0) > print dot(A,transpose(conjugate(null_space))) > print dot(A,transpose(null_space)) > > Nils > >> >> -- >> 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 > > > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From rkern at ucsd.edu Wed Jun 29 19:40:34 2005 From: rkern at ucsd.edu (Robert Kern) Date: Wed, 29 Jun 2005 16:40:34 -0700 Subject: [SciPy-user] null space of a matrix In-Reply-To: <42C30865.2020006@comcast.net> References: <42C2EE75.3090004@comcast.net> <42C2F34C.6020401@ucsd.edu> <42C2F711.3030107@comcast.net> <42C2FDBD.6040106@comcast.net> <42C2FFCC.7080807@ucsd.edu> <42C30865.2020006@comcast.net> Message-ID: <42C33172.1070405@ucsd.edu> Ryan Krauss wrote: > Thanks to Nils and Robert for catching the complex conjugate thing. I > am going to be working with complex matrices and not knowing that may > have caused me a bit of pain. > > When you transpose a complex matrix in Matlab it always takes the > complex conjugate transpose. Is this desirable behavior for SciPy/Numeric? No. Numeric arrays are not matrices. transpose() performs a structural operation, not a linear algebraic operation. -- 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 Fernando.Perez at colorado.edu Wed Jun 29 20:29:49 2005 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Wed, 29 Jun 2005 18:29:49 -0600 Subject: [SciPy-user] null space of a matrix In-Reply-To: <42C33172.1070405@ucsd.edu> References: <42C2EE75.3090004@comcast.net> <42C2F34C.6020401@ucsd.edu> <42C2F711.3030107@comcast.net> <42C2FDBD.6040106@comcast.net> <42C2FFCC.7080807@ucsd.edu> <42C30865.2020006@comcast.net> <42C33172.1070405@ucsd.edu> Message-ID: <42C33CFD.3020905@colorado.edu> Robert Kern wrote: > Ryan Krauss wrote: > >>Thanks to Nils and Robert for catching the complex conjugate thing. I >>am going to be working with complex matrices and not knowing that may >>have caused me a bit of pain. >> >>When you transpose a complex matrix in Matlab it always takes the >>complex conjugate transpose. Is this desirable behavior for SciPy/Numeric? > > > No. Numeric arrays are not matrices. transpose() performs a structural > operation, not a linear algebraic operation. Besides, even for mathematical matrices, transposition and conjugation are distinct operations. Why matlab joins them is beyond me, and IMHO beyond mathematical sense. Cheers, f From rkern at ucsd.edu Wed Jun 29 20:38:44 2005 From: rkern at ucsd.edu (Robert Kern) Date: Wed, 29 Jun 2005 17:38:44 -0700 Subject: [SciPy-user] null space of a matrix In-Reply-To: <42C33CFD.3020905@colorado.edu> References: <42C2EE75.3090004@comcast.net> <42C2F34C.6020401@ucsd.edu> <42C2F711.3030107@comcast.net> <42C2FDBD.6040106@comcast.net> <42C2FFCC.7080807@ucsd.edu> <42C30865.2020006@comcast.net> <42C33172.1070405@ucsd.edu> <42C33CFD.3020905@colorado.edu> Message-ID: <42C33F14.2070403@ucsd.edu> Fernando Perez wrote: > Besides, even for mathematical matrices, transposition and conjugation > are distinct operations. Why matlab joins them is beyond me, and IMHO > beyond mathematical sense. It's a convenience issue, I think. For a certain set of problems (i.e. the ones that matlab was originally designed to solve way back in the day), one usually wants a Hermitian transpose. Personally, I'll gladly take sanity over that tiny convenience any day. -- 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 aisaac at american.edu Thu Jun 30 02:48:38 2005 From: aisaac at american.edu (Alan G Isaac) Date: Thu, 30 Jun 2005 02:48:38 -0400 Subject: [SciPy-user] 'linear regression' In-Reply-To: <200506052230.27312.david.grant@telus.net> References: <200506052230.27312.david.grant@telus.net> Message-ID: On Sun, 05 Jun 2005, David Grant apparently wrote: > http://www.davidgrant.ca/python/bestFitLine.py 1. For something like this I think GPL is major overkill. How about public domain, or at least MIT? (The comments below are in the public domain. ;-)) 2. In the loop for i in range(len(x)): data[i] = (x[i],y[i],(max(abs(y))+min(abs(y)))/100.) I think you could: - omit the weight. In any case, you chose a weight that does not look generally optimal (but will not usually hurt or help). - compute the weight outside the loop - let data=zip(x,y,repeat(wt)) (for whatever weight you choose, if you use one) (repeat is in itertools) 3. For your stated purpose, if I understood, you do not need nonlinear LS and could use a linear solution (noniterative). (Scipy has this.) 4. An object oriented approach seems more natural here, perhaps, especially given your reliance on Scientific Python. Point 2 seems to raise a question for Konrad: might allowing leastSquaresFit to accept an iterator instead of a list as data have some advantages? Cheers, Alan Isaac From ryanfedora at comcast.net Thu Jun 30 06:55:35 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Thu, 30 Jun 2005 06:55:35 -0400 Subject: [SciPy-user] do complex numbers default to double precision? Message-ID: <42C3CFA7.6040500@comcast.net> I have a matrix that is a function of a complex valued input. I am trying to find that value of that input that drives the determinant of the matrix to zero. I am searching for this value using fmin. The error I am trying to minimize is the abs(det(complex matrix)). I don't seem to be able to drive this error lower that roughly 9e-17, regardless of the values for ftol and xtol I use. Am I hitting some internal limitation? Are complex values by default single or double precision? Thanks, Ryan From nwagner at mecha.uni-stuttgart.de Thu Jun 30 07:03:53 2005 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Thu, 30 Jun 2005 13:03:53 +0200 Subject: [SciPy-user] do complex numbers default to double precision? In-Reply-To: <42C3CFA7.6040500@comcast.net> References: <42C3CFA7.6040500@comcast.net> Message-ID: <42C3D199.80107@mecha.uni-stuttgart.de> Ryan Krauss wrote: > I have a matrix that is a function of a complex valued input. I am > trying to find that value of that input that drives the determinant of > the matrix to zero. I am searching for this value using fmin. The > error I am trying to minimize is the abs(det(complex matrix)). It's not a good idea to use the determinant directly since det(A) is a rapidly varying function. As far as I understand your problem, you are interested in the solution of a two-parameter nonlinear eigenvalue problem. Is that correct ? How about the size of your complex matrix A ? Nils > I don't seem to be able to drive this error lower that roughly 9e-17, > regardless of the values for ftol and xtol I use. > > Am I hitting some internal limitation? Are complex values by default > single or double precision? > > Thanks, > > Ryan > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From pajer at iname.com Thu Jun 30 08:00:02 2005 From: pajer at iname.com (Gary) Date: Thu, 30 Jun 2005 08:00:02 -0400 Subject: [SciPy-user] do complex numbers default to double precision? In-Reply-To: <42C3CFA7.6040500@comcast.net> References: <42C3CFA7.6040500@comcast.net> Message-ID: <42C3DEC2.4010406@iname.com> Ryan Krauss wrote: > I have a matrix that is a function of a complex valued input. I am > trying to find that value of that input that drives the determinant of > the matrix to zero. I am searching for this value using fmin. The > error I am trying to minimize is the abs(det(complex matrix)). I > don't seem to be able to drive this error lower that roughly 9e-17, > regardless of the values for ftol and xtol I use. > Many years ago I did some programing in "pure" Forth, which does not support floating point numbers. That's right: integers only. I learned something about the limitations of floating point numbers, and something else about restructuring problems. I'm not suggesting you switch to integer arithmetic. Your question just rang a bell in my head. Maybe there is some other way to formulate your problem so that you don't run up against floating point limitations. Who hasn't gotten bitten by blind reliance on floating point arithmetic? just a thought, gary > Am I hitting some internal limitation? Are complex values by default > single or double precision? > > Thanks, > > Ryan > From ryanfedora at comcast.net Thu Jun 30 08:56:26 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Thu, 30 Jun 2005 08:56:26 -0400 Subject: [SciPy-user] do complex numbers default to double precision? In-Reply-To: <42C3D199.80107@mecha.uni-stuttgart.de> References: <42C3CFA7.6040500@comcast.net> <42C3D199.80107@mecha.uni-stuttgart.de> Message-ID: <42C3EBFA.6050200@comcast.net> The matrix is currently 4x4 but will grow to probably 6x6. It is definitely nonlinear. The matrix contains sinh, cosh, sin, and cos. I am using the transfer matrix method to analyze structures. When you say two-parameter, do you mean the real and imaginary part of the independent variable? I guess you are right that I don't necessarily need to use the determinant. In order to satisfy the boundary conditions of the problem this 4x4 or 6x6 matrix (which is really a submatrix of an 8x8 or 12x12) must have a null space. So, what would be the better thing to look for? An eignevalue that approaches 0? Ryan Nils Wagner wrote: > Ryan Krauss wrote: > >> I have a matrix that is a function of a complex valued input. I am >> trying to find that value of that input that drives the determinant >> of the matrix to zero. I am searching for this value using fmin. The >> error I am trying to minimize is the abs(det(complex matrix)). > > > It's not a good idea to use the determinant directly since det(A) is a > rapidly varying function. As far as I understand your problem, > you are interested in the solution of a two-parameter nonlinear > eigenvalue problem. Is that correct ? How about the size of your > complex matrix A ? > > Nils > >> I don't seem to be able to drive this error lower that roughly 9e-17, >> regardless of the values for ftol and xtol I use. >> >> Am I hitting some internal limitation? Are complex values by default >> single or double precision? >> >> Thanks, >> >> Ryan >> >> _______________________________________________ >> 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 rkern at ucsd.edu Thu Jun 30 09:02:58 2005 From: rkern at ucsd.edu (Robert Kern) Date: Thu, 30 Jun 2005 06:02:58 -0700 Subject: [SciPy-user] do complex numbers default to double precision? In-Reply-To: <42C3CFA7.6040500@comcast.net> References: <42C3CFA7.6040500@comcast.net> Message-ID: <42C3ED82.1020809@ucsd.edu> Ryan Krauss wrote: > I have a matrix that is a function of a complex valued input. I am > trying to find that value of that input that drives the determinant of > the matrix to zero. I am searching for this value using fmin. The error > I am trying to minimize is the abs(det(complex matrix)). I don't seem > to be able to drive this error lower that roughly 9e-17, regardless of > the values for ftol and xtol I use. > > Am I hitting some internal limitation? Are complex values by default > single or double precision? Python complexes are double precision. Numeric can do both (Complex32 and Complex64), but defaults to double precision. For double precision, eps (the smallest number that can be added to 1.0 and return a number greater than 1.0) is 2.**-52 or 2.22e-16. Anything smaller than eps, scaled by some constant related to the problem like norm(A, inf), can usually be considered to zero. If you actually need to make distinctions smaller than that, you need to use something better than double precision. Nothing in Scipy does that, yet. -- 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 ryanfedora at comcast.net Thu Jun 30 09:08:17 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Thu, 30 Jun 2005 09:08:17 -0400 Subject: [SciPy-user] do complex numbers default to double precision? In-Reply-To: <42C3EBFA.6050200@comcast.net> References: <42C3CFA7.6040500@comcast.net> <42C3D199.80107@mecha.uni-stuttgart.de> <42C3EBFA.6050200@comcast.net> Message-ID: <42C3EEC1.9000508@comcast.net> Thanks to Nils and Robert for their quick responses. This is definitely one thing to love about SciPy. I posted my null space question yesterday and Robert responded in 20 minutes and Nils in 30. I posted my optimization question this morning and Nils reponded in 8 minutes! It is almost like chatting with tech support. You make SciPy a pleasure to use! Thanks. Coincidentally, these two problems are linked and I don't know if my numerical error problems are from fmin or the null space/svd stuff. Once I find the input that drives my matrix to have a null space, I find the vector that corresponds to the null space (assuming the sub-matrix is only rank deficient by 1). Then I combined the null space vector with zeros that correspond with the boundary condition on one end of the problem. So, a 4x1 null space vector would give me an 8x1 full vector. I then take the 8x8 full matrix which has a 4x4 submatrix whose determinant is roughly 0 and multiply it by the 8x1 vector of the boudnary conditions I just solved for. This should then give me an 8x1 vector of the boundary conditions on the other end. The problem is that there are some elements of this second vector that should be 0 because of the boundary conditions and they are actually of order 1e-10, if the vector is normalized so that its magnitude is 1. This physically means that I have a cantilever beam with a free end that has just a little bit of force and moment at the free tip. Ryan Ryan Krauss wrote: > The matrix is currently 4x4 but will grow to probably 6x6. It is > definitely nonlinear. The matrix contains sinh, cosh, sin, and cos. > I am using the transfer matrix method to analyze structures. When you > say two-parameter, do you mean the real and imaginary part of the > independent variable? I guess you are right that I don't necessarily > need to use the determinant. In order to satisfy the boundary > conditions of the problem this 4x4 or 6x6 matrix (which is really a > submatrix of an 8x8 or 12x12) must have a null space. So, what would > be the better thing to look for? An eignevalue that approaches 0? > > Ryan > > Nils Wagner wrote: > >> Ryan Krauss wrote: >> >>> I have a matrix that is a function of a complex valued input. I am >>> trying to find that value of that input that drives the determinant >>> of the matrix to zero. I am searching for this value using fmin. >>> The error I am trying to minimize is the abs(det(complex matrix)). >> >> >> >> It's not a good idea to use the determinant directly since det(A) is >> a rapidly varying function. As far as I understand your problem, >> you are interested in the solution of a two-parameter nonlinear >> eigenvalue problem. Is that correct ? How about the size of your >> complex matrix A ? >> >> Nils >> >>> I don't seem to be able to drive this error lower that roughly >>> 9e-17, regardless of the values for ftol and xtol I use. >>> >>> Am I hitting some internal limitation? Are complex values by >>> default single or double precision? >>> >>> Thanks, >>> >>> Ryan >>> >>> _______________________________________________ >>> 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 >> > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From nwagner at mecha.uni-stuttgart.de Thu Jun 30 10:15:29 2005 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Thu, 30 Jun 2005 16:15:29 +0200 Subject: [SciPy-user] do complex numbers default to double precision? In-Reply-To: <42C3EEC1.9000508@comcast.net> References: <42C3CFA7.6040500@comcast.net> <42C3D199.80107@mecha.uni-stuttgart.de> <42C3EBFA.6050200@comcast.net> <42C3EEC1.9000508@comcast.net> Message-ID: <42C3FE81.1080701@mecha.uni-stuttgart.de> Ryan Krauss wrote: > Thanks to Nils and Robert for their quick responses. This is > definitely one thing to love about SciPy. I posted my null space > question yesterday and Robert responded in 20 minutes and Nils in 30. > I posted my optimization question this morning and Nils reponded in 8 > minutes! It is almost like chatting with tech support. You make > SciPy a pleasure to use! Thanks. > > Coincidentally, these two problems are linked and I don't know if my > numerical error problems are from fmin or the null space/svd stuff. > Once I find the input that drives my matrix to have a null space, I > find the vector that corresponds to the null space (assuming the > sub-matrix is only rank deficient by 1). Then I combined the null > space vector with zeros that correspond with the boundary condition on > one end of the problem. So, a 4x1 null space vector would give me an > 8x1 full vector. I then take the 8x8 full matrix which has a 4x4 > submatrix whose determinant is roughly 0 and multiply it by the 8x1 > vector of the boudnary conditions I just solved for. This should then > give me an 8x1 vector of the boundary conditions on the other end. > The problem is that there are some elements of this second vector that > should be 0 because of the boundary conditions and they are actually > of order 1e-10, if the vector is normalized so that its magnitude is > 1. This physically means that I have a cantilever beam with a free > end that has just a little bit of force and moment at the free tip. > > Ryan Ryan, Please can you send me your matrix (matrices). I will try solve your problem asap. A good starting point for your problem is an article by Ram Transcendental eigenvalue problem and its applications AIAA Journal Vol.40 (2002) pp. 1402-1407 Nils > > Ryan Krauss wrote: > >> The matrix is currently 4x4 but will grow to probably 6x6. It is >> definitely nonlinear. The matrix contains sinh, cosh, sin, and cos. >> I am using the transfer matrix method to analyze structures. When >> you say two-parameter, do you mean the real and imaginary part of the >> independent variable? I guess you are right that I don't necessarily >> need to use the determinant. In order to satisfy the boundary >> conditions of the problem this 4x4 or 6x6 matrix (which is really a >> submatrix of an 8x8 or 12x12) must have a null space. So, what would >> be the better thing to look for? An eignevalue that approaches 0? >> >> Ryan >> >> Nils Wagner wrote: >> >>> Ryan Krauss wrote: >>> >>>> I have a matrix that is a function of a complex valued input. I am >>>> trying to find that value of that input that drives the determinant >>>> of the matrix to zero. I am searching for this value using fmin. >>>> The error I am trying to minimize is the abs(det(complex matrix)). >>> >>> >>> >>> >>> It's not a good idea to use the determinant directly since det(A) is >>> a rapidly varying function. As far as I understand your problem, >>> you are interested in the solution of a two-parameter nonlinear >>> eigenvalue problem. Is that correct ? How about the size of your >>> complex matrix A ? >>> >>> Nils >>> >>>> I don't seem to be able to drive this error lower that roughly >>>> 9e-17, regardless of the values for ftol and xtol I use. >>>> >>>> Am I hitting some internal limitation? Are complex values by >>>> default single or double precision? >>>> >>>> Thanks, >>>> >>>> Ryan >>>> >>>> _______________________________________________ >>>> 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 >>> >> >> _______________________________________________ >> 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 rkern at ucsd.edu Thu Jun 30 10:27:53 2005 From: rkern at ucsd.edu (Robert Kern) Date: Thu, 30 Jun 2005 07:27:53 -0700 Subject: [SciPy-user] do complex numbers default to double precision? In-Reply-To: <42C3EEC1.9000508@comcast.net> References: <42C3CFA7.6040500@comcast.net> <42C3D199.80107@mecha.uni-stuttgart.de> <42C3EBFA.6050200@comcast.net> <42C3EEC1.9000508@comcast.net> Message-ID: <42C40169.7000507@ucsd.edu> Ryan Krauss wrote: > Thanks to Nils and Robert for their quick responses. This is definitely > one thing to love about SciPy. I posted my null space question > yesterday and Robert responded in 20 minutes and Nils in 30. I posted > my optimization question this morning and Nils reponded in 8 minutes! > It is almost like chatting with tech support. More pleasant than that, I hope! We have better "On Hold" music, too. > You make SciPy a pleasure > to use! Thanks. > > Coincidentally, these two problems are linked and I don't know if my > numerical error problems are from fmin or the null space/svd stuff. > Once I find the input that drives my matrix to have a null space, I find > the vector that corresponds to the null space (assuming the sub-matrix > is only rank deficient by 1). Then I combined the null space vector > with zeros that correspond with the boundary condition on one end of the > problem. So, a 4x1 null space vector would give me an 8x1 full vector. > I then take the 8x8 full matrix which has a 4x4 submatrix whose > determinant is roughly 0 and multiply it by the 8x1 vector of the > boudnary conditions I just solved for. This should then give me an 8x1 > vector of the boundary conditions on the other end. The problem is that > there are some elements of this second vector that should be 0 because > of the boundary conditions and they are actually of order 1e-10, if the > vector is normalized so that its magnitude is 1. This physically means > that I have a cantilever beam with a free end that has just a little bit > of force and moment at the free tip. A better function to minimize might be linalg.svdvals(A)[-1] (singular values are always sorted largest-to-smallest with LAPACK). If the size of the elements of A are about 1e6 or so, the smallest singular value may be about 1e-10 and the result of multiplying it with a calculated null vector will have elements the size of 1e-10. Come to think about it, a better nullspace function might be as follows: def null(A, eps=1e-16): u, s, vh = scipy.linalg.svd(A) mask = (s/s[0] <= eps) rowspace = scipy.compress(mask, vh, axis=0) return scipy.conjugate(scipy.transpose(rowspace)) and a corresponding function to minimize: def f(params): A = ... s = scipy.linalg.svdvals(A) return s[-1]/s[0] That should be <~ 1e-16 regardless of the size of the matrix. Be sure to check the output of the minimizer; it may be stuck in a local minimum. Do some plots of f(params) to see how nasty your functions are. You'll still get the small but > 1e-16 numbers when you multiply through, but if you've satisfied yourself that they ought to be zero, you can artificially set them to zero if you need to propagate the results through to other calculations. Ain't floating point great? -- 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 ryanfedora at comcast.net Thu Jun 30 10:32:58 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Thu, 30 Jun 2005 10:32:58 -0400 Subject: [SciPy-user] do complex numbers default to double precision? In-Reply-To: <42C3FE81.1080701@mecha.uni-stuttgart.de> References: <42C3CFA7.6040500@comcast.net> <42C3D199.80107@mecha.uni-stuttgart.de> <42C3EBFA.6050200@comcast.net> <42C3EEC1.9000508@comcast.net> <42C3FE81.1080701@mecha.uni-stuttgart.de> Message-ID: <42C4029A.10300@comcast.net> Thanks for your offer Nils. Attached are two files. TMM.py defines the transfer matrix classes. initial_TMM_scipy_v2 calls these classes. If you run initial_TMM_scipy_v2 it should work. I run it from Ipython. It generates a plot of the determinant to tell me where to start the optimization. Because there is no damping in this model yet, the eigenvalue should actually be purely imaginary in this case, but I need the algorithm to be able to handle damping and therefore complex values. I will look at the code and see if I can get you an easier to follow example if you would like. But feel free to start with this. Thanks, Ryan Nils Wagner wrote: > Ryan Krauss wrote: > >> Thanks to Nils and Robert for their quick responses. This is >> definitely one thing to love about SciPy. I posted my null space >> question yesterday and Robert responded in 20 minutes and Nils in >> 30. I posted my optimization question this morning and Nils reponded >> in 8 minutes! It is almost like chatting with tech support. You >> make SciPy a pleasure to use! Thanks. >> >> Coincidentally, these two problems are linked and I don't know if my >> numerical error problems are from fmin or the null space/svd stuff. >> Once I find the input that drives my matrix to have a null space, I >> find the vector that corresponds to the null space (assuming the >> sub-matrix is only rank deficient by 1). Then I combined the null >> space vector with zeros that correspond with the boundary condition >> on one end of the problem. So, a 4x1 null space vector would give me >> an 8x1 full vector. I then take the 8x8 full matrix which has a 4x4 >> submatrix whose determinant is roughly 0 and multiply it by the 8x1 >> vector of the boudnary conditions I just solved for. This should >> then give me an 8x1 vector of the boundary conditions on the other >> end. The problem is that there are some elements of this second >> vector that should be 0 because of the boundary conditions and they >> are actually of order 1e-10, if the vector is normalized so that its >> magnitude is 1. This physically means that I have a cantilever beam >> with a free end that has just a little bit of force and moment at the >> free tip. >> >> Ryan > > > Ryan, > > Please can you send me your matrix (matrices). I will try solve your > problem asap. > > A good starting point for your problem is an article by Ram > Transcendental eigenvalue problem and its applications > AIAA Journal Vol.40 (2002) pp. 1402-1407 > > Nils > >> >> Ryan Krauss wrote: >> >>> The matrix is currently 4x4 but will grow to probably 6x6. It is >>> definitely nonlinear. The matrix contains sinh, cosh, sin, and >>> cos. I am using the transfer matrix method to analyze structures. >>> When you say two-parameter, do you mean the real and imaginary part >>> of the independent variable? I guess you are right that I don't >>> necessarily need to use the determinant. In order to satisfy the >>> boundary conditions of the problem this 4x4 or 6x6 matrix (which is >>> really a submatrix of an 8x8 or 12x12) must have a null space. So, >>> what would be the better thing to look for? An eignevalue that >>> approaches 0? >>> >>> Ryan >>> >>> Nils Wagner wrote: >>> >>>> Ryan Krauss wrote: >>>> >>>>> I have a matrix that is a function of a complex valued input. I >>>>> am trying to find that value of that input that drives the >>>>> determinant of the matrix to zero. I am searching for this value >>>>> using fmin. The error I am trying to minimize is the >>>>> abs(det(complex matrix)). >>>> >>>> >>>> >>>> >>>> >>>> It's not a good idea to use the determinant directly since det(A) >>>> is a rapidly varying function. As far as I understand your problem, >>>> you are interested in the solution of a two-parameter nonlinear >>>> eigenvalue problem. Is that correct ? How about the size of your >>>> complex matrix A ? >>>> >>>> Nils >>>> >>>>> I don't seem to be able to drive this error lower that roughly >>>>> 9e-17, regardless of the values for ftol and xtol I use. >>>>> >>>>> Am I hitting some internal limitation? Are complex values by >>>>> default single or double precision? >>>>> >>>>> Thanks, >>>>> >>>>> Ryan >>>>> >>>>> _______________________________________________ >>>>> 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 >>>> >>> >>> _______________________________________________ >>> 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 > > > > > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: initial_TMM_scipy_v2.py URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: TMM.py URL: From ryanfedora at comcast.net Thu Jun 30 11:17:06 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Thu, 30 Jun 2005 11:17:06 -0400 Subject: [SciPy-user] do complex numbers default to double precision? In-Reply-To: <42C4029A.10300@comcast.net> References: <42C3CFA7.6040500@comcast.net> <42C3D199.80107@mecha.uni-stuttgart.de> <42C3EBFA.6050200@comcast.net> <42C3EEC1.9000508@comcast.net> <42C3FE81.1080701@mecha.uni-stuttgart.de> <42C4029A.10300@comcast.net> Message-ID: <42C40CF2.9090401@comcast.net> An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: TMM.py URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: myparams.txt URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: example.py URL: From rajb at cs.rice.edu Thu Jun 30 11:30:23 2005 From: rajb at cs.rice.edu (rajb) Date: Thu, 30 Jun 2005 10:30:23 -0500 Subject: [SciPy-user] Installing Scipy on Mac os X Panther G5 Message-ID: Hi I'm trying to install SciPy on a G5 running Mac OS X Panther with Nagware f95 compiler. the build terminates with the following ------------------------------------------------------------------------ ------------------- compiling Fortran sources f95(f77) options: '-fixed -O4' f95(f90) options: '-O4' f95(fix) options: '-fixed -O4' compile options: '-c' f95:f77: Lib/special/mach/r1mach.f -c option specified twice, continuing Note: On some machines, -ieee=full may be needed for best performance Obsolescent: Lib/special/mach/r1mach.f, line 1: Fixed source form Error: Lib/special/mach/r1mach.f, line 173: Inconsistent structure for arg 1 in call to I1MCRA [f95 error termination] -c option specified twice, continuing Note: On some machines, -ieee=full may be needed for best performance Obsolescent: Lib/special/mach/r1mach.f, line 1: Fixed source form Error: Lib/special/mach/r1mach.f, line 173: Inconsistent structure for arg 1 in call to I1MCRA [f95 error termination] error: Command "f95 -fixed -O4 -c -c Lib/special/mach/r1mach.f -o build/temp.darwin-7.9.0-Power_Macintosh-2.4/Lib/special/mach/ r1mach.o" failed with exit status 2 ------------------------------------------------------------------------ ------------------- Does anyone know what's happening? Thanks Raj From ryanfedora at comcast.net Thu Jun 30 12:36:36 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Thu, 30 Jun 2005 12:36:36 -0400 Subject: [SciPy-user] do complex numbers default to double precision? In-Reply-To: <42C40169.7000507@ucsd.edu> References: <42C3CFA7.6040500@comcast.net> <42C3D199.80107@mecha.uni-stuttgart.de> <42C3EBFA.6050200@comcast.net> <42C3EEC1.9000508@comcast.net> <42C40169.7000507@ucsd.edu> Message-ID: <42C41F94.1020403@comcast.net> So what should a good plot of the function I want to minimize look like? To my untrainded eye, the determinant seems like it is slightly better conditioned as magnitude of the eigenvalue increases, while the ratio of the minimum to the maximum svd looks better for smaller magnitudes. The svd approach is consdierably faster for the same convergence criteria - mainly because the determinant based method spends a long time looking for the second eigenvalue. Ryan Robert Kern wrote: > Ryan Krauss wrote: > >> Thanks to Nils and Robert for their quick responses. This is >> definitely one thing to love about SciPy. I posted my null space >> question yesterday and Robert responded in 20 minutes and Nils in >> 30. I posted my optimization question this morning and Nils reponded >> in 8 minutes! It is almost like chatting with tech support. > > > More pleasant than that, I hope! We have better "On Hold" music, too. > >> You make SciPy a pleasure to use! Thanks. >> >> Coincidentally, these two problems are linked and I don't know if my >> numerical error problems are from fmin or the null space/svd stuff. >> Once I find the input that drives my matrix to have a null space, I >> find the vector that corresponds to the null space (assuming the >> sub-matrix is only rank deficient by 1). Then I combined the null >> space vector with zeros that correspond with the boundary condition >> on one end of the problem. So, a 4x1 null space vector would give me >> an 8x1 full vector. I then take the 8x8 full matrix which has a 4x4 >> submatrix whose determinant is roughly 0 and multiply it by the 8x1 >> vector of the boudnary conditions I just solved for. This should >> then give me an 8x1 vector of the boundary conditions on the other >> end. The problem is that there are some elements of this second >> vector that should be 0 because of the boundary conditions and they >> are actually of order 1e-10, if the vector is normalized so that its >> magnitude is 1. This physically means that I have a cantilever beam >> with a free end that has just a little bit of force and moment at the >> free tip. > > > A better function to minimize might be linalg.svdvals(A)[-1] (singular > values are always sorted largest-to-smallest with LAPACK). > > If the size of the elements of A are about 1e6 or so, the smallest > singular value may be about 1e-10 and the result of multiplying it > with a calculated null vector will have elements the size of 1e-10. > > Come to think about it, a better nullspace function might be as follows: > > def null(A, eps=1e-16): > u, s, vh = scipy.linalg.svd(A) > mask = (s/s[0] <= eps) > rowspace = scipy.compress(mask, vh, axis=0) > return scipy.conjugate(scipy.transpose(rowspace)) > > and a corresponding function to minimize: > > def f(params): > A = ... > s = scipy.linalg.svdvals(A) > return s[-1]/s[0] > > That should be <~ 1e-16 regardless of the size of the matrix. Be sure > to check the output of the minimizer; it may be stuck in a local > minimum. Do some plots of f(params) to see how nasty your functions are. > > You'll still get the small but > 1e-16 numbers when you multiply > through, but if you've satisfied yourself that they ought to be zero, > you can artificially set them to zero if you need to propagate the > results through to other calculations. > > Ain't floating point great? > From rkern at ucsd.edu Thu Jun 30 12:44:17 2005 From: rkern at ucsd.edu (Robert Kern) Date: Thu, 30 Jun 2005 09:44:17 -0700 Subject: [SciPy-user] Installing Scipy on Mac os X Panther G5 In-Reply-To: References: Message-ID: <42C42161.1050102@ucsd.edu> rajb wrote: > Hi > > I'm trying to install SciPy on a G5 running Mac OS X Panther with > Nagware f95 > compiler. the build terminates with the following > > ------------------------------------------------------------------------ > ------------------- > compiling Fortran sources > f95(f77) options: '-fixed -O4' > f95(f90) options: '-O4' > f95(fix) options: '-fixed -O4' > compile options: '-c' > f95:f77: Lib/special/mach/r1mach.f > -c option specified twice, continuing > Note: On some machines, -ieee=full may be needed for best performance > Obsolescent: Lib/special/mach/r1mach.f, line 1: Fixed source form > Error: Lib/special/mach/r1mach.f, line 173: Inconsistent structure for > arg 1 in call to I1MCRA > [f95 error termination] > -c option specified twice, continuing > Note: On some machines, -ieee=full may be needed for best performance > Obsolescent: Lib/special/mach/r1mach.f, line 1: Fixed source form > Error: Lib/special/mach/r1mach.f, line 173: Inconsistent structure for > arg 1 in call to I1MCRA > [f95 error termination] > error: Command "f95 -fixed -O4 -c -c Lib/special/mach/r1mach.f -o > build/temp.darwin-7.9.0-Power_Macintosh-2.4/Lib/special/mach/ r1mach.o" > failed with exit status 2 > ------------------------------------------------------------------------ > ------------------- > > Does anyone know what's happening? The compiler doesn't like some of our FORTRAN. You will have to look in your compiler's documentation to see what that error message means. You may need to add some command line arguments to relax the compiler's assumptions. -- 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 list.cj at gmail.com Thu Jun 30 16:03:43 2005 From: list.cj at gmail.com (CJ Fleck) Date: Thu, 30 Jun 2005 15:03:43 -0500 Subject: [SciPy-user] Fitting a polynomial to data Message-ID: <77b490e805063013039c7e1f2@mail.gmail.com> I have some data points that I'd like to fit a polynomial to. I have a gut feeling that this can be done with scipy, but I'm not sure how. Admitadly, my math skills are a bit lacking and I'm not real sure how to go about it. If anyone can point me in the right direction or give me examples on how to do this, it would be much appreciated. CJ From Fernando.Perez at colorado.edu Thu Jun 30 16:46:36 2005 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Thu, 30 Jun 2005 14:46:36 -0600 Subject: [SciPy-user] Fitting a polynomial to data In-Reply-To: <77b490e805063013039c7e1f2@mail.gmail.com> References: <77b490e805063013039c7e1f2@mail.gmail.com> Message-ID: <42C45A2C.6070300@colorado.edu> CJ Fleck wrote: > I have some data points that I'd like to fit a polynomial to. I have > a gut feeling that this can be done with scipy, but I'm not sure how. > Admitadly, my math skills are a bit lacking and I'm not real sure how > to go about it. have a look at polyfit in matplotlib, which wraps the needed functionality in one little, easy to use routine for you. In [1]: polyfit? Type: function Base Class: String Form: Namespace: Interactive File: /usr/lib/python2.3/site-packages/matplotlib/mlab.py Definition: polyfit(x, y, N) Docstring: Do a best fit polynomial of order N of y to x. Return value is a vector of polynomial coefficients [pk ... p1 p0]. Eg, for N=2 p2*x0^2 + p1*x0 + p0 = y1 p2*x1^2 + p1*x1 + p0 = y1 p2*x2^2 + p1*x2 + p0 = y2 ..... p2*xk^2 + p1*xk + p0 = yk Method: if X is a the Vandermonde Matrix computed from x (see http://mathworld.wolfram.com/VandermondeMatrix.html), then the polynomial least squares solution is given by the 'p' in X*p = y where X is a len(x) x N+1 matrix, p is a N+1 length vector, and y is a len(x) x 1 vector This equation can be solved as p = (XT*X)^-1 * XT * y where XT is the transpose of X and -1 denotes the inverse. For more info, see http://mathworld.wolfram.com/LeastSquaresFittingPolynomial.html, but note that the k's and n's in the superscripts and subscripts on that page. The linear algebra is correct, however. See also polyval Cheers, f From list.cj at gmail.com Thu Jun 30 16:47:04 2005 From: list.cj at gmail.com (CJ Fleck) Date: Thu, 30 Jun 2005 15:47:04 -0500 Subject: [SciPy-user] Plotting Question Message-ID: <77b490e805063013471692f25d@mail.gmail.com> Using the gnuplot module to plot data, is it possible to plot functions? That is, can I plot x**2 somehow? If so, how? From aisaac at american.edu Thu Jun 30 16:51:50 2005 From: aisaac at american.edu (Alan G Isaac) Date: Thu, 30 Jun 2005 16:51:50 -0400 Subject: [SciPy-user] Fitting a polynomial to data In-Reply-To: <77b490e805063013039c7e1f2@mail.gmail.com> References: <77b490e805063013039c7e1f2@mail.gmail.com> Message-ID: On Thu, 30 Jun 2005, CJ Fleck apparently wrote: > I have some data points that I'd like to fit a polynomial to. I have > a gut feeling that this can be done with scipy, but I'm not sure how. > Admitadly, my math skills are a bit lacking and I'm not real sure how > to go about it. You can certainly do this in scipy: you can just use a linear regression to get the polynomial coefficients. You can also use a polynomial fitting function in Scientific Python, if I recall. http://starship.python.net/~hinsen/ScientificPython/ Scientific.Functions.LeastSquares hth, Alan Isaac From list.cj at gmail.com Thu Jun 30 17:17:13 2005 From: list.cj at gmail.com (CJ Fleck) Date: Thu, 30 Jun 2005 16:17:13 -0500 Subject: [SciPy-user] Fitting a polynomial to data In-Reply-To: References: <77b490e805063013039c7e1f2@mail.gmail.com> Message-ID: <77b490e8050630141775a04668@mail.gmail.com> How do you use a linear regression to get the polynomial coefficients? On 6/30/05, Alan G Isaac wrote: > On Thu, 30 Jun 2005, CJ Fleck apparently wrote: > > I have some data points that I'd like to fit a polynomial to. I have > > a gut feeling that this can be done with scipy, but I'm not sure how. > > Admitadly, my math skills are a bit lacking and I'm not real sure how > > to go about it. > > You can certainly do this in scipy: > you can just use a linear regression > to get the polynomial coefficients. > > You can also use a polynomial fitting function > in Scientific Python, if I recall. > http://starship.python.net/~hinsen/ScientificPython/ > Scientific.Functions.LeastSquares > > hth, > Alan Isaac > > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From aisaac at american.edu Thu Jun 30 17:22:50 2005 From: aisaac at american.edu (Alan G Isaac) Date: Thu, 30 Jun 2005 17:22:50 -0400 Subject: [SciPy-user] Fitting a polynomial to data In-Reply-To: <42C45A2C.6070300@colorado.edu> References: <77b490e805063013039c7e1f2@mail.gmail.com><42C45A2C.6070300@colorado.edu> Message-ID: On Thu, 30 Jun 2005, Fernando Perez apparently wrote: > p = (XT*X)^-1 * XT * y Which is of course the ordinary least squares solution. I note this only because the discussion seemed to suggest that something special about polynomials was about to be exploited in producing the solution, but that something seems only to be the automatic production of the data matrix (and not any subsequent computations). Correct? Cheers, Alan Isaac From rkern at ucsd.edu Thu Jun 30 17:32:17 2005 From: rkern at ucsd.edu (Robert Kern) Date: Thu, 30 Jun 2005 14:32:17 -0700 Subject: [SciPy-user] Fitting a polynomial to data In-Reply-To: References: <77b490e805063013039c7e1f2@mail.gmail.com><42C45A2C.6070300@colorado.edu> Message-ID: <42C464E1.8090603@ucsd.edu> Alan G Isaac wrote: > On Thu, 30 Jun 2005, Fernando Perez apparently wrote: > >>p = (XT*X)^-1 * XT * y > > Which is of course the ordinary least squares solution. > I note this only because the discussion seemed to > suggest that something special about polynomials was > about to be exploited in producing the solution, > but that something seems only to be the automatic > production of the data matrix (and not any subsequent > computations). Correct? Yup. -- 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 list.cj at gmail.com Thu Jun 30 17:33:22 2005 From: list.cj at gmail.com (CJ Fleck) Date: Thu, 30 Jun 2005 16:33:22 -0500 Subject: [SciPy-user] Fitting a polynomial to data In-Reply-To: References: <77b490e805063013039c7e1f2@mail.gmail.com> <42C45A2C.6070300@colorado.edu> Message-ID: <77b490e8050630143388ef86d@mail.gmail.com> I see it now. Yes you are correct. Thanks much. On 6/30/05, Alan G Isaac wrote: > On Thu, 30 Jun 2005, Fernando Perez apparently wrote: > > p = (XT*X)^-1 * XT * y > > Which is of course the ordinary least squares solution. > I note this only because the discussion seemed to > suggest that something special about polynomials was > about to be exploited in producing the solution, > but that something seems only to be the automatic > production of the data matrix (and not any subsequent > computations). Correct? > > Cheers, > Alan Isaac > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From Fernando.Perez at colorado.edu Thu Jun 30 17:42:05 2005 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Thu, 30 Jun 2005 15:42:05 -0600 Subject: [SciPy-user] Fitting a polynomial to data In-Reply-To: References: <77b490e805063013039c7e1f2@mail.gmail.com><42C45A2C.6070300@colorado.edu> Message-ID: <42C4672D.6060708@colorado.edu> Alan G Isaac wrote: > On Thu, 30 Jun 2005, Fernando Perez apparently wrote: > >>p = (XT*X)^-1 * XT * y > > > Which is of course the ordinary least squares solution. > I note this only because the discussion seemed to > suggest that something special about polynomials was > about to be exploited in producing the solution, > but that something seems only to be the automatic > production of the data matrix (and not any subsequent > computations). Correct? I know, I just mentioned polyfit b/c it encapsulates the construction in a single, easy to use routine. The OP mentioned weak math skills, so I figured a single-shot routine might be a good solution for him. Cheers, f From aisaac at american.edu Thu Jun 30 17:55:38 2005 From: aisaac at american.edu (Alan G Isaac) Date: Thu, 30 Jun 2005 17:55:38 -0400 Subject: [SciPy-user] Fitting a polynomial to data In-Reply-To: <42C4672D.6060708@colorado.edu> References: <77b490e805063013039c7e1f2@mail.gmail.com><42C45A2C.6070300@colorado.edu> <42C4672D.6060708@colorado.edu> Message-ID: On Thu, 30 Jun 2005, Fernando Perez apparently wrote: > I just mentioned polyfit b/c it encapsulates the > construction in a single, easy to use routine. Got it. Just wanted to be sure I wasn't missing something interesting. Thanks. From grante at visi.com Thu Jun 30 18:54:35 2005 From: grante at visi.com (Grant Edwards) Date: Thu, 30 Jun 2005 22:54:35 +0000 (UTC) Subject: [SciPy-user] Re: Plotting Question References: <77b490e805063013471692f25d@mail.gmail.com> Message-ID: On 2005-06-30, CJ Fleck wrote: > Using the gnuplot module to plot data, is it possible to plot > functions? That is, can I plot x**2 somehow? If so, how? p = Gnuplot.Gnuplot() p.plot("x**2") -- Grant Edwards grante Yow! Life is a POPULARITY at CONTEST! I'm REFRESHINGLY visi.com CANDID!! From ryanfedora at comcast.net Thu Jun 30 20:24:01 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Thu, 30 Jun 2005 20:24:01 -0400 Subject: [SciPy-user] ipython website Message-ID: <42C48D21.4060500@comcast.net> One of my computers in the lab doesn't have ipython on it. The website appears to be down. I can't seem to find the a place to download the windows installer for python 2.3. Does anyone know when the website will be back up? I guess I will also need the other couple of things to make colors work on windows. I can't seem to find the files in any of the place I would normally save downloads. Thanks, Ryan From joe at enthought.com Thu Jun 30 20:32:23 2005 From: joe at enthought.com (Joe Cooper) Date: Thu, 30 Jun 2005 19:32:23 -0500 Subject: [SciPy-user] ipython website In-Reply-To: <42C48D21.4060500@comcast.net> References: <42C48D21.4060500@comcast.net> Message-ID: <42C48F17.3070405@enthought.com> I probably broke it. We're moving all of the scipy hosted sites to a new server. I'll try to get it back up tonight. Ryan Krauss wrote: > One of my computers in the lab doesn't have ipython on it. The website > appears to be down. I can't seem to find the a place to download the > windows installer for python 2.3. Does anyone know when the website > will be back up? I guess I will also need the other couple of things to > make colors work on windows. I can't seem to find the files in any of > the place I would normally save downloads. > > Thanks, > > Ryan > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From Fernando.Perez at colorado.edu Thu Jun 30 20:35:59 2005 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Thu, 30 Jun 2005 18:35:59 -0600 Subject: [SciPy-user] ipython website In-Reply-To: <42C48F17.3070405@enthought.com> References: <42C48D21.4060500@comcast.net> <42C48F17.3070405@enthought.com> Message-ID: <42C48FEF.4010102@colorado.edu> Joe Cooper wrote: > I probably broke it. We're moving all of the scipy hosted sites to a > new server. I'll try to get it back up tonight. > > Ryan Krauss wrote: > >>One of my computers in the lab doesn't have ipython on it. The website >>appears to be down. I can't seem to find the a place to download the >>windows installer for python 2.3. Does anyone know when the website >>will be back up? I guess I will also need the other couple of things to >>make colors work on windows. I can't seem to find the files in any of >>the place I would normally save downloads. In the meantime, you can get a copy of the current CVS build from here: http://amath.colorado.edu/faculty/fperez/python/ipython/ I'll remove this when the scipy-hosted site is back up. The other things you need are: 1. PyWin32 from http://starship.python.net/crew/mhammond. 2. CTypes from http://starship.python.net/crew/theller/ctypes (you must use version 0.9.1 or newer). 3. Readline for Windows from http://sourceforge.net/projects/uncpythontools. Cheers, f From rkern at ucsd.edu Thu Jun 30 20:36:37 2005 From: rkern at ucsd.edu (Robert Kern) Date: Thu, 30 Jun 2005 17:36:37 -0700 Subject: [SciPy-user] ipython website In-Reply-To: <42C48D21.4060500@comcast.net> References: <42C48D21.4060500@comcast.net> Message-ID: <42C49015.20607@ucsd.edu> Ryan Krauss wrote: > One of my computers in the lab doesn't have ipython on it. The website > appears to be down. I can't seem to find the a place to download the > windows installer for python 2.3. Does anyone know when the website > will be back up? I guess I will also need the other couple of things to > make colors work on windows. I can't seem to find the files in any of > the place I would normally save downloads. While we're waiting for Joe to restore the website, you can get a CVS checkout and install from source. It's pure Python. The documentation ought to mention the Windows dependencies. cvs -d:pserver:anonymous at scipy.org:/home/cvsroot co ipython -- 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 joe at enthought.com Thu Jun 30 20:50:28 2005 From: joe at enthought.com (Joe Cooper) Date: Thu, 30 Jun 2005 19:50:28 -0500 Subject: [SciPy-user] ipython website In-Reply-To: <42C48F17.3070405@enthought.com> References: <42C48D21.4060500@comcast.net> <42C48F17.3070405@enthought.com> Message-ID: <42C49354.5060401@enthought.com> Ok, it's live on the new server, including downloads. Sorry for the inconvenience. Joe Cooper wrote: > I probably broke it. We're moving all of the scipy hosted sites to a > new server. I'll try to get it back up tonight. > > Ryan Krauss wrote: > >> One of my computers in the lab doesn't have ipython on it. The >> website appears to be down. I can't seem to find the a place to >> download the windows installer for python 2.3. Does anyone know when >> the website will be back up? I guess I will also need the other >> couple of things to make colors work on windows. I can't seem to find >> the files in any of the place I would normally save downloads. >> >> Thanks, >> >> Ryan >> >> _______________________________________________ >> 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