From nwagner at mecha.uni-stuttgart.de Fri Jul 1 02:52:05 2005 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Fri, 01 Jul 2005 08:52:05 +0200 Subject: [SciPy-user] Generating tuples and lists connected with optimize.fmin_l_bfgs_b(func, guess, bounds=bounds, iprint=-1) Message-ID: <42C4E815.5030401@mecha.uni-stuttgart.de> Hi all, Sorry for this inquiry but how can I initialize the list "bounds" and the tuple "guess" more efficiently ? The entries in bounds are identical for each design variable, while the initial guess consists of two different values. So how can I benefit from this pattern in building "bounds" and "guess" for 2n design variables ? bounds = [(0.0,2.0), (0.0,2.0), (0.0,2.0), (0.0,2.0), (0.0,2.0), (0.0,2.0)] guess = 2.0,2.0,2.0,1.0,1.0,1.0 A small example would be appreciated. Thanks in advance Nils From nwagner at mecha.uni-stuttgart.de Fri Jul 1 03:14:01 2005 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Fri, 01 Jul 2005 09:14:01 +0200 Subject: [SciPy-user] Generating tuples and lists connected with optimize.fmin_l_bfgs_b(func, guess, bounds=bounds, iprint=-1) In-Reply-To: <42C4E815.5030401@mecha.uni-stuttgart.de> References: <42C4E815.5030401@mecha.uni-stuttgart.de> Message-ID: <42C4ED39.60002@mecha.uni-stuttgart.de> Nils Wagner wrote: > Hi all, > > Sorry for this inquiry but how can I initialize the list "bounds" and > the tuple "guess" more efficiently ? > The entries in bounds are identical for each design variable, while > the initial guess consists of two different values. > So how can I benefit from this pattern in building "bounds" and > "guess" for 2n design variables ? > > bounds = [(0.0,2.0), (0.0,2.0), (0.0,2.0), (0.0,2.0), (0.0,2.0), > (0.0,2.0)] > guess = 2.0,2.0,2.0,1.0,1.0,1.0 > > A small example would be appreciated. > > Thanks in advance > Nils > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user Is there a better way for building bounds ? bounds=[] for i in arange(0,2*n): bounds = bounds + [(0.0,2.0)] Nils From ckkart at hoc.net Fri Jul 1 04:14:54 2005 From: ckkart at hoc.net (Christian Kristukat) Date: Fri, 01 Jul 2005 10:14:54 +0200 Subject: [SciPy-user] Generating tuples and lists connected with optimize.fmin_l_bfgs_b(func, guess, bounds=bounds, iprint=-1) In-Reply-To: <42C4ED39.60002@mecha.uni-stuttgart.de> References: <42C4E815.5030401@mecha.uni-stuttgart.de> <42C4ED39.60002@mecha.uni-stuttgart.de> Message-ID: <42C4FB7E.7040604@hoc.net> Nils Wagner wrote: > Nils Wagner wrote: > >> Hi all, >> >> Sorry for this inquiry but how can I initialize the list "bounds" and >> the tuple "guess" more efficiently ? >> The entries in bounds are identical for each design variable, while >> the initial guess consists of two different values. >> So how can I benefit from this pattern in building "bounds" and >> "guess" for 2n design variables ? >> >> bounds = [(0.0,2.0), (0.0,2.0), (0.0,2.0), (0.0,2.0), (0.0,2.0), >> (0.0,2.0)] >> guess = 2.0,2.0,2.0,1.0,1.0,1.0 >> >> A small example would be appreciated. >> >> Thanks in advance >> Nils >> >> _______________________________________________ >> SciPy-user mailing list >> SciPy-user at scipy.net >> http://www.scipy.net/mailman/listinfo/scipy-user > > > Is there a better way for building bounds ? > > bounds=[] > for i in arange(0,2*n): > bounds = bounds + [(0.0,2.0)] bounds = [(0.0,2.0)]*n This works with python lists, not with numeric arrays. btw: I'm using fmin_tnc which is another constrained minimizer and I found that it is much faster than bfgs for large problems. Regards, Christian From nwagner at mecha.uni-stuttgart.de Fri Jul 1 05:38:51 2005 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Fri, 01 Jul 2005 11:38:51 +0200 Subject: [SciPy-user] Generating tuples and lists connected with optimize.fmin_l_bfgs_b(func, guess, bounds=bounds, iprint=-1) In-Reply-To: <42C4FB7E.7040604@hoc.net> References: <42C4E815.5030401@mecha.uni-stuttgart.de> <42C4ED39.60002@mecha.uni-stuttgart.de> <42C4FB7E.7040604@hoc.net> Message-ID: <42C50F2B.1070901@mecha.uni-stuttgart.de> Christian Kristukat wrote: > Nils Wagner wrote: > >> Nils Wagner wrote: >> >>> Hi all, >>> >>> Sorry for this inquiry but how can I initialize the list "bounds" >>> and the tuple "guess" more efficiently ? >>> The entries in bounds are identical for each design variable, while >>> the initial guess consists of two different values. >>> So how can I benefit from this pattern in building "bounds" and >>> "guess" for 2n design variables ? >>> >>> bounds = [(0.0,2.0), (0.0,2.0), (0.0,2.0), (0.0,2.0), (0.0,2.0), >>> (0.0,2.0)] >>> guess = 2.0,2.0,2.0,1.0,1.0,1.0 >>> >>> A small example would be appreciated. >>> >>> Thanks in advance >>> Nils >>> >>> _______________________________________________ >>> SciPy-user mailing list >>> SciPy-user at scipy.net >>> http://www.scipy.net/mailman/listinfo/scipy-user >> >> >> >> Is there a better way for building bounds ? >> >> bounds=[] >> for i in arange(0,2*n): >> bounds = bounds + [(0.0,2.0)] > > > bounds = [(0.0,2.0)]*n > > This works with python lists, not with numeric arrays. > > btw: I'm using fmin_tnc which is another constrained minimizer and I > found that it is much faster than bfgs for large problems. > > Regards, Christian > Christian, Thank you very much for your hints. I have tried fmin_tnc. It's really faster than fmin_l_bfgs_b. Is it possible to solve constrained optimization problems of the form min f(x) s.t. 0 < x_1 < =1 0 < x_2 < =1 n(x) = 0 with scipy. n(x) denotes a nonlinear function of the design variables x^T=[x_1,\dots,x_n] So we have both equality and inequality constraints. Best regards, Nils > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From ckkart at hoc.net Fri Jul 1 07:32:42 2005 From: ckkart at hoc.net (Christian Kristukat) Date: Fri, 01 Jul 2005 13:32:42 +0200 Subject: [SciPy-user] Generating tuples and lists connected with optimize.fmin_l_bfgs_b(func, guess, bounds=bounds, iprint=-1) In-Reply-To: <42C50F2B.1070901@mecha.uni-stuttgart.de> References: <42C4E815.5030401@mecha.uni-stuttgart.de> <42C4ED39.60002@mecha.uni-stuttgart.de> <42C4FB7E.7040604@hoc.net> <42C50F2B.1070901@mecha.uni-stuttgart.de> Message-ID: <42C529DA.7060804@hoc.net> Nils Wagner wrote: > Is it possible to solve constrained optimization problems of the form > > min f(x) > > s.t. > > 0 < x_1 < =1 > 0 < x_2 < =1 > > n(x) = 0 > with scipy. n(x) denotes a nonlinear function of the design variables > x^T=[x_1,\dots,x_n] > So we have both equality and inequality constraints. Might be stupid, but as we are limited to machine precision, one could take the machine precision as lower limit: eps <= x_1 <= 1 That should be equal to 0 < x_1. Correct me if I'm wrong. Regards, Christian From nwagner at mecha.uni-stuttgart.de Fri Jul 1 07:43:32 2005 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Fri, 01 Jul 2005 13:43:32 +0200 Subject: [SciPy-user] Generating tuples and lists connected with optimize.fmin_l_bfgs_b(func, guess, bounds=bounds, iprint=-1) In-Reply-To: <42C529DA.7060804@hoc.net> References: <42C4E815.5030401@mecha.uni-stuttgart.de> <42C4ED39.60002@mecha.uni-stuttgart.de> <42C4FB7E.7040604@hoc.net> <42C50F2B.1070901@mecha.uni-stuttgart.de> <42C529DA.7060804@hoc.net> Message-ID: <42C52C64.5040106@mecha.uni-stuttgart.de> Christian Kristukat wrote: > Nils Wagner wrote: > >> Is it possible to solve constrained optimization problems of the form >> >> min f(x) >> >> s.t. >> >> 0 < x_1 < =1 >> 0 < x_2 < =1 >> >> n(x) = 0 >> with scipy. n(x) denotes a nonlinear function of the design >> variables x^T=[x_1,\dots,x_n] >> So we have both equality and inequality constraints. > > > Might be stupid, but as we are limited to machine precision, one could > take the machine precision as lower limit: > eps <= x_1 <= 1 > That should be equal to 0 < x_1. Correct me if I'm wrong. > > Regards, Christian > I agree, but how about the nonlinear equality constraint. As far as I understand it, I have to use fmin_cobyla which offers an argument cons for constraints. However these constraints must be >=0 insetad of = 0 in my case. Am I missing something ? Cheers, Nils fmin_tnc(func, x0, fprime=None, args=(), approx_grad=False, bounds=None, epsilon=1e-08, scale=None, messages=15, maxCGit =-1, maxfun=None, eta=-1, stepmx=0, accuracy=0, fmin=0, ftol=0, rescale=-1) Minimize a function with variables subject to bounds, using gradient information. fmin_cobyla(func, x0, cons, args=(), consargs=None, rhobeg=1.0, rhoend=0.0001, iprint=1, maxfun=1000) Minimize a function using the Contrained Optimization BY Linear Approximation (COBYLA) method Arguments: func -- function to minimize. Called as func(x, *args) x0 -- initial guess to minimum cons -- a list of functions that all must be >=0 (a single function if only 1 constraint) args -- extra arguments to pass to function consargs -- extra arguments to pass to constraints (default of None means use same extra arguments as those passed to func). Use () for no extra arguments. rhobeg -- reasonable initial changes to the variables rhoend -- final accuracy in the optimization (not precisely guaranteed) iprint -- controls the frequency of output: 0 (no output),1,2,3 maxfun -- maximum number of function evaluations. Returns: x -- the minimum > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From ryanfedora at comcast.net Fri Jul 1 07:48:05 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Fri, 01 Jul 2005 07:48:05 -0400 Subject: [SciPy-user] ipython website In-Reply-To: <42C49354.5060401@enthought.com> References: <42C48D21.4060500@comcast.net> <42C48F17.3070405@enthought.com> <42C49354.5060401@enthought.com> Message-ID: <42C52D75.70400@comcast.net> Thanks. I've got everything I need. Joe Cooper wrote: > 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 > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From guillem at torroja.dmt.upm.es Fri Jul 1 12:08:59 2005 From: guillem at torroja.dmt.upm.es (Guillem Borrell Nogueras) Date: Fri, 01 Jul 2005 16:08:59 +0000 Subject: [SciPy-user] Read data file with scipy.io.read_array() Message-ID: <42C56A9B.5000406@torroja.dmt.upm.es> Hi I need to read a data file written by a fortran executable and I'm triyng to do it with the read_array function. The file is formatted this way: fortran format '(5(f10.6,x))' 13.600905 11.536095 7.478742 1.529088 -1.705019 6.646662 21.875410 20.727882 10.592803 2.582046 -1.615569 -4.082547 -5.376484 -4.660769 -2.616893 -0.791246 0.842457 2.215573 3.311196 3.853060 ... I tried In [12]: u=read_array('udebug.out',columns=((0,5))) but gave me a segmentation fault. Default options don't work for me. Is there a problem with spacings? Any ideas? Thanks in advance -- Guillem Borrell Nogueras website http://torroja.dmt.upm.es/~guillem/ guillemborrell at gmail.com guillem at torroja.dmt.upm.es tf. 655388683 From nwagner at mecha.uni-stuttgart.de Fri Jul 1 10:18:01 2005 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Fri, 01 Jul 2005 16:18:01 +0200 Subject: [SciPy-user] Read data file with scipy.io.read_array() In-Reply-To: <42C56A9B.5000406@torroja.dmt.upm.es> References: <42C56A9B.5000406@torroja.dmt.upm.es> Message-ID: <42C55099.7040605@mecha.uni-stuttgart.de> Guillem Borrell Nogueras wrote: >Hi > >I need to read a data file written by a fortran executable and I'm >triyng to do it with the read_array function. The file is formatted >this way: >fortran format '(5(f10.6,x))' > >13.600905 11.536095 7.478742 1.529088 -1.705019 > 6.646662 21.875410 20.727882 10.592803 2.582046 >-1.615569 -4.082547 -5.376484 -4.660769 -2.616893 >-0.791246 0.842457 2.215573 3.311196 3.853060 >... > >I tried > >In [12]: u=read_array('udebug.out',columns=((0,5))) > >but gave me a segmentation fault. Default options don't work for me. Is >there a problem with spacings? > >Any ideas? > >Thanks in advance > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: read.py Type: text/x-python Size: 81 bytes Desc: not available URL: From ryanfedora at comcast.net Fri Jul 1 10:19:18 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Fri, 01 Jul 2005 10:19:18 -0400 Subject: [SciPy-user] Read data file with scipy.io.read_array() In-Reply-To: <42C56A9B.5000406@torroja.dmt.upm.es> References: <42C56A9B.5000406@torroja.dmt.upm.es> Message-ID: <42C550E6.7000905@comcast.net> I copied and pasted the data from your e-mail into a text file. I had no problems reading it in - but python matrices use 0 as the first index, so I changed the second index to 4: u=scipy.io.read_array('test.txt',columns=((0,4))) and it worked fine. By the way, I ran it in ipython on windows and using the 5 index gave me a useful error message rather than a seg fault. Guillem Borrell Nogueras wrote: >Hi > >I need to read a data file written by a fortran executable and I'm >triyng to do it with the read_array function. The file is formatted >this way: >fortran format '(5(f10.6,x))' > >13.600905 11.536095 7.478742 1.529088 -1.705019 > 6.646662 21.875410 20.727882 10.592803 2.582046 >-1.615569 -4.082547 -5.376484 -4.660769 -2.616893 >-0.791246 0.842457 2.215573 3.311196 3.853060 >... > >I tried > >In [12]: u=read_array('udebug.out',columns=((0,5))) > >but gave me a segmentation fault. Default options don't work for me. Is >there a problem with spacings? > >Any ideas? > >Thanks in advance > > > From list.cj at gmail.com Fri Jul 1 11:25:46 2005 From: list.cj at gmail.com (CJ Fleck) Date: Fri, 1 Jul 2005 10:25:46 -0500 Subject: [SciPy-user] Re: Plotting Question In-Reply-To: References: <77b490e805063013471692f25d@mail.gmail.com> Message-ID: <77b490e805070108251229903e@mail.gmail.com> I'm sorry. I meant using gplt. On 6/30/05, Grant Edwards wrote: > 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!! > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From grante at visi.com Fri Jul 1 14:28:41 2005 From: grante at visi.com (Grant Edwards) Date: Fri, 1 Jul 2005 18:28:41 +0000 (UTC) Subject: [SciPy-user] Re: Plotting Question References: <77b490e805063013471692f25d@mail.gmail.com> <77b490e805070108251229903e@mail.gmail.com> Message-ID: On 2005-07-01, 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") > I'm sorry. I meant using gplt. Ah, I should have guessed that based on the newsgroup. Sorry, I don't know. I couldn't get gplt to do what I want to do, so I switched to gnuplot-py http://gnuplot-py.sourceforge.net/ -- Grant Edwards grante Yow! I feel like a wet at parking meter on Darvon! visi.com From ckkart at hoc.net Fri Jul 1 14:43:08 2005 From: ckkart at hoc.net (Christian Kristukat) Date: Fri, 01 Jul 2005 20:43:08 +0200 Subject: [SciPy-user] Re: Plotting Question In-Reply-To: <77b490e805070108251229903e@mail.gmail.com> References: <77b490e805063013471692f25d@mail.gmail.com> <77b490e805070108251229903e@mail.gmail.com> Message-ID: <42C58EBC.7040801@hoc.net> CJ Fleck wrote: > I'm sorry. I meant using gplt. > > On 6/30/05, Grant Edwards wrote: > >>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") >> gplt.plot expects two 1D arrays of equal length as x- and y-data. e.g. x= arange(-10,10,1) y=x**2 gpl.plot(x,y) Regards, Christian From nwagner at mecha.uni-stuttgart.de Mon Jul 4 09:53:38 2005 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Mon, 04 Jul 2005 15:53:38 +0200 Subject: [SciPy-user] Semidefinite programming in scipy ? Message-ID: <42C93F62.4010200@mecha.uni-stuttgart.de> Hi all, Is it possible to solve semidefinite programs with scipy ? minimize t subject to t I -A(x) \ge 0 with variables x \in R^k and t \in R. A(x) depends affinely on x and I denotes the identity. Reference: Vandenberghe, L., Boyd, S. Semidefinite Programming SIAM Review 38 1996 pp. 49-95 From zhiwen.chong at elf.mcgill.ca Mon Jul 4 11:39:32 2005 From: zhiwen.chong at elf.mcgill.ca (Zhiwen Chong) Date: Mon, 4 Jul 2005 11:39:32 -0400 Subject: [SciPy-user] Semidefinite programming in scipy ? In-Reply-To: <42C93F62.4010200@mecha.uni-stuttgart.de> References: <42C93F62.4010200@mecha.uni-stuttgart.de> Message-ID: Hi Nils, On 4-Jul-05, at 9:53 AM, Nils Wagner wrote: > Is it possible to solve semidefinite programs with scipy ? > > minimize t > subject to t I -A(x) \ge 0 > > with variables x \in R^k and t \in R. A(x) depends affinely on x > and I denotes the identity. > > Reference: > Vandenberghe, L., Boyd, S. > Semidefinite Programming > SIAM Review 38 1996 pp. 49-95 This probably doesn't answer your question, but might give you some ideas: My project involves extensive use of large-scale optimization, and what I did was to write a meta-language (using the pyparsing module) to generate AMPL code from a simpler syntax describing my problem. AMPL in turn generates a stub for any number of high performance solvers that support it. By taking this approach, my NLP isn't tied to any single solver, and I will have the freedom to try different solvers if I should need to in the future. (though I am currently using IPOPT exclusively, available for free at http://www.coin-or.org/ Ipopt/) The only snag is that AMPL is not free, but it really is a very good mathematical programming language, and academic licenses are fairly inexpensive. If your problem is very complicated or very large, it is usually much easier to write it in a dedicated mathematical programming language than a general purpose one. For SDPs in particular, you may want to look at PENNON. http://www2.am.uni-erlangen.de/~kocvara/pennon/ It uses the SDPA input file -- perhaps it is possible to write some code in Python to generate one of these chappies? 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 nwagner at mecha.uni-stuttgart.de Mon Jul 4 15:45:22 2005 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Mon, 04 Jul 2005 21:45:22 +0200 Subject: [SciPy-user] Semidefinite programming in scipy ? In-Reply-To: References: <42C93F62.4010200@mecha.uni-stuttgart.de> Message-ID: On Mon, 4 Jul 2005 11:39:32 -0400 Zhiwen Chong wrote: > Hi Nils, > > On 4-Jul-05, at 9:53 AM, Nils Wagner wrote: >> Is it possible to solve semidefinite programs with scipy >>? >> >> minimize t >> subject to t I -A(x) \ge 0 >> >> with variables x \in R^k and t \in R. A(x) depends >>affinely on x >> and I denotes the identity. >> >> Reference: >> Vandenberghe, L., Boyd, S. >> Semidefinite Programming >> SIAM Review 38 1996 pp. 49-95 > > This probably doesn't answer your question, but might >give you some ideas: > > My project involves extensive use of large-scale >optimization, and what I did was to write a >meta-language (using the pyparsing module) to generate >AMPL code from a simpler syntax describing my problem. > AMPL in turn generates a stub for any number of high >performance solvers that support it. By taking this >approach, my NLP isn't tied to any single solver, and I >will have the freedom to try different solvers if I >should need to in the future. (though I am currently > using IPOPT exclusively, available for free at >http://www.coin-or.org/ Ipopt/) > > The only snag is that AMPL is not free, but it really is >a very good mathematical programming language, and >academic licenses are fairly inexpensive. If your >problem is very complicated or very large, it is usually >much easier to write it in a dedicated mathematical > programming language than a general purpose one. > >For SDPs in particular, you may want to look at PENNON. > http://www2.am.uni-erlangen.de/~kocvara/pennon/ > > It uses the SDPA input file -- perhaps it is possible to >write some code in Python to generate one of these >chappies? > > > > Zhiwen Chong Hi Zhiwen, Thank you for your valuable hints. Actually, I am interested in eigenvalue optimization. Are you aware of freely available software for this topic ? I look forward to hearing from you. Thanks in advance. Regards, Nils > -------------------------------- > 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 > -------------------------------- > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From zhiwen.chong at elf.mcgill.ca Mon Jul 4 16:55:00 2005 From: zhiwen.chong at elf.mcgill.ca (Zhiwen Chong) Date: Mon, 4 Jul 2005 16:55:00 -0400 Subject: [SciPy-user] Semidefinite programming in scipy ? In-Reply-To: References: <42C93F62.4010200@mecha.uni-stuttgart.de> Message-ID: Hello Nils, On 4-Jul-05, at 3:45 PM, Nils Wagner wrote: > Actually, I am interested in eigenvalue optimization. > Are you aware of freely available software for this > topic ? Unfortunately I know very little about eigenvalue optimization. If you can express your problem as an SDP, then you can use any number of SDP solvers. Most accept the SDPA input format (which looks fairly simple). http://infohost.nmt.edu/~sdplib/FORMAT Here's a list of current SDP solvers: (scroll down a little) http://orion.math.uwaterloo.ca/~hwolkowi/henry/software/readme.html#sdp The guys working in the building across from mine are maintaining SeDuMi. Blurb: SeDuMi is a software package to solve optimization problems over symmetric cones. This includes linear, quadratic, second order conic and semidefinite optimization, and any combination of these. Free. http://sedumi.mcmaster.ca/ Sorry I couldn't be of more help. Perhaps someone else on this list knows more about this subject. Zhiwen Side note: I took a peek at scipy.optimize; I don't think you'll find an SDP optimizer there. Most of the functions there are your standard line searches and basic algorithms like Newton, Trust Region, Conjugate Gradient, variable metric BFGS and some DFO-type algorithms etc. From zhiwen.chong at elf.mcgill.ca Mon Jul 4 17:06:43 2005 From: zhiwen.chong at elf.mcgill.ca (Zhiwen Chong) Date: Mon, 4 Jul 2005 17:06:43 -0400 Subject: [SciPy-user] Semidefinite programming in scipy ? In-Reply-To: References: <42C93F62.4010200@mecha.uni-stuttgart.de> Message-ID: <9A25C25A-99D6-49B6-A2FF-03A3A81CE0EB@elf.mcgill.ca> On 4-Jul-05, at 3:45 PM, Nils Wagner wrote: >>> Is it possible to solve semidefinite programs with scipy ? Oh, just an aside, there's this one incentive for expressing/ generating your optimization problem in AMPL (and you don't even have to own a copy of AMPL): You can use the solvers on the NEOS server for free. Just upload your problem, and it is immediately distributed to several machines for computation. The only catch is that there are no guarantees when you'll get your solution. http://www-neos.mcs.anl.gov/neos/neos-5/Web/ They've just introduced an API to communicate with their XML-RPC server, so you use NEOS from within your program. http://www-neos.mcs.anl.gov/neos/neos-5/Web/NEOS-API.html Scroll to the bottom, and you'll see that the sample client is written in Python! ;-) There's lots of free stuff out there. Zhiwen From lobezno_2k at yahoo.es Tue Jul 5 08:12:26 2005 From: lobezno_2k at yahoo.es (Juan Martinez) Date: Tue, 5 Jul 2005 14:12:26 +0200 (CEST) Subject: [SciPy-user] griddata Message-ID: <20050705121226.89409.qmail@web53107.mail.yahoo.com> Hi, I?m new using python, and i'd like to know if there is something like matlab's griddata funtion. I need to make a surface from same points and i like to make all in python. this is matlab code. j = load(nom) a=j(:,1); b=j(:,2); c=j(:,3); [X,Y]=meshgrid([0:297],[0:297]); [XI,YI,ZI]=griddata(a,b,c,X,Y,'cubic'); h = surf(XI,YI,ZI,'EdgeColor','none') Thanks. ______________________________________________ Renovamos el Correo Yahoo! Nuevos servicios, m?s seguridad http://correo.yahoo.es From ryanfedora at comcast.net Tue Jul 5 09:43:18 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Tue, 05 Jul 2005 09:43:18 -0400 Subject: [SciPy-user] pow bug? Message-ID: <42CA8E76.5020402@comcast.net> Does this seem like a bug to anyone else or is it as it should be: pow(-0.25,0.5) ->ValueError: negative number cannot be raised to a fractional power pow(-0.25+0j,0.5) ->(3.0615158845559431e-017+0.5j) If I want the input to always be taken as complex, can I override this behavior or should I just add 0j to force a cast of the input? Ryan From aisaac at american.edu Tue Jul 5 10:53:33 2005 From: aisaac at american.edu (Alan G Isaac) Date: Tue, 5 Jul 2005 10:53:33 -0400 Subject: [SciPy-user] Semidefinite programming in scipy ? In-Reply-To: References: <42C93F62.4010200@mecha.uni-stuttgart.de> Message-ID: On Mon, 4 Jul 2005, Zhiwen Chong apparently wrote: > The only snag is that AMPL is not free, but it really is a very good > mathematical programming language, and academic licenses are fairly > inexpensive. If your problem is very complicated or very large, it is > usually much easier to write it in a dedicated mathematical > programming language than a general purpose one. You probably know this already but just in case: - http://www.gnu.org/software/glpk/glpk.html GNU Linear Programming Kit (GLPK) "supports the GNU MathProg language, which is a subset of the AMPL language." (Includes a translator for GNU MathProg and documentation.) - http://www.jeannot.org/~js/code/index.en.html#PuLP PuLP "is an LP modeler written in Python. PuLP can generate .LP and .MPS files and call GLPK, COIN CLP/SBB, CPLEX or XPRESS to solve linear problems." fwiw, Alan Isaac From zhiwen.chong at elf.mcgill.ca Tue Jul 5 15:04:33 2005 From: zhiwen.chong at elf.mcgill.ca (Zhiwen Chong) Date: Tue, 5 Jul 2005 15:04:33 -0400 Subject: [SciPy-user] Semidefinite programming in scipy ? In-Reply-To: References: <42C93F62.4010200@mecha.uni-stuttgart.de> Message-ID: <304181EA-6584-41BF-83EE-4BFF1D91C372@elf.mcgill.ca> On 5-Jul-05, at 10:53 AM, Alan G Isaac wrote: > Programming Kit (GLPK) "supports the GNU MathProg > language, which is a subset of the AMPL language." Thanks for the links Alan. I looked into GNU MathProg some time ago, but I understand it does not support nonlinear constraints. I guess I had kinda expected that, since the library was called the GNU LP Kit, heh heh. > - http://www.jeannot.org/~js/code/index.en.html#PuLP > PuLP can generate .LP and .MPS files and call GLPK, COIN > CLP/SBB, CPLEX or XPRESS to solve linear problems." This piece of code looks pretty interesting... seems to be able to generate stubs for a mixed-integer LP solvers. Worth taking a look! Zhiwen From ryanfedora at comcast.net Wed Jul 6 16:10:50 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Wed, 06 Jul 2005 16:10:50 -0400 Subject: [SciPy-user] min/max with index Message-ID: <42CC3ACA.5070307@comcast.net> I know there has to be an easy way to do this, but I can't find it in the docs. I need to find the eigenvector associated with the smallest eigenvalue returned by linalg.eig. To do this I need to know the index of the minimum of the eigenvalues. Is there not a built in function to return the index of the minimum? Ryan From rkern at ucsd.edu Wed Jul 6 16:55:31 2005 From: rkern at ucsd.edu (Robert Kern) Date: Wed, 06 Jul 2005 13:55:31 -0700 Subject: [SciPy-user] min/max with index In-Reply-To: <42CC3ACA.5070307@comcast.net> References: <42CC3ACA.5070307@comcast.net> Message-ID: <42CC4543.5050001@ucsd.edu> Ryan Krauss wrote: > I know there has to be an easy way to do this, but I can't find it in > the docs. > > I need to find the eigenvector associated with the smallest eigenvalue > returned by linalg.eig. To do this I need to know the index of the > minimum of the eigenvalues. Is there not a built in function to return > the index of the minimum? argmin(), argmax() -- 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 cdavis at staffmail.ed.ac.uk Fri Jul 8 06:49:29 2005 From: cdavis at staffmail.ed.ac.uk (Cory Davis) Date: Fri, 08 Jul 2005 11:49:29 +0100 Subject: [SciPy-user] disabling "numerix Numeric 23.1" message Message-ID: <42CE5A39.1000403@staffmail.ed.ac.uk> Hi All, does anyone know how to disable the following behaviour when importing scipy... >>> from scipy import integrate numerix Numeric 23.1 >>> That message can be a real pain if you are using pipes to communicate with child processes. I think it also goes against a golden rule in unix programming of only speaking up when something has gone wrong. Any hints on how to disable this? Any justifications of why it is there in the first place? Cheers, Cory -- --------------------------------------------------- Cory Davis Institute for Atmospheric and Environmental Science Room 307, Crew Building, Kings Buildings, University of Edinburgh. Edinburgh EH9 3JN phone: +44 131 6505092 www: http://www.geos.ed.ac.uk/contacts/homes/cdavis From fishburn at MIT.EDU Fri Jul 8 08:19:46 2005 From: fishburn at MIT.EDU (Matt Fishburn) Date: Fri, 08 Jul 2005 08:19:46 -0400 Subject: [SciPy-user] disabling "numerix Numeric 23.1" message In-Reply-To: <42CE5A39.1000403@staffmail.ed.ac.uk> References: <42CE5A39.1000403@staffmail.ed.ac.uk> Message-ID: <42CE6F62.4090508@mit.edu> Cory Davis wrote: > Hi All, > does anyone know how to disable the following behaviour when importing > scipy... > > >>> from scipy import integrate > numerix Numeric 23.1 > >>> > In scipy_core/scipy_base/numerix.py, comment out: print 'numerix %s'% NX_VERSION -Matt Fishburn From cdavis at staffmail.ed.ac.uk Fri Jul 8 08:35:01 2005 From: cdavis at staffmail.ed.ac.uk (Cory Davis) Date: Fri, 08 Jul 2005 13:35:01 +0100 Subject: [SciPy-user] disabling "numerix Numeric 23.1" message In-Reply-To: <42CE6F62.4090508@mit.edu> References: <42CE5A39.1000403@staffmail.ed.ac.uk> <42CE6F62.4090508@mit.edu> Message-ID: <42CE72F5.7010103@staffmail.ed.ac.uk> Thanks Matt. If there are any scipy developers listening, could you please consider removing this print statement? Cheers, Cory. Matt Fishburn wrote: > Cory Davis wrote: > >> Hi All, >> does anyone know how to disable the following behaviour when importing >> scipy... >> >> >>> from scipy import integrate >> numerix Numeric 23.1 >> >>> >> > > In scipy_core/scipy_base/numerix.py, comment out: > > print 'numerix %s'% NX_VERSION > > -Matt Fishburn > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user -- --------------------------------------------------- Cory Davis Institute for Atmospheric and Environmental Science Room 307, Crew Building, Kings Buildings, University of Edinburgh. Edinburgh EH9 3JN phone: +44 131 6505092 www: http://www.geos.ed.ac.uk/contacts/homes/cdavis From Fernando.Perez at colorado.edu Fri Jul 8 11:28:48 2005 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Fri, 08 Jul 2005 09:28:48 -0600 Subject: [SciPy-user] disabling "numerix Numeric 23.1" message In-Reply-To: <42CE72F5.7010103@staffmail.ed.ac.uk> References: <42CE5A39.1000403@staffmail.ed.ac.uk> <42CE6F62.4090508@mit.edu> <42CE72F5.7010103@staffmail.ed.ac.uk> Message-ID: <42CE9BB0.9030209@colorado.edu> Cory Davis wrote: > Thanks Matt. > If there are any scipy developers listening, could you please consider > removing this print statement? I can certainly do it in a minute, but I'd like to hear back from whoever put it in the first place if they are OK with the removal. I personally also dislike it (and agree with the 'unix golden rule' argument). If it was an accidentally left over debug statement, I'll clean it up, but I'd like at least another dev's confirmation. Cheers, f From eric at enthought.com Fri Jul 8 14:03:27 2005 From: eric at enthought.com (eric jones) Date: Fri, 08 Jul 2005 13:03:27 -0500 Subject: [SciPy-user] disabling "numerix Numeric 23.1" message In-Reply-To: <42CE9BB0.9030209@colorado.edu> References: <42CE5A39.1000403@staffmail.ed.ac.uk> <42CE6F62.4090508@mit.edu> <42CE72F5.7010103@staffmail.ed.ac.uk> <42CE9BB0.9030209@colorado.edu> Message-ID: <42CEBFEF.6020507@enthought.com> I say get rid of it also. eric Fernando Perez wrote: > Cory Davis wrote: > >> Thanks Matt. >> If there are any scipy developers listening, could you please >> consider removing this print statement? > > > I can certainly do it in a minute, but I'd like to hear back from > whoever put it in the first place if they are OK with the removal. I > personally also dislike it (and agree with the 'unix golden rule' > argument). If it was an accidentally left over debug statement, I'll > clean it up, but I'd like at least another dev's confirmation. > > Cheers, > > f > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From jmiller at stsci.edu Fri Jul 8 14:47:17 2005 From: jmiller at stsci.edu (Todd Miller) Date: Fri, 08 Jul 2005 14:47:17 -0400 Subject: [SciPy-user] disabling "numerix Numeric 23.1" message In-Reply-To: <42CE9BB0.9030209@colorado.edu> References: <42CE5A39.1000403@staffmail.ed.ac.uk> <42CE6F62.4090508@mit.edu> <42CE9BB0.9030209@colorado.edu> Message-ID: <1120848437.25891.241.camel@halloween.stsci.edu> On Fri, 2005-07-08 at 11:28, Fernando Perez wrote: > Cory Davis wrote: > > Thanks Matt. > > If there are any scipy developers listening, could you please consider > > removing this print statement? > > I can certainly do it in a minute, but I'd like to hear back from whoever put > it in the first place if they are OK with the removal. I put it the message there as part of the numarray port. > I personally also > dislike it (and agree with the 'unix golden rule' argument). If it was an > accidentally left over debug statement, I'll clean it up, but I'd like at > least another dev's confirmation. Please take out the message. Regards, Todd From Fernando.Perez at colorado.edu Fri Jul 8 14:55:38 2005 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Fri, 08 Jul 2005 12:55:38 -0600 Subject: [SciPy-user] disabling "numerix Numeric 23.1" message In-Reply-To: <42CEBFEF.6020507@enthought.com> References: <42CE5A39.1000403@staffmail.ed.ac.uk> <42CE6F62.4090508@mit.edu> <42CE72F5.7010103@staffmail.ed.ac.uk> <42CE9BB0.9030209@colorado.edu> <42CEBFEF.6020507@enthought.com> Message-ID: <42CECC2A.1050203@colorado.edu> eric jones wrote: > I say get rid of it also. Done (I just commented it out). The patch was just this: planck[scipy_base]> cvs diff numerix.py Index: numerix.py =================================================================== RCS file: /home/cvsroot/world/scipy_core/scipy_base/numerix.py,v retrieving revision 1.4 diff -r1.4 numerix.py 67c67 < print 'numerix %s'% NX_VERSION --- > #print 'numerix %s'% NX_VERSION Cheers, f From rkern at ucsd.edu Sun Jul 10 19:15:58 2005 From: rkern at ucsd.edu (Robert Kern) Date: Sun, 10 Jul 2005 16:15:58 -0700 Subject: [SciPy-user] GNU Data Language and Python Message-ID: <42D1AC2E.6040206@ucsd.edu> Apparently, the latest release of GDL, a GPLed interpreter for IDL code, has added a Python interface using numarray and matplotlib. I have no experience with it, so I'll just pass on the URL: http://gnudatalanguage.sourceforge.net/ -- 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 nphala at angloresearch.com Mon Jul 11 08:55:27 2005 From: nphala at angloresearch.com (Noko Phala) Date: Mon, 11 Jul 2005 14:55:27 +0200 Subject: [SciPy-user] Scipy and Py2exe Message-ID: Hi, I have a program written in python, that uses several Scipy modules and wish to send it to a client as an exe. The client does not have to install Python. For this, python worked before on my other programs, but does not work with scipy. Through google I have established that the program has to do with dynamic importing of modules by scipy, as opposed to static import. Does anyone know how to fix this problem? Regards, Noko Dr Noko Phala Process Research Anglo American Research Laboratories 8 Schonland Street Theta Johannesburg PO Box 106 Crown Mines 2025 Republic of South Africa Tel: +27 (11) 377 4817 e-mail: nphala at angloresearch.com ------------------------------------------------------------------------------------------ This e-mail was checked by the e-Sweeper Service. For more information visit our website, Clearswift Corporation e-Sweeper : http://www.mimesweeper.com/products/esweeper/ ------------------------------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicopernetty at yahoo.fr Mon Jul 11 16:43:48 2005 From: nicopernetty at yahoo.fr (Nicolas Pernetty) Date: Mon, 11 Jul 2005 22:43:48 +0200 Subject: [SciPy-user] SciPy on IA-64 Message-ID: <20050711224348.52f42e8f@linuxcestcomplique.fr> Hello, While trying to compile SciPy on a Linux box on top of an Itanium processor I ran into an error in fpuset.c. It seems that IA-64 isn't referenced in either fpuset.c and README.fpu. Has someone managed to compile SciPy on IA-64 ? What shoud I do to compile fpuset.c or skip it ? Thanks, From guillem at torroja.dmt.upm.es Mon Jul 11 20:13:17 2005 From: guillem at torroja.dmt.upm.es (guillem at torroja.dmt.upm.es) Date: Tue, 12 Jul 2005 02:13:17 +0200 (CEST) Subject: [SciPy-user] about integrate.tplquad Message-ID: hi I was trying to solve the following integral ?? ?? ?? ?? ?? / / / ?? ?? ?? ?? ??dx dy dz ?? ?? ?? ?? ?? | | | ?? ??------------------- ?? ?? ?? ?? ?? / / / ?? ??SQRT(z + y + x + 2) ?? ?? ?? ?? ??I(x,y,z) = [0,2]x[0,1]x[-1,4] with the following script from scipy_base import * from scipy.integrate import tplquad lower_bound_z= lambda x,y : -1. upper_bound_z= lambda x,y : 4. lower_bound_y= lambda x: 0. upper_bound_y= lambda x: 1. lower_bound_x = 0. upper_bound_x = 2. func = lambda x,y,z: 1./sqrt(x+y+z+2.) B=tplquad(func, ?? ?? ?? ?? ?? lower_bound_x, ?? ?? ?? ?? ?? upper_bound_x, ?? ?? ?? ?? ?? lower_bound_y, ?? ?? ?? ?? ?? upper_bound_y, ?? ?? ?? ?? ?? lower_bound_z, ?? ?? ?? ?? ?? upper_bound_z print B print 1688/15-B[0] The result should be 1688/15 (112.53) but I get (4.6750890836723107, 5.1903915428667244e-14) and I really can't find anything wrong. Can anyone give me a clue? thanks in advance ----- Guillem Borrell Nogueras ETSIA CFD lab. guillem at torroja.dmt.upm.es guillemborrell at gmail.com From rkern at ucsd.edu Mon Jul 11 20:30:35 2005 From: rkern at ucsd.edu (Robert Kern) Date: Mon, 11 Jul 2005 17:30:35 -0700 Subject: [SciPy-user] about integrate.tplquad In-Reply-To: References: Message-ID: <42D30F2B.1050900@ucsd.edu> guillem at torroja.dmt.upm.es wrote: > hi > > I was trying to solve the following integral > > ? ? ? ? ? / / / ? ? ? ? ? dx dy dz > ? ? ? ? ? | | | ? ? ------------------- > ? ? ? ? ? / / / ? ? SQRT(z + y + x + 2) > > ? ? ? ? ? I(x,y,z) = [0,2]x[0,1]x[-1,4] > > with the following script > > from scipy_base import * > from scipy.integrate import tplquad > > lower_bound_z= lambda x,y : -1. > upper_bound_z= lambda x,y : 4. > > lower_bound_y= lambda x: 0. > upper_bound_y= lambda x: 1. > > lower_bound_x = 0. > upper_bound_x = 2. > > func = lambda x,y,z: 1./sqrt(x+y+z+2.) > > B=tplquad(func, > ? ? ? ? ? lower_bound_x, > ? ? ? ? ? upper_bound_x, > ? ? ? ? ? lower_bound_y, > ? ? ? ? ? upper_bound_y, > ? ? ? ? ? lower_bound_z, > ? ? ? ? ? upper_bound_z > print B > print 1688/15-B[0] > > The result should be 1688/15 (112.53) but I get (4.6750890836723107, > 5.1903915428667244e-14) and I really can't find anything wrong. > > Can anyone give me a clue? Doing the integral by hand gives me the same answer that tplquad gives. In [1]: 8./15*(9**2.5-8**2.5-4**2.5+3**2.5-7**2.5+6**2.5+2**2.5-1**2.5) Out[1]: 4.6750890836723009 In [2]: def f(x, y, z): ...: return 1./sqrt(x+y+z+2.) ...: In [3]: integrate.tplquad(f, 0., 2., lambda x: 0., lambda x: 1., lambda x,y: -1., lambda x,y: 4.) Out[3]: (4.6750890836723098, 5.1903915428667231e-14) -- 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 papagr at gmail.com Tue Jul 12 02:52:11 2005 From: papagr at gmail.com (Nikos Papagrigoriou) Date: Tue, 12 Jul 2005 09:52:11 +0300 Subject: [SciPy-user] Scipy and Py2exe In-Reply-To: References: Message-ID: You have to make a proper setup.py if you want to create a Windows executable using py2exe. The following is part of a setup.py I wrote for a program (last year). Look at the "options" dictionary (includes: [... ' scipy.special.*','scipy.linalg.*'...]) . . . options = { "py2exe": { "compressed": 1, "optimize": 2, "includes": ['gui', 'stats', 'tables', 'config', 'scipy', 'constants', 'images', 'pool', 'tools','HTMLgen','shellcmds','scipy.special.*','scipy.linalg.*'], "packages": ['encodings'], "dist_dir": distPath, } } . . . setup( name = progName, description = progDesc, version = __version__, options = options,** zipfile = zipfile, windows = [program],** cmdclass = {"py2exe": build_installer}, data_files = dataFiles, ) I hope this helps. Nikos. On 7/11/05, Noko Phala wrote: > > Hi, > > I have a program written in python, that uses several Scipy modules and > wish to send it to a client as an exe. The client does not have to install > Python. For this, python worked before on my other programs, but does not > work with scipy. Through google I have established that the program has to > do with dynamic importing of modules by scipy, as opposed to static import. > Does anyone know how to fix this problem? > > Regards, > > Noko > > -- Nikos Papagrigoriou http://www.papagrigoriou.gr -------------- next part -------------- An HTML attachment was scrubbed... URL: From nphala at angloresearch.com Tue Jul 12 06:45:02 2005 From: nphala at angloresearch.com (Noko Phala) Date: Tue, 12 Jul 2005 12:45:02 +0200 Subject: [SciPy-user] Scipy and Py2exe Message-ID: Thanks. I could solve the _cvs_version_ and 'cephes' errors, but I keep getting the 'No Module named integrate'. I used the following lines : from distutils.core import setup import py2exe import glob import os os.system("color E2") #color of console,2=green (use 1-7) # options = { "py2exe": { "includes": ['scipy', 'scipy.integrate', 'scipy.special.*','scipy.linalg.*'], "packages": ['encodings' ], } } Thanks, Noko -----Original Message----- From: scipy-user-bounces at scipy.net [mailto:scipy-user-bounces at scipy.net] On Behalf Of Nikos Papagrigoriou Sent: Tuesday, July 12, 2005 8:52 AM To: SciPy Users List Subject: Re: [SciPy-user] Scipy and Py2exe You have to make a proper setup.py if you want to create a Windows executable using py2exe. The following is part of a setup.py I wrote for a program (last year). Look at the "options" dictionary (includes: [... 'scipy.special.*','scipy.linalg.*'...]) . . . options = { "py2exe": { "compressed": 1, "optimize": 2, "includes": ['gui', 'stats', 'tables', 'config', 'scipy', 'constants', 'images', 'pool', 'tools','HTMLgen','shellcmds', 'scipy.special.*','scipy.linalg.*'], "packages": ['encodings' ], "dist_dir": distPath, } } . . . setup( name = progName, description = progDesc, version = __version__, options = options, zipfile = zipfile, windows = [program], cmdclass = {"py2exe": build_installer }, data_files = dataFiles, ) I hope this helps. Nikos. On 7/11/05, Noko Phala wrote: Hi, I have a program written in python, that uses several Scipy modules and wish to send it to a client as an exe. The client does not have to install Python. For this, python worked before on my other programs, but does not work with scipy. Through google I have established that the program has to do with dynamic importing of modules by scipy, as opposed to static import. Does anyone know how to fix this problem? Regards, Noko -- Nikos Papagrigoriou http://www.papagrigoriou.gr ------------------------------------------------------------------------------------------ This e-mail was checked by the e-Sweeper Service. For more information visit our website, Clearswift Corporation e-Sweeper : http://www.mimesweeper.com/products/esweeper/ ------------------------------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From papagr at gmail.com Tue Jul 12 07:12:07 2005 From: papagr at gmail.com (Nikos Papagrigoriou) Date: Tue, 12 Jul 2005 14:12:07 +0300 Subject: [SciPy-user] Scipy and Py2exe In-Reply-To: References: Message-ID: Try to add "scipy.*" to your includes. On 7/12/05, Noko Phala wrote: > > Thanks. > > I could solve the _*cvs_version*_ and 'cephes' errors, but I keep getting > the 'No Module named integrate'. I used the following lines : > > from distutils.core import setup > > import py2exe > > import glob > > import os > > os.system("color E2") #color of console,2=green (use 1-7) > > # > > options = { > > "py2exe": { > > "includes": ['scipy', > > 'scipy.integrate', 'scipy.special.*','scipy.linalg.*'], > > "packages": ['encodings' > > ], > > } > > } > > Thanks, > > Noko > > -----Original Message----- > *From:* scipy-user-bounces at scipy.net [mailto:scipy-user-bounces at scipy.net] > *On Behalf Of *Nikos Papagrigoriou > *Sent:* Tuesday, July 12, 2005 8:52 AM > *To:* SciPy Users List > *Subject:* Re: [SciPy-user] Scipy and Py2exe > > You have to make a proper setup.py if you want to create a Windows > executable using py2exe. The following is part of a setup.py I wrote for a > program (last year). Look at the "options" dictionary (includes: [... ' > scipy.special.*','scipy.linalg.*'...]) > . > . > . > > options = { > > "py2exe": { > > "compressed": 1, > > "optimize": 2, > > "includes": ['gui', > > 'stats', 'tables', 'config', 'scipy', > > 'constants', 'images', 'pool', > > 'tools','HTMLgen','shellcmds', > > 'scipy.special.*','scipy.linalg.*'], > > "packages": ['encodings' > > ], > > "dist_dir": distPath, > > } > > } > > . > . > . > > setup( > > name = progName, > > description = progDesc, > > version = __version__, > > options = options, > > zipfile = zipfile, > > windows = [program], > > cmdclass = {"py2exe": build_installer > > }, > > data_files = dataFiles, > > ) > > > I hope this helps. > > Nikos. > > On 7/11/05, *Noko Phala* wrote: > > Hi, > > I have a program written in python, that uses several Scipy modules and > wish to send it to a client as an exe. The client does not have to install > Python. For this, python worked before on my other programs, but does not > work with scipy. Through google I have established that the program has to > do with dynamic importing of modules by scipy, as opposed to static import. > Does anyone know how to fix this problem? > > Regards, > > Noko > > > > -- > Nikos Papagrigoriou > http://www.papagrigoriou.gr > > > > ------------------------------------------------------------------------------------------ > This e-mail was checked by the e-Sweeper Service. > For more information visit our website, Clearswift Corporation e-Sweeper : > http://www.mimesweeper.com/products/esweeper/ > > ------------------------------------------------------------------------------------------ > -- Nikos Papagrigoriou http://www.papagrigoriou.gr -------------- next part -------------- An HTML attachment was scrubbed... URL: From rajb at cs.rice.edu Tue Jul 12 10:26:17 2005 From: rajb at cs.rice.edu (rajb) Date: Tue, 12 Jul 2005 09:26:17 -0500 Subject: [SciPy-user] Simulation applications in Python Message-ID: <370B34E6-F456-44D2-BFE2-EAB50FD6FF4E@cs.rice.edu> Hi I'm a graduate student at Rice University working on compiler optimizations in high-level languages. We are looking for a few non- trivial public-domain scientific applications written in Python (which may or may not use lower-level libraries) in order to survey the characteristics of these applications. Specifically we are interested in studying a few real-life scientific simulation applications. If you have such an application, or if you know of one, please do let me know. I'd appreciate any help with this! thanks Raj From neruocomp at yahoo.com Tue Jul 12 11:07:10 2005 From: neruocomp at yahoo.com (David Noriega) Date: Tue, 12 Jul 2005 08:07:10 -0700 (PDT) Subject: [SciPy-user] Building Scipy on Dell 64bit Xeon Message-ID: <20050712150710.30408.qmail@web54504.mail.yahoo.com> Hello, I've been put in charge of setting up a Dell 64bit Xeon workstation and on the side I've been tring to get scipy to install, but I haven't had any luck. I compiled LAPACK, BLAS, and ATLAS sucsesfuly and scipy finds them. Its when I try to build scipy that I get problems. I try just plain "./setup.py build" and I get these errors: /usr/bin/ld: /usr/lib/gcc-lib/x86_64-redhat-linux/3.2.3/libg2c.a(s_stop.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc-lib/x86_64-redhat-linux/3.2.3/libg2c.a: could not read symbols: Bad value collect2: ld returned 1 exit status /usr/bin/ld: /usr/lib/gcc-lib/x86_64-redhat-linux/3.2.3/libg2c.a(s_stop.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc-lib/x86_64-redhat-linux/3.2.3/libg2c.a: could not read symbols: Bad value collect2: ld returned 1 exit status error: Command "/usr/bin/g77 -shared build/temp.linux-x86_64-2.4/Lib/special/cephesmodule.o build/temp.linux-x86_64-2.4/Lib/special/amos_wrappers.o build/temp.linux-x86_64-2.4/Lib/special/specfun_wrappers.o build/temp.linux-x86_64-2.4/Lib/special/toms_wrappers.o build/temp.linux-x86_64-2.4/Lib/special/cdf_wrappers.o build/temp.linux-x86_64-2.4/Lib/special/ufunc_extras.o -Lbuild/temp.linux-x86_64-2.4 -lamos -ltoms -lc_misc -lcephes -lmach -lcdf -lspecfun -lg2c -o build/lib.linux-x86_64-2.4/scipy/special/cephes.so" failed with exit status 1 I also installed Intel's compiler, but I get different errors: ld: skipping incompatible build/temp.linux-x86_64-2.4/libc_misc.a when searching for -lc_misc ld: cannot find -lc_misc ld: skipping incompatible build/temp.linux-x86_64-2.4/libc_misc.a when searching for -lc_misc ld: cannot find -lc_misc error: Command "/usr/local/intel/bin/ifort -shared -nofor_main build/temp.linux-x86_64-2.4/Lib/special/cephesmodule.o build/temp.linux-x86_64-2.4/Lib/special/amos_wrappers.o build/temp.linux-x86_64-2.4/Lib/special/specfun_wrappers.o build/temp.linux-x86_64-2.4/Lib/special/toms_wrappers.o build/temp.linux-x86_64-2.4/Lib/special/cdf_wrappers.o build/temp.linux-x86_64-2.4/Lib/special/ufunc_extras.o -Lbuild/temp.linux-x86_64-2.4 -lamos -ltoms -lc_misc -lcephes -lmach -lcdf -lspecfun -o build/lib.linux-x86_64-2.4/scipy/special/cephes.so" failed with exit status 1 In trying to figure out whats wrong, I changed some items in scipy_distutils. I'm running Fedora Core 4 x86_64, so I had scipy looking in /usr/lib64 and /usr/X11R6/lib64 for libraries. I also set scipy to use gcc32, just because when I compiled ATLAS Don't fear that philosophy's an impious way --superstition's more likely to lead folk astray. ~Lucretius, De rerum natura, Book One http://mindbender.deviantart.com __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rajb at cs.rice.edu Tue Jul 12 11:44:29 2005 From: rajb at cs.rice.edu (rajb) Date: Tue, 12 Jul 2005 10:44:29 -0500 Subject: [SciPy-user] Fortran issue with Building Python on Mac os X panther! Message-ID: <05B8688F-8713-4BD8-B2C7-6AA3FCD6A358@cs.rice.edu> Hi, while building scipy on Mac OS X (G5 processor), I get a bunch of errors as given below The latter part of the errors has to do with the fact that uses the Nagware f95 compiler to compile stuff. How can I make the building process try some other compiler, or at least skip the Nagware compiler? I've been racking my head over this for a while, so please help! Raj ------------------------------------------------------------- building library "superlu_src" sources running build_py copying build/src/scipy/scipy/config.py -> build/lib.darwin-7.9.0- Power_Macintosh-2.4/scipy package init file 'Lib/tests/__init__.py' not found (or not a regular file) package init file '/Users/rajb/research/TelescopingCode/ SciPy_complete-0.3.2/Lib/cluster/tests/__init__.py' not found (or not a regular file) package init file '/Users/rajb/research/TelescopingCode/ SciPy_complete-0.3.2/Lib/fftpack/tests/__init__.py' not found (or not a regular file) package init file '/Users/rajb/research/TelescopingCode/ SciPy_complete-0.3.2/Lib/fftpack/tests/__init__.py' not found (or not a regular file) package init file '/Users/rajb/research/TelescopingCode/ SciPy_complete-0.3.2/Lib/gui_thread/tests/__init__.py' not found (or not a regular file) followed by customize UnixCCompiler using build_clib customize NAGFCompiler customize NAGFCompiler customize NAGFCompiler using build_clib building 'mach' library 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] 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 From nicopernetty at yahoo.fr Tue Jul 12 14:46:03 2005 From: nicopernetty at yahoo.fr (Nicolas Pernetty) Date: Tue, 12 Jul 2005 20:46:03 +0200 Subject: [SciPy-user] Building Scipy on Dell 64bit Xeon In-Reply-To: <20050712150710.30408.qmail@web54504.mail.yahoo.com> References: <20050712150710.30408.qmail@web54504.mail.yahoo.com> Message-ID: <20050712204603.5c935619@linuxcestcomplique.fr> On Tue, 12 Jul 2005 08:07:10 -0700 (PDT), David Noriega wrote : > Hello, I've been put in charge of setting up a Dell > 64bit Xeon workstation and on the side I've been tring > to get scipy to install, but I haven't had any luck. > I compiled LAPACK, BLAS, and ATLAS sucsesfuly and > scipy finds them. Its when I try to build scipy that > I get problems. I try just plain "./setup.py build" > and I get these errors: Hello, > /usr/bin/ld: > /usr/lib/gcc-lib/x86_64-redhat-linux/3.2.3/libg2c.a(s_stop.o): > relocation R_X86_64_32 against `a local symbol' can > not be used when making a shared object; recompile > with -fPIC It seems that your gcc installation is somewhat messed up (libg2c hasn't been compiled with -fPIC) IMHO, best you can do to see if it's the problem is to compile your own gcc (try 3.4.3 instead of 4.0.0 which seems a little buggy). Don't be afraid : it's not that hard. Regards, From nicopernetty at yahoo.fr Tue Jul 12 14:54:10 2005 From: nicopernetty at yahoo.fr (Nicolas Pernetty) Date: Tue, 12 Jul 2005 20:54:10 +0200 Subject: [SciPy-user] SciPy on IA-64 In-Reply-To: <20050711224348.52f42e8f@linuxcestcomplique.fr> References: <20050711224348.52f42e8f@linuxcestcomplique.fr> Message-ID: <20050712205410.670fa43b@linuxcestcomplique.fr> On Mon, 11 Jul 2005 22:43:48 +0200, Nicolas Pernetty wrote : > Hello, > > While trying to compile SciPy on a Linux box on top of an Itanium > processor I ran into an error in fpuset.c. > It seems that IA-64 isn't referenced in either fpuset.c and > README.fpu. > > Has someone managed to compile SciPy on IA-64 ? > What shoud I do to compile fpuset.c or skip it ? > Ok I've skipped the 'xplt' package by modifying ignore_packages in setup.py. SciPy then compiled without other problems but when trying the tests I got a bunch of errors. Is there someone else out there using SciPy on IA-64 or am I the only one ? I'll try to debug the 7 errors which actually give back random results instead of throwing an exception... Regards, ====================================================================== ERROR: check_pBIGBIG (scipy.stats.stats.test_stats.test_corr) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/tests/test_st ats.py", line 211, in check_pBIGBIG y = scipy.stats.pearsonr(BIG,BIG) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1244, in pearsonr prob = betai(0.5*df,0.5,df/(df+t*t)) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1751, in betai return special.betainc(a,b,x) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_pBIGHUGE (scipy.stats.stats.test_stats.test_corr) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/tests/test_st ats.py", line 219, in check_pBIGHUGE y = scipy.stats.pearsonr(BIG,HUGE) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1244, in pearsonr prob = betai(0.5*df,0.5,df/(df+t*t)) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1751, in betai return special.betainc(a,b,x) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_pBIGLITTLE (scipy.stats.stats.test_stats.test_corr) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/tests/test_st ats.py", line 215, in check_pBIGLITTLE y = scipy.stats.pearsonr(BIG,LITTLE) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1244, in pearsonr prob = betai(0.5*df,0.5,df/(df+t*t)) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1751, in betai return special.betainc(a,b,x) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_pBIGROUND (scipy.stats.stats.test_stats.test_corr) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/tests/test_st ats.py", line 227, in check_pBIGROUND y = scipy.stats.pearsonr(BIG,ROUND) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1244, in pearsonr prob = betai(0.5*df,0.5,df/(df+t*t)) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1751, in betai return special.betainc(a,b,x) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_pBIGTINY (scipy.stats.stats.test_stats.test_corr) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/tests/test_st ats.py", line 223, in check_pBIGTINY y = scipy.stats.pearsonr(BIG,TINY) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1244, in pearsonr prob = betai(0.5*df,0.5,df/(df+t*t)) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1751, in betai return special.betainc(a,b,x) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_pHUGEHUGE (scipy.stats.stats.test_stats.test_corr) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/tests/test_st ats.py", line 247, in check_pHUGEHUGE y = scipy.stats.pearsonr(HUGE,HUGE) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1244, in pearsonr prob = betai(0.5*df,0.5,df/(df+t*t)) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1751, in betai return special.betainc(a,b,x) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_pHUGEROUND (scipy.stats.stats.test_stats.test_corr) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/tests/test_st ats.py", line 255, in check_pHUGEROUND y = scipy.stats.pearsonr(HUGE,ROUND) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1244, in pearsonr prob = betai(0.5*df,0.5,df/(df+t*t)) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1751, in betai return special.betainc(a,b,x) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_pHUGETINY (scipy.stats.stats.test_stats.test_corr) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/tests/test_st ats.py", line 251, in check_pHUGETINY y = scipy.stats.pearsonr(HUGE,TINY) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1244, in pearsonr prob = betai(0.5*df,0.5,df/(df+t*t)) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1751, in betai return special.betainc(a,b,x) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_pLITTLEHUGE (scipy.stats.stats.test_stats.test_corr) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/tests/test_st ats.py", line 235, in check_pLITTLEHUGE y = scipy.stats.pearsonr(LITTLE,HUGE) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1244, in pearsonr prob = betai(0.5*df,0.5,df/(df+t*t)) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1751, in betai return special.betainc(a,b,x) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_pLITTLELITTLE (scipy.stats.stats.test_stats.test_corr) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/tests/test_st ats.py", line 231, in check_pLITTLELITTLE y = scipy.stats.pearsonr(LITTLE,LITTLE) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1244, in pearsonr prob = betai(0.5*df,0.5,df/(df+t*t)) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1751, in betai return special.betainc(a,b,x) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_pLITTLEROUND (scipy.stats.stats.test_stats.test_corr) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/tests/test_st ats.py", line 243, in check_pLITTLEROUND y = scipy.stats.pearsonr(LITTLE,ROUND) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1244, in pearsonr prob = betai(0.5*df,0.5,df/(df+t*t)) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1751, in betai return special.betainc(a,b,x) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_pLITTLETINY (scipy.stats.stats.test_stats.test_corr) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/tests/test_st ats.py", line 239, in check_pLITTLETINY y = scipy.stats.pearsonr(LITTLE,TINY) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1244, in pearsonr prob = betai(0.5*df,0.5,df/(df+t*t)) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1751, in betai return special.betainc(a,b,x) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_pROUNDROUND (scipy.stats.stats.test_stats.test_corr) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/tests/test_st ats.py", line 267, in check_pROUNDROUND y = scipy.stats.pearsonr(ROUND,ROUND) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1244, in pearsonr prob = betai(0.5*df,0.5,df/(df+t*t)) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1751, in betai return special.betainc(a,b,x) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_pTINYROUND (scipy.stats.stats.test_stats.test_corr) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/tests/test_st ats.py", line 263, in check_pTINYROUND y = scipy.stats.pearsonr(TINY,ROUND) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1244, in pearsonr prob = betai(0.5*df,0.5,df/(df+t*t)) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1751, in betai return special.betainc(a,b,x) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_pTINYTINY (scipy.stats.stats.test_stats.test_corr) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/tests/test_st ats.py", line 259, in check_pTINYTINY y = scipy.stats.pearsonr(TINY,TINY) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1244, in pearsonr prob = betai(0.5*df,0.5,df/(df+t*t)) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1751, in betai return special.betainc(a,b,x) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_pXBIG (scipy.stats.stats.test_stats.test_corr) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/tests/test_st ats.py", line 191, in check_pXBIG y = scipy.stats.pearsonr(X,BIG) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1244, in pearsonr prob = betai(0.5*df,0.5,df/(df+t*t)) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1751, in betai return special.betainc(a,b,x) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_pXHUGE (scipy.stats.stats.test_stats.test_corr) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/tests/test_st ats.py", line 199, in check_pXHUGE y = scipy.stats.pearsonr(X,HUGE) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1244, in pearsonr prob = betai(0.5*df,0.5,df/(df+t*t)) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1751, in betai return special.betainc(a,b,x) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_pXLITTLE (scipy.stats.stats.test_stats.test_corr) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/tests/test_st ats.py", line 195, in check_pXLITTLE y = scipy.stats.pearsonr(X,LITTLE) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1244, in pearsonr prob = betai(0.5*df,0.5,df/(df+t*t)) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1751, in betai return special.betainc(a,b,x) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_pXROUND (scipy.stats.stats.test_stats.test_corr) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/tests/test_st ats.py", line 207, in check_pXROUND y = scipy.stats.pearsonr(X,ROUND) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1244, in pearsonr prob = betai(0.5*df,0.5,df/(df+t*t)) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1751, in betai return special.betainc(a,b,x) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_pXTINY (scipy.stats.stats.test_stats.test_corr) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/tests/test_st ats.py", line 203, in check_pXTINY y = scipy.stats.pearsonr(X,TINY) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1244, in pearsonr prob = betai(0.5*df,0.5,df/(df+t*t)) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1751, in betai return special.betainc(a,b,x) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_pXX (scipy.stats.stats.test_stats.test_corr) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/tests/test_st ats.py", line 187, in check_pXX y = scipy.stats.pearsonr(X,X) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1244, in pearsonr prob = betai(0.5*df,0.5,df/(df+t*t)) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1751, in betai return special.betainc(a,b,x) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: W.II.F. Regress BIG on X. ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/tests/test_st ats.py", line 371, in check_linregressBIGX y = scipy.stats.linregress(X,BIG) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1371, in linregress prob = betai(0.5*df,0.5,df/(df+t*t)) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1751, in betai return special.betainc(a,b,x) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: W.IV.B. Regress X on X. ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/tests/test_st ats.py", line 395, in check_regressXX y = scipy.stats.linregress(X,X) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1371, in linregress prob = betai(0.5*df,0.5,df/(df+t*t)) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1751, in betai return special.betainc(a,b,x) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: W.IV.D. Regress ZERO on X. ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/tests/test_st ats.py", line 414, in check_regressZEROX y = scipy.stats.linregress(X,ZERO) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1371, in linregress prob = betai(0.5*df,0.5,df/(df+t*t)) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1751, in betai return special.betainc(a,b,x) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_simple_overdet (scipy.linalg.basic.test_basic.test_lstsq) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/linalg/tests/test_b asic.py", line 361, in check_simple_overdet x,res,r,s = lstsq(a,b) File "/home/nico/local/lib/python2.4/site-packages/scipy/linalg/basic.py", line 353, in lstsq if rank==n: resids = sum(x[n:]**2) ArithmeticError: Integer overflow in power. ====================================================================== ERROR: check_betainc (scipy.special.basic.test_basic.test_betainc) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 652, in check_betainc btinc = betainc(1,1,.2) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_betaincinv (scipy.special.basic.test_basic.test_betaincinv) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 658, in check_betaincinv y = betaincinv(2,4,.5) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_bdtr (scipy.special.basic.test_basic.test_cephes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 50, in check_bdtr assert_equal(cephes.bdtr(1,1,0.5),1.0) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_bdtrc (scipy.special.basic.test_basic.test_cephes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 54, in check_bdtrc assert_equal(cephes.bdtrc(1,3,0.5),0.5) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_bdtri (scipy.special.basic.test_basic.test_cephes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 52, in check_bdtri assert_equal(cephes.bdtri(1,3,0.5),0.5) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_bdtrik (scipy.special.basic.test_basic.test_cephes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 58, in check_bdtrik cephes.bdtrik(1,3,0.5) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_bdtrin (scipy.special.basic.test_basic.test_cephes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 56, in check_bdtrin assert_equal(cephes.bdtrin(1,0,1),5.0) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_besselpoly (scipy.special.basic.test_basic.test_cephes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 70, in check_besselpoly assert_equal(cephes.besselpoly(0,0,0),1.0) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_betainc (scipy.special.basic.test_basic.test_cephes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 75, in check_betainc assert_equal(cephes.betainc(1,1,1),1.0) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_betaincinv (scipy.special.basic.test_basic.test_cephes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 79, in check_betaincinv assert_equal(cephes.betaincinv(1,1,1),1.0) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_btdtr (scipy.special.basic.test_basic.test_cephes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 82, in check_btdtr assert_equal(cephes.btdtr(1,1,1),1.0) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_btdtri (scipy.special.basic.test_basic.test_cephes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 84, in check_btdtri assert_equal(cephes.btdtri(1,1,1),1.0) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_btdtria (scipy.special.basic.test_basic.test_cephes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 86, in check_btdtria assert_equal(cephes.btdtria(1,1,1),5.0) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_btdtrib (scipy.special.basic.test_basic.test_cephes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 88, in check_btdtrib assert_equal(cephes.btdtrib(1,1,1),5.0) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_chndtr (scipy.special.basic.test_basic.test_cephes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 103, in check_chndtr assert_equal(cephes.chndtr(0,1,0),0.0) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_chndtridf (scipy.special.basic.test_basic.test_cephes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 105, in check_chndtridf assert_equal(cephes.chndtridf(0,0,1),5.0) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_chndtrinc (scipy.special.basic.test_basic.test_cephes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 107, in check_chndtrinc assert_equal(cephes.chndtrinc(0,1,0),5.0) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_chndtrix (scipy.special.basic.test_basic.test_cephes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 109, in check_chndtrix assert_equal(cephes.chndtrix(0,1,0),0.0) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_fdtr (scipy.special.basic.test_basic.test_cephes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 152, in check_fdtr assert_equal(cephes.fdtr(1,1,0),0.0) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_fdtrc (scipy.special.basic.test_basic.test_cephes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 154, in check_fdtrc assert_equal(cephes.fdtrc(1,1,0),1.0) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_fdtri (scipy.special.basic.test_basic.test_cephes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 156, in check_fdtri cephes.fdtri(1,1,0.5) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_fdtridfd (scipy.special.basic.test_basic.test_cephes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 158, in check_fdtridfd assert_equal(cephes.fdtridfd(1,0,0),5.0) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_gdtr (scipy.special.basic.test_basic.test_cephes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 175, in check_gdtr assert_equal(cephes.gdtr(1,1,0),0.0) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_gdtrc (scipy.special.basic.test_basic.test_cephes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 177, in check_gdtrc assert_equal(cephes.gdtrc(1,1,0),1.0) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_gdtria (scipy.special.basic.test_basic.test_cephes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 179, in check_gdtria assert_equal(cephes.gdtria(0,1,1),0.0) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_gdtrib (scipy.special.basic.test_basic.test_cephes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 181, in check_gdtrib cephes.gdtrib(1,0,1) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_gdtrix (scipy.special.basic.test_basic.test_cephes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 184, in check_gdtrix cephes.gdtrix(1,1,.1) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_hyperu (scipy.special.basic.test_basic.test_cephes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 206, in check_hyperu assert_equal(cephes.hyperu(0,1,1),1.0) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_lpmv (scipy.special.basic.test_basic.test_cephes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 282, in check_lpmv assert_equal(cephes.lpmv(0,0,1),1.0) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_nbdtr (scipy.special.basic.test_basic.test_cephes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 309, in check_nbdtr assert_equal(cephes.nbdtr(1,1,1),1.0) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_nbdtrc (scipy.special.basic.test_basic.test_cephes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 311, in check_nbdtrc assert_equal(cephes.nbdtrc(1,1,1),0.0) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_nbdtri (scipy.special.basic.test_basic.test_cephes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 313, in check_nbdtri assert_equal(cephes.nbdtri(1,1,1),1.0) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_nbdtrin (scipy.special.basic.test_basic.test_cephes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 317, in check_nbdtrin assert_equal(cephes.nbdtrin(1,0,0),5.0) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_nctdtr (scipy.special.basic.test_basic.test_cephes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 331, in check_nctdtr assert_equal(cephes.nctdtr(1,0,0),0.5) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_nctdtrinc (scipy.special.basic.test_basic.test_cephes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 335, in check_nctdtrinc cephes.nctdtrinc(1,0,0) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_nctdtrit (scipy.special.basic.test_basic.test_cephes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 337, in check_nctdtrit cephes.nctdtrit(.1,0.2,.5) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_nrdtrimn (scipy.special.basic.test_basic.test_cephes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 344, in check_nrdtrimn assert_approx_equal(cephes.nrdtrimn(0.5,1,1),1.0) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_nrdtrisd (scipy.special.basic.test_basic.test_cephes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 346, in check_nrdtrisd assert_equal(cephes.nrdtrisd(0.5,0.5,0.5),0.0) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_pbdv (scipy.special.basic.test_basic.test_cephes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 367, in check_pbdv assert_equal(cephes.pbdv(1,0),(0.0,0.0)) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_pbvv (scipy.special.basic.test_basic.test_cephes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 369, in check_pbvv cephes.pbvv(1,0) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_pbwa (scipy.special.basic.test_basic.test_cephes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 371, in check_pbwa cephes.pbwa(1,0) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_radian (scipy.special.basic.test_basic.test_cephes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 401, in check_radian assert_equal(cephes.radian(0,0,0),0) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_hyperu (scipy.special.basic.test_basic.test_hyperu) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 1158, in check_hyperu val1 = hyperu(1,0.1,100) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_lpmv (scipy.special.basic.test_basic.test_lpmv) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 1641, in check_lpmv lp = lpmv(0,2,.5) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_pbdv (scipy.special.basic.test_basic.test_pbdv) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 1711, in check_pbdv pbv = pbdv(1,.2) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_radian (scipy.special.basic.test_basic.test_radian) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 1753, in check_radian rad = radian(90,0,0) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_radianmore (scipy.special.basic.test_basic.test_radian) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 1757, in check_radianmore rad1 = radian(90,1,60) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_data (scipy.stats.morestats.test_morestats.test_binom_test) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/tests/test_mo restats.py", line 101, in check_data pval = stats.binom_test(100,250) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/morestats.py", line 752, in binom_test d = distributions.binom.pmf(x,n,p) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/distributions .py", line 3259, in pmf insert(output,cond,self._pmf(*goodargs)) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/distributions .py", line 3188, in _pmf return self.cdf(k,*args) - self.cdf(k-1,*args) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/distributions .py", line 3287, in cdf insert(output,cond,self._cdf(*goodargs)) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/distributions .py", line 3552, in _cdf vals = special.bdtr(k,n,pr) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_data (scipy.stats.morestats.test_morestats.test_levene) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/tests/test_mo restats.py", line 95, in check_data W, pval = stats.levene(*args) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/morestats.py", line 721, in levene pval = distributions.f.sf(W,k-1,Ntot-k) # 1 - cdf File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/distributions .py", line 529, in sf insert(output,cond,self._sf(*goodargs)) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/distributions .py", line 1363, in _sf return special.fdtrc(dfn, dfd, x) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_cdf (scipy.stats.distributions.test_distributions.test_beta) ---------------------------------------------------------------------- Traceback (most recent call last): File "", line 5, in check_cdf File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1527, in kstest cdfvals = cdf(vals, *args) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/distributions .py", line 500, in cdf insert(output,cond,self._cdf(*goodargs)) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/distributions .py", line 915, in _cdf return special.btdtr(a,b,x) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_cdf (scipy.stats.distributions.test_distributions.test_erlang) ---------------------------------------------------------------------- Traceback (most recent call last): File "", line 5, in check_cdf File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1527, in kstest cdfvals = cdf(vals, *args) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/distributions .py", line 500, in cdf insert(output,cond,self._cdf(*goodargs)) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/distributions .py", line 1219, in _cdf return special.gdtr(1.0,n,x) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_cdf (scipy.stats.distributions.test_distributions.test_f) ---------------------------------------------------------------------- Traceback (most recent call last): File "", line 5, in check_cdf File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1527, in kstest cdfvals = cdf(vals, *args) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/distributions .py", line 500, in cdf insert(output,cond,self._cdf(*goodargs)) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/distributions .py", line 1361, in _cdf return special.fdtr(dfn, dfd, x) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_cdf (scipy.stats.distributions.test_distributions.test_nct) ---------------------------------------------------------------------- Traceback (most recent call last): File "", line 5, in check_cdf File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1527, in kstest cdfvals = cdf(vals, *args) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/distributions .py", line 500, in cdf insert(output,cond,self._cdf(*goodargs)) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/distributions .py", line 2347, in _cdf return special.nctdtr(df, nc, x) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_cdf (scipy.stats.distributions.test_distributions.test_ncx2) ---------------------------------------------------------------------- Traceback (most recent call last): File "", line 5, in check_cdf File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/stats.py", line 1527, in kstest cdfvals = cdf(vals, *args) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/distributions .py", line 500, in cdf insert(output,cond,self._cdf(*goodargs)) File "/home/nico/local/lib/python2.4/site-packages/scipy/stats/distributions .py", line 2248, in _cdf return special.chndtr(x,df,nc) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== FAIL: check_simple (scipy.linalg.decomp.test_decomp.test_cholesky) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/linalg/tests/test_d ecomp.py", line 247, in check_simple assert_array_almost_equal(Numeric.dot(Numeric.transpose(c),c),a) File "/home/nico/local/lib/python2.4/site-packages/scipy_test/testing.py", line 684, in assert_array_almost_equal assert cond,\ AssertionError: Arrays are not almost equal (mismatch 100.0%): Array 1: [[-1885965976648932823 5601654751623046748 -761725725645001531] [ 5601654751623046748 -5339454195305043312 358622652... Array 2: [[8 2 3] [2 9 3] [3 3 6]] ====================================================================== FAIL: check_simple (scipy.linalg.basic.test_basic.test_det) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/linalg/tests/test_b asic.py", line 273, in check_simple assert_almost_equal(a_det,-2.0) File "/home/nico/local/lib/python2.4/site-packages/scipy_test/testing.py", line 606, in assert_almost_equal assert round(abs(desired - actual),decimal) == 0, msg AssertionError: Items are not equal: DESIRED: -2.0 ACTUAL: inf ====================================================================== FAIL: check_simple (scipy.linalg.basic.test_basic.test_inv) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/linalg/tests/test_b asic.py", line 202, in check_simple [[1,0],[0,1]]) File "/home/nico/local/lib/python2.4/site-packages/scipy_test/testing.py", line 684, in assert_array_almost_equal assert cond,\ AssertionError: Arrays are not almost equal (mismatch 100.0%): Array 1: [[9216616637413720064 -4503599627370496] [9207609438158979072 -9007199254740992]] Array 2: [[1 0] [0 1]] ====================================================================== FAIL: check_simple_exact (scipy.linalg.basic.test_basic.test_lstsq) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/linalg/tests/test_b asic.py", line 356, in check_simple_exact assert_array_almost_equal(Numeric.matrixmultiply(a,x),b) File "/home/nico/local/lib/python2.4/site-packages/scipy_test/testing.py", line 684, in assert_array_almost_equal assert cond,\ AssertionError: Arrays are not almost equal (mismatch 50.0%): Array 1: [0 0] Array 2: [1 0] ====================================================================== FAIL: check_simple (scipy.linalg.basic.test_basic.test_solve) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/linalg/tests/test_b asic.py", line 74, in check_simple assert_array_almost_equal(Numeric.matrixmultiply(a,x),b) File "/home/nico/local/lib/python2.4/site-packages/scipy_test/testing.py", line 684, in assert_array_almost_equal assert cond,\ AssertionError: Arrays are not almost equal (mismatch 100.0%): Array 1: [[ nan nan] [ nan nan]] Array 2: [[1 0] [0 1]] ====================================================================== FAIL: check_simple_sym (scipy.linalg.basic.test_basic.test_solve) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/linalg/tests/test_b asic.py", line 81, in check_simple_sym assert_array_almost_equal(Numeric.matrixmultiply(a,x),b) File "/home/nico/local/lib/python2.4/site-packages/scipy_test/testing.py", line 684, in assert_array_almost_equal assert cond,\ AssertionError: Arrays are not almost equal (mismatch 100.0%): Array 1: [[ nan nan] [ nan nan]] Array 2: [[1 0] [0 1]] ====================================================================== FAIL: check_tandg (scipy.special.basic.test_basic.test_cephes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nico/local/lib/python2.4/site-packages/scipy/special/tests/test_ basic.py", line 436, in check_tandg assert_equal(cephes.tandg(45),1.0) File "/home/nico/local/lib/python2.4/site-packages/scipy_test/testing.py", line 589, in assert_equal assert desired == actual, msg AssertionError: Items are not equal: DESIRED: 1.0 ACTUAL: 1.0000000000000002 ---------------------------------------------------------------------- Ran 972 tests in 3.504s FAILED (failures=7, errors=79) From rkern at ucsd.edu Tue Jul 12 16:06:50 2005 From: rkern at ucsd.edu (Robert Kern) Date: Tue, 12 Jul 2005 13:06:50 -0700 Subject: [SciPy-user] Fortran issue with Building Python on Mac os X panther! In-Reply-To: <05B8688F-8713-4BD8-B2C7-6AA3FCD6A358@cs.rice.edu> References: <05B8688F-8713-4BD8-B2C7-6AA3FCD6A358@cs.rice.edu> Message-ID: <42D422DA.6010300@ucsd.edu> rajb wrote: > Hi, while building scipy on Mac OS X (G5 processor), I get a bunch of > errors as given below > > The latter part of the errors has to do with the fact that uses the > Nagware f95 compiler to compile stuff. How can I make the building > process try some other compiler, or at least skip the Nagware compiler? > I've been racking my head over this for a while, so please help! python setup.py build_src build_clib build_ext --fcompiler=gnu build --fcompiler=gnu I'm sure there's a terser way, but that's what I do when I have some other compiler sitting around. -- 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 neruocomp at yahoo.com Tue Jul 12 17:33:35 2005 From: neruocomp at yahoo.com (David Noriega) Date: Tue, 12 Jul 2005 14:33:35 -0700 (PDT) Subject: [SciPy-user] Building Scipy on Dell 64bit Xeon In-Reply-To: <20050712204603.5c935619@linuxcestcomplique.fr> Message-ID: <20050712213335.45075.qmail@web54504.mail.yahoo.com> Well thats easier said then done on a fedora/redhat system. I know enought to get rpmbuild to rebuild gcc for me, but how would I get it to recompile gcc with -fPIC. Any ideas as to which file I should edit and where to put "-fPIC"? --- Nicolas Pernetty wrote: > On Tue, 12 Jul 2005 08:07:10 -0700 (PDT), David > Noriega > wrote : > > > Hello, I've been put in charge of setting up a > Dell > > 64bit Xeon workstation and on the side I've been > tring > > to get scipy to install, but I haven't had any > luck. > > I compiled LAPACK, BLAS, and ATLAS sucsesfuly and > > scipy finds them. Its when I try to build scipy > that > > I get problems. I try just plain "./setup.py > build" > > and I get these errors: > > Hello, > > > /usr/bin/ld: > > > /usr/lib/gcc-lib/x86_64-redhat-linux/3.2.3/libg2c.a(s_stop.o): > > relocation R_X86_64_32 against `a local symbol' > can > > not be used when making a shared object; recompile > > with -fPIC > > It seems that your gcc installation is somewhat > messed up (libg2c hasn't > been compiled with -fPIC) > IMHO, best you can do to see if it's the problem is > to compile your own > gcc (try 3.4.3 instead of 4.0.0 which seems a little > buggy). Don't be > afraid : it's not that hard. > > Regards, > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > Don't fear that philosophy's an impious way --superstition's more likely to lead folk astray. ~Lucretius, De rerum natura, Book One http://mindbender.deviantart.com __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From neruocomp at yahoo.com Tue Jul 12 17:51:08 2005 From: neruocomp at yahoo.com (David Noriega) Date: Tue, 12 Jul 2005 14:51:08 -0700 (PDT) Subject: [SciPy-user] Building Scipy on Dell 64bit Xeon In-Reply-To: <20050712213335.45075.qmail@web54504.mail.yahoo.com> Message-ID: <20050712215108.17407.qmail@web54507.mail.yahoo.com> Well I did some more looking around and found that my problem was that I didnt have the 64bit package for libg2c. Its a bit weird with this system since it installs both i386 and x86_64 for some packages. Well that fixed this problem, I have a new one. It seems I need to build the ATLAS libraries with -fPIC /usr/bin/g77 -shared build/temp.linux-x86_64-2.4/build/src/Lib/optimize/lbfgsb-0.9/_lbfgsbmodule.o build/temp.linux-x86_64-2.4/build/src/fortranobject.o build/temp.linux-x86_64-2.4/Lib/optimize/lbfgsb-0.9/routines.o -L/usr/local/lib/atlas -Lbuild/temp.linux-x86_64-2.4 -llapack -lf77blas -lcblas -latlas -lg2c -o build/lib.linux-x86_64-2.4/scipy/optimize/_lbfgsb.so /usr/bin/ld: /usr/local/lib/atlas/liblapack.a(dpotrf.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/local/lib/atlas/liblapack.a: could not read symbols: Bad value collect2: ld returned 1 exit status /usr/bin/ld: /usr/local/lib/atlas/liblapack.a(dpotrf.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/local/lib/atlas/liblapack.a: could not read symbols: Bad value collect2: ld returned 1 exit status error: Command "/usr/bin/g77 -shared build/temp.linux-x86_64-2.4/build/src/Lib/optimize/lbfgsb-0.9/_lbfgsbmodule.o build/temp.linux-x86_64-2.4/build/src/fortranobject.o build/temp.linux-x86_64-2.4/Lib/optimize/lbfgsb-0.9/routines.o -L/usr/local/lib/atlas -Lbuild/temp.linux-x86_64-2.4 -llapack -lf77blas -lcblas -latlas -lg2c -o build/lib.linux-x86_64-2.4/scipy/optimize/_lbfgsb.so" failed with exit status 1 I'll keep you posted on my progress. I also wanted to point out something in scipy_distutils. The way cpuinfo.py is currently setup, it will not find that this system uses a Xeon processor. also it will fail to recongize it as having sse3. Looking at /proc/cpuinfo, Xeon is not in all caps and sse3, while it should be there, only comes up as ss. But that might just be a kernel thing as I fixed it in cpuinfo.py. --- David Noriega wrote: > Well thats easier said then done on a fedora/redhat > system. I know enought to get rpmbuild to rebuild > gcc > for me, but how would I get it to recompile gcc with > -fPIC. Any ideas as to which file I should edit and > where to put "-fPIC"? > > --- Nicolas Pernetty wrote: > > > On Tue, 12 Jul 2005 08:07:10 -0700 (PDT), David > > Noriega > > wrote : > > > > > Hello, I've been put in charge of setting up a > > Dell > > > 64bit Xeon workstation and on the side I've been > > tring > > > to get scipy to install, but I haven't had any > > luck. > > > I compiled LAPACK, BLAS, and ATLAS sucsesfuly > and > > > scipy finds them. Its when I try to build scipy > > that > > > I get problems. I try just plain "./setup.py > > build" > > > and I get these errors: > > > > Hello, > > > > > /usr/bin/ld: > > > > > > /usr/lib/gcc-lib/x86_64-redhat-linux/3.2.3/libg2c.a(s_stop.o): > > > relocation R_X86_64_32 against `a local symbol' > > can > > > not be used when making a shared object; > recompile > > > with -fPIC > > > > It seems that your gcc installation is somewhat > > messed up (libg2c hasn't > > been compiled with -fPIC) > > IMHO, best you can do to see if it's the problem > is > > to compile your own > > gcc (try 3.4.3 instead of 4.0.0 which seems a > little > > buggy). Don't be > > afraid : it's not that hard. > > > > Regards, > > > > _______________________________________________ > > SciPy-user mailing list > > SciPy-user at scipy.net > > http://www.scipy.net/mailman/listinfo/scipy-user > > > > > Don't fear that philosophy's an impious way > --superstition's more likely to lead folk astray. > > ~Lucretius, De rerum natura, Book One > > http://mindbender.deviantart.com > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam > protection around > http://mail.yahoo.com > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > Don't fear that philosophy's an impious way --superstition's more likely to lead folk astray. ~Lucretius, De rerum natura, Book One http://mindbender.deviantart.com __________________________________ Yahoo! Mail Stay connected, organized, and protected. Take the tour: http://tour.mail.yahoo.com/mailtour.html From nicopernetty at yahoo.fr Tue Jul 12 18:46:09 2005 From: nicopernetty at yahoo.fr (Nicolas Pernetty) Date: Wed, 13 Jul 2005 00:46:09 +0200 Subject: [SciPy-user] Building Scipy on Dell 64bit Xeon In-Reply-To: <20050712215108.17407.qmail@web54507.mail.yahoo.com> References: <20050712213335.45075.qmail@web54504.mail.yahoo.com> <20050712215108.17407.qmail@web54507.mail.yahoo.com> Message-ID: <20050713004609.5050fa52@linuxcestcomplique.fr> On Tue, 12 Jul 2005 14:51:08 -0700 (PDT), David Noriega wrote : > Well I did some more looking around and found that my > problem was that I didnt have the 64bit package for > libg2c. Its a bit weird with this system since it > installs both i386 and x86_64 for some packages. Well > that fixed this problem, Good ! > I have a new one. It seems I > need to build the ATLAS libraries with -fPIC > > /usr/bin/g77 -shared > build/temp.linux-x86_64-2.4/build/src/Lib/optimize/lbfgsb-0.9/_lbfgsb > module.o build/temp.linux-x86_64-2.4/build/src/fortranobject.o > build/temp.linux-x86_64-2.4/Lib/optimize/lbfgsb-0.9/routines.o > -L/usr/local/lib/atlas -Lbuild/temp.linux-x86_64-2.4 > -llapack -lf77blas -lcblas -latlas -lg2c -o > build/lib.linux-x86_64-2.4/scipy/optimize/_lbfgsb.so > /usr/bin/ld: > /usr/local/lib/atlas/liblapack.a(dpotrf.o): relocation > R_X86_64_32 against `a local symbol' can not be used > when making a shared object; recompile with -fPIC > /usr/local/lib/atlas/liblapack.a: could not read > symbols: Bad value -fPIC again... > > I'll keep you posted on my progress. I also wanted to > point out something in scipy_distutils. The way > cpuinfo.py is currently setup, it will not find that > this system uses a Xeon processor. also it will fail > to recongize it as having sse3. Looking at > /proc/cpuinfo, Xeon is not in all caps and sse3, while > it should be there, only comes up as ss. But that > might just be a kernel thing as I fixed it in > cpuinfo.py. I've just managed to compile SciPy on a RedHat Advanced Server 3 on an IA-64, so I guess you're near to succeed too ! I've also tried to use the default atlas and lapack given by RedHat but it somehow didn't fit (couldn't remember the errors though). After having much trouble compiling both for Solaris and HP-UX, doing it on a Linux box was much more simpler (didn't say easy), so I recompile atlas and lapack and managed to compile SciPy. Numeric is really simple to compile, could you try to compile it with your atlas/lapack to see if you still got the error ? (you have to manually edit setup.py to indicate paths to atlas/lapack) That would prove that the problem is inside atlas/lapack. If that's the case I could help you compiling them. Keep us informed ! Regards, > --- David Noriega wrote: > > > Well thats easier said then done on a fedora/redhat > > system. I know enought to get rpmbuild to rebuild > > gcc > > for me, but how would I get it to recompile gcc with > > -fPIC. Any ideas as to which file I should edit and > > where to put "-fPIC"? > > > > --- Nicolas Pernetty wrote: > > > > > On Tue, 12 Jul 2005 08:07:10 -0700 (PDT), David > > > Noriega > > > wrote : > > > > > > > Hello, I've been put in charge of setting up a > > > Dell > > > > 64bit Xeon workstation and on the side I've been > > > tring > > > > to get scipy to install, but I haven't had any > > > luck. > > > > I compiled LAPACK, BLAS, and ATLAS sucsesfuly > > and > > > > scipy finds them. Its when I try to build scipy > > > that > > > > I get problems. I try just plain "./setup.py > > > build" > > > > and I get these errors: > > > > > > Hello, > > > > > > > /usr/bin/ld: > > > > > > > > > > /usr/lib/gcc-lib/x86_64-redhat-linux/3.2.3/libg2c.a(s_stop.o): > > > > relocation R_X86_64_32 against `a local symbol' > > > can > > > > not be used when making a shared object; > > recompile > > > > with -fPIC > > > > > > It seems that your gcc installation is somewhat > > > messed up (libg2c hasn't > > > been compiled with -fPIC) > > > IMHO, best you can do to see if it's the problem > > is > > > to compile your own > > > gcc (try 3.4.3 instead of 4.0.0 which seems a > > little > > > buggy). Don't be > > > afraid : it's not that hard. > > > > > > Regards, > > > > > > _______________________________________________ > > > SciPy-user mailing list > > > SciPy-user at scipy.net > > > http://www.scipy.net/mailman/listinfo/scipy-user > > > > > > > > > Don't fear that philosophy's an impious way > > --superstition's more likely to lead folk astray. > > > > ~Lucretius, De rerum natura, Book One > > > > http://mindbender.deviantart.com > > > > __________________________________________________ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam > > protection around > > http://mail.yahoo.com > > > > _______________________________________________ > > SciPy-user mailing list > > SciPy-user at scipy.net > > http://www.scipy.net/mailman/listinfo/scipy-user > > > > > Don't fear that philosophy's an impious way > --superstition's more likely to lead folk astray. > > ~Lucretius, De rerum natura, Book One > > http://mindbender.deviantart.com > > > > __________________________________ > Yahoo! Mail > Stay connected, organized, and protected. Take the tour: > http://tour.mail.yahoo.com/mailtour.html > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From ed at lamedomain.net Tue Jul 12 19:46:05 2005 From: ed at lamedomain.net (Ed Rahn) Date: Tue, 12 Jul 2005 19:46:05 -0400 Subject: [SciPy-user] Building Scipy on Dell 64bit Xeon In-Reply-To: <20050713004609.5050fa52@linuxcestcomplique.fr> References: <20050712213335.45075.qmail@web54504.mail.yahoo.com> <20050712215108.17407.qmail@web54507.mail.yahoo.com> <20050713004609.5050fa52@linuxcestcomplique.fr> Message-ID: <20050712194605.5ce44dba@localhost.localdomain> On Wed, 13 Jul 2005 00:46:09 +0200 Nicolas Pernetty wrote: > > I have a new one. It seems I > > need to build the ATLAS libraries with -fPIC > > > > /usr/bin/g77 -shared > > build/temp.linux-x86_64-2.4/build/src/Lib/optimize/lbfgsb-0.9/_lbfg > > sb module.o build/temp.linux-x86_64-2.4/build/src/fortranobject.o > > build/temp.linux-x86_64-2.4/Lib/optimize/lbfgsb-0.9/routines.o > > -L/usr/local/lib/atlas -Lbuild/temp.linux-x86_64-2.4 > > -llapack -lf77blas -lcblas -latlas -lg2c -o > > build/lib.linux-x86_64-2.4/scipy/optimize/_lbfgsb.so > > /usr/bin/ld: > > /usr/local/lib/atlas/liblapack.a(dpotrf.o): relocation > > R_X86_64_32 against `a local symbol' can not be used > > when making a shared object; recompile with -fPIC > > /usr/local/lib/atlas/liblapack.a: could not read > > symbols: Bad value > > -fPIC again... > Setting the environment flag CFLAGS=-fPIC might work. If ATLAS uses configure to setup Makefiles you will need to set this before running it again. (e.g. CFLAGS=-fPIC ./configure --prefix=/usr/local/). I have not done this with ATLAS, but this is how I solved the same problem compiling other software. cheers! Ed From aisaac at american.edu Tue Jul 12 21:29:44 2005 From: aisaac at american.edu (Alan G Isaac) Date: Tue, 12 Jul 2005 21:29:44 -0400 Subject: [SciPy-user] nan puzzle Message-ID: Is this expected behavior? Thank you, Alan Isaac >>> z=[0,1,nan] >>> x=nan >>> x -1.#IND >>> x is nan True >>> x=z[2] >>> x -1.#IND >>> x is nan False >>> From Fernando.Perez at colorado.edu Tue Jul 12 21:44:24 2005 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Tue, 12 Jul 2005 19:44:24 -0600 Subject: [SciPy-user] nan puzzle In-Reply-To: References: Message-ID: <42D471F8.6000602@colorado.edu> Alan G Isaac wrote: > Is this expected behavior? doesn't seem to happen under linux: In [8]: from scipy import nan In [9]: z=[0,1,nan] In [10]: x=nan In [11]: x is nan Out[11]: True In [12]: x = z[2] In [13]: x is nan Out[13]: True In [14]: x Out[14]: nan If I recall correctly Tim Peter's posts on the subject, the IEEE-754 behavior of python is 100% platform dependent, and fully at the whim of the underlying C library implementation. Under win32, this means whatever Microsoft was willing to do. I wouldn't exactly hold my breath on that. Cheers, f From rkern at ucsd.edu Tue Jul 12 22:04:22 2005 From: rkern at ucsd.edu (Robert Kern) Date: Tue, 12 Jul 2005 19:04:22 -0700 Subject: [SciPy-user] nan puzzle In-Reply-To: References: Message-ID: <42D476A6.3050900@ucsd.edu> Alan G Isaac wrote: > Is this expected behavior? > Thank you, > Alan Isaac > >>>>z=[0,1,nan] >>>>x=nan >>>>x > > -1.#IND > >>>>x is nan > > True > >>>>x=z[2] >>>>x > > -1.#IND > >>>>x is nan > > False Platform-dependent accident, as Tim Peters is fond of saying. On my Powerbook: In [1]: z = [0, 1, nan] In [2]: x = nan In [3]: x is nan Out[3]: True In [4]: z[2] is nan Out[4]: True In [5]: x = z[2] In [6]: x is nan Out[6]: True -- 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 strawman at astraw.com Tue Jul 12 23:25:43 2005 From: strawman at astraw.com (Andrew Straw) Date: Tue, 12 Jul 2005 20:25:43 -0700 Subject: [SciPy-user] nan puzzle In-Reply-To: References: Message-ID: <42D489B7.2000702@astraw.com> I haven't used it, but the fpconst module is supposed to deal with this situation. e.g. fpconst.isNaN(val) fpconst home: http://research.warnes.net/projects/RStatServer/fpconst/ The draft PEP: http://www.python.org/peps/pep-0754.html Alan G Isaac wrote: > Is this expected behavior? > Thank you, > Alan Isaac > > >>>>z=[0,1,nan] >>>>x=nan >>>>x > > -1.#IND > >>>>x is nan > > True > >>>>x=z[2] >>>>x > > -1.#IND > >>>>x is nan > > False > From rkern at ucsd.edu Tue Jul 12 23:52:04 2005 From: rkern at ucsd.edu (Robert Kern) Date: Tue, 12 Jul 2005 20:52:04 -0700 Subject: [SciPy-user] nan puzzle In-Reply-To: <42D489B7.2000702@astraw.com> References: <42D489B7.2000702@astraw.com> Message-ID: <42D48FE4.5030909@ucsd.edu> Andrew Straw wrote: > I haven't used it, but the fpconst module is supposed to deal with this > situation. > > e.g. fpconst.isNaN(val) > > fpconst home: > http://research.warnes.net/projects/RStatServer/fpconst/ > > The draft PEP: > http://www.python.org/peps/pep-0754.html Well, scipy.isnan() usually works, too. The real issue seems to be that the "is" operator isn't working correctly. "is" compares the underlying PyObject* pointers and shouldn't be touching the floating point value at all. I can't replicate it on OS X, so it's probably Windows-specific. Alan, is what you wrote a direct cut-and-paste of the actual session? -- 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 grante at visi.com Wed Jul 13 00:16:35 2005 From: grante at visi.com (Grant Edwards) Date: Wed, 13 Jul 2005 04:16:35 +0000 (UTC) Subject: [SciPy-user] Re: nan puzzle References: Message-ID: On 2005-07-13, Alan G Isaac wrote: > Is this expected behavior? >>>> x is nan > True >>>> x=z[2] >>>> x > -1.#IND >>>> x is nan > False May I ask why you care? The expression "x is nan" seems pretty useless to me. The "is" operator isn't really useful for other floating point values, why would it be useful for nans? >>> x = 1.234 >>> x is 1.234 False >>> >>> y = 1.234 >>> x is y False >>> x == y True >>> What you probably want to be checking is if x has a nan value, not whether x is the same object as some other object that has a nan value. -- Grant Edwards grante Yow! Is this my STOP?? at visi.com From drohr at few.vu.nl Wed Jul 13 03:47:39 2005 From: drohr at few.vu.nl (Daniel R. Rohr) Date: Wed, 13 Jul 2005 09:47:39 +0200 Subject: [SciPy-user] Simulation applications in Python In-Reply-To: <370B34E6-F456-44D2-BFE2-EAB50FD6FF4E@cs.rice.edu> References: <370B34E6-F456-44D2-BFE2-EAB50FD6FF4E@cs.rice.edu> Message-ID: <42D4C71B.5080606@few.vu.nl> Hi Raj I'm not so sure if this is what you are looking for but here a short describtion of what I am doing: I'm a Ph.D. in Amsterdam in theoretical chemistry. I'm writing a program to "simulate" molecules. In fact I try to find better approximations to do so. It is written in Python and uses the LAPACK libary to do the hard stuff. C U Dan > Hi > > I'm a graduate student at Rice University working on compiler > optimizations in high-level languages. We are looking for a few non- > trivial public-domain scientific applications written in Python (which > may or may not use lower-level libraries) in order to survey the > characteristics of these applications. Specifically we are interested > in studying a few real-life scientific simulation applications. > > If you have such an application, or if you know of one, please do let > me know. I'd appreciate any help with this! > > thanks > Raj > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From d.howey at imperial.ac.uk Wed Jul 13 07:43:53 2005 From: d.howey at imperial.ac.uk (Howey, David A) Date: Wed, 13 Jul 2005 12:43:53 +0100 Subject: [SciPy-user] wxpython Message-ID: <056D32E9B2D93B49B01256A88B3EB218766E31@icex2.ic.ac.uk> I've just got python and scipy working on my winXP box here - hurrah! I have the following installed so far: Python 2.3.5 Python 2.3 F2PY-2.45.241_1926 Python 2.3 Numeric-23.1 Python 2.3 pywin32 extensions (build 204) Python 2.3 SciPy_complete-0.3.2 So I thought I would try the little bit of code on http://www.scipy.org/documentation/FAQ.html under 'what does a python...session look like?' Sadly, it bombs out on 'gui_thread.start()' with the following: >>> gui_thread.start() Traceback (most recent call last): File "C:\Python23\Lib\site-packages\scipy_base\pexec.py", line 56, in run exec (code, frame.f_globals,frame.f_locals) File "", line 1, in ? ImportError: No module named wxPython Traceback (most recent call last): File "", line 1, in -toplevel- gui_thread.start() File "C:\Python23\Lib\site-packages\gui_thread\__init__.py", line 73, in start wxPython_thread() File "C:\Python23\Lib\site-packages\gui_thread\wxPython_thread.py", line 156, in wxPython_thread for name in get_extmodules(pexec): File "C:\Python23\Lib\site-packages\gui_thread\wxPython_thread.py", line 25, in get_extmodules _do_import(pexec) File "C:\Python23\Lib\site-packages\gui_thread\wxPython_thread.py", line 115, in _do_import path = os.path.dirname(sys.modules['wxPython'].__file__) KeyError: 'wxPython' >>> Any ideas? Thanks Dave From ryanfedora at comcast.net Wed Jul 13 08:09:47 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Wed, 13 Jul 2005 08:09:47 -0400 Subject: [SciPy-user] wxpython In-Reply-To: <056D32E9B2D93B49B01256A88B3EB218766E31@icex2.ic.ac.uk> References: <056D32E9B2D93B49B01256A88B3EB218766E31@icex2.ic.ac.uk> Message-ID: <42D5048B.4000103@comcast.net> An HTML attachment was scrubbed... URL: From B.P.S.Thurin at city.ac.uk Wed Jul 13 08:11:35 2005 From: B.P.S.Thurin at city.ac.uk (Brice Thurin) Date: Wed, 13 Jul 2005 13:11:35 +0100 Subject: [SciPy-user] wxpython In-Reply-To: <056D32E9B2D93B49B01256A88B3EB218766E31@icex2.ic.ac.uk> References: <056D32E9B2D93B49B01256A88B3EB218766E31@icex2.ic.ac.uk> Message-ID: <26640d53821285a488b061930e1f0369@city.ac.uk> Hi, I had some trouble in the past as well using gui_thread and someone recommend me to use matplotlib (http://matplotlib.sourceforge.net). Otherwise, wxpython allows you to play with gui and can be find here: (http://www.wxpython.org). Brice On 13 Jul 2005, at 12:43, Howey, David A wrote: > > I've just got python and scipy working on my winXP box here - hurrah! I > have the following installed so far: > > Python 2.3.5 > Python 2.3 F2PY-2.45.241_1926 > Python 2.3 Numeric-23.1 > Python 2.3 pywin32 extensions (build 204) > Python 2.3 SciPy_complete-0.3.2 > > So I thought I would try the little bit of code on > http://www.scipy.org/documentation/FAQ.html under 'what does a > python...session look like?' > > Sadly, it bombs out on 'gui_thread.start()' with the following: > >>>> gui_thread.start() > Traceback (most recent call last): > File "C:\Python23\Lib\site-packages\scipy_base\pexec.py", line 56, in > run > exec (code, frame.f_globals,frame.f_locals) > File "", line 1, in ? > ImportError: No module named wxPython > > Traceback (most recent call last): > File "", line 1, in -toplevel- > gui_thread.start() > File "C:\Python23\Lib\site-packages\gui_thread\__init__.py", line 73, > in start > wxPython_thread() > File "C:\Python23\Lib\site-packages\gui_thread\wxPython_thread.py", > line 156, in wxPython_thread > for name in get_extmodules(pexec): > File "C:\Python23\Lib\site-packages\gui_thread\wxPython_thread.py", > line 25, in get_extmodules > _do_import(pexec) > File "C:\Python23\Lib\site-packages\gui_thread\wxPython_thread.py", > line 115, in _do_import > path = os.path.dirname(sys.modules['wxPython'].__file__) > KeyError: 'wxPython' >>>> > > > Any ideas? > Thanks > > Dave > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > > 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 d.howey at imperial.ac.uk Wed Jul 13 08:35:21 2005 From: d.howey at imperial.ac.uk (Howey, David A) Date: Wed, 13 Jul 2005 13:35:21 +0100 Subject: [SciPy-user] wxpython Message-ID: <056D32E9B2D93B49B01256A88B3EB218766E33@icex2.ic.ac.uk> I've now installed wxpython, and sadly get: >>> import gui_thread >>> gui_thread.start() Traceback (most recent call last): File "", line 1, in -toplevel- gui_thread.start() File "C:\Python23\Lib\site-packages\gui_thread\__init__.py", line 73, in start wxPython_thread() File "C:\Python23\Lib\site-packages\gui_thread\wxPython_thread.py", line 160, in wxPython_thread sys.modules[name] = wrap_extmodule(module,call_holder) File "C:\Python23\Lib\site-packages\gui_thread\wxPython_thread.py", line 61, in wrap_extmodule raise NotImplementedError,`t` NotImplementedError: >>> Perhaps I've done something wrong? Dave -----Original Message----- From: scipy-user-bounces at scipy.net [mailto:scipy-user-bounces at scipy.net] On Behalf Of Brice Thurin Sent: 13 July 2005 13:12 To: SciPy Users List Subject: Re: [SciPy-user] wxpython Hi, I had some trouble in the past as well using gui_thread and someone recommend me to use matplotlib (http://matplotlib.sourceforge.net). Otherwise, wxpython allows you to play with gui and can be find here: (http://www.wxpython.org). Brice From ryanfedora at comcast.net Wed Jul 13 08:40:34 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Wed, 13 Jul 2005 08:40:34 -0400 Subject: [SciPy-user] wxpython In-Reply-To: <056D32E9B2D93B49B01256A88B3EB218766E33@icex2.ic.ac.uk> References: <056D32E9B2D93B49B01256A88B3EB218766E33@icex2.ic.ac.uk> Message-ID: <42D50BC2.2040504@comcast.net> An HTML attachment was scrubbed... URL: From ryanfedora at comcast.net Wed Jul 13 08:41:22 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Wed, 13 Jul 2005 08:41:22 -0400 Subject: [SciPy-user] wxpython In-Reply-To: <056D32E9B2D93B49B01256A88B3EB218766E33@icex2.ic.ac.uk> References: <056D32E9B2D93B49B01256A88B3EB218766E33@icex2.ic.ac.uk> Message-ID: <42D50BF2.1010306@comcast.net> An HTML attachment was scrubbed... URL: From d.howey at imperial.ac.uk Wed Jul 13 08:45:07 2005 From: d.howey at imperial.ac.uk (Howey, David A) Date: Wed, 13 Jul 2005 13:45:07 +0100 Subject: [SciPy-user] wxpython Message-ID: <056D32E9B2D93B49B01256A88B3EB218766E35@icex2.ic.ac.uk> thanks. I'll try that. I'm currently coding in matlab to simulate 1D steady state fluid dynamics problems, and considering the switch to python/scipy. Key issues of concern: 1) can matrices/vectors be handled in the same way (this is the power of matlab of course). eg. the matlab 'dot' notation which operates element by element on matrices. using vectors greatly speeds up code over for loops and makes it more compact. 2) matlab has extremely powerful plotting facilities 3) object orientation. Actually I think python might excel here. I get a bit frustrated with matlab objects (no passing by reference, for example). 4) creation of executables/binaries-- should be okay Do you or anyone have any comments on these points? Dave ________________________________ From: scipy-user-bounces at scipy.net [mailto:scipy-user-bounces at scipy.net] On Behalf Of Ryan Krauss Sent: 13 July 2005 13:41 To: SciPy Users List Subject: Re: [SciPy-user] wxpython Dave, I actually get the same thing. I know it can be frustrating to try new software and have it not work completely out of the box. At this point in the installation, someone recommended to me to switch to Ipython and matplotlib. That is what I have done and I am quite happy with it. Ryan Howey, David A wrote: I've now installed wxpython, and sadly get: import gui_thread gui_thread.start() Traceback (most recent call last): File "", line 1, in -toplevel- gui_thread.start() File "C:\Python23\Lib\site-packages\gui_thread\__init__.py", line 73, in start wxPython_thread() File "C:\Python23\Lib\site-packages\gui_thread\wxPython_thread.py", line 160, in wxPython_thread sys.modules[name] = wrap_extmodule(module,call_holder) File "C:\Python23\Lib\site-packages\gui_thread\wxPython_thread.py", line 61, in wrap_extmodule raise NotImplementedError,`t` NotImplementedError: Perhaps I've done something wrong? Dave -----Original Message----- From: scipy-user-bounces at scipy.net [mailto:scipy-user-bounces at scipy.net] On Behalf Of Brice Thurin Sent: 13 July 2005 13:12 To: SciPy Users List Subject: Re: [SciPy-user] wxpython Hi, I had some trouble in the past as well using gui_thread and someone recommend me to use matplotlib (http://matplotlib.sourceforge.net). Otherwise, wxpython allows you to play with gui and can be find here: (http://www.wxpython.org). Brice _______________________________________________ SciPy-user mailing list SciPy-user at scipy.net http://www.scipy.net/mailman/listinfo/scipy-user -------------- next part -------------- An HTML attachment was scrubbed... URL: From rkern at ucsd.edu Wed Jul 13 08:53:06 2005 From: rkern at ucsd.edu (Robert Kern) Date: Wed, 13 Jul 2005 05:53:06 -0700 Subject: [SciPy-user] wxpython In-Reply-To: <42D50BF2.1010306@comcast.net> References: <056D32E9B2D93B49B01256A88B3EB218766E33@icex2.ic.ac.uk> <42D50BF2.1010306@comcast.net> Message-ID: <42D50EB2.9000402@ucsd.edu> [Apologies for piggybacking. I haven't seen the original, yet.] Ryan Krauss wrote: > By the way, matplotlib does include a wx backend that makes plotting in > wxPython quite nice. > > Howey, David A wrote: > >>I've now installed wxpython, and sadly get: >> >>>>>import gui_thread >>>>>gui_thread.start() >>>>> >>>>> >> >>Traceback (most recent call last): >> File "", line 1, in -toplevel- >> gui_thread.start() >> File "C:\Python23\Lib\site-packages\gui_thread\__init__.py", line 73, >>in start >> wxPython_thread() >> File "C:\Python23\Lib\site-packages\gui_thread\wxPython_thread.py", >>line 160, in wxPython_thread >> sys.modules[name] = wrap_extmodule(module,call_holder) >> File "C:\Python23\Lib\site-packages\gui_thread\wxPython_thread.py", >>line 61, in wrap_extmodule >> raise NotImplementedError,`t` >>NotImplementedError: gui_thread is obsolete and has not been upgraded to handle the latest wxPython. ipython has up-to-date threading support. 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 ryanfedora at comcast.net Wed Jul 13 08:56:08 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Wed, 13 Jul 2005 08:56:08 -0400 Subject: [SciPy-user] wxpython In-Reply-To: <056D32E9B2D93B49B01256A88B3EB218766E35@icex2.ic.ac.uk> References: <056D32E9B2D93B49B01256A88B3EB218766E35@icex2.ic.ac.uk> Message-ID: <42D50F68.8090309@comcast.net> An HTML attachment was scrubbed... URL: From d.howey at imperial.ac.uk Wed Jul 13 09:07:35 2005 From: d.howey at imperial.ac.uk (Howey, David A) Date: Wed, 13 Jul 2005 14:07:35 +0100 Subject: [SciPy-user] wxpython Message-ID: <056D32E9B2D93B49B01256A88B3EB218766E38@icex2.ic.ac.uk> >gui_thread is obsolete and has not been upgraded to handle the latest wxPython. ipython has up-to-date threading >support. I've just installed ipython. Seems okay, although I was getting to quite like the look and feel of 'idle', particularly the way it hints at syntax (like excel does) and also uses colours in the interpreter, and links to its own editor. Dave From ryanfedora at comcast.net Wed Jul 13 09:13:28 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Wed, 13 Jul 2005 09:13:28 -0400 Subject: [SciPy-user] wxpython In-Reply-To: <056D32E9B2D93B49B01256A88B3EB218766E38@icex2.ic.ac.uk> References: <056D32E9B2D93B49B01256A88B3EB218766E38@icex2.ic.ac.uk> Message-ID: <42D51378.7020309@comcast.net> An HTML attachment was scrubbed... URL: From d.howey at imperial.ac.uk Wed Jul 13 09:23:11 2005 From: d.howey at imperial.ac.uk (Howey, David A) Date: Wed, 13 Jul 2005 14:23:11 +0100 Subject: [SciPy-user] wxpython Message-ID: <056D32E9B2D93B49B01256A88B3EB218766E3B@icex2.ic.ac.uk> yeah, I've got it running in colour.. I just meant the 'inline' colour changes as you type also, what editor do you use with ipython? I quite liked the idle built in editor Dave ________________________________ From: scipy-user-bounces at scipy.net [mailto:scipy-user-bounces at scipy.net] On Behalf Of Ryan Krauss Sent: 13 July 2005 14:13 To: SciPy Users List Subject: Re: [SciPy-user] wxpython Ipython can be made to run in color if you follow the Windows install instructions. It will also suggest syntax when you hit the tab key. Howey, David A wrote: gui_thread is obsolete and has not been upgraded to handle the latest wxPython. ipython has up-to-date threading support. I've just installed ipython. Seems okay, although I was getting to quite like the look and feel of 'idle', particularly the way it hints at syntax (like excel does) and also uses colours in the interpreter, and links to its own editor. Dave _______________________________________________ SciPy-user mailing list SciPy-user at scipy.net http://www.scipy.net/mailman/listinfo/scipy-user -------------- next part -------------- An HTML attachment was scrubbed... URL: From ryanfedora at comcast.net Wed Jul 13 09:32:39 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Wed, 13 Jul 2005 09:32:39 -0400 Subject: [SciPy-user] wxpython In-Reply-To: <056D32E9B2D93B49B01256A88B3EB218766E3B@icex2.ic.ac.uk> References: <056D32E9B2D93B49B01256A88B3EB218766E3B@icex2.ic.ac.uk> Message-ID: <42D517F7.2010900@comcast.net> An HTML attachment was scrubbed... URL: From nphala at angloresearch.com Wed Jul 13 09:38:20 2005 From: nphala at angloresearch.com (Noko Phala) Date: Wed, 13 Jul 2005 15:38:20 +0200 Subject: [SciPy-user] RE: plotting and Py2exe Message-ID: Hi, Does anyone have any experience with making executables of a scipy-using python script that uses a plotting function like gplt or plt? I canot get the executable to plot. Other methods of solving scipy-related problems with py2exe did not work so far (e.g. scipy.gplt in includes, etc). Thanks, Noko ------------------------------------------------------------------------------------------ This e-mail was checked by the e-Sweeper Service. For more information visit our website, Clearswift Corporation e-Sweeper : http://www.mimesweeper.com/products/esweeper/ ------------------------------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From ryanfedora at comcast.net Wed Jul 13 09:43:24 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Wed, 13 Jul 2005 09:43:24 -0400 Subject: [SciPy-user] RE: plotting and Py2exe In-Reply-To: References: Message-ID: <42D51A7C.5090604@comcast.net> An HTML attachment was scrubbed... URL: From jdhunter at ace.bsd.uchicago.edu Wed Jul 13 10:09:37 2005 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Wed, 13 Jul 2005 09:09:37 -0500 Subject: [SciPy-user] RE: plotting and Py2exe In-Reply-To: <42D51A7C.5090604@comcast.net> (Ryan Krauss's message of "Wed, 13 Jul 2005 09:43:24 -0400") References: <42D51A7C.5090604@comcast.net> Message-ID: <87y88aiyqm.fsf@peds-pc311.bsd.uchicago.edu> >>>>> "Ryan" == Ryan Krauss writes: Ryan> I have heard of people doing it with matplotlib. The Ryan> py2exe question gets asked a lot on that list. Yep, so often in fact we made it a FAQ (with example) http://matplotlib.sourceforge.net/faq.html#PY2EXE JDH From d.howey at imperial.ac.uk Wed Jul 13 10:14:55 2005 From: d.howey at imperial.ac.uk (Howey, David A) Date: Wed, 13 Jul 2005 15:14:55 +0100 Subject: [SciPy-user] wxpython Message-ID: <056D32E9B2D93B49B01256A88B3EB218766E40@icex2.ic.ac.uk> I'm a bit annoyed at having to give up the 'integrated' environment of IDLE and use ipython, although I concede that ipython is quite nice. In particular I now need an editor. Can anyone help? Unlike you I prefer emacs but haven't yet found an easy win32 binary (any idea where I can get it? I would rather not mess with cygwin etc). Also, it's a bit heavyweight. I will check out crimsoneditor, looks nice. Dave ________________________________ From: scipy-user-bounces at scipy.net [mailto:scipy-user-bounces at scipy.net] On Behalf Of Ryan Krauss Sent: 13 July 2005 14:33 To: SciPy Users List Subject: Re: [SciPy-user] wxpython I am a bit of an editor freak. I have finally decided on VIM. It is a bit painful at first and like VI, it has modes where typing doesn't produce text. But the leads to lots of key board short cuts and it has tab-completion as well. Another good choice is Crimson Editor. It is free and does syntax highlighting for many languages including python. I have used it for matlab, LaTeX, html, python, and C++. http://www.crimsoneditor.com/ Other people may have other suggestions. Ryan Howey, David A wrote: yeah, I've got it running in colour.. I just meant the 'inline' colour changes as you type also, what editor do you use with ipython? I quite liked the idle built in editor Dave ________________________________ From: scipy-user-bounces at scipy.net [mailto:scipy-user-bounces at scipy.net] On Behalf Of Ryan Krauss Sent: 13 July 2005 14:13 To: SciPy Users List Subject: Re: [SciPy-user] wxpython Ipython can be made to run in color if you follow the Windows install instructions. It will also suggest syntax when you hit the tab key. Howey, David A wrote: gui_thread is obsolete and has not been upgraded to handle the latest wxPython. ipython has up-to-date threading support. I've just installed ipython. Seems okay, although I was getting to quite like the look and feel of 'idle', particularly the way it hints at syntax (like excel does) and also uses colours in the interpreter, and links to its own editor. Dave _______________________________________________ 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 HTML attachment was scrubbed... URL: From jdhunter at ace.bsd.uchicago.edu Wed Jul 13 10:24:32 2005 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Wed, 13 Jul 2005 09:24:32 -0500 Subject: [SciPy-user] wxpython In-Reply-To: <056D32E9B2D93B49B01256A88B3EB218766E40@icex2.ic.ac.uk> ("Howey, David A"'s message of "Wed, 13 Jul 2005 15:14:55 +0100") References: <056D32E9B2D93B49B01256A88B3EB218766E40@icex2.ic.ac.uk> Message-ID: <87d5pmg4wv.fsf@peds-pc311.bsd.uchicago.edu> >>>>> "Howey," == Howey, David A writes: Howey,> I'm a bit annoyed at having to give up the 'integrated' Howey,> environment of IDLE and use ipython, although I concede Howey,> that ipython is quite nice. In particular I now need an Howey,> editor. Can anyone help? Unlike you I prefer emacs but Howey,> haven't yet found an easy win32 binary (any idea where I Howey,> can get it? I would rather not mess with cygwin Howey,> etc). Also, it's a bit heavyweight. You can get binary versions of gnu emacs at http://ftp.gnu.org/gnu/windows/emacs/ eg http://ftp.gnu.org/gnu/windows/emacs/emacs-21.3-fullbin-i386.tar.gz No cygwin required. I usually untar it in Program Files and then create a shortcut to bin/runemacs on my desktop. I use them it all the time on win32; after putty and winscp it's the first thing I install on a new windows box. Only thing that keeps me sane in windows land... If you already like emacs, emacs + ipython are a great combination that work well together. You can, for example, configure ipython and emacs so that from ipython you can do In [3]: pwd Out[3]: '/home/jdhunter' In [4]: edit test.py and have test.py appear in a emacs buffer in the running emacs session. Never tried this on windows, though. Also, > ipython -pylab mode has special support for maptlotlib pylab mode, and will automagically handle gui threading, etc... JDH From nphala at angloresearch.com Wed Jul 13 10:27:52 2005 From: nphala at angloresearch.com (Noko Phala) Date: Wed, 13 Jul 2005 16:27:52 +0200 Subject: [SciPy-user] RE: plotting and Py2exe Message-ID: Thanks! -----Original Message----- From: scipy-user-bounces at scipy.net [mailto:scipy-user-bounces at scipy.net] On Behalf Of John Hunter Sent: Wednesday, July 13, 2005 4:10 PM To: SciPy Users List Subject: Re: [SciPy-user] RE: plotting and Py2exe >>>>> "Ryan" == Ryan Krauss writes: Ryan> I have heard of people doing it with matplotlib. The Ryan> py2exe question gets asked a lot on that list. Yep, so often in fact we made it a FAQ (with example) http://matplotlib.sourceforge.net/faq.html#PY2EXE JDH _______________________________________________ SciPy-user mailing list SciPy-user at scipy.net http://www.scipy.net/mailman/listinfo/scipy-user ------------------------------------------------------------------------------------------ This e-mail was checked by the e-Sweeper Service. For more information visit our website, Clearswift Corporation e-Sweeper : http://www.mimesweeper.com/products/esweeper/ ------------------------------------------------------------------------------------------ From dd55 at cornell.edu Wed Jul 13 10:39:14 2005 From: dd55 at cornell.edu (Darren Dale) Date: Wed, 13 Jul 2005 10:39:14 -0400 Subject: [SciPy-user] wxpython In-Reply-To: <87d5pmg4wv.fsf@peds-pc311.bsd.uchicago.edu> References: <056D32E9B2D93B49B01256A88B3EB218766E40@icex2.ic.ac.uk> <87d5pmg4wv.fsf@peds-pc311.bsd.uchicago.edu> Message-ID: <200507131039.15008.dd55@cornell.edu> On Wednesday 13 July 2005 10:24 am, John Hunter wrote: > If you already like emacs, emacs + ipython are a great combination > that work well together. You can, for example, configure ipython and > emacs so that from ipython you can do > > > In [3]: pwd > Out[3]: '/home/jdhunter' > > In [4]: edit test.py > > and have test.py appear in a emacs buffer in the running emacs > session. Never tried this on windows, though. I think you need gnuserv to make this work on windows. This link looks useful: http://www.mirror5.com/software/emacs/windows/faq3.html#assoc -- Darren From d.howey at imperial.ac.uk Wed Jul 13 10:50:52 2005 From: d.howey at imperial.ac.uk (Howey, David A) Date: Wed, 13 Jul 2005 15:50:52 +0100 Subject: [SciPy-user] pycrust Message-ID: <056D32E9B2D93B49B01256A88B3EB218766E42@icex2.ic.ac.uk> This is what I was suspecting... I've never been able to 'just install' emacs on windows without having to install a whole bunch of other things. It starts to feel like linux-land!!! :-) Unrelated question: has anyone used pycrust instead of ipython or idle? Is it better/worse for scipy/numpy/matplotlib type stuff? Uuugh the volume of python related stuff flying about it massive. I'm just trying to get my head around it. At least with matlab you get an integrated editor, command line etc. All wrapped into one package. Having said that, it aint open source, is it! Dave -----Original Message----- From: scipy-user-bounces at scipy.net [mailto:scipy-user-bounces at scipy.net] On Behalf Of Darren Dale Sent: 13 July 2005 15:39 To: SciPy Users List Subject: Re: [SciPy-user] wxpython On Wednesday 13 July 2005 10:24 am, John Hunter wrote: > If you already like emacs, emacs + ipython are a great combination > that work well together. You can, for example, configure ipython and > emacs so that from ipython you can do > > > In [3]: pwd > Out[3]: '/home/jdhunter' > > In [4]: edit test.py > > and have test.py appear in a emacs buffer in the running emacs > session. Never tried this on windows, though. I think you need gnuserv to make this work on windows. This link looks useful: http://www.mirror5.com/software/emacs/windows/faq3.html#assoc -- Darren _______________________________________________ SciPy-user mailing list SciPy-user at scipy.net http://www.scipy.net/mailman/listinfo/scipy-user From ryanfedora at comcast.net Wed Jul 13 11:02:56 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Wed, 13 Jul 2005 11:02:56 -0400 Subject: [SciPy-user] pycrust In-Reply-To: <056D32E9B2D93B49B01256A88B3EB218766E42@icex2.ic.ac.uk> References: <056D32E9B2D93B49B01256A88B3EB218766E42@icex2.ic.ac.uk> Message-ID: <42D52D20.8030703@comcast.net> As long as you use the TkAgg backend, I was able to use matplotlib and scipy with pycrust: import pylab from scipy import * x=arange(0,1,0.1) y=sin(2*pi*x) pylab.plot(x,y) pylab.show() The only catch is that once you show() your plots, you have to close them all before you can do anything else in the command window (because gui_thread doesn't work). While pycrust and its variants form a nice environment, the editor associated with them is pretty plain and the history mechanism isn't persistant (i.e. it doesn't remember commands after you close it and restart it). Ryan Howey, David A wrote: >This is what I was suspecting... I've never been able to 'just install' >emacs on windows without having to install a whole bunch of other >things. It starts to feel like linux-land!!! :-) > >Unrelated question: has anyone used pycrust instead of ipython or idle? >Is it better/worse for scipy/numpy/matplotlib type stuff? > >Uuugh the volume of python related stuff flying about it massive. I'm >just trying to get my head around it. At least with matlab you get an >integrated editor, command line etc. All wrapped into one package. >Having said that, it aint open source, is it! > >Dave > >-----Original Message----- >From: scipy-user-bounces at scipy.net [mailto:scipy-user-bounces at scipy.net] >On Behalf Of Darren Dale >Sent: 13 July 2005 15:39 >To: SciPy Users List >Subject: Re: [SciPy-user] wxpython > >On Wednesday 13 July 2005 10:24 am, John Hunter wrote: > > >>If you already like emacs, emacs + ipython are a great combination >>that work well together. You can, for example, configure ipython and >>emacs so that from ipython you can do >> >> >> In [3]: pwd >> Out[3]: '/home/jdhunter' >> >> In [4]: edit test.py >> >>and have test.py appear in a emacs buffer in the running emacs >>session. Never tried this on windows, though. >> >> > >I think you need gnuserv to make this work on windows. This link looks >useful: > >http://www.mirror5.com/software/emacs/windows/faq3.html#assoc > > > From d.howey at imperial.ac.uk Wed Jul 13 11:07:47 2005 From: d.howey at imperial.ac.uk (Howey, David A) Date: Wed, 13 Jul 2005 16:07:47 +0100 Subject: [SciPy-user] pycrust Message-ID: <056D32E9B2D93B49B01256A88B3EB218766E43@icex2.ic.ac.uk> Thanks - this is helpful. I am trying to get ipython to use an editor other than windows notepad. First I tried editing the 'ipythonrc' file. Didn't have any affect - still uses notepad. Then I tried a command line: ipython -editor C:\Program Files\Crimson Editor\cedt.exe It doesn't like that. I think it's something to do with the spaces in the path. Should I use \%20 ? Anyone else got this sorted on a win32 system? Thanks Dave -----Original Message----- From: scipy-user-bounces at scipy.net [mailto:scipy-user-bounces at scipy.net] On Behalf Of Ryan Krauss Sent: 13 July 2005 16:03 To: SciPy Users List Subject: Re: [SciPy-user] pycrust As long as you use the TkAgg backend, I was able to use matplotlib and scipy with pycrust: import pylab from scipy import * x=arange(0,1,0.1) y=sin(2*pi*x) pylab.plot(x,y) pylab.show() The only catch is that once you show() your plots, you have to close them all before you can do anything else in the command window (because gui_thread doesn't work). While pycrust and its variants form a nice environment, the editor associated with them is pretty plain and the history mechanism isn't persistant (i.e. it doesn't remember commands after you close it and restart it). Ryan From ryanfedora at comcast.net Wed Jul 13 11:19:53 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Wed, 13 Jul 2005 11:19:53 -0400 Subject: [SciPy-user] pycrust In-Reply-To: <056D32E9B2D93B49B01256A88B3EB218766E43@icex2.ic.ac.uk> References: <056D32E9B2D93B49B01256A88B3EB218766E43@icex2.ic.ac.uk> Message-ID: <42D53119.102@comcast.net> Add C:\Program Files\Crimson Editor to your windows path variable and then set the line in ipythonrc.ini to read editor cedt I just tried it and it worked. Howey, David A wrote: >Thanks - this is helpful. > >I am trying to get ipython to use an editor other than windows notepad. >First I tried editing the 'ipythonrc' file. Didn't have any affect - >still uses notepad. Then I tried a command line: > ipython -editor C:\Program Files\Crimson Editor\cedt.exe > >It doesn't like that. I think it's something to do with the spaces in >the path. Should I use \%20 ? >Anyone else got this sorted on a win32 system? > >Thanks > >Dave > >-----Original Message----- >From: scipy-user-bounces at scipy.net [mailto:scipy-user-bounces at scipy.net] >On Behalf Of Ryan Krauss >Sent: 13 July 2005 16:03 >To: SciPy Users List >Subject: Re: [SciPy-user] pycrust > >As long as you use the TkAgg backend, I was able to use matplotlib and >scipy with pycrust: >import pylab >from scipy import * >x=arange(0,1,0.1) >y=sin(2*pi*x) >pylab.plot(x,y) >pylab.show() > >The only catch is that once you show() your plots, you have to close >them all before you can do anything else in the command window (because >gui_thread doesn't work). > >While pycrust and its variants form a nice environment, the editor >associated with them is pretty plain and the history mechanism isn't >persistant (i.e. it doesn't remember commands after you close it and >restart it). > >Ryan > >_______________________________________________ >SciPy-user mailing list >SciPy-user at scipy.net >http://www.scipy.net/mailman/listinfo/scipy-user > > > From gruben at bigpond.net.au Wed Jul 13 11:26:09 2005 From: gruben at bigpond.net.au (Gary Ruben) Date: Thu, 14 Jul 2005 01:26:09 +1000 Subject: [SciPy-user] wxpython In-Reply-To: <056D32E9B2D93B49B01256A88B3EB218766E40@icex2.ic.ac.uk> References: <056D32E9B2D93B49B01256A88B3EB218766E40@icex2.ic.ac.uk> Message-ID: <42D53291.4010006@bigpond.net.au> Also take a look at SciTE if you want a small, fast editor with a Python heritage which follows MS Windows editing conventions: http://scintilla.sourceforge.net/SciTE.html It supports single key execution and matplotlib works fine with it. Gary Howey, David A wrote: > I'm a bit annoyed at having to give up the 'integrated' environment of > IDLE and use ipython, although I concede that ipython is quite nice. In > particular I now need an editor. Can anyone help? Unlike you I prefer > emacs but haven't yet found an easy win32 binary (any idea where I can > get it? I would rather not mess with cygwin etc). Also, it's a bit > heavyweight. > > I will check out crimsoneditor, looks nice. > > Dave From ryanfedora at comcast.net Wed Jul 13 11:37:13 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Wed, 13 Jul 2005 11:37:13 -0400 Subject: [SciPy-user] wxpython In-Reply-To: <42D53291.4010006@bigpond.net.au> References: <056D32E9B2D93B49B01256A88B3EB218766E40@icex2.ic.ac.uk> <42D53291.4010006@bigpond.net.au> Message-ID: <42D53529.2050705@comcast.net> SciTE does look pretty cool. When I try to run a python script using the F5 - run, it automatically closes all the plot windows and exists before I can see them. I tried adding a raw input wait and then it waits for me but doesn't finish drawing the plots. What is the right way to do this? Ryan Gary Ruben wrote: > Also take a look at SciTE if you want a small, fast editor with a > Python heritage which follows MS Windows editing conventions: > http://scintilla.sourceforge.net/SciTE.html > It supports single key execution and matplotlib works fine with it. > Gary > > Howey, David A wrote: > >> I'm a bit annoyed at having to give up the 'integrated' environment >> of IDLE and use ipython, although I concede that ipython is quite >> nice. In particular I now need an editor. Can anyone help? Unlike you >> I prefer emacs but haven't yet found an easy win32 binary (any idea >> where I can get it? I would rather not mess with cygwin etc). Also, >> it's a bit heavyweight. >> >> I will check out crimsoneditor, looks nice. >> >> Dave > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From grante at visi.com Wed Jul 13 11:46:29 2005 From: grante at visi.com (Grant Edwards) Date: Wed, 13 Jul 2005 15:46:29 +0000 (UTC) Subject: [SciPy-user] Re: plotting and Py2exe References: Message-ID: On 2005-07-13, Noko Phala wrote: > Does anyone have any experience with making executables of a scipy-using > python script that uses a plotting function like gplt or plt? No, but I've use Gnuplot-py without any problems. -- Grant Edwards grante Yow! I represent a at sardine!! visi.com From d.howey at imperial.ac.uk Wed Jul 13 12:13:14 2005 From: d.howey at imperial.ac.uk (Howey, David A) Date: Wed, 13 Jul 2005 17:13:14 +0100 Subject: [SciPy-user] pycrust Message-ID: <056D32E9B2D93B49B01256A88B3EB218766E46@icex2.ic.ac.uk> One last thing with crimson editor is that the autoindent doesn't seem to work for python .py files. Unless I'm missing something (it is switched on). Have you got it working? Dave -----Original Message----- From: scipy-user-bounces at scipy.net [mailto:scipy-user-bounces at scipy.net] On Behalf Of Ryan Krauss Sent: 13 July 2005 16:20 To: SciPy Users List Subject: Re: [SciPy-user] pycrust Add C:\Program Files\Crimson Editor to your windows path variable and then set the line in ipythonrc.ini to read editor cedt I just tried it and it worked. From aisaac at american.edu Wed Jul 13 12:18:11 2005 From: aisaac at american.edu (Alan G Isaac) Date: Wed, 13 Jul 2005 12:18:11 -0400 Subject: [SciPy-user] Re: nan puzzle In-Reply-To: References: Message-ID: On Wed, 13 Jul 2005, Grant Edwards apparently wrote: > What you probably want to be checking is if x has a nan > value, not whether x is the same object as some other > object that has a nan value. How? (See below.) Anyway, now I cannot replicate the problem. I did post a cut and paste, but I cannot reproduce it. Also I recall having to type something that did not come with the cut, so the post must be suspect until I can replicate. I'll repost if I find can. Until then, sorry for the noise. I'll plan on using isnan(). Thanks for the feedback. Alan Python 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> from scipy import * >>> x=nan >>> x is nan True >>> isnan(x) 1 >>> x == nan False >>> z = [0,1,nan,3] >>> z[2] is nan True >>> x = z[2] >>> x is nan True >>> From zhiwen.chong at elf.mcgill.ca Wed Jul 13 12:39:39 2005 From: zhiwen.chong at elf.mcgill.ca (Zhiwen Chong) Date: Wed, 13 Jul 2005 12:39:39 -0400 Subject: [SciPy-user] Matlab and Python In-Reply-To: <056D32E9B2D93B49B01256A88B3EB218766E35@icex2.ic.ac.uk> References: <056D32E9B2D93B49B01256A88B3EB218766E35@icex2.ic.ac.uk> Message-ID: <8E81B89E-4F86-404B-B4D5-4F77BB2C99F3@elf.mcgill.ca> On 13-Jul-05, at 8:45 AM, Howey, David A wrote: > 1) can matrices/vectors be handled in the same way (this is the > power of matlab of course). eg. the matlab 'dot' notation which > operates element by element on matrices. using vectors greatly > speeds up code over for loops and makes it more compact. The situation is the reverse in SciPy. A multiplication of two SciPy array objects defaults to an element-by-element multiplication (dot notation in MATLAB, .*, ./ etc.). If you want to do linear algebra in SciPy, you have to explicitly specify a Matrix object. In [1]: from SciPy import mat numerix Numeric 24.0b2 In [2]: a = mat('[1 2; 3 4]') In [3]: a Matrix([[1, 2], [3, 4]]) In [4]: a.T Matrix([[1, 3], [2, 4]]) > 2) matlab has extremely powerful plotting facilities I haven't been able to do any plotting with SciPy or Python yet because of an installation problem on my Mac OS X machine. And I admit, MATLAB does have a very usable plotting system. > 3) object orientation. Actually I think python might excel here. I > get a bit frustrated with matlab objects (no passing by reference, > for example). IMHO, MATLAB's object-oriented features are actually a bit of a hack compared to Python's. Python passes lists, dicts, objects by reference, so if one wants to pass a copy, one actually has to explicitly do a copy/slice. But interestingly, there are many nuances: http://tinyurl.com/78mf8 > 4) creation of executables/binaries-- should be okay On the Win32 platform there is py2exe, and Python is standard on many Unices including Mac OS X. I've know a MATLAB compiler exists, but I haven't used it. Zhiwen -- "If the women don't find you handsome, they should at least find you handy." - Red Green From Fernando.Perez at colorado.edu Wed Jul 13 12:41:35 2005 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Wed, 13 Jul 2005 10:41:35 -0600 Subject: [SciPy-user] wxpython In-Reply-To: <056D32E9B2D93B49B01256A88B3EB218766E3B@icex2.ic.ac.uk> References: <056D32E9B2D93B49B01256A88B3EB218766E3B@icex2.ic.ac.uk> Message-ID: <42D5443F.8090901@colorado.edu> Howey, David A wrote: > yeah, I've got it running in colour.. I just meant the 'inline' colour > changes as you type > > also, what editor do you use with ipython? I quite liked the idle built > in editor You can use any editor you want, as ipython has very poor editing capabilities (limited to single-line changes). Some users like to call %edit with ipython, which will invoke your $EDITOR, try %edit? for more info. I personally don't like %edit, and my normal modus operandi is to run Xemacs with my files open, along with an ipython session where I use '%run foo' over and over as I modify the file foo.py. I find this to be a good balance: I get a good editor for the heavy lifting, and in the interactive ipython session I get good tracebacks, %pdb debugging, the ability to inspect objects resulting from my runs, and no expensive reinitialization of the interpreter for each test (this can be a HUGE deal if you are using complex/large libraries like scipy or VTK). Cheers, f From grante at visi.com Wed Jul 13 12:43:02 2005 From: grante at visi.com (Grant Edwards) Date: Wed, 13 Jul 2005 16:43:02 +0000 (UTC) Subject: [SciPy-user] Re: nan puzzle References: Message-ID: On 2005-07-13, Alan G Isaac wrote: > On Wed, 13 Jul 2005, Grant Edwards apparently wrote: >> What you probably want to be checking is if x has a nan >> value, not whether x is the same object as some other >> object that has a nan value. > > How? (See below.) Here's a function I wrote. There are other implimentations floating around in various libraries. def isNaN(f): u = struct.unpack("L",struct.pack("f",f))[0] return ((u & 0x7f800000) == 0x7f800000) and (u & 0x7fffff) > Anyway, now I cannot replicate the problem. I still don't understand what the problem is (or was). > Python 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32 > Type "help", "copyright", "credits" or "license" for more information. >>>> from scipy import * >>>> x=nan >>>> x is nan > True >>>> isnan(x) > 1 >>>> x == nan > False >>>> z = [0,1,nan,3] >>>> z[2] is nan > True >>>> x = z[2] >>>> x is nan > True >>>> OK, I "saw below", but I'm afraid I don't understand what this is supposed do be showing me. -- Grant Edwards grante Yow! Sorry, wrong ZIP at CODE!! visi.com From Fernando.Perez at colorado.edu Wed Jul 13 12:49:30 2005 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Wed, 13 Jul 2005 10:49:30 -0600 Subject: [SciPy-user] pycrust In-Reply-To: <056D32E9B2D93B49B01256A88B3EB218766E43@icex2.ic.ac.uk> References: <056D32E9B2D93B49B01256A88B3EB218766E43@icex2.ic.ac.uk> Message-ID: <42D5461A.8020504@colorado.edu> Howey, David A wrote: > Thanks - this is helpful. > > I am trying to get ipython to use an editor other than windows notepad. > First I tried editing the 'ipythonrc' file. Didn't have any affect - > still uses notepad. Then I tried a command line: > ipython -editor C:\Program Files\Crimson Editor\cedt.exe > > It doesn't like that. I think it's something to do with the spaces in > the path. Should I use \%20 ? > Anyone else got this sorted on a win32 system? You probably need to quote that line: ipython -editor "C:\Program Files\Crimson Editor\cedt.exe" Same for editing the ipythonrc file, try with quotes around the name. And yes, the problem is most likely the spaces in the filenames (that causes no end of grief for many tools, not just ipython). Cheers, f From Fernando.Perez at colorado.edu Wed Jul 13 12:53:43 2005 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Wed, 13 Jul 2005 10:53:43 -0600 Subject: [SciPy-user] Matlab and Python In-Reply-To: <8E81B89E-4F86-404B-B4D5-4F77BB2C99F3@elf.mcgill.ca> References: <056D32E9B2D93B49B01256A88B3EB218766E35@icex2.ic.ac.uk> <8E81B89E-4F86-404B-B4D5-4F77BB2C99F3@elf.mcgill.ca> Message-ID: <42D54717.6030207@colorado.edu> Zhiwen Chong wrote: > On 13-Jul-05, at 8:45 AM, Howey, David A wrote: > >>1) can matrices/vectors be handled in the same way (this is the >>power of matlab of course). eg. the matlab 'dot' notation which >>operates element by element on matrices. using vectors greatly >>speeds up code over for loops and makes it more compact. > > > The situation is the reverse in SciPy. A multiplication of two SciPy > array objects defaults to an element-by-element multiplication (dot > notation in MATLAB, .*, ./ etc.). If you want to do linear algebra in > SciPy, you have to explicitly specify a Matrix object. Just to note that if you want to use normal numeric arrays, and occasionally need to multiply them as matrices, you can use dot(A,B) without having to turn them into Matrix objects. It's a function call and not an operator, but it may serve better some usage cases where having a Matrix object is unwieldy for other reasons (I personally never use Matrix). Cheers, f From nphala at angloresearch.com Wed Jul 13 12:56:12 2005 From: nphala at angloresearch.com (Noko Phala) Date: Wed, 13 Jul 2005 18:56:12 +0200 Subject: [SciPy-user] matplotlib, py2exe and import problems Message-ID: Not sure if this is the right list, but can someone tell mw how to successfully create an executable of a script that uses matplotlib? The example script in the documentation odes not appear to work. I keep missing modules, and everytime I add the missing module, a new one crops up. Much like the problems listed here: http://mail.python.org/pipermail/python-list/2005-February/267595.html My recent error message is: Traceback (most recent call last): File "Uranium_Leaching_ Modelv1.py", line 162, in ? File "pylab.pyc", line 1, in ? File "matplotlib\pylab.pyc", line 217, in ? File "matplotlib\backends\__init__.pyc", line 24, in pylab_setup ImportError: No module named backend_tkagg Thanks, Noko ------------------------------------------------------------------------------------------ This e-mail was checked by the e-Sweeper Service. For more information visit our website, Clearswift Corporation e-Sweeper : http://www.mimesweeper.com/products/esweeper/ ------------------------------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From ryanfedora at comcast.net Wed Jul 13 14:31:28 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Wed, 13 Jul 2005 14:31:28 -0400 Subject: [SciPy-user] pycrust In-Reply-To: <056D32E9B2D93B49B01256A88B3EB218766E46@icex2.ic.ac.uk> References: <056D32E9B2D93B49B01256A88B3EB218766E46@icex2.ic.ac.uk> Message-ID: <42D55E00.2070800@comcast.net> There is a file called python.spc in the spec folder of the Crimson Editor directory, add this line to that file: $INDENTATIONON=: and it should increase your indent after every line that ends in a :. I think this is desirable behavior. Since Python has no "end" to its blocks, you have to out-indent manually. Ryan Howey, David A wrote: >One last thing with crimson editor is that the autoindent doesn't seem >to work for python .py files. Unless I'm missing something (it is >switched on). Have you got it working? > >Dave > >-----Original Message----- >From: scipy-user-bounces at scipy.net [mailto:scipy-user-bounces at scipy.net] >On Behalf Of Ryan Krauss >Sent: 13 July 2005 16:20 >To: SciPy Users List >Subject: Re: [SciPy-user] pycrust > >Add C:\Program Files\Crimson Editor to your windows path variable and >then set the line in ipythonrc.ini to read editor cedt > >I just tried it and it worked. > >_______________________________________________ >SciPy-user mailing list >SciPy-user at scipy.net >http://www.scipy.net/mailman/listinfo/scipy-user > > > From rkern at ucsd.edu Wed Jul 13 22:53:34 2005 From: rkern at ucsd.edu (Robert Kern) Date: Wed, 13 Jul 2005 19:53:34 -0700 Subject: [SciPy-user] Re: nan puzzle In-Reply-To: References: Message-ID: <42D5D3AE.9050600@ucsd.edu> Grant Edwards wrote: > On 2005-07-13, Alan G Isaac wrote: >>Anyway, now I cannot replicate the problem. > > I still don't understand what the problem is (or was). His original code had >>> z = [0, 1, nan] >>> x = z[2] >>> x is nan False Since "is" evaluates based on pointer comparisons and putting something in a list or extracting it again by indexing ought to preserve those pointers, that result shouldn't happen for any object, nan or otherwise. Of course, "x is nan" is a pretty useless operation as you point out, and one really should be using some kind of isnan() function. Preferably implemented by someone other than one's self. :-) -- 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 Thu Jul 14 05:44:01 2005 From: d.howey at imperial.ac.uk (Howey, David A) Date: Thu, 14 Jul 2005 10:44:01 +0100 Subject: [SciPy-user] weird Message-ID: <056D32E9B2D93B49B01256A88B3EB218766E49@icex2.ic.ac.uk> I'm new to Python, so just working through the tutorials on python.org The question is, why doesn't this work: In [34]: if x<0: ....: print 'blah' ....: elif x == 0: ------------------------------------------------------------ File "", line 3 elif x == 0: ^ SyntaxError: invalid syntax Surely this is the simplest thing? Does is have a problem with 'elif'? But it's in the tutorial!! Dave From d.howey at imperial.ac.uk Thu Jul 14 05:45:56 2005 From: d.howey at imperial.ac.uk (Howey, David A) Date: Thu, 14 Jul 2005 10:45:56 +0100 Subject: [SciPy-user] RE: weird Message-ID: <056D32E9B2D93B49B01256A88B3EB218766E4A@icex2.ic.ac.uk> sorry - ignore me, I've figured it out. It's the indentation on 'elif' of course! Duh Dave -----Original Message----- From: Howey, David A Sent: 14 July 2005 10:44 To: 'SciPy Users List' Subject: weird I'm new to Python, so just working through the tutorials on python.org The question is, why doesn't this work: In [34]: if x<0: ....: print 'blah' ....: elif x == 0: ------------------------------------------------------------ File "", line 3 elif x == 0: ^ SyntaxError: invalid syntax Surely this is the simplest thing? Does is have a problem with 'elif'? But it's in the tutorial!! Dave From Jim.Vickroy at noaa.gov Thu Jul 14 10:11:32 2005 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu, 14 Jul 2005 08:11:32 -0600 Subject: [SciPy-user] Re: nan puzzle In-Reply-To: <42D5D3AE.9050600@ucsd.edu> References: <42D5D3AE.9050600@ucsd.edu> Message-ID: <42D67294.3010403@noaa.gov> Robert Kern wrote: > Grant Edwards wrote: > >> On 2005-07-13, Alan G Isaac wrote: > > >>> Anyway, now I cannot replicate the problem. >> >> >> I still don't understand what the problem is (or was). > > > His original code had > > >>> z = [0, 1, nan] > >>> x = z[2] > >>> x is nan > False > > Since "is" evaluates based on pointer comparisons and putting > something in a list or extracting it again by indexing ought to > preserve those pointers, that result shouldn't happen for any object, > nan or otherwise. > > Of course, "x is nan" is a pretty useless operation as you point out, > and one really should be using some kind of isnan() function. > Preferably implemented by someone other than one's self. :-) > Sorry, I joined this discussion in mid-stream so I have may have missed something important, but: >>> x = [1.0, 2.0, 3.0] >>> x[2] is 3.0 False >>> x[2] == 3.0 # even this is risky True >>> x.append(None) # None is special >>> x[3] is None True >>> x[3] == None True So without knowing the implementation of nan (e.g., is it truly unique package-wide), I would not expect x is nan to evalutate to True. Just my 2-cents worth. -- jv From grante at visi.com Thu Jul 14 10:16:13 2005 From: grante at visi.com (Grant Edwards) Date: Thu, 14 Jul 2005 14:16:13 +0000 (UTC) Subject: [SciPy-user] Re: nan puzzle References: <42D5D3AE.9050600@ucsd.edu> Message-ID: On 2005-07-14, Robert Kern wrote: > Since "is" evaluates based on pointer comparisons and putting > something in a list or extracting it again by indexing ought > to preserve those pointers, that result shouldn't happen for > any object, nan or otherwise. Ah, I missed that. That is rather odd. > Of course, "x is nan" is a pretty useless operation as you > point out, and one really should be using some kind of isnan() > function. Preferably implemented by someone other than one's > self. :-) After many, many years of having to impliment stuff like that myself in C, it's hard to get into the habit of looking around for a pre-existing implimentation. It turns out there are a couple different Python modules that include an isnan() function, and even Gnu libc now comes with one. Apparently the world is waking up to the usefulness of NaN's. -- Grant Edwards grante Yow! Hand me a pair of at leather pants and a CASIO visi.com keyboard -- I'm living for today! From rowen at cesmail.net Thu Jul 14 10:38:40 2005 From: rowen at cesmail.net (Russell E. Owen) Date: Thu, 14 Jul 2005 07:38:40 -0700 Subject: [SciPy-user] pyfits question: handling gzipped fits files Message-ID: Is there some reasonable way to get pyfits to read a gzipped fits file (in a way that works on Windows and unix)? I realize I can unzip the file first, but I was hoping to have it directly read (unzipped on the fly). I can't see any command that takes a file-like object (instead of a file path), so I can't see how to take advantage of Python's gzip module. I realize I can just edit the code and add this in, but, well...if there's a better way I'd love to know about it and if there isn't, I'd like to request that it be modified to handle gzipped files automatically. -- Russell P.S. I hope this isn't a duplicate. I tried posting before I was a member of the list -- I read it on gmane -- and that posting was held. From perry at stsci.edu Thu Jul 14 10:56:14 2005 From: perry at stsci.edu (Perry Greenfield) Date: Thu, 14 Jul 2005 10:56:14 -0400 Subject: [SciPy-user] pyfits question: handling gzipped fits files In-Reply-To: References: Message-ID: Hi Russell, The astropy list is probably a better forum for this. On Jul 14, 2005, at 10:38 AM, Russell E. Owen wrote: > Is there some reasonable way to get pyfits to read a gzipped fits file > (in a way that works on Windows and unix)? > > I realize I can unzip the file first, but I was hoping to have it > directly read (unzipped on the fly). > > I can't see any command that takes a file-like object (instead of a > file > path), so I can't see how to take advantage of Python's gzip module. > > I realize I can just edit the code and add this in, but, well...if > there's a better way I'd love to know about it and if there isn't, I'd > like to request that it be modified to handle gzipped files > automatically. Not yet, but after version 1 is out, it's one of the first things we'd like to add (as well as support for the compression conventions that CFITSIO supports). We don't have time right now to do it (though it shouldn't be hard at all). If you or someone would like to add it, we would welcome such a patch. Perry From grante at visi.com Thu Jul 14 11:48:42 2005 From: grante at visi.com (Grant Edwards) Date: Thu, 14 Jul 2005 15:48:42 +0000 (UTC) Subject: [SciPy-user] Re: nan puzzle References: <42D5D3AE.9050600@ucsd.edu> <42D67294.3010403@noaa.gov> Message-ID: On 2005-07-14, Jim Vickroy wrote: > So without knowing the implementation of nan (e.g., is it > truly unique package-wide), I don't understand how there can even be "an implimentation of nan" in this context. In IEEE floating point a NaN is any of a large set of bit patterns. Assuming a 64-bit IEEE float (which is what all the Python implimentations I know of use), there are 16 million unique bit patterns that are NaNs. Half of them are signalling NaNs, half are quiet NaNs. Half of them are positive, half of them are negative.Though the sign of a NaN is, in practice, meaningless, the sign bit can be either postive or negative. There is no unique NaN FP value. Since there is no unique _value_ it's rather pointless to talk about a module-wide implimentation of a NaN value. It's like talking about an object that contains "the negative number", and wondering whether that implimentation of "negative" is module-wide or not. If you want to know if a name is bound to a floating point object object that has one of the NaN bit-patterns, then you've got to look at the bit pattern. It's handy to have a name bound to one of those bit patterns for when you want to use one, but having a name bound to one of those bit patterns is uselss when you want to decide if some other FP object contains a NaN. > I would not expect x is nan to evalutate to True. -- Grant Edwards grante Yow! Now KEN and BARBIE at are PERMANENTLY ADDICTED to visi.com MIND-ALTERING DRUGS... From Jim.Vickroy at noaa.gov Thu Jul 14 13:47:59 2005 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu, 14 Jul 2005 11:47:59 -0600 Subject: [SciPy-user] Re: nan puzzle In-Reply-To: References: <42D5D3AE.9050600@ucsd.edu> <42D67294.3010403@noaa.gov> Message-ID: <42D6A54F.1060508@noaa.gov> Thanks for the background information. I was (perhaps incorrectly) thinking that NaN, as discussed in this thread, must not be implemented(defined) in the same way that Python None is defined because comparing objects to None via 'is' does work as expected; in a sense, None is a singleton. However, it clearly does not work as expected for floating point constant objects like 2.0. Grant Edwards wrote: >On 2005-07-14, Jim Vickroy wrote: > > > >>So without knowing the implementation of nan (e.g., is it >>truly unique package-wide), >> >> > >I don't understand how there can even be "an implimentation of >nan" in this context. In IEEE floating point a NaN is any of a >large set of bit patterns. Assuming a 64-bit IEEE float (which >is what all the Python implimentations I know of use), there >are 16 million unique bit patterns that are NaNs. Half of them >are signalling NaNs, half are quiet NaNs. Half of them are >positive, half of them are negative.Though the sign of a NaN >is, in practice, meaningless, the sign bit can be either >postive or negative. > >There is no unique NaN FP value. Since there is no unique >_value_ it's rather pointless to talk about a module-wide >implimentation of a NaN value. It's like talking about an >object that contains "the negative number", and wondering >whether that implimentation of "negative" is module-wide or >not. > >If you want to know if a name is bound to a floating point >object object that has one of the NaN bit-patterns, then you've >got to look at the bit pattern. > >It's handy to have a name bound to one of those bit patterns >for when you want to use one, but having a name bound to one of >those bit patterns is uselss when you want to decide if some >other FP object contains a NaN. > > > >>I would not expect x is nan to evalutate to True. >> >> > > > From Jim.Vickroy at noaa.gov Thu Jul 14 13:47:59 2005 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu, 14 Jul 2005 11:47:59 -0600 Subject: [SciPy-user] Re: nan puzzle In-Reply-To: References: <42D5D3AE.9050600@ucsd.edu> <42D67294.3010403@noaa.gov> Message-ID: <42D6A54F.1060508@noaa.gov> Thanks for the background information. I was (perhaps incorrectly) thinking that NaN, as discussed in this thread, must not be implemented(defined) in the same way that Python None is defined because comparing objects to None via 'is' does work as expected; in a sense, None is a singleton. However, it clearly does not work as expected for floating point constant objects like 2.0. Grant Edwards wrote: >On 2005-07-14, Jim Vickroy wrote: > > > >>So without knowing the implementation of nan (e.g., is it >>truly unique package-wide), >> >> > >I don't understand how there can even be "an implimentation of >nan" in this context. In IEEE floating point a NaN is any of a >large set of bit patterns. Assuming a 64-bit IEEE float (which >is what all the Python implimentations I know of use), there >are 16 million unique bit patterns that are NaNs. Half of them >are signalling NaNs, half are quiet NaNs. Half of them are >positive, half of them are negative.Though the sign of a NaN >is, in practice, meaningless, the sign bit can be either >postive or negative. > >There is no unique NaN FP value. Since there is no unique >_value_ it's rather pointless to talk about a module-wide >implimentation of a NaN value. It's like talking about an >object that contains "the negative number", and wondering >whether that implimentation of "negative" is module-wide or >not. > >If you want to know if a name is bound to a floating point >object object that has one of the NaN bit-patterns, then you've >got to look at the bit pattern. > >It's handy to have a name bound to one of those bit patterns >for when you want to use one, but having a name bound to one of >those bit patterns is uselss when you want to decide if some >other FP object contains a NaN. > > > >>I would not expect x is nan to evalutate to True. >> >> > > > From nwagner at mecha.uni-stuttgart.de Thu Jul 14 14:28:34 2005 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Thu, 14 Jul 2005 20:28:34 +0200 Subject: [SciPy-user] Logarithm of the determinant Message-ID: Hi all, The GSL library has a function gsl_linalg_LU_lndet and gsl_linalg_complex_LU_lndet. These functions compute the logarithm of the absolute value of the determinant of a matrix A, \ln|det(A)|, from its LU decomposition, LU. This function may be useful if the direct computation of the determinant would overflow or underflow. In scipy we have only det(a, overwrite_a=0) det(a, overwrite_a=0) -> d Return determinant of a square matrix. Is it possible to add the logarithm of a determinant in scipy ? Nils From Fernando.Perez at colorado.edu Thu Jul 14 14:47:23 2005 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Thu, 14 Jul 2005 12:47:23 -0600 Subject: [SciPy-user] Logarithm of the determinant In-Reply-To: References: Message-ID: <42D6B33B.5050103@colorado.edu> Nils Wagner wrote: > Hi all, > > The GSL library has a function > gsl_linalg_LU_lndet and gsl_linalg_complex_LU_lndet. [...] > Is it possible to add the logarithm > of a determinant in scipy ? The GSL is GPL code. Feel free to submit a patch with non-gpl code, since scipy uses the BSD license. Cheers, f From nwagner at mecha.uni-stuttgart.de Thu Jul 14 14:55:55 2005 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Thu, 14 Jul 2005 20:55:55 +0200 Subject: [SciPy-user] Logarithm of the determinant In-Reply-To: <42D6B33B.5050103@colorado.edu> References: <42D6B33B.5050103@colorado.edu> Message-ID: On Thu, 14 Jul 2005 12:47:23 -0600 Fernando Perez wrote: > Nils Wagner wrote: >> Hi all, >> >> The GSL library has a function >> gsl_linalg_LU_lndet and gsl_linalg_complex_LU_lndet. > > [...] > >> Is it possible to add the logarithm >> of a determinant in scipy ? > > The GSL is GPL code. Feel free to submit a patch with >non-gpl code, since scipy uses the BSD license. > > Cheers, > > f > Sorry I am a user not a developer. Nils > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From neruocomp at yahoo.com Thu Jul 14 18:44:47 2005 From: neruocomp at yahoo.com (David Noriega) Date: Thu, 14 Jul 2005 15:44:47 -0700 (PDT) Subject: [SciPy-user] Building Scipy on Dell 64bit Xeon In-Reply-To: <20050712194605.5ce44dba@localhost.localdomain> Message-ID: <20050714224447.31311.qmail@web54501.mail.yahoo.com> I would like to report the partial working of Scipy on a 64bit Xeon. I figured out that it was LAPACK that was causing problems. Luckly there is an rpm for my distro and arch. I used that to compleate ATLAS, after recompiling it with -fPIC. I then ran the scipy test and got one fail, four errors. Something about arrays. I installed Numeric with an rpm. So I uninstalled that one and installed the latest version from the source. That got rid of the errors, but the test still had one failure. FAIL: check_round (scipy.special.basic.test_basic.test_round) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib64/python2.4/site-packages/scipy/special/tests/test_basic.py", line 1789, in check_round assert_array_equal(rnd,rndrl) File "/usr/lib64/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 11 11] Array 2: [10 10 10 11] ---------------------------------------------------------------------- Ran 690 tests in 1.340s This is using the latest ATLAS with the cvs source of Scipy. The normal scipy wouldn't even compile. I get declaration errors when it compiles ranlib_all.c error: Command "gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m64 -mtune=nocona -D_GNU_SOURCE -fPIC -fPIC -I/usr/include/python2.4 -c Lib/stats/ranlib_all.c -o build/temp.linux-x86_64-2.4/Lib/stats/ranlib_all.o" failed with exit status 1 I guess this should get to the developers, but I'm not part of that mailing list. If someone could pass it on, that would be great. Don't fear that philosophy's an impious way --superstition's more likely to lead folk astray. ~Lucretius, De rerum natura, Book One http://mindbender.deviantart.com ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs From rshepard at appl-ecosys.com Thu Jul 14 18:48:48 2005 From: rshepard at appl-ecosys.com (Rich Shepard) Date: Thu, 14 Jul 2005 15:48:48 -0700 (PDT) Subject: [SciPy-user] Clarification Message-ID: I'm new to python and I'm trying to find my way in the wilderness of various packages as well as old versus new documentation. Right now I'd like to understand the differences between SciPy and ScientificPython. I suspect that my immediate needs for matrix manipulations -- particularly the calculation of the principal eigenvector -- may well be met by NumPy or Numeric. That's another pair whose differences I don't understand. Anyway, clarification of the SciPy/ScientificPython situation would be very much appreciated. Thanks, Rich -- Dr. Richard B. Shepard, President | Author of "Quantifying Environmental Applied Ecosystem Services, Inc. (TM) | Impact Assessments Using Fuzzy Logic" Voice: 503-667-4517 Fax: 503-667-8863 From rkern at ucsd.edu Thu Jul 14 19:07:01 2005 From: rkern at ucsd.edu (Robert Kern) Date: Thu, 14 Jul 2005 16:07:01 -0700 Subject: [SciPy-user] Re: nan puzzle In-Reply-To: <42D67294.3010403@noaa.gov> References: <42D5D3AE.9050600@ucsd.edu> <42D67294.3010403@noaa.gov> Message-ID: <42D6F015.3020108@ucsd.edu> Jim Vickroy wrote: > Robert Kern wrote: > >> Grant Edwards wrote: >> >>> On 2005-07-13, Alan G Isaac wrote: >> >> >> >>>> Anyway, now I cannot replicate the problem. >>> >>> >>> >>> I still don't understand what the problem is (or was). >> >> >> >> His original code had >> >> >>> z = [0, 1, nan] >> >>> x = z[2] >> >>> x is nan >> False >> >> Since "is" evaluates based on pointer comparisons and putting >> something in a list or extracting it again by indexing ought to >> preserve those pointers, that result shouldn't happen for any object, >> nan or otherwise. >> >> Of course, "x is nan" is a pretty useless operation as you point out, >> and one really should be using some kind of isnan() function. >> Preferably implemented by someone other than one's self. :-) >> > Sorry, I joined this discussion in mid-stream so I have may have missed > something important, but: > > >>> x = [1.0, 2.0, 3.0] > >>> x[2] is 3.0 > False Float literals like 3.0 creates a new object every time. nan is not a literal; it is a variable. -- Robert Kern rkern at ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter From rkern at ucsd.edu Thu Jul 14 19:22:24 2005 From: rkern at ucsd.edu (Robert Kern) Date: Thu, 14 Jul 2005 16:22:24 -0700 Subject: [SciPy-user] Logarithm of the determinant In-Reply-To: References: Message-ID: <42D6F3B0.2040304@ucsd.edu> Nils Wagner wrote: > Hi all, > > The GSL library has a function > gsl_linalg_LU_lndet and gsl_linalg_complex_LU_lndet. > > These functions compute the logarithm of the absolute value of the > determinant of a matrix A, \ln|det(A)|, from its LU decomposition, LU. > This function may be useful if the direct computation of the determinant > would overflow or underflow. > > In scipy we have only > det(a, overwrite_a=0) > det(a, overwrite_a=0) -> d > > Return determinant of a square matrix. > > Is it possible to add the logarithm > of a determinant in scipy ? As soon as someone writes a suitable implementation. We can't directly use GSL's because of its GPL license. -- Robert Kern rkern at ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter From rkern at ucsd.edu Fri Jul 15 00:15:05 2005 From: rkern at ucsd.edu (Robert Kern) Date: Thu, 14 Jul 2005 21:15:05 -0700 Subject: [SciPy-user] Logarithm of the determinant In-Reply-To: References: <42D6B33B.5050103@colorado.edu> Message-ID: <42D73849.3070702@ucsd.edu> Nils Wagner wrote: > Sorry I am a user not a developer. As long as you insist on remaining so, the things you want will probably continue to go unimplemented. -- 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 Jul 15 06:42:11 2005 From: d.howey at imperial.ac.uk (Howey, David A) Date: Fri, 15 Jul 2005 11:42:11 +0100 Subject: [SciPy-user] Python number handling? Message-ID: <056D32E9B2D93B49B01256A88B3EB218766E5B@icex2.ic.ac.uk> I'm new to python... Why, why oh why did someone decide to make python do this: Integer case In [5]: 107 / 4 Out[5]: 26 Float case In [6]: 107.0 / 4 Out[6]: 26.75 I'm a bit worried that when it come to using variables, because you don't declare them (eg as integer or float) python might mess up division and give you the first result above rather than the second. Has anyone had any problems with this? Dave From falted at pytables.org Fri Jul 15 07:06:31 2005 From: falted at pytables.org (Francesc Altet) Date: Fri, 15 Jul 2005 13:06:31 +0200 Subject: [SciPy-user] ANN: PyTables 1.1 released Message-ID: <200507151306.32239.falted@pytables.org> ========================= Announcing PyTables 1.1 ========================= The PyTables development team is happy to announce the availability of a new version of PyTables package. On this version you will find support for a nice set of new features, like nested datatypes, enumerated datatypes, nested iterators (for reading only), support for native HDF5 multidimensional attributes, a new object for dealing with compressed, non-enlargeable arrays (CArray), bzip2 compression support and more. Many bugs has been addressed as well. Go to the PyTables web site for downloading the beast: http://pytables.sourceforge.net/ or keep reading for more info about the new features and bugs fixed. Changes more in depth ===================== Improvements: - Support for nested datatypes is in place. You can now made columns of tables that host another columns for an unlimited depth (well, theoretically, in practice until the python recursive limit would be reached). Convenient NestedRecArray objects has been implemented as data containers. Cols and Description accessors has been improved so you can navigate on the type hierarchy very easily (natural naming is has been implemented for the task). - ``Table``, ``EArray`` and ``VLArray`` objects now support enumerated types. ``Array`` objects support opening existing HDF5 enumerated arrays. Enumerated types are restricted sets of ``(name, value)`` pairs. Use the ``Enum`` class to easily define new enumerations that will be saved along with your data. - Now, the HDF5 library is responsible to do data conversions when the datasets are written in a machine with different byte-ordering than the machine that reads the dataset. With this, all the data is converted on-the-fly and you always get native datatypes in memory. I think this approach to be more convenient in terms of CPU consumption when using these datasets. Right now, this only works for tables, though. - Added support for native HDF5 multidimensional attributes. Now, you can load native HDF5 files that contains fully multidimensional attributes; these attributes will be mapped to NumArray objects. Also, when you save NumArray objects as attributes, they get saved as native HDF5 attributes (before, NumArray attributes where pickled). - A brand-new class, called CArray, has been introduced. It's mainly like an Array class (i.e. non-enlargeable), but with compression capabilities enabled. The existence of CArray also allows PyTables to read native HDF5 chunked, non-enlargeable datasets. - Bzip2 compressor is supported. Such a support was already in PyTables 1.0, but forgot to announce it. - New LZO2 (http://www.oberhumer.com/opensource/lzo/lzonews.php) compressor is supported. The installer now recognizes whether LZO1 or LZO2 is installed, and adapts automatically to it. If both are installed in your system, then LZO2 is chosen. LZO2 claims to be fully compatible (both backward and forward) with LZO1, so you should not experience any problem during this transition. - The old limit of 256 columns in a table has been released. Now, you can have tables with any number of columns, although if you try to use a too high number (i.e. > 1024), you will start to consume a lot of system resources. You have been warned!. - The limit in the length of column names has been released also. - Nested iterators for reading in tables are supported now. - A new section in tutorial about how to modify values in tables and arrays has been added to the User's Manual. Backward-incompatible changes: - None. Bug fixes: - VLArray now correctly updates the number of rows internal counter when opening an existing VLArray object. Now you can add new rows to existing VLA's without problems. - Tuple flavor for VLArrays now works as intended, i.e. reading VLArray objects will always return tuples even in the case of multidimensional Atoms. Before, this operations returned a mix of tuples and lists. - If a column was not able to be indexed because it has too few entries, then _whereInRange is called instead of _whereIndexed. Fixes #1203202. - You can call now Row.append() in the middle of Table iterators without resetting loop counters. Fixes #1205588. - PyTables used to give a segmentation fault when removing the last row out of a table with the table.removeRows() method. This is due to a limitation in the HDF5 library. Until this get fixed in HDF5, a NotImplemented error is raised when trying to do that. Address #1201023. - You can safely break a loop over an iterator returned by Table.where(). Fixes #1234637. - When removing a Group with hidden child groups, those are effectively closed now. - Now, there is a distinction between shapes 1 and (1,) in tables. The former represents a scalar, and the later a 1-D array with just one element. That follows the numarray convention for records, and makes more sense as well. Before 1.1, shapes 1 and (1,) were represented by an scalar on disk. Known bugs: - Classes inheriting from IsDescription subclasses do not inherit columns defined in the super-class. See SF bug #1207732 for more info. - Time datatypes are non-portable between big-endian and little-endian architectures. This is ultimately a consequence of a HDF5 limitation. See SF bug #1234709 for more info. Known issues: - UCL compressor seems to work badly on MacOSX platforms. Until the problem would be isolated and eventually solved, UCL will not be compiled by default on MacOSX platforms, even if the installer finds it in the system. However, if you still want to get UCL support on MacOSX, you can use the --force-ucl flag in setup.py. Important note for Python 2.4 and Windows users =============================================== If you are willing to use PyTables with Python 2.4 in Windows platforms, you will need to get the HDF5 library compiled for MSVC 7.1, aka .NET 2003. It can be found at: ftp://ftp.ncsa.uiuc.edu/HDF/HDF5/current/bin/windows/5-164-win-net.ZIP Users of Python 2.3 on Windows will have to download the version of HDF5 compiled with MSVC 6.0 available in: ftp://ftp.ncsa.uiuc.edu/HDF/HDF5/current/bin/windows/5-164-win.ZIP What it is ========== **PyTables** is a package for managing hierarchical datasets and designed to efficiently cope with extremely large amounts of data (with support for full 64-bit file addressing). It features an object-oriented interface that, combined with C extensions for the performance-critical parts of the code, makes it a very easy-to-use tool for high performance data storage and retrieval. Perhaps its more interesting feature is that it optimizes memory and disk resources so that data take much less space (between a factor 3 to 5, and more if the data is compressible) than other solutions, like for example, relational or object oriented databases. Besides, PyTables I/O for table objects is buffered, implemented in C and carefully tuned so that you can reach much better performance with PyTables than with your own home-grown wrappings to the HDF5 library. PyTables sports indexing capabilities as well, allowing doing selections in tables exceeding one billion of rows in just seconds. Where can PyTables be applied? ============================== PyTables is not designed to work as a relational database competitor, but rather as a teammate. If you want to work with large datasets of multidimensional data (for example, for multidimensional analysis), or just provide a categorized structure for some portions of your cluttered RDBS, then give PyTables a try. It works well for storing data from data acquisition systems (DAS), simulation software, network data monitoring systems (for example, traffic measurements of IP packets on routers), very large XML files, or for creating a centralized repository for system logs, to name only a few possible uses. What is a table? ================ A table is defined as a collection of records whose values are stored in fixed-length fields. All records have the same structure and all values in each field have the same data type. The terms "fixed-length" and "strict data types" seem to be quite a strange requirement for a language like Python that supports dynamic data types, but they serve a useful function if the goal is to save very large quantities of data (such as is generated by many scientific applications, for example) in an efficient manner that reduces demand on CPU time and I/O resources. What is HDF5? ============= For those people who know nothing about HDF5, it is a general purpose library and file format for storing scientific data made at NCSA. HDF5 can store two primary objects: datasets and groups. A dataset is essentially a multidimensional array of data elements, and a group is a structure for organizing objects in an HDF5 file. Using these two basic constructs, one can create and store almost any kind of scientific data structure, such as images, arrays of vectors, and structured and unstructured grids. You can also mix and match them in HDF5 files according to your needs. Platforms ========= We are using Linux on top of Intel32 as the main development platform, but PyTables should be easy to compile/install on other UNIX machines. This package has also been successfully compiled and tested on a FreeBSD 5.4 with Opteron64 processors, a UltraSparc platform with Solaris 7 and Solaris 8, a SGI Origin3000 with Itanium processors running IRIX 6.5 (using the gcc compiler), Microsoft Windows and MacOSX (10.2 although 10.3 should work fine as well). In particular, it has been thoroughly tested on 64-bit platforms, like Linux-64 on top of an Intel Itanium, AMD Opteron (in 64-bit mode) or PowerPC G5 (in 64-bit mode) where all the tests pass successfully. Regarding Windows platforms, PyTables has been tested with Windows 2000 and Windows XP (using the Microsoft Visual C compiler), but it should also work with other flavors as well. Web site ======== Go to the PyTables web site for more details: http://pytables.sourceforge.net/ To know more about the company behind the PyTables development, see: http://www.carabos.com/ Share your experience ===================== Let us know of any bugs, suggestions, gripes, kudos, etc. you may have. ---- **Enjoy data!** -- The PyTables Team From rkern at ucsd.edu Fri Jul 15 07:25:52 2005 From: rkern at ucsd.edu (Robert Kern) Date: Fri, 15 Jul 2005 04:25:52 -0700 Subject: [SciPy-user] Python number handling? In-Reply-To: <056D32E9B2D93B49B01256A88B3EB218766E5B@icex2.ic.ac.uk> References: <056D32E9B2D93B49B01256A88B3EB218766E5B@icex2.ic.ac.uk> Message-ID: <42D79D40.6080003@ucsd.edu> Howey, David A wrote: > I'm new to python... > Why, why oh why did someone decide to make python do this: > > Integer case > > In [5]: 107 / 4 > Out[5]: 26 > > Float case > > In [6]: 107.0 / 4 > Out[6]: 26.75 > > I'm a bit worried that when it come to using variables, because you > don't declare them (eg as integer or float) python might mess up > division and give you the first result above rather than the second. > > Has anyone had any problems with this? Long, long ago, Guido decided to make integers behave this way because C integers behaved this way (close enough at any rate; Python differs from C with negative integers, but arguably does something more consistent). In many cases, this behavior is actually useful although it tends to get in the way a good amount of the time. Numeric Int arrays also do this because they just do C operations more or less. Most of us have learned to just add the .0 wherever we really want a float or to make the explicit float() or .astype(Float) conversion when we really need 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 aisaac at american.edu Fri Jul 15 08:05:47 2005 From: aisaac at american.edu (Alan G Isaac) Date: Fri, 15 Jul 2005 08:05:47 -0400 Subject: [SciPy-user] Clarification In-Reply-To: References: Message-ID: On Thu, 14 Jul 2005, Rich Shepard apparently wrote: > I'm new to python and I'm trying to find my way in the wilderness of > various packages as well as old versus new documentation. Right now I'd like > to understand the differences between SciPy and ScientificPython. > I suspect that my immediate needs for matrix manipulations -- particularly > the calculation of the principal eigenvector -- may well be met by NumPy or > Numeric. That's another pair whose differences I don't understand. > Anyway, clarification of the SciPy/ScientificPython situation would be very > much appreciated. Response from a relatively new user: Unfortunately, the current situation is confusing. This is how I understand it. SciPy currently sits above Numeric. It has extensive facilities for scientific computation. Numarray was evolved to address some perceived inadequacies in Numeric---numarray has some technical advantages, but has a more "under development" flavor to it, while Numeric is practically static. This is discussed in part on the SciPy page. The two packages are currently being unified, and preliminary work on this unification is available. http://www.scipy.org/wikis/numdesign/ Thus the Numeric/numarray distinction should go away "soon", but for the moment it is complicated by a 3rd option. ScientificPython is something else entirely. It is a collection of useful objects for scientific computation. You can use these in any of the above environments. There is some overlap with functions provided by SciPy. One last things as you come on board: I recommend Matplotlib as your graphics package in any of these environments. hth, Alan Isaac From nwagner at mecha.uni-stuttgart.de Fri Jul 15 08:27:54 2005 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Fri, 15 Jul 2005 14:27:54 +0200 Subject: [SciPy-user] Clarification In-Reply-To: References: Message-ID: <42D7ABCA.1070108@mecha.uni-stuttgart.de> Alan G Isaac wrote: >On Thu, 14 Jul 2005, Rich Shepard apparently wrote: > > >> I'm new to python and I'm trying to find my way in the wilderness of >>various packages as well as old versus new documentation. Right now I'd like >>to understand the differences between SciPy and ScientificPython. >> >> > > > >> I suspect that my immediate needs for matrix manipulations -- particularly >>the calculation of the principal eigenvector -- may well be met by NumPy or >>Numeric. That's another pair whose differences I don't understand. >> >> > > > >> Anyway, clarification of the SciPy/ScientificPython situation would be very >>much appreciated. >> >> > >Response from a relatively new user: > >Unfortunately, the current situation is confusing. >This is how I understand it. > >SciPy currently sits above Numeric. It has extensive >facilities for scientific computation. > >Numarray was evolved to address some perceived inadequacies >in Numeric---numarray has some technical advantages, but has >a more "under development" flavor to it, while Numeric is >practically static. This is discussed in part on the SciPy >page. The two packages are currently being unified, and >preliminary work on this unification is available. >http://www.scipy.org/wikis/numdesign/ >Thus the Numeric/numarray distinction should go away "soon", >but for the moment it is complicated by a 3rd option. > >ScientificPython is something else entirely. It is >a collection of useful objects for scientific computation. >You can use these in any of the above environments. There >is some overlap with functions provided by SciPy. > >One last things as you come on board: I recommend Matplotlib >as your graphics package in any of these environments. > > > And how about 3D plotting capabilities ? Nils >hth, >Alan Isaac > > > >_______________________________________________ >SciPy-user mailing list >SciPy-user at scipy.net >http://www.scipy.net/mailman/listinfo/scipy-user > > From d.howey at imperial.ac.uk Fri Jul 15 08:30:23 2005 From: d.howey at imperial.ac.uk (Howey, David A) Date: Fri, 15 Jul 2005 13:30:23 +0100 Subject: [SciPy-user] Clarification Message-ID: <056D32E9B2D93B49B01256A88B3EB218766E5D@icex2.ic.ac.uk> >And how about 3D plotting capabilities ? Try gplt. See the scipy website Dave From rkern at ucsd.edu Fri Jul 15 08:34:03 2005 From: rkern at ucsd.edu (Robert Kern) Date: Fri, 15 Jul 2005 05:34:03 -0700 Subject: [SciPy-user] Clarification In-Reply-To: <42D7ABCA.1070108@mecha.uni-stuttgart.de> References: <42D7ABCA.1070108@mecha.uni-stuttgart.de> Message-ID: <42D7AD3B.30402@ucsd.edu> Nils Wagner wrote: > And how about 3D plotting capabilities ? mayavi -- 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 Fri Jul 15 08:35:46 2005 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Fri, 15 Jul 2005 14:35:46 +0200 Subject: [SciPy-user] Clarification In-Reply-To: <056D32E9B2D93B49B01256A88B3EB218766E5D@icex2.ic.ac.uk> References: <056D32E9B2D93B49B01256A88B3EB218766E5D@icex2.ic.ac.uk> Message-ID: <42D7ADA2.3070002@mecha.uni-stuttgart.de> Howey, David A wrote: >>And how about 3D plotting capabilities ? >> >> > >Try gplt. See the scipy website > > > Is it planned to add 3D plotting to matplotlib in the near future ? Nils >Dave > >_______________________________________________ >SciPy-user mailing list >SciPy-user at scipy.net >http://www.scipy.net/mailman/listinfo/scipy-user > > From rshepard at appl-ecosys.com Fri Jul 15 09:06:43 2005 From: rshepard at appl-ecosys.com (Rich Shepard) Date: Fri, 15 Jul 2005 06:06:43 -0700 (PDT) Subject: [SciPy-user] Clarification In-Reply-To: References: Message-ID: On Fri, 15 Jul 2005, Alan G Isaac wrote: > Unfortunately, the current situation is confusing. Alan, Which is why I wrote for clarification. :-) > Numarray was evolved to address some perceived inadequacies in > Numeric---numarray has some technical advantages, but has a more "under > development" flavor to it, while Numeric is practically static. This is > discussed in part on the SciPy page. The two packages are currently being > unified, and preliminary work on this unification is available. > http://www.scipy.org/wikis/numdesign/ Thus the Numeric/numarray distinction > should go away "soon", but for the moment it is complicated by a 3rd > option. This is what I assumed from my reading. > ScientificPython is something else entirely. It is a collection of useful > objects for scientific computation. You can use these in any of the above > environments. There is some overlap with functions provided by SciPy. I suspected this. Such similar names doesn't help one looking for options. > One last things as you come on board: I recommend Matplotlib as your > graphics package in any of these environments. I'll take a look. I've used Gri for years and PSTricks more recently. I'm also looking at PGF which has advanced considerably. The latter two integrate very well with LaTeX. Thanks for the insight, Rich -- Dr. Richard B. Shepard, President | Author of "Quantifying Environmental Applied Ecosystem Services, Inc. (TM) | Impact Assessments Using Fuzzy Logic" Voice: 503-667-4517 Fax: 503-667-8863 From vincefn at users.sourceforge.net Fri Jul 15 09:13:56 2005 From: vincefn at users.sourceforge.net (Vincent Favre-Nicolin) Date: Fri, 15 Jul 2005 15:13:56 +0200 Subject: [SciPy-user] Python number handling? In-Reply-To: <056D32E9B2D93B49B01256A88B3EB218766E5B@icex2.ic.ac.uk> References: <056D32E9B2D93B49B01256A88B3EB218766E5B@icex2.ic.ac.uk> Message-ID: <200507151513.57420.vincefn@users.sourceforge.net> > Why, why oh why did someone decide to make python do this: > > Integer case > > In [5]: 107 / 4 > Out[5]: 26 Just use "from __future__ import division" at the beginning of your programs if you want to *systematically* use floating-point division. e.g.: >>> from __future__ import division >>> 107/4 26.75 Vincent -- Vincent Favre-Nicolin Universit? Joseph Fourier http://v.favrenicolin.free.fr ObjCryst & Fox : http://objcryst.sourceforge.net From aisaac at american.edu Fri Jul 15 09:24:21 2005 From: aisaac at american.edu (Alan G Isaac) Date: Fri, 15 Jul 2005 09:24:21 -0400 Subject: [SciPy-user] Python number handling? In-Reply-To: <056D32E9B2D93B49B01256A88B3EB218766E5B@icex2.ic.ac.uk> References: <056D32E9B2D93B49B01256A88B3EB218766E5B@icex2.ic.ac.uk> Message-ID: On Fri, 15 Jul 2005, David A Howey apparently wrote: > I'm a bit worried that when it come to using variables, because you > don't declare them (eg as integer or float) python might mess up > division and give you the first result above rather than the second. from __future__ import division http://www.python.org/peps/pep-0238.html hth, Alan Isaac From grante at visi.com Fri Jul 15 09:20:35 2005 From: grante at visi.com (Grant Edwards) Date: Fri, 15 Jul 2005 13:20:35 +0000 (UTC) Subject: [SciPy-user] Re: Python number handling? References: <056D32E9B2D93B49B01256A88B3EB218766E5B@icex2.ic.ac.uk> Message-ID: On 2005-07-15, Howey, David A wrote: > I'm new to python... > Why, why oh why did someone decide to make python do this: > > Integer case > > In [5]: 107 / 4 > Out[5]: 26 > > Float case > > In [6]: 107.0 / 4 > Out[6]: 26.75 > > I'm a bit worried that when it come to using variables, because you > don't declare them (eg as integer or float) python might mess up > division and give you the first result above rather than the second. How could that happen? You have complete control over the types of objects you use. You might screw up, but Python won't. > Has anyone had any problems with this? No. What sort of problems do you envision? -- Grant Edwards grante Yow! YOW!! The land of the at rising SONY!! visi.com From skip at pobox.com Fri Jul 15 09:41:05 2005 From: skip at pobox.com (skip at pobox.com) Date: Fri, 15 Jul 2005 08:41:05 -0500 Subject: [SciPy-user] Re: Python number handling? In-Reply-To: References: <056D32E9B2D93B49B01256A88B3EB218766E5B@icex2.ic.ac.uk> Message-ID: <17111.48369.722535.66024@montanaro.dyndns.org> >> I'm new to python... >> Why, why oh why did someone decide to make python do this: >> >> Integer case >> >> In [5]: 107 / 4 >> Out[5]: 26 >> >> Float case >> >> In [6]: 107.0 / 4 >> Out[6]: 26.75 >> >> I'm a bit worried that when it come to using variables, because you >> don't declare them (eg as integer or float) python might mess up >> division and give you the first result above rather than the second. In recent versions of Python you have full control over truncation of division results: >>> from __future__ import division >>> 107/4 26.75 >>> 107//4 26 >>> 107.0/4 26.75 >>> 107.0//4 26.0 That will eventually be the default. I think the main reason Guido made integer division return integer results was that that's the way C did it. Skip From wjdandreta at att.net Fri Jul 15 09:44:13 2005 From: wjdandreta at att.net (Bill Dandreta) Date: Fri, 15 Jul 2005 09:44:13 -0400 Subject: [SciPy-user] Problem installing scipy on Gentoo amd64 Message-ID: <42D7BDAD.8080501@att.net> scipy compiles but fails during the test phase: * Testing installation ... /usr/local/portage/dev-python/scipy/scipy-0.3.2-r1.ebuild: line /usr/local/portage/dev-python/scipy/scipy-0.3.2-r1.ebuild: line 36: 15712 Segmentation fault python -c "import scipy; scipy.test(level=1)" Relavent(?) installed software: USE="wxpython wxgtk1" emerge -p python wxGTK wxpython dev-lang/python-2.3.5 dev-python/egenix-mx-base-2.0.5 dev-python/f2py-2.45.241.1926 dev-python/gnuplot-py-1.6 dev-python/numeric-23.7 dev-python/pygame-1.6 dev-python/pygtk-2.4.1 dev-python/pyopengl-2.0.0.44 dev-python/python-fchksum-1.7.1 *$PORTDIR_OVERLAY/dev-python/scipy-0.3.2-r1* dev-python/wxpython-2.4.2.4 x11-libs/wxGTK-2.4.2-r3 x11-libs/wxGTK-2.6.1 *$PORTDIR_OVERLAY/sci-libs/acml/acml-2.6.0* atlas3.7.10 compiled from source Any suggestions? Bill From perry at stsci.edu Fri Jul 15 09:48:37 2005 From: perry at stsci.edu (Perry Greenfield) Date: Fri, 15 Jul 2005 09:48:37 -0400 Subject: [SciPy-user] Clarification In-Reply-To: <42D7ADA2.3070002@mecha.uni-stuttgart.de> References: <056D32E9B2D93B49B01256A88B3EB218766E5D@icex2.ic.ac.uk> <42D7ADA2.3070002@mecha.uni-stuttgart.de> Message-ID: <05c7650c74c4ef34ed98bd44d1234413@stsci.edu> On Jul 15, 2005, at 8:35 AM, Nils Wagner wrote: > Howey, David A wrote: > >>> And how about 3D plotting capabilities ? >>> >> >> Try gplt. See the scipy website >> >> > Is it planned to add 3D plotting to matplotlib in the near future ? > > Nils > Since John Hunter is away I'll try to answer that as best as I can. I think the current thinking on 3D capabilities is that it may be worth adding limited capabilities such as surface plots and perhaps 3-d scatter plots. I doubt that there will be any attempt to try to duplicate any significant fraction of what VTK provides and equivalent. The motivation for including any 3-d capabilities is to avoid users having to install VTK (which can be daunting for some). Also, I think ultimately it is desired that matplotlib optionally support VTK plotting within its figures (i.e., it won't be necessary to install VTK unless you want those capabilities). Perry From neruocomp at yahoo.com Fri Jul 15 12:10:59 2005 From: neruocomp at yahoo.com (David Noriega) Date: Fri, 15 Jul 2005 09:10:59 -0700 (PDT) Subject: [SciPy-user] Problem installing scipy on Gentoo amd64 In-Reply-To: <42D7BDAD.8080501@att.net> Message-ID: <20050715161059.77905.qmail@web54501.mail.yahoo.com> Maybe you should try the cvs source of scipy. I tried making scipy on a 64bit Xeon in Fedora Core 4 x86_64, and I had to use the cvs source. Even so, I still ended up with the scipy test ending with one failure. --- Bill Dandreta wrote: > scipy compiles but fails during the test phase: > > * Testing installation ... > /usr/local/portage/dev-python/scipy/scipy-0.3.2-r1.ebuild: > line > /usr/local/portage/dev-python/scipy/scipy-0.3.2-r1.ebuild: > line 36: > 15712 Segmentation fault python -c "import scipy; > scipy.test(level=1)" > > Relavent(?) installed software: > > USE="wxpython wxgtk1" emerge -p python wxGTK > wxpython > > dev-lang/python-2.3.5 > dev-python/egenix-mx-base-2.0.5 > dev-python/f2py-2.45.241.1926 > dev-python/gnuplot-py-1.6 > dev-python/numeric-23.7 > dev-python/pygame-1.6 > dev-python/pygtk-2.4.1 > dev-python/pyopengl-2.0.0.44 > dev-python/python-fchksum-1.7.1 > *$PORTDIR_OVERLAY/dev-python/scipy-0.3.2-r1* > dev-python/wxpython-2.4.2.4 > x11-libs/wxGTK-2.4.2-r3 > x11-libs/wxGTK-2.6.1 > *$PORTDIR_OVERLAY/sci-libs/acml/acml-2.6.0* > atlas3.7.10 compiled from source > > Any suggestions? > > Bill > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > Don't fear that philosophy's an impious way --superstition's more likely to lead folk astray. ~Lucretius, De rerum natura, Book One http://mindbender.deviantart.com __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From Fernando.Perez at colorado.edu Fri Jul 15 12:24:49 2005 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Fri, 15 Jul 2005 10:24:49 -0600 Subject: [SciPy-user] Clarification In-Reply-To: References: Message-ID: <42D7E351.7060106@colorado.edu> Rich Shepard wrote: > On Fri, 15 Jul 2005, Alan G Isaac wrote: > > >>Unfortunately, the current situation is confusing. > > > Alan, > > Which is why I wrote for clarification. :-) Indeed it is confusing, though I think that most of these issues will get sorted in the future. The Numeric/numarray split is being smoothed over, matplotlib has matured tremendously for 2d plotting, and while mayavi is a great 3d solution, the even better mayavi2 is coming down the pipe very soon. So it's not just a sea of confusion forever, there is land on the horizon :) For a new user to python and scientific computing, the topical software wiki can be a good list of pointers: http://www.scipy.org/wikis/topical_software/TopicalSoftware Feel free to add your own contributions. Cheers, f From wjdandreta at att.net Fri Jul 15 15:17:30 2005 From: wjdandreta at att.net (Bill Dandreta) Date: Fri, 15 Jul 2005 15:17:30 -0400 Subject: [SciPy-user] Problem installing scipy on Gentoo amd64 In-Reply-To: <20050715161059.77905.qmail@web54501.mail.yahoo.com> References: <20050715161059.77905.qmail@web54501.mail.yahoo.com> Message-ID: <42D80BCA.6030102@att.net> I think we need to find out what is causing the problem. It may not be a problem with scipy per se but maybe one or more of the dependecies are compiled with incompatible switches. It could also be a kernel problem, I get a segemtation fault with wvdial if any problem occurs (like using Ctl-c to terminate the program) on amd64 but not on x86_32. Bill David Noriega wrote: >Maybe you should try the cvs source of scipy. I tried >making scipy on a 64bit Xeon in Fedora Core 4 x86_64, >and I had to use the cvs source. Even so, I still >ended up with the scipy test ending with one failure. > >--- Bill Dandreta wrote: > > > >>scipy compiles but fails during the test phase: >> >>* Testing installation ... >> >> >> >/usr/local/portage/dev-python/scipy/scipy-0.3.2-r1.ebuild: > > >>line >> >> >> >/usr/local/portage/dev-python/scipy/scipy-0.3.2-r1.ebuild: > > >>line 36: >>15712 Segmentation fault python -c "import scipy; >>scipy.test(level=1)" >> >>Relavent(?) installed software: >> >>USE="wxpython wxgtk1" emerge -p python wxGTK >>wxpython >> >>dev-lang/python-2.3.5 >>dev-python/egenix-mx-base-2.0.5 >>dev-python/f2py-2.45.241.1926 >>dev-python/gnuplot-py-1.6 >>dev-python/numeric-23.7 >>dev-python/pygame-1.6 >>dev-python/pygtk-2.4.1 >>dev-python/pyopengl-2.0.0.44 >>dev-python/python-fchksum-1.7.1 >>*$PORTDIR_OVERLAY/dev-python/scipy-0.3.2-r1* >>dev-python/wxpython-2.4.2.4 >>x11-libs/wxGTK-2.4.2-r3 >>x11-libs/wxGTK-2.6.1 >>*$PORTDIR_OVERLAY/sci-libs/acml/acml-2.6.0* >>atlas3.7.10 compiled from source >> >>Any suggestions? >> >>Bill >> >>_______________________________________________ >>SciPy-user mailing list >>SciPy-user at scipy.net >>http://www.scipy.net/mailman/listinfo/scipy-user >> >> >> > > >Don't fear that philosophy's an impious way >--superstition's more likely to lead folk astray. > >~Lucretius, De rerum natura, Book One > >http://mindbender.deviantart.com > >__________________________________________________ >Do You Yahoo!? >Tired of spam? Yahoo! Mail has the best spam protection around >http://mail.yahoo.com > >_______________________________________________ >SciPy-user mailing list >SciPy-user at scipy.net >http://www.scipy.net/mailman/listinfo/scipy-user > > > From neruocomp at yahoo.com Fri Jul 15 17:30:32 2005 From: neruocomp at yahoo.com (David Noriega) Date: Fri, 15 Jul 2005 14:30:32 -0700 (PDT) Subject: [SciPy-user] Problem installing scipy on Gentoo amd64 In-Reply-To: <42D80BCA.6030102@att.net> Message-ID: <20050715213032.53452.qmail@web54505.mail.yahoo.com> Oh yea that reminds me, I had to recomile ATLAS with -fPIC to get it to link right. But then scipy would tell you about that. Why not try to load the scipy modules one by one, starting with numeric first. --- Bill Dandreta wrote: > I think we need to find out what is causing the > problem. It may not be a > problem with scipy per se but maybe one or more of > the dependecies are > compiled with incompatible switches. It could also > be a kernel problem, > I get a segemtation fault with wvdial if any problem > occurs (like using > Ctl-c to terminate the program) on amd64 but not on > x86_32. > > Bill > Don't fear that philosophy's an impious way --superstition's more likely to lead folk astray. ~Lucretius, De rerum natura, Book One http://mindbender.deviantart.com __________________________________ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail From wjdandreta at att.net Fri Jul 15 21:44:59 2005 From: wjdandreta at att.net (Bill Dandreta) Date: Fri, 15 Jul 2005 21:44:59 -0400 Subject: [SciPy-user] Problem installing scipy on Gentoo amd64 In-Reply-To: <20050715213032.53452.qmail@web54505.mail.yahoo.com> References: <20050715213032.53452.qmail@web54505.mail.yahoo.com> Message-ID: <42D8669B.4040109@att.net> OK, The following modules all imported without a problem: import Numeric import scipy import scipy.ga import scipy.interpolate import scipy.sparse import scipy.gplt import scipy.io import scipy.plt import scipy.special import scipy.linalg import scipy.stats import scipy.cluster import scipy.optimize import scipy.cow import scipy.xplt import scipy.fftpack import scipy.integrate import scipy.signal import scipy.xxx import scipy_base import scipy_test import scipy_distutils import scipy_distutils.command scipy.test() causes the seg fault. Bill David Noriega wrote: >Oh yea that reminds me, I had to recomile ATLAS with >-fPIC to get it to link right. But then scipy would >tell you about that. Why not try to load the scipy >modules one by one, starting with numeric first. > >--- Bill Dandreta wrote: > > > >>I think we need to find out what is causing the >>problem. It may not be a >>problem with scipy per se but maybe one or more of >>the dependecies are >>compiled with incompatible switches. It could also >>be a kernel problem, >>I get a segemtation fault with wvdial if any problem >>occurs (like using >>Ctl-c to terminate the program) on amd64 but not on >>x86_32. >> >>Bill >> >> >> > >Don't fear that philosophy's an impious way >--superstition's more likely to lead folk astray. > >~Lucretius, De rerum natura, Book One > >http://mindbender.deviantart.com > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail - Helps protect you from nasty viruses. >http://promotions.yahoo.com/new_mail > >_______________________________________________ >SciPy-user mailing list >SciPy-user at scipy.net >http://www.scipy.net/mailman/listinfo/scipy-user > > > From neruocomp at yahoo.com Sat Jul 16 10:22:25 2005 From: neruocomp at yahoo.com (David Noriega) Date: Sat, 16 Jul 2005 07:22:25 -0700 (PDT) Subject: [SciPy-user] 3d plotting not working as expected Message-ID: <20050716142225.52171.qmail@web54509.mail.yahoo.com> I think its my understanding of how gplt works is what is causing my problem. I've been trying to do some parametric equation graphing, which I can get to work very nicly. So I decided to try something else. I wanted to show it in 3d, with the z axis being time. Here is my example, its a particle moving in a circle. from scipy import * t=arange(0.0, 6.0*pi, pi/12.0) x=cos(t) y=sin(t) Now how can I graph it so it makes a spiral(A particle moving in a circle in time makes a spiral)? Don't fear that philosophy's an impious way --superstition's more likely to lead folk astray. ~Lucretius, De rerum natura, Book One http://mindbender.deviantart.com ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs From ryanfedora at comcast.net Sat Jul 16 10:54:59 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Sat, 16 Jul 2005 10:54:59 -0400 Subject: [SciPy-user] Enthought python Message-ID: <42D91FC3.2020001@comcast.net> Does anyone on this list know if the Enthought Python win32 installer will play nicely with my existing Python installation? I am trying to get mayavi installed and the Enthought installer was recommended to me as the easiest way. I am getting ready to do that, but don't want to end up essentially reinstalling every Python package I have ever installed. The ideal behavior would be for the Enthought installer to only add packages and probably overwrite the ones I have already installed and leave everything else alone. Is this what will happen? Thanks, Ryan From drohr at few.vu.nl Sat Jul 16 11:26:51 2005 From: drohr at few.vu.nl (drohr at few.vu.nl) Date: Sat, 16 Jul 2005 17:26:51 +0200 Subject: [SciPy-user] 3d plotting not working as expected Message-ID: <1121527611.42d9273bde3e4@www.few.vu.nl> This worked for me: from scipy import * t = arange(0.0,6.0*pi,pi/12.0) x = cos(t) y = sin(t) a = zip(t,x,y) gplt.plot3d((a,)) changing the order of t,x and y when zipping will change the orientation of your spiral Dan David Noriega wrote: > I think its my understanding of how gplt works is what > is causing my problem. I've been trying to do some > parametric equation graphing, which I can get to work > very nicly. So I decided to try something else. I > wanted to show it in 3d, with the z axis being time. > > Here is my example, its a particle moving in a > circle. > > from scipy import * > t=arange(0.0, 6.0*pi, pi/12.0) > x=cos(t) > y=sin(t) > > Now how can I graph it so it makes a spiral(A particle > moving in a circle in time makes a spiral)? > > Don't fear that philosophy's an impious way > --superstition's more likely to lead folk astray. > > ~Lucretius, De rerum natura, Book One > > http://mindbender.deviantart.com > > > > ____________________________________________________ > Start your day with Yahoo! - make it your home page > http://www.yahoo.com/r/hs > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From prabhu_r at users.sf.net Sat Jul 16 12:57:26 2005 From: prabhu_r at users.sf.net (Prabhu Ramachandran) Date: Sat, 16 Jul 2005 22:27:26 +0530 Subject: [SciPy-user] Enthought python In-Reply-To: <42D91FC3.2020001@comcast.net> References: <42D91FC3.2020001@comcast.net> Message-ID: <17113.15478.863449.660259@monster.linux.in> >>>>> "Ryan" == Ryan Krauss writes: Ryan> Does anyone on this list know if the Enthought Python win32 Ryan> installer will play nicely with my existing Python Ryan> installation? I am trying to get mayavi installed and the Ryan> Enthought installer was recommended to me as the easiest Ryan> way. I am getting ready to do that, but don't want to end Ryan> up essentially reinstalling every Python package I have ever Ryan> installed. It installs its own version of Python-2.3. I suspect that this will blow away your existing install or atleast make your life a little more interesting than it currently is... Ryan> The ideal behavior would be for the Enthought installer to Ryan> only add packages and probably overwrite the ones I have Ryan> already installed and leave everything else alone. Is this Ryan> what will happen? No clue, there is certainly one way to find out though. >:-D IIRC, Enthon installs Python-2.3.5. Might be worth taking a backup. Alternatively, if you just want to install the VTK stuff follow the instructions here: http://vvikram.com/~prabhu/download/vtk/win32/readme.txt Specifically see "Instructions for VTK-Python-4.4.zip". This will let you just install the necessary stuff on top of an existing Python-2.3 install. cheers, prabhu From prabhu_r at users.sf.net Sat Jul 16 13:28:46 2005 From: prabhu_r at users.sf.net (Prabhu Ramachandran) Date: Sat, 16 Jul 2005 22:58:46 +0530 Subject: [SciPy-user] Clarification In-Reply-To: <05c7650c74c4ef34ed98bd44d1234413@stsci.edu> References: <056D32E9B2D93B49B01256A88B3EB218766E5D@icex2.ic.ac.uk> <42D7ADA2.3070002@mecha.uni-stuttgart.de> <05c7650c74c4ef34ed98bd44d1234413@stsci.edu> Message-ID: <17113.17358.233608.992125@monster.linux.in> >>>>> "Perry" == Perry Greenfield writes: Perry> Since John Hunter is away I'll try to answer that as best Perry> as I can. I think the current thinking on 3D capabilities Perry> is that it may be worth adding limited capabilities such as Perry> surface plots and perhaps 3-d scatter plots. I doubt that Perry> there will be any attempt to try to duplicate any Perry> significant fraction of what VTK provides and equivalent. Perry> The motivation for including any 3-d capabilities is to Perry> avoid users having to install VTK (which can be daunting Perry> for some). Also, I think ultimately it is desired that Perry> matplotlib optionally support VTK plotting within its Perry> figures (i.e., it won't be necessary to install VTK unless Perry> you want those capabilities). I sincerely hope that we don't end up with 10 different 3d packages, each doing its thing slightly different. I've worked quite hard on tvtk and the core mayavi2 infrastructure. I've been trying to use a lot of Enthought's open source tools to do this job right by focussing on the "model" and less on the view. Here is more information: http://www.python-in-business.org/ep2005/talk.chtml?talk=1721&track=646 http://www.python-in-business.org/ep2005/talk.chtml?talk=1723&track=646 I think a more constructive thing to do would be to make prebuilt VTK binaries available. Debian ships with VTK (under 11 architectures!), VTK-4.4 binaries are available for Win32 via Enthon, IIRC VTK rpms are also available. If this is not enough, surely it would be easier for folks to just contribute a build for a favorite platform every year or 6 months. It is not too hard to do if you are used to building software. But it is work and not a trivial thing either. regards, prabhu From rkern at ucsd.edu Sat Jul 16 15:05:42 2005 From: rkern at ucsd.edu (Robert Kern) Date: Sat, 16 Jul 2005 12:05:42 -0700 Subject: [SciPy-user] Clarification In-Reply-To: <17113.17358.233608.992125@monster.linux.in> References: <056D32E9B2D93B49B01256A88B3EB218766E5D@icex2.ic.ac.uk> <42D7ADA2.3070002@mecha.uni-stuttgart.de> <05c7650c74c4ef34ed98bd44d1234413@stsci.edu> <17113.17358.233608.992125@monster.linux.in> Message-ID: <42D95A86.3040103@ucsd.edu> Prabhu Ramachandran wrote: > I think a more constructive thing to do would be to make prebuilt VTK > binaries available. Debian ships with VTK (under 11 architectures!), > VTK-4.4 binaries are available for Win32 via Enthon, IIRC VTK rpms are > also available. If this is not enough, surely it would be easier for > folks to just contribute a build for a favorite platform every year or > 6 months. It is not too hard to do if you are used to building > software. But it is work and not a trivial thing either. I'll commit to supporting the Mac build. -- 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 Sat Jul 16 16:42:35 2005 From: joe at enthought.com (Joe Cooper) Date: Sat, 16 Jul 2005 15:42:35 -0500 Subject: [SciPy-user] Enthought python In-Reply-To: <42D91FC3.2020001@comcast.net> References: <42D91FC3.2020001@comcast.net> Message-ID: <42D9713B.60307@enthought.com> It will probably not play nicely with Python installations of the same major.minor version (i.e. any 2.3 version), but it can exist alongside other Python revisions (you have to figure out the path issues, however, and decide which python is your default python, and if it is not the last python installed manually configure the associations and such). The 2.4 release that I'm currently working will play nicely with existing Python installations even of the same revision, in the sense that it will get its own directory and won't interfere with existing registry entries. It will pretty much do as you've described in the current version (add to or overwrite existing), but I'm not making any guarantees that everything will work on the other end of the process. You may end up reinstalling some of your python modules anyway. Anyway, I think you can do a rollback with our installer...so if things really go horribly wrong, you could do a rollback uninstall (just don't touch anything in the Python23 directory before you know the stuff you /need/ to work is working after the installation) and it should take you back to where you were before you installed. Maybe. I'd back up C:\Python23, anyway. ;-) Ryan Krauss wrote: > Does anyone on this list know if the Enthought Python win32 installer > will play nicely with my existing Python installation? I am trying to > get mayavi installed and the Enthought installer was recommended to me > as the easiest way. I am getting ready to do that, but don't want to > end up essentially reinstalling every Python package I have ever installed. > > The ideal behavior would be for the Enthought installer to only add > packages and probably overwrite the ones I have already installed and > leave everything else alone. Is this what will happen? > > Thanks, > > Ryan > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From ryanfedora at comcast.net Sat Jul 16 16:53:32 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Sat, 16 Jul 2005 16:53:32 -0400 Subject: [SciPy-user] Enthought python In-Reply-To: <42D9713B.60307@enthought.com> References: <42D91FC3.2020001@comcast.net> <42D9713B.60307@enthought.com> Message-ID: <42D973CC.30706@comcast.net> Sounds good. I will backup C:\Python23 to an external hard drive and give this a try - but probably not until Monday. I will let the list know how it went in case anyone else ever needs to do it. Ryan Joe Cooper wrote: > It will probably not play nicely with Python installations of the same > major.minor version (i.e. any 2.3 version), but it can exist alongside > other Python revisions (you have to figure out the path issues, > however, and decide which python is your default python, and if it is > not the last python installed manually configure the associations and > such). > > The 2.4 release that I'm currently working will play nicely with > existing Python installations even of the same revision, in the sense > that it will get its own directory and won't interfere with existing > registry entries. > > It will pretty much do as you've described in the current version (add > to or overwrite existing), but I'm not making any guarantees that > everything will work on the other end of the process. You may end up > reinstalling some of your python modules anyway. > > Anyway, I think you can do a rollback with our installer...so if > things really go horribly wrong, you could do a rollback uninstall > (just don't touch anything in the Python23 directory before you know > the stuff you /need/ to work is working after the installation) and it > should take you back to where you were before you installed. Maybe. > I'd back up C:\Python23, anyway. ;-) > > Ryan Krauss wrote: > >> Does anyone on this list know if the Enthought Python win32 installer >> will play nicely with my existing Python installation? I am trying >> to get mayavi installed and the Enthought installer was recommended >> to me as the easiest way. I am getting ready to do that, but don't >> want to end up essentially reinstalling every Python package I have >> ever installed. >> >> The ideal behavior would be for the Enthought installer to only add >> packages and probably overwrite the ones I have already installed and >> leave everything else alone. Is this what will happen? >> >> 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 aisaac at american.edu Sat Jul 16 17:47:28 2005 From: aisaac at american.edu (Alan G Isaac) Date: Sat, 16 Jul 2005 17:47:28 -0400 Subject: [SciPy-user] Clarification In-Reply-To: <17113.17358.233608.992125@monster.linux.in> References: <056D32E9B2D93B49B01256A88B3EB218766E5D@icex2.ic.ac.uk><42D7ADA2.3070002@mecha.uni-stuttgart.de><05c7650c74c4ef34ed98bd44d1234413@stsci.edu><17113.17358.233608.992125@monster.linux.in> Message-ID: On Sat, 16 Jul 2005, Prabhu Ramachandran apparently wrote: > I think a more constructive thing to do would be to make > prebuilt VTK binaries available. I am a relatively new SciPy user. Here was my experience. 1. After some messing around, learn that I should use Matplotlib rather than *plt. 2. Learn that Matplotlib does not support 3D surface plots. 3. Learn that people are recommending MayaVi. 4. Go to MayaVi website and give thanks that there is a Win32 binary that "comes bundled with everything necessary to run MayaVi." (Of course this means that I read past the "recommendation" to install from sources ...) 5. Install the binary and discover, alas, that I did not get the pyvtk module with it. And test_vtk.py wants in addition a vtkpython module. Then I find this: "If you have installed MayaVi from the sources and are not using a binary release, then you can use MayaVi as a Python module." Aha. That is what that "recommendation" was about. Can we agree that "recommendation" at this point appears a bit understated? 6. Find nothing in the docs about how to add the module(s) to work with my MayaVi installation, except of course the recommendation to install from source. (Of course, despite the sanguine assessment on the MayaVi page, I recall the various warnings of others, plus I now feel "once burned".) 7. Give up and keep using gnuplot for now. If this sounds like a complaint, it is not. It is meant to be informational. Cheers, Alan Isaac From joe at enthought.com Sat Jul 16 21:28:10 2005 From: joe at enthought.com (Joe Cooper) Date: Sat, 16 Jul 2005 20:28:10 -0500 Subject: [SciPy-user] Clarification In-Reply-To: References: <056D32E9B2D93B49B01256A88B3EB218766E5D@icex2.ic.ac.uk><42D7ADA2.3070002@mecha.uni-stuttgart.de><05c7650c74c4ef34ed98bd44d1234413@stsci.edu><17113.17358.233608.992125@monster.linux.in> Message-ID: <42D9B42A.5080407@enthought.com> If it is any consolation, we all have trouble building and maintaining VTK installations. ;-) Further consolation may be found in the knowledge that MayaVi and MotPlotLib and all dependencies are included in all newer Enthought Edition Python releases (like the current test release on the website...not that I'm recommending you use that one, as it has some pretty ugly warts), and Prabhu has been very helpful in making sure we include all of the right bits so that MayaVi and VTK work correctly out of the box. I will post a new Enthought Edition official release with the latest MayaVi release and VTK 4.4 next week sometime--it reverts a lot of components back to the older versions found in the 1057 build, due to incompatibilities and instabilities and other bad things, but the plotting stuff is reasonably cutting edge. These things take time, because we have competing pressures for extreme stability of both software and interfaces on one side and for rapid inclusion of the latest versions of everything on the other. The bundle is just so bloody huge, it's a crap shoot to upgrade even a single element. There seems to finally be some movement within the python community for easier to install and update software bundles, ala CPAN for Perl, such that it may soon be easy for folks to safely upgrade some components individually. That will be nice. Alan G Isaac wrote: > On Sat, 16 Jul 2005, Prabhu Ramachandran apparently wrote: > >>I think a more constructive thing to do would be to make >>prebuilt VTK binaries available. > > > I am a relatively new SciPy user. > Here was my experience. > 1. After some messing around, learn that I should use > Matplotlib rather than *plt. > 2. Learn that Matplotlib does not support 3D surface plots. > 3. Learn that people are recommending MayaVi. > 4. Go to MayaVi website and give thanks that there is > a Win32 binary that "comes bundled with everything > necessary to run MayaVi." (Of course this means that > I read past the "recommendation" to install from sources > ...) > 5. Install the binary and discover, alas, that I did not get > the pyvtk module with it. And test_vtk.py wants in > addition a vtkpython module. Then I find this: > "If you have installed MayaVi from the sources and > are not using a binary release, then you can use > MayaVi as a Python module." > Aha. That is what that "recommendation" was about. Can > we agree that "recommendation" at this point appears > a bit understated? > 6. Find nothing in the docs about how to add the module(s) > to work with my MayaVi installation, except of course the > recommendation to install from source. (Of course, > despite the sanguine assessment on the MayaVi page, > I recall the various warnings of others, plus I now feel > "once burned".) > 7. Give up and keep using gnuplot for now. > > If this sounds like a complaint, it is not. > It is meant to be informational. From prabhu_r at users.sf.net Sat Jul 16 23:14:28 2005 From: prabhu_r at users.sf.net (Prabhu Ramachandran) Date: Sun, 17 Jul 2005 08:44:28 +0530 Subject: [SciPy-user] Clarification In-Reply-To: References: <056D32E9B2D93B49B01256A88B3EB218766E5D@icex2.ic.ac.uk> <42D7ADA2.3070002@mecha.uni-stuttgart.de> <05c7650c74c4ef34ed98bd44d1234413@stsci.edu> <17113.17358.233608.992125@monster.linux.in> Message-ID: <17113.52500.511681.663701@monster.linux.in> Thanks for the comments. First time someone has complained about install instructions being bad in 4 years. So unless someone tells me I can't know. :-) >>>>> "Alan" == Alan G Isaac writes: Alan> 4. Go to MayaVi website and give thanks that there is Alan> a Win32 binary that "comes bundled with everything Alan> necessary to run MayaVi." (Of course this means that I Alan> read past the "recommendation" to install from sources Alan> ...) To be fair, the lines in question say this: "The stand-alone binaries are available for Win32 and Linux. They allow you to install MayaVi as an application without having to install VTK or even Python! If you are going to use MayaVi as a Python module then it is recommended that you install it from the sources." You are right in saying that the recommendation is understated. I'll fix that sometime this week. However, there are lots of non-Python folks who use the binaries, that is the target audience for the standalone binaries. There is also a reason why the binaries are "standalone". I was under the mistaken impression that the overall wording indicates that the standalone install comes with its own install of Python. I assumed that it was clear to most Python users that you can't use the binary and have mayavi working from another installation of Python. Maybe this presupposes too much Python knowledge and since explicit is better than implicit I should state this explicitly. Alan> 5. Install the binary and discover, alas, that I did not get Alan> the pyvtk module with it. And test_vtk.py wants in I guess you mean the VTK-Python bindings by pyvtk (there is another package called pyvtk out there). The binaries actually ship with all the vtk-python stuff, but in a manner not easily usable outside of the binary. Thus it is not easy using them in your currently installed Python. Alan> addition a vtkpython module. Then I find this: Alan> "If you have installed MayaVi from the sources and Alan> are not using a binary release, then you can use Alan> MayaVi as a Python module." Alan> Aha. That is what that "recommendation" was about. Can Alan> we agree that "recommendation" at this point appears a Alan> bit understated? Yes, I'll fix that sometime when I can. Alan> 6. Find nothing in the docs about how to add the module(s) Alan> to work with my MayaVi installation, except of course the Alan> recommendation to install from source. (Of course, Alan> despite the sanguine assessment on the MayaVi page, I Alan> recall the various warnings of others, plus I now feel Alan> "once burned".) There is a whole section each on the requirements and installing VTK. The requirements are the first thing mentioned in the "install from sources" section. So, I am not sure that this is not clear. http://mayavi.sourceforge.net/install.html#requirements http://mayavi.sourceforge.net/install.html#install_vtk In addition to this there are also detailed accounts of how to build VTK from sources under Linux, Win32 and the Mac on the wiki. Alan> 7. Give up and keep using gnuplot for now. Alan> If this sounds like a complaint, it is not. It is meant to Alan> be informational. Yes, thanks for the information. However, you must understand that things are not so easy to do considering the number of complications I have to deal with as it is. I've setup a wiki in the hope that it is easier for users to help each other and it has worked well. Unfortunately, we have spammers bent on abusing the wiki, so I have to disable access except to those with a login. The spammers then login and abuse the site. So I have to setup a trusted group. This was probably the most frustrating experience with spammers that I have had. I also have not received much feedback on difficulties with installing from sources and problems with the given instructions. If you have more comments I'd appreciate if you sent them on the mayavi-users list. Under windows the easiest way to get almost everything you need working is to use Enthon. So if you are new to Python/SciPy etc. and use Win32 this is a must have. cheers, prabhu From bgranger at scu.edu Mon Jul 18 01:10:52 2005 From: bgranger at scu.edu (Brian Granger) Date: Sun, 17 Jul 2005 22:10:52 -0700 Subject: [SciPy-user] Very slow comparison of arrays of integers Message-ID: <3EEFFD22-7937-431E-8963-89AD41794D2E@scu.edu> Hello all, I have some code that is using scipy/numeric and one bottleneck in the code consists of comparing arrays or lists of integers. To my dismay, I am finding that using Python lists is 15-20 times _faster_ than using numeric array's for this. The problem is that it seems that there is no efficient way to compare arrays of integers. Here is code that clearly demonstrates this problem: from scipy import * def test_list(n): a = range(100) for i in range(n): r = (a == a) def test_array(n): a = array(range(100),Int) for i in range(n): r = allclose(a,a) The test_list code runs about 20 times as fast as the test_array code that uses allclose(). Is there any way of comparing to arrays of integers that would be as fast or faster than using lists? Any hints would be greatly appreciated. Thanks Brian From rkern at ucsd.edu Mon Jul 18 04:15:47 2005 From: rkern at ucsd.edu (Robert Kern) Date: Mon, 18 Jul 2005 01:15:47 -0700 Subject: [SciPy-user] Very slow comparison of arrays of integers In-Reply-To: <3EEFFD22-7937-431E-8963-89AD41794D2E@scu.edu> References: <3EEFFD22-7937-431E-8963-89AD41794D2E@scu.edu> Message-ID: <42DB6533.2020705@ucsd.edu> Brian Granger wrote: > Hello all, > > I have some code that is using scipy/numeric and one bottleneck in the > code consists of comparing arrays or lists of integers. To my dismay, > I am finding that using Python lists is 15-20 times _faster_ than using > numeric array's for this. The problem is that it seems that there is > no efficient way to compare arrays of integers. > > Here is code that clearly demonstrates this problem: > > from scipy import * > > def test_list(n): > a = range(100) > for i in range(n): > r = (a == a) > > def test_array(n): > a = array(range(100),Int) > for i in range(n): > r = allclose(a,a) > > The test_list code runs about 20 times as fast as the test_array code > that uses allclose(). > > Is there any way of comparing to arrays of integers that would be as > fast or faster than using lists? Any hints would be greatly appreciated. allclose() is for floating point arrays. Use alltrue(x == y) for integer arrays. Also, use numbers > 100. Small integer objects are cached and object identity is checked first, I believe. In [28]: tlist = timeit.Timer("a == a", setup="a = range(1000, 2000)") In [29]: tarray = timeit.Timer("alltrue(a == a)", setup="from scipy import alltrue,arange; a = arange(1000, 2000)") In [30]: tarray.repeat(3, 1000) Out[30]: [0.097441911697387695, 0.049738168716430664, 0.051641941070556641] In [31]: tlist.repeat(3, 1000) Out[31]: [0.1062159538269043, 0.062600851058959961, 0.063454866409301758] -- 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 bryan.cole at teraview.com Mon Jul 18 04:43:43 2005 From: bryan.cole at teraview.com (Bryan Cole) Date: Mon, 18 Jul 2005 09:43:43 +0100 Subject: [SciPy-user] Re: Enthought python In-Reply-To: <42D91FC3.2020001@comcast.net> References: <42D91FC3.2020001@comcast.net> Message-ID: <1121676222.24543.3.camel@bryan.teraview.local> On Sat, 2005-07-16 at 10:54 -0400, Ryan Krauss wrote: > Does anyone on this list know if the Enthought Python win32 installer > will play nicely with my existing Python installation? I am trying to > get mayavi installed and the Enthought installer was recommended to me > as the easiest way. I am getting ready to do that, but don't want to > end up essentially reinstalling every Python package I have ever installed. If it's just mayavi you want, you can get a "binary" version (i.e. all shared libs packaged with the MacMillan installer or similar). It's a 10MB download but it'll run independently of your python installation. BC > > The ideal behavior would be for the Enthought installer to only add > packages and probably overwrite the ones I have already installed and > leave everything else alone. Is this what will happen? > > Thanks, > > Ryan From perry at stsci.edu Mon Jul 18 09:17:13 2005 From: perry at stsci.edu (Perry Greenfield) Date: Mon, 18 Jul 2005 09:17:13 -0400 Subject: [SciPy-user] Very slow comparison of arrays of integers In-Reply-To: <3EEFFD22-7937-431E-8963-89AD41794D2E@scu.edu> References: <3EEFFD22-7937-431E-8963-89AD41794D2E@scu.edu> Message-ID: <8a72e50a524f63f369194bff5f8aab2a@stsci.edu> Part of the problem may be due to the fact that your array is so small. For small numbers of values, lists are probably faster. Try it with 100,000 values and see what the comparison looks like. If it is still 15 times slower than there is a problem with Numeric. Perry Greenfield On Jul 18, 2005, at 1:10 AM, Brian Granger wrote: > Hello all, > > I have some code that is using scipy/numeric and one bottleneck in the > code consists of comparing arrays or lists of integers. To my dismay, > I am finding that using Python lists is 15-20 times _faster_ than > using numeric array's for this. The problem is that it seems that > there is no efficient way to compare arrays of integers. > > Here is code that clearly demonstrates this problem: > > from scipy import * > > def test_list(n): > a = range(100) > for i in range(n): > r = (a == a) > > def test_array(n): > a = array(range(100),Int) > for i in range(n): > r = allclose(a,a) > > The test_list code runs about 20 times as fast as the test_array code > that uses allclose(). > > Is there any way of comparing to arrays of integers that would be as > fast or faster than using lists? Any hints would be greatly > appreciated. > > Thanks > > Brian > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From aisaac at american.edu Mon Jul 18 10:21:44 2005 From: aisaac at american.edu (Alan G Isaac) Date: Mon, 18 Jul 2005 10:21:44 -0400 Subject: [SciPy-user] Re: Enthought python In-Reply-To: <1121676222.24543.3.camel@bryan.teraview.local> References: <42D91FC3.2020001@comcast.net><1121676222.24543.3.camel@bryan.teraview.local> Message-ID: > On Sat, 2005-07-16 at 10:54 -0400, Ryan Krauss wrote: >> Does anyone on this list know if the Enthought Python win32 installer >> will play nicely with my existing Python installation? I am trying to >> get mayavi installed and the Enthought installer was recommended to me >> as the easiest way. I am getting ready to do that, but don't want to >> end up essentially reinstalling every Python package I have ever installed. On Mon, 18 Jul 2005, Bryan Cole apparently wrote: > If it's just mayavi you want, you can get a "binary" version (i.e. all > shared libs packaged with the MacMillan installer or similar). It's a > 10MB download but it'll run independently of your python installation. Apparently that's no good if you want MayaVi to play with Python. Cheers, Alan Isaac From prabhu_r at users.sf.net Mon Jul 18 12:16:52 2005 From: prabhu_r at users.sf.net (Prabhu Ramachandran) Date: Mon, 18 Jul 2005 21:46:52 +0530 Subject: [SciPy-user] Re: Enthought python In-Reply-To: References: <42D91FC3.2020001@comcast.net> <1121676222.24543.3.camel@bryan.teraview.local> Message-ID: <17115.54772.288161.241596@monster.linux.in> >>>>> "Alan" == Alan G Isaac writes: Alan> On Mon, 18 Jul 2005, Bryan Cole apparently wrote: >> If it's just mayavi you want, you can get a "binary" version >> (i.e. all shared libs packaged with the MacMillan installer or >> similar). It's a 10MB download but it'll run independently of >> your python installation. Alan> Apparently that's no good if you want MayaVi to play with Alan> Python. Yes, but I think I answered the question on how to install VTK on Win32 for Python2.3 over here: http://www.scipy.org/mailinglists/mailman?fn=scipy-user/2005-July/004820.html cheers, prabhu From bgranger at scu.edu Mon Jul 18 12:33:59 2005 From: bgranger at scu.edu (Brian Granger) Date: Mon, 18 Jul 2005 09:33:59 -0700 Subject: [SciPy-user] Very slow comparison of arrays of integers In-Reply-To: <42DB6533.2020705@ucsd.edu> References: <3EEFFD22-7937-431E-8963-89AD41794D2E@scu.edu> <42DB6533.2020705@ucsd.edu> Message-ID: <572522B0-3164-4C8A-9A8B-2F0173DAF7BF@scu.edu> On Jul 18, 2005, at 1:15 AM, Robert Kern wrote: > Brian Granger wrote: > >> Hello all, >> I have some code that is using scipy/numeric and one bottleneck >> in the code consists of comparing arrays or lists of integers. >> To my dismay, I am finding that using Python lists is 15-20 times >> _faster_ than using numeric array's for this. The problem is >> that it seems that there is no efficient way to compare arrays of >> integers. >> Here is code that clearly demonstrates this problem: >> from scipy import * >> def test_list(n): >> a = range(100) >> for i in range(n): >> r = (a == a) >> def test_array(n): >> a = array(range(100),Int) >> for i in range(n): >> r = allclose(a,a) >> The test_list code runs about 20 times as fast as the test_array >> code that uses allclose(). >> Is there any way of comparing to arrays of integers that would be >> as fast or faster than using lists? Any hints would be greatly >> appreciated. >> > > allclose() is for floating point arrays. Use alltrue(x == y) for > integer arrays. > > Also, use numbers > 100. Small integer objects are cached and > object identity is checked first, I believe. > > In [28]: tlist = timeit.Timer("a == a", setup="a = range(1000, 2000)") > In [29]: tarray = timeit.Timer("alltrue(a == a)", setup="from scipy > import alltrue,arange; a = arange(1000, 2000)") > > In [30]: tarray.repeat(3, 1000) > Out[30]: [0.097441911697387695, 0.049738168716430664, > 0.051641941070556641] > > In [31]: tlist.repeat(3, 1000) > Out[31]: [0.1062159538269043, 0.062600851058959961, > 0.063454866409301758] > Thanks, alltrue is much faster, especially for large arrays. Unfortunately out arrays have only 0's and 1's though, which may be slowing us down a bit if their identity is first checked. > -- > 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 bgranger at scu.edu Mon Jul 18 12:38:19 2005 From: bgranger at scu.edu (Brian Granger) Date: Mon, 18 Jul 2005 09:38:19 -0700 Subject: [SciPy-user] Very slow comparison of arrays of integers In-Reply-To: <8a72e50a524f63f369194bff5f8aab2a@stsci.edu> References: <3EEFFD22-7937-431E-8963-89AD41794D2E@scu.edu> <8a72e50a524f63f369194bff5f8aab2a@stsci.edu> Message-ID: <843CB824-406D-4687-9733-DED6C7053B71@scu.edu> On Jul 18, 2005, at 6:17 AM, Perry Greenfield wrote: > Part of the problem may be due to the fact that your array is so > small. For small numbers of values, lists are probably faster. Try > it with 100,000 values and see what the comparison looks like. If > it is still 15 times slower than there is a problem with Numeric. > > Perry Greenfield > > On Jul 18, 2005, at 1:10 AM, Brian Granger wrote: > > It is as you expect. For large arrays, Numeric is about 10 times faster than using Python lists (only in checking to see if two arrays are the same). We have also tested an array comparison function written using weave. For arrays smaller than 20,000, alltrue(a==b) is faster, but for larger arrays, the weaved code wins. Thanks so much for the help! Brian From rkern at ucsd.edu Mon Jul 18 12:44:44 2005 From: rkern at ucsd.edu (Robert Kern) Date: Mon, 18 Jul 2005 09:44:44 -0700 Subject: [SciPy-user] Very slow comparison of arrays of integers In-Reply-To: <572522B0-3164-4C8A-9A8B-2F0173DAF7BF@scu.edu> References: <3EEFFD22-7937-431E-8963-89AD41794D2E@scu.edu> <42DB6533.2020705@ucsd.edu> <572522B0-3164-4C8A-9A8B-2F0173DAF7BF@scu.edu> Message-ID: <42DBDC7C.4070305@ucsd.edu> Brian Granger wrote: > Thanks, alltrue is much faster, especially for large arrays. > Unfortunately out arrays have only 0's and 1's though, which may be > slowing us down a bit if their identity is first checked. (1) That would be for lists, (2) I'm probably wrong, and (3) it probably doesn't matter in any case. -- 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 Mon Jul 18 16:28:14 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Mon, 18 Jul 2005 16:28:14 -0400 Subject: [SciPy-user] mandatory overriding of class method Message-ID: <42DC10DE.5050903@comcast.net> I have a general Python question (but I am not subscribed to a general Python list:)- I intend to use this for technical computing if that makes it any better. I want to define a class that I don't the user to be able to use directly and I want to require the user to derive from the class and I want to require that two specifics methods be overridden for the derived class to be valid. I think in C++ you could define virtual methods so that they had to be overridden. Is there a way to do this in Python? I thought about defining the two methods in the base class to do nothing but raise exceptions, but that is kind of a hack and the user would know there was a problem until they tried to call the methods. Thanks for any thoughts you have, Ryan From Fernando.Perez at colorado.edu Mon Jul 18 16:32:14 2005 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Mon, 18 Jul 2005 14:32:14 -0600 Subject: [SciPy-user] mandatory overriding of class method In-Reply-To: <42DC10DE.5050903@comcast.net> References: <42DC10DE.5050903@comcast.net> Message-ID: <42DC11CE.1020002@colorado.edu> Ryan Krauss wrote: > I have a general Python question (but I am not subscribed to a general > Python list:)- I intend to use this for technical computing if that > makes it any better. > > I want to define a class that I don't the user to be able to use > directly and I want to require the user to derive from the class and I > want to require that two specifics methods be overridden for the derived > class to be valid. I think in C++ you could define virtual methods so > that they had to be overridden. Is there a way to do this in Python? I > thought about defining the two methods in the base class to do nothing > but raise exceptions, but that is kind of a hack and the user would know > there was a problem until they tried to call the methods. standard idiom: class foo: def something(self): raise NotImplementedError cheers, f From rkern at ucsd.edu Mon Jul 18 16:36:01 2005 From: rkern at ucsd.edu (Robert Kern) Date: Mon, 18 Jul 2005 13:36:01 -0700 Subject: [SciPy-user] mandatory overriding of class method In-Reply-To: <42DC10DE.5050903@comcast.net> References: <42DC10DE.5050903@comcast.net> Message-ID: <42DC12B1.4060105@ucsd.edu> Ryan Krauss wrote: > I have a general Python question (but I am not subscribed to a general > Python list:)- I intend to use this for technical computing if that > makes it any better. Well, there's always comp.lang.python. > I want to define a class that I don't the user to be able to use > directly and I want to require the user to derive from the class and I > want to require that two specifics methods be overridden for the derived > class to be valid. I think in C++ you could define virtual methods so > that they had to be overridden. Is there a way to do this in Python? I > thought about defining the two methods in the base class to do nothing > but raise exceptions, but that is kind of a hack and the user would know > there was a problem until they tried to call the methods. They'll know if they read the documentation. The canonical way to do this is to have the methods raise NotImplementedError in the base class and mention in the class's docstring that it needs to be subclassed and those specific methods need to be overwritten. -- 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 Mon Jul 18 19:00:20 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Mon, 18 Jul 2005 19:00:20 -0400 Subject: [SciPy-user] Re: Enthought python In-Reply-To: <17115.54772.288161.241596@monster.linux.in> References: <42D91FC3.2020001@comcast.net> <1121676222.24543.3.camel@bryan.teraview.local> <17115.54772.288161.241596@monster.linux.in> Message-ID: <42DC3484.3080802@comcast.net> I can't access the readme referenced in this message. Ryan Prabhu Ramachandran wrote: >>>>>>"Alan" == Alan G Isaac writes: >>>>>> >>>>>> > > Alan> On Mon, 18 Jul 2005, Bryan Cole apparently wrote: > >> If it's just mayavi you want, you can get a "binary" version > >> (i.e. all shared libs packaged with the MacMillan installer or > >> similar). It's a 10MB download but it'll run independently of > >> your python installation. > > Alan> Apparently that's no good if you want MayaVi to play with > Alan> Python. > >Yes, but I think I answered the question on how to install VTK on >Win32 for Python2.3 over here: > > http://www.scipy.org/mailinglists/mailman?fn=scipy-user/2005-July/004820.html > >cheers, >prabhu > >_______________________________________________ >SciPy-user mailing list >SciPy-user at scipy.net >http://www.scipy.net/mailman/listinfo/scipy-user > > > From cupricwhistle at yahoo.com Mon Jul 18 20:36:35 2005 From: cupricwhistle at yahoo.com (cupric) Date: Mon, 18 Jul 2005 17:36:35 -0700 (PDT) Subject: [SciPy-user] Error using fmin_powell Message-ID: <20050719003636.8791.qmail@web50701.mail.yahoo.com> Hi all, I think this question has been asked earlier, but I wasn't able to get any definitive answer from the related postings and hence, I am asking it again. I was trying to use the optimization functions in the scipy package. While using the function "fmin_powell", the program dies giving the following error messages. =================================================== File "/usr/local/lib/python2.4/site-packages/scipy/optimize/optimize.py", line 1486, in fmin_powell fval, x, direc1 = _linesearch_powell(func, x, direc1, args=args, tol=xtol*100) File "/usr/local/lib/python2.4/site-packages/scipy/optimize/optimize.py", line 1415, in _linesearch_powell full_output=1, tol=tol) File "/usr/local/lib/python2.4/site-packages/scipy/optimize/optimize.py", line 1196, in brent xa,xb,xc,fa,fb,fc,funcalls = bracket(func, args=args) File "/usr/local/lib/python2.4/site-packages/scipy/optimize/optimize.py", line 1349, in bracket fa = apply(func, (xa,)+args) TypeError: _myfunc() takes at most 5 arguments (6 given) ============================================ Earlier discussion on the topic concluded that there was a bug in the function which had been fixed. However, even after installing the newest version of the scipy package, I get the very same error. Any help would be much appreciated. thanks, cupric __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From prabhu_r at users.sf.net Mon Jul 18 22:26:59 2005 From: prabhu_r at users.sf.net (Prabhu Ramachandran) Date: Tue, 19 Jul 2005 07:56:59 +0530 Subject: [SciPy-user] Re: Enthought python In-Reply-To: <42DC3484.3080802@comcast.net> References: <42D91FC3.2020001@comcast.net> <1121676222.24543.3.camel@bryan.teraview.local> <17115.54772.288161.241596@monster.linux.in> <42DC3484.3080802@comcast.net> Message-ID: <17116.25843.995725.573251@monster.linux.in> >>>>> "Ryan" == Ryan Krauss writes: Ryan> I can't access the readme referenced in this message. Hmm, it seems to work from here but is a little flaky. Maybe this is some temporary issue with the site. Can you try again? http://vvikram.com/~prabhu/download/vtk/win32/readme.txt In any case here are the instructions: -------------------------------------------------- == Instructions for VTK-Python-4.4.zip == This ZIP file was made from the VTK dlls included in an unofficial [http://www.enthought.com/downloads/downloads.htm Enthought Python bundle]. Using this ZIP file requires that you have Python-2.3 installed. If we assume that your Python install was in `C:\Python23` then simply unzip the contents of this ZIP file into that directory. The ZIP file basically contains files inside `Lib\site-packages\` and also some inside `Scripts\`. You should make sure that `C:\Python23\Scripts` is in your `PATH` (it should be). You should now be able to use VTK from Python. To test the install try this: python -c "import vtk; print vtk.vtkVersion().GetVTKSourceVersion()" If it runs without error you are done. -------------------------------------------------- VTK-Python-4.4.zip is available here: http://vvikram.com/~prabhu/download/vtk/win32/VTK-Python-4.4.zip Please let me know if you have problems. In another half an hour (file transfers take a while from here) this file and the new readme should also be available here: http://mayavi.sourceforge.net/dwnld/vtk/win32/ So if you are unable to access vvikram.com try at the SF site. cheers, prabhu From ryanfedora at comcast.net Tue Jul 19 09:24:24 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Tue, 19 Jul 2005 09:24:24 -0400 Subject: [SciPy-user] Re: Enthought python In-Reply-To: <17116.25843.995725.573251@monster.linux.in> References: <42D91FC3.2020001@comcast.net> <1121676222.24543.3.camel@bryan.teraview.local> <17115.54772.288161.241596@monster.linux.in> <42DC3484.3080802@comcast.net> <17116.25843.995725.573251@monster.linux.in> Message-ID: <42DCFF08.8080009@comcast.net> An HTML attachment was scrubbed... URL: From prabhu_r at users.sf.net Tue Jul 19 09:58:50 2005 From: prabhu_r at users.sf.net (Prabhu Ramachandran) Date: Tue, 19 Jul 2005 19:28:50 +0530 Subject: [SciPy-user] Re: Enthought python In-Reply-To: <42DCFF08.8080009@comcast.net> References: <42D91FC3.2020001@comcast.net> <1121676222.24543.3.camel@bryan.teraview.local> <17115.54772.288161.241596@monster.linux.in> <42DC3484.3080802@comcast.net> <17116.25843.995725.573251@monster.linux.in> <42DCFF08.8080009@comcast.net> Message-ID: <17117.1818.255431.651027@monster.linux.in> >>>>> "Ryan" == Ryan Krauss writes: [...] Ryan> y", line 63, in vtkLoadPythonTkWidgets
Ryan>     interp.call('load', filename)
Ryan> _tkinter.TclError: couldn't load library Ryan> "vtkRenderingPythonTkWidgets.dll": this
 library or Ryan> a dependent library could not be found in library path
Ryan>

The dll mentioned is in the vtk_python folder in Ryan> C:\Python23\Lib\site-packages\vtk_python\vtkRenderingPythonTkWidgets.dll
Ryan>
Thanks for any help in taking this further.

Please don't send HTML emails, they are impossible for me to quote correctly. I think I might have an older version of the ZIP file on my disk which I moved to the SF page. To fix your problem just move the vtkRenderingPythonTkWidgets.dll into the vtk sub directory inside vtk_python and see if that fixes it. If it does please let me know, and if it still does not work, then move it into Python23/Scripts/. Please get back to me on what works and I'll fix the ZIP file and upload a new one when I get the time. Thanks. cheers, prabhu From emsellem at obs.univ-lyon1.fr Tue Jul 19 10:35:51 2005 From: emsellem at obs.univ-lyon1.fr (Eric Emsellem) Date: Tue, 19 Jul 2005 16:35:51 +0200 Subject: [SciPy-user] 2D interpolation from a set of irregularly spaced positions in python? Message-ID: <42DD0FC7.4090202@obs.univ-lyon1.fr> Hi, I have a very simple problem which I am not able to solve with my current knowledge of scipy/python/... I have a set of positions X, Y, and intensities Z provided in 1D arrays. The positions are NOT at all on a regular grid. Now for a new position Xnew, Ynew I would like to get the *interpolated* Znew value, and if possible trying different schemes such as "bilinear", "cubic", etc... I also would like to know if my point is EXTRApolated or not so I can decide what to do (either take the extrapolated value or exclude it). Any suggestion on this simple item? Thanks in advance Eric -- =============================================================== Observatoire de Lyon emsellem at obs.univ-lyon1.fr 9 av. Charles-Andre tel: +33 4 78 86 83 84 69561 Saint-Genis Laval Cedex fax: +33 4 78 86 83 86 France http://www-obs.univ-lyon1.fr/eric.emsellem =============================================================== From rkern at ucsd.edu Tue Jul 19 10:43:21 2005 From: rkern at ucsd.edu (Robert Kern) Date: Tue, 19 Jul 2005 07:43:21 -0700 Subject: [SciPy-user] 2D interpolation from a set of irregularly spaced positions in python? In-Reply-To: <42DD0FC7.4090202@obs.univ-lyon1.fr> References: <42DD0FC7.4090202@obs.univ-lyon1.fr> Message-ID: <42DD1189.4010708@ucsd.edu> Eric Emsellem wrote: > Hi, > > I have a very simple problem which I am not able to solve with my > current knowledge of scipy/python/... > > I have a set of positions X, Y, and intensities Z provided in 1D arrays. > The positions are NOT at all on a regular grid. > > Now for a new position Xnew, Ynew I would like to get the *interpolated* > Znew value, and if possible trying different schemes such as "bilinear", > "cubic", etc... I also would like to know if my point is EXTRApolated or > not so I can decide what to do (either take the extrapolated value or > exclude it). Look at Scientific.Functions.Interpolation . It's only one scheme, but it does the job. http://starship.python.net/~hinsen/ScientificPython/ -- 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 Tue Jul 19 11:30:33 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Tue, 19 Jul 2005 11:30:33 -0400 Subject: [SciPy-user] Re: Enthought python In-Reply-To: <17117.1818.255431.651027@monster.linux.in> References: <42D91FC3.2020001@comcast.net> <1121676222.24543.3.camel@bryan.teraview.local> <17115.54772.288161.241596@monster.linux.in> <42DC3484.3080802@comcast.net> <17116.25843.995725.573251@monster.linux.in> <42DCFF08.8080009@comcast.net> <17117.1818.255431.651027@monster.linux.in> Message-ID: <42DD1C99.2050304@comcast.net> Sorry about the html e-mail thing. I have been asked before, but I use several different computers and apparently haven't set this one correctly. It should be taken care of now. I tried placing vtkRenderingPythonTkWidgets.dll in all of the places you mentioned with no success. I went into def vtkLoadPythonTkWidgets(interp): and specifically appended the pathlist with a location where I had the dll installed: pathlist.append('C:\\Python23\\Lib\\site-packages\\vtk_python\\vtk\\tk') I also turned on the python debugger and here is what I learned: (Pdb) fullpath 'C:\\Python23\\lib\\site-packages\\vtk_python\\vtkRenderingPythonTkWidgets.dll' (Pdb) import os (Pdb) os.path.exists(fullpath) True (Pdb) n > c:\python23\lib\site-packages\vtk_python\vtk\tk\vtkloadpythontkwidgets.py(62)v tkLoadPythonTkWidgets() -> if interp.eval('catch {load '+fullpath+' '+pkgname+'}') == '0': (Pdb) interp.eval('catch {load '+fullpath+' '+pkgname+'}') '1' (Pdb) pkgname 'Vtkrenderingpythontkwidgets' (Pdb) So apparently, the dll is being found and its original location was fine, but the package Vtkrenderingpythontkwidgets cannot be found within the dll (I guess). Ryan Prabhu Ramachandran wrote: >>>>>>"Ryan" == Ryan Krauss writes: >>>>>> >>>>>> > >[...] > Ryan> y", line 63, in vtkLoadPythonTkWidgets
> Ryan>     interp.call('load', filename)
> Ryan> _tkinter.TclError: couldn't load library > Ryan> "vtkRenderingPythonTkWidgets.dll": this
 library or > Ryan> a dependent library could not be found in library path
> Ryan>

The dll mentioned is in the vtk_python folder in > Ryan> C:\Python23\Lib\site-packages\vtk_python\vtkRenderingPythonTkWidgets.dll
> Ryan>
Thanks for any help in taking this further.

> >Please don't send HTML emails, they are impossible for me to quote >correctly. I think I might have an older version of the ZIP file on >my disk which I moved to the SF page. To fix your problem just move >the vtkRenderingPythonTkWidgets.dll into the vtk sub directory inside >vtk_python and see if that fixes it. If it does please let me know, >and if it still does not work, then move it into Python23/Scripts/. > >Please get back to me on what works and I'll fix the ZIP file and >upload a new one when I get the time. Thanks. > >cheers, >prabhu > >_______________________________________________ >SciPy-user mailing list >SciPy-user at scipy.net >http://www.scipy.net/mailman/listinfo/scipy-user > > > From prabhu_r at users.sf.net Tue Jul 19 12:03:02 2005 From: prabhu_r at users.sf.net (Prabhu Ramachandran) Date: Tue, 19 Jul 2005 21:33:02 +0530 Subject: [SciPy-user] Re: Enthought python In-Reply-To: <42DD1C99.2050304@comcast.net> References: <42D91FC3.2020001@comcast.net> <1121676222.24543.3.camel@bryan.teraview.local> <17115.54772.288161.241596@monster.linux.in> <42DC3484.3080802@comcast.net> <17116.25843.995725.573251@monster.linux.in> <42DCFF08.8080009@comcast.net> <17117.1818.255431.651027@monster.linux.in> <42DD1C99.2050304@comcast.net> Message-ID: <17117.9270.71761.672915@monster.linux.in> >>>>> "Ryan" == Ryan Krauss writes: Ryan> I tried placing vtkRenderingPythonTkWidgets.dll in all of Ryan> the places you mentioned with no success. Ryan> I went into def vtkLoadPythonTkWidgets(interp): and Ryan> specifically appended the pathlist with a location where I Ryan> had the dll installed: Ryan> pathlist.append('C:\\Python23\\Lib\\site-packages\\vtk_python\\vtk\\tk') Hmm, I replied in a hurry. Is C:\\Python23\\Scripts in your PATH? If it is not then that might be the cause. For some reason this DLL has to be in your PATH. Alternatively, if C:\\Python23 is in your path, then put the dll there and test. I am not sure about why and how this happens since I've never had the chance to fully debug this. HTH, cheers, prabhu From emsellem at obs.univ-lyon1.fr Tue Jul 19 12:14:09 2005 From: emsellem at obs.univ-lyon1.fr (Eric Emsellem) Date: Tue, 19 Jul 2005 18:14:09 +0200 Subject: [SciPy-user] 2D interpolation from a set of irregularly spaced Message-ID: <42DD26D1.6020601@obs.univ-lyon1.fr> Hi again, Robert Kern provided me some input with a link to Scientific Python (thanks!) ==> However this is again using an ORTHOGONAL GRID! The set of points I am using are NOT on an orthogonal grid but are RANDOMLY positioned points... So any idea on how to interpolate a set of randomly positioned x,y ?? (so I have three 1D arrays: x, y for the positions, and z for the values. I need to know z at other positions...) Thanks Eric P.S.: please cc to my email too. -- =============================================================== Observatoire de Lyon emsellem at obs.univ-lyon1.fr 9 av. Charles-Andre tel: +33 4 78 86 83 84 69561 Saint-Genis Laval Cedex fax: +33 4 78 86 83 86 France http://www-obs.univ-lyon1.fr/eric.emsellem =============================================================== From ryanfedora at comcast.net Tue Jul 19 12:20:30 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Tue, 19 Jul 2005 12:20:30 -0400 Subject: [SciPy-user] Re: Enthought python In-Reply-To: <17117.9270.71761.672915@monster.linux.in> References: <42D91FC3.2020001@comcast.net> <1121676222.24543.3.camel@bryan.teraview.local> <17115.54772.288161.241596@monster.linux.in> <42DC3484.3080802@comcast.net> <17116.25843.995725.573251@monster.linux.in> <42DCFF08.8080009@comcast.net> <17117.1818.255431.651027@monster.linux.in> <42DD1C99.2050304@comcast.net> <17117.9270.71761.672915@monster.linux.in> Message-ID: <42DD284E.30909@comcast.net> Alright, we are getting close. I added C:\Python23\scripts to the windows path and moved the dll there (I don't think it was already there), and now tesk_vtk finishes correctly. I tried running this example script out of the online manual: import mayavi v = mayavi.mayavi() # create a MayaVi window. d = v.open_vtk('test.vtk', config=0) # open the data file. # The config option turns on/off showing a GUI control for the data/filter/module. # load the filters. f = v.load_filter('WarpScalar', config=0) n = v.load_filter('PolyDataNormals', 0) n.fil.SetFeatureAngle (45) # configure the normals. # Load the necessary modules. m = v.load_module('SurfaceMap', 0) a = v.load_module('Axes', 0) a.axes.SetCornerOffset(0.0) # configure the axes module. o = v.load_module('Outline', 0) v.Render() # Re-render the scene. (Aftter running the preceding portion to generate the data.) The visualization pops up but so does an error message that says: ERROR: In C:\aap\src\VTK\Rendering\vtkWin32OpenGLRenderWindow.cxx, line 216 vtkWin32OpenGLRenderWindow (0x06592F70): wglMakeCurrent failed in MakeCurrent(), error: The requested resource is in use. I was getting this same error last night at home. I had installed EntoughtPython and the above example worked out of the box. But as soon as I updated either Ipython or Matplotlib to the current versions, I started getting the above error. Thanks again for your help Prabhu. I think we are getting close. Ryan Prabhu Ramachandran wrote: >>>>>>"Ryan" == Ryan Krauss writes: >>>>>> >>>>>> > > Ryan> I tried placing vtkRenderingPythonTkWidgets.dll in all of > Ryan> the places you mentioned with no success. > > Ryan> I went into def vtkLoadPythonTkWidgets(interp): and > Ryan> specifically appended the pathlist with a location where I > Ryan> had the dll installed: > Ryan> pathlist.append('C:\\Python23\\Lib\\site-packages\\vtk_python\\vtk\\tk') > >Hmm, I replied in a hurry. Is C:\\Python23\\Scripts in your PATH? If >it is not then that might be the cause. For some reason this DLL has >to be in your PATH. > >Alternatively, if C:\\Python23 is in your path, then put the dll there >and test. > >I am not sure about why and how this happens since I've never had the >chance to fully debug this. > >HTH, > >cheers, >prabhu > >_______________________________________________ >SciPy-user mailing list >SciPy-user at scipy.net >http://www.scipy.net/mailman/listinfo/scipy-user > > > From grante at visi.com Tue Jul 19 12:57:33 2005 From: grante at visi.com (Grant Edwards) Date: Tue, 19 Jul 2005 16:57:33 +0000 (UTC) Subject: [SciPy-user] Re: 2D interpolation from a set of irregularly spaced References: <42DD26D1.6020601@obs.univ-lyon1.fr> Message-ID: On 2005-07-19, Eric Emsellem wrote: > Hi again, > Robert Kern provided me some input with a link to Scientific Python > (thanks!) > >==> However this is again using an ORTHOGONAL GRID! > The set of points I am using are NOT on an orthogonal grid but are > RANDOMLY positioned points... > > So any idea on how to interpolate a set of randomly positioned > x,y ?? (so I have three 1D arrays: x, y for the positions, and > z for the values. I need to know z at other positions...) I had to do the same thing recently, and the only workable solution I was able to find was a triangulated surface. -- Grant Edwards grante Yow! What I want to find at out is -- do parrots know visi.com much about Astro-Turf? From emsellem at obs.univ-lyon1.fr Tue Jul 19 13:07:44 2005 From: emsellem at obs.univ-lyon1.fr (Eric Emsellem) Date: Tue, 19 Jul 2005 19:07:44 +0200 Subject: [SciPy-user] Re: 2D interpolation from a set of irregularly spaced Message-ID: <42DD3360.7080801@obs.univ-lyon1.fr> Hi, thanks for the tip; But then in practice how did you do it? Eric >On 2005-07-19, Eric Emsellem > wrote: >>/ Hi again, >/>/ Robert Kern provided me some input with a link to Scientific Python >/>/ (thanks!) >/>/ >/>/==> However this is again using an ORTHOGONAL GRID! >/>/ The set of points I am using are NOT on an orthogonal grid but are >/>/ RANDOMLY positioned points... >/>/ >/>/ So any idea on how to interpolate a set of randomly positioned >/>/ x,y ?? (so I have three 1D arrays: x, y for the positions, and >/>/ z for the values. I need to know z at other positions...) >/ >I had to do the same thing recently, and the only workable >solution I was able to find was a triangulated surface. > -- =============================================================== Observatoire de Lyon emsellem at obs.univ-lyon1.fr 9 av. Charles-Andre tel: +33 4 78 86 83 84 69561 Saint-Genis Laval Cedex fax: +33 4 78 86 83 86 France http://www-obs.univ-lyon1.fr/eric.emsellem =============================================================== From perry at stsci.edu Tue Jul 19 13:08:24 2005 From: perry at stsci.edu (Perry Greenfield) Date: Tue, 19 Jul 2005 13:08:24 -0400 Subject: [SciPy-user] Re: 2D interpolation from a set of irregularly spaced In-Reply-To: References: <42DD26D1.6020601@obs.univ-lyon1.fr> Message-ID: <28b2b2a48730256aeec8161ab7af9670@stsci.edu> On Jul 19, 2005, at 12:57 PM, Grant Edwards wrote: > On 2005-07-19, Eric Emsellem wrote: >> Hi again, >> Robert Kern provided me some input with a link to Scientific Python >> (thanks!) >> >> ==> However this is again using an ORTHOGONAL GRID! >> The set of points I am using are NOT on an orthogonal grid but are >> RANDOMLY positioned points... >> >> So any idea on how to interpolate a set of randomly positioned >> x,y ?? (so I have three 1D arrays: x, y for the positions, and >> z for the values. I need to know z at other positions...) > > I had to do the same thing recently, and the only workable > solution I was able to find was a triangulated surface. > Yes, I think a common approach is to use Delaunay triangulation to associate the desired x,y positions for which z is desired with existing triplets of x,y,z values and perform interpolation on those. At least that's the way I did it many years ago. So, is there a Delaunay module in scipy? None that I could see, but I do see on on cheeseshop.python.org (Delny 0.1.0a2). What did you (Grant) use? Perry From perry at stsci.edu Tue Jul 19 13:08:24 2005 From: perry at stsci.edu (Perry Greenfield) Date: Tue, 19 Jul 2005 13:08:24 -0400 Subject: [SciPy-user] Re: 2D interpolation from a set of irregularly spaced In-Reply-To: References: <42DD26D1.6020601@obs.univ-lyon1.fr> Message-ID: <28b2b2a48730256aeec8161ab7af9670@stsci.edu> On Jul 19, 2005, at 12:57 PM, Grant Edwards wrote: > On 2005-07-19, Eric Emsellem wrote: >> Hi again, >> Robert Kern provided me some input with a link to Scientific Python >> (thanks!) >> >> ==> However this is again using an ORTHOGONAL GRID! >> The set of points I am using are NOT on an orthogonal grid but are >> RANDOMLY positioned points... >> >> So any idea on how to interpolate a set of randomly positioned >> x,y ?? (so I have three 1D arrays: x, y for the positions, and >> z for the values. I need to know z at other positions...) > > I had to do the same thing recently, and the only workable > solution I was able to find was a triangulated surface. > Yes, I think a common approach is to use Delaunay triangulation to associate the desired x,y positions for which z is desired with existing triplets of x,y,z values and perform interpolation on those. At least that's the way I did it many years ago. So, is there a Delaunay module in scipy? None that I could see, but I do see on on cheeseshop.python.org (Delny 0.1.0a2). What did you (Grant) use? Perry From grante at visi.com Tue Jul 19 13:36:56 2005 From: grante at visi.com (Grant Edwards) Date: Tue, 19 Jul 2005 17:36:56 +0000 (UTC) Subject: [SciPy-user] Re: 2D interpolation from a set of irregularly spaced References: <42DD3360.7080801@obs.univ-lyon1.fr> Message-ID: On 2005-07-19, Eric Emsellem wrote: >>> So any idea on how to interpolate a set of randomly positioned >>> x,y ?? (so I have three 1D arrays: x, y for the positions, and >>> z for the values. I need to know z at other positions...) >> >>I had to do the same thing recently, and the only workable >>solution I was able to find was a triangulated surface. > thanks for the tip; But then in practice how did you do it? http://cheeseshop.python.org/Delny/0.1.0a2 -- Grant Edwards grante Yow! Hello... IRON at CURTAIN? Send over a visi.com SAUSAGE PIZZA! World War III? No thanks! From zunzun at zunzun.com Tue Jul 19 17:58:10 2005 From: zunzun at zunzun.com (zunzun at zunzun.com) Date: Tue, 19 Jul 2005 17:58:10 -0400 Subject: [SciPy-user] 2D interpolation from a set of irregularly spaced positions in python? In-Reply-To: <42DD0FC7.4090202@obs.univ-lyon1.fr> References: <42DD0FC7.4090202@obs.univ-lyon1.fr> Message-ID: <20050719215810.GA22068@localhost.members.linode.com> On Tue, Jul 19, 2005 at 04:35:51PM +0200, Eric Emsellem wrote: > > Now for a new position Xnew, Ynew I would like to get the *interpolated* > Znew value, and if possible trying different schemes such as "bilinear", > "cubic", etc... I also would like to know if my point is EXTRApolated or > not so I can decide what to do (either take the extrapolated value or > exclude it). You might consider curvefitting the data and using the fitted function to calculate interpolated values. Plotting the points against the data used in curvefitting would be one way to determine if the value was extrapolated or not. To find a good function, try the 3D function finder on my curve and surface fitting web site, http://zunzun.com - I'll be glad to help you if you're interested in this route as a solution. I use SciPy for the site's fitting, both linear and nonlinear functions. James Phillips http://zunzun.com From harkal at sylphis3d.com Wed Jul 20 08:32:24 2005 From: harkal at sylphis3d.com (Harry Kalogirou) Date: Wed, 20 Jul 2005 15:32:24 +0300 Subject: [SciPy-user] RQ Decomposition Message-ID: <1121862744.3586.5.camel@cool> Hello! is there a function to compute the RQ decomposition of a matrix in scipy? I don't find something in the docs, but I think that lapack supports it. Thanks! Harry From nwagner at mecha.uni-stuttgart.de Wed Jul 20 08:51:47 2005 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Wed, 20 Jul 2005 14:51:47 +0200 Subject: [SciPy-user] RQ Decomposition In-Reply-To: <1121862744.3586.5.camel@cool> References: <1121862744.3586.5.camel@cool> Message-ID: <42DE48E3.1080002@mecha.uni-stuttgart.de> Harry Kalogirou wrote: >Hello! > >is there a function to compute the RQ decomposition of a matrix in >scipy? I don't find something in the docs, but I think that lapack >supports it. > >Thanks! >Harry > > >_______________________________________________ >SciPy-user mailing list >SciPy-user at scipy.net >http://www.scipy.net/mailman/listinfo/scipy-user > > In LAPACK we have http://www.netlib.org/lapack/double/dgerqf.f Nils From ryanfedora at comcast.net Wed Jul 20 08:56:06 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Wed, 20 Jul 2005 08:56:06 -0400 Subject: [SciPy-user] RQ Decomposition In-Reply-To: <42DE48E3.1080002@mecha.uni-stuttgart.de> References: <1121862744.3586.5.camel@cool> <42DE48E3.1080002@mecha.uni-stuttgart.de> Message-ID: <42DE49E6.8030107@comcast.net> scipy.linalg.qr If you are using Ipython type scipy.linalg. and hit tab and it lists all the possibilities. Nils Wagner wrote: > Harry Kalogirou wrote: > >> Hello! >> >> is there a function to compute the RQ decomposition of a matrix in >> scipy? I don't find something in the docs, but I think that lapack >> supports it. >> >> Thanks! >> Harry >> >> >> _______________________________________________ >> SciPy-user mailing list >> SciPy-user at scipy.net >> http://www.scipy.net/mailman/listinfo/scipy-user >> >> > > In LAPACK we have > > http://www.netlib.org/lapack/double/dgerqf.f > > Nils > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From nwagner at mecha.uni-stuttgart.de Wed Jul 20 09:04:06 2005 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Wed, 20 Jul 2005 15:04:06 +0200 Subject: [SciPy-user] RQ Decomposition In-Reply-To: <42DE49E6.8030107@comcast.net> References: <1121862744.3586.5.camel@cool> <42DE48E3.1080002@mecha.uni-stuttgart.de> <42DE49E6.8030107@comcast.net> Message-ID: <42DE4BC6.8090304@mecha.uni-stuttgart.de> Ryan Krauss wrote: > scipy.linalg.qr > > If you are using Ipython type scipy.linalg. and hit tab and it lists > all the possibilities. > QR is not RQ. Am I missing something ? Nils > Nils Wagner wrote: > >> Harry Kalogirou wrote: >> >>> Hello! >>> >>> is there a function to compute the RQ decomposition of a matrix in >>> scipy? I don't find something in the docs, but I think that lapack >>> supports it. >>> >>> Thanks! >>> Harry >>> >>> >>> _______________________________________________ >>> SciPy-user mailing list >>> SciPy-user at scipy.net >>> http://www.scipy.net/mailman/listinfo/scipy-user >>> >>> >> >> In LAPACK we have >> >> http://www.netlib.org/lapack/double/dgerqf.f >> >> Nils >> >> _______________________________________________ >> SciPy-user mailing list >> SciPy-user at scipy.net >> http://www.scipy.net/mailman/listinfo/scipy-user >> > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From ryanfedora at comcast.net Wed Jul 20 09:07:25 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Wed, 20 Jul 2005 09:07:25 -0400 Subject: [SciPy-user] RQ Decomposition In-Reply-To: <42DE4BC6.8090304@mecha.uni-stuttgart.de> References: <1121862744.3586.5.camel@cool> <42DE48E3.1080002@mecha.uni-stuttgart.de> <42DE49E6.8030107@comcast.net> <42DE4BC6.8090304@mecha.uni-stuttgart.de> Message-ID: <42DE4C8D.8030902@comcast.net> I didn't know they were different. A list of scipy.linalg.lapack.flapack includes scipy.linalg.lapack.flapack.dgeqrf but no dgerqf. Maybe it was left out. Nils Wagner wrote: > Ryan Krauss wrote: > >> scipy.linalg.qr >> >> If you are using Ipython type scipy.linalg. and hit tab and it lists >> all the possibilities. >> > QR is not RQ. Am I missing something ? > > Nils > >> Nils Wagner wrote: >> >>> Harry Kalogirou wrote: >>> >>>> Hello! >>>> >>>> is there a function to compute the RQ decomposition of a matrix in >>>> scipy? I don't find something in the docs, but I think that lapack >>>> supports it. >>>> >>>> Thanks! >>>> Harry >>>> >>>> >>>> _______________________________________________ >>>> SciPy-user mailing list >>>> SciPy-user at scipy.net >>>> http://www.scipy.net/mailman/listinfo/scipy-user >>>> >>>> >>> >>> In LAPACK we have >>> >>> http://www.netlib.org/lapack/double/dgerqf.f >>> >>> Nils >>> >>> _______________________________________________ >>> SciPy-user mailing list >>> SciPy-user at scipy.net >>> http://www.scipy.net/mailman/listinfo/scipy-user >>> >> >> _______________________________________________ >> SciPy-user mailing list >> SciPy-user at scipy.net >> http://www.scipy.net/mailman/listinfo/scipy-user > > > > > > > > _______________________________________________ > 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 Jul 20 09:16:39 2005 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Wed, 20 Jul 2005 15:16:39 +0200 Subject: [SciPy-user] RQ Decomposition In-Reply-To: <42DE4C8D.8030902@comcast.net> References: <1121862744.3586.5.camel@cool> <42DE48E3.1080002@mecha.uni-stuttgart.de> <42DE49E6.8030107@comcast.net> <42DE4BC6.8090304@mecha.uni-stuttgart.de> <42DE4C8D.8030902@comcast.net> Message-ID: <42DE4EB7.3080800@mecha.uni-stuttgart.de> Ryan Krauss wrote: > I didn't know they were different. A list of > scipy.linalg.lapack.flapack includes > scipy.linalg.lapack.flapack.dgeqrf but no dgerqf. Maybe it was left out. > Pearu, Is there any special reason why flapack is "incomplete" ? Nils > Nils Wagner wrote: > >> Ryan Krauss wrote: >> >>> scipy.linalg.qr >>> >>> If you are using Ipython type scipy.linalg. and hit tab and it >>> lists all the possibilities. >>> >> QR is not RQ. Am I missing something ? >> >> Nils >> >>> Nils Wagner wrote: >>> >>>> Harry Kalogirou wrote: >>>> >>>>> Hello! >>>>> >>>>> is there a function to compute the RQ decomposition of a matrix in >>>>> scipy? I don't find something in the docs, but I think that lapack >>>>> supports it. >>>>> >>>>> Thanks! >>>>> Harry >>>>> >>>>> >>>>> _______________________________________________ >>>>> SciPy-user mailing list >>>>> SciPy-user at scipy.net >>>>> http://www.scipy.net/mailman/listinfo/scipy-user >>>>> >>>>> >>>> >>>> In LAPACK we have >>>> >>>> http://www.netlib.org/lapack/double/dgerqf.f >>>> >>>> Nils >>>> >>>> _______________________________________________ >>>> SciPy-user mailing list >>>> SciPy-user at scipy.net >>>> http://www.scipy.net/mailman/listinfo/scipy-user >>>> >>> >>> _______________________________________________ >>> SciPy-user mailing list >>> SciPy-user at scipy.net >>> http://www.scipy.net/mailman/listinfo/scipy-user >> >> >> >> >> >> >> >> >> _______________________________________________ >> SciPy-user mailing list >> SciPy-user at scipy.net >> http://www.scipy.net/mailman/listinfo/scipy-user >> > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From pearu at scipy.org Wed Jul 20 08:27:28 2005 From: pearu at scipy.org (Pearu Peterson) Date: Wed, 20 Jul 2005 07:27:28 -0500 (CDT) Subject: [SciPy-user] RQ Decomposition In-Reply-To: <42DE4EB7.3080800@mecha.uni-stuttgart.de> References: <1121862744.3586.5.camel@cool> <42DE48E3.1080002@mecha.uni-stuttgart.de> <42DE4BC6.8090304@mecha.uni-stuttgart.de> <42DE4EB7.3080800@mecha.uni-stuttgart.de> Message-ID: On Wed, 20 Jul 2005, Nils Wagner wrote: > Ryan Krauss wrote: > >> I didn't know they were different. A list of scipy.linalg.lapack.flapack >> includes scipy.linalg.lapack.flapack.dgeqrf but no dgerqf. Maybe it was >> left out. >> > Pearu, > > Is there any special reason why flapack is "incomplete" ? No, there isn't. Patches with unittests to complete flapack are welcome. Note that scipy.lib.lapack.flapack will be replace scipy.linalg.lapack.flapack in future. scipy.lib.lapack .pyf.src files document which lapack routines are wrapped and which are not. Pearu From prabhu_r at users.sf.net Wed Jul 20 09:31:54 2005 From: prabhu_r at users.sf.net (Prabhu Ramachandran) Date: Wed, 20 Jul 2005 19:01:54 +0530 Subject: [SciPy-user] Re: Enthought python In-Reply-To: <42DD284E.30909@comcast.net> References: <42D91FC3.2020001@comcast.net> <1121676222.24543.3.camel@bryan.teraview.local> <17115.54772.288161.241596@monster.linux.in> <42DC3484.3080802@comcast.net> <17116.25843.995725.573251@monster.linux.in> <42DCFF08.8080009@comcast.net> <17117.1818.255431.651027@monster.linux.in> <42DD1C99.2050304@comcast.net> <17117.9270.71761.672915@monster.linux.in> <42DD284E.30909@comcast.net> Message-ID: <17118.21066.736872.354282@monster.linux.in> >>>>> "Ryan" == Ryan Krauss writes: Ryan> Alright, we are getting close. I added C:\Python23\scripts Ryan> to the windows path and moved the dll there (I don't think Ryan> it was already there), and now tesk_vtk finishes correctly. [...] Ryan> v.Render() # Re-render the scene. Ryan> (Aftter running the preceding portion to generate the data.) Ryan> The visualization pops up but so does an error message that Ryan> says: ERROR: In Ryan> C:\aap\src\VTK\Rendering\vtkWin32OpenGLRenderWindow.cxx, Ryan> line 216 vtkWin32OpenGLRenderWindow (0x06592F70): Ryan> wglMakeCurrent failed in MakeCurrent(), error: The requested Ryan> resource is in use. Great, atleast we have something that atleast displays something on screen. I've never seen this error but think I've seen similar messages on the VTK mailing list a while back. How exactly did you run the example? Did you use IPython or IDLE or the vanilla interpreter? It looks like a threading issue. Ryan> I was getting this same error last night at home. I had Ryan> installed EntoughtPython and the above example worked out of Ryan> the box. But as soon as I updated either Ipython or Ryan> Matplotlib to the current versions, I started getting the Ryan> above error. If you are using IPython, Enthought's IPython icon starts ipython as ipython -wthread -p enthought or something like that. MayaVi is a Tkinter application and does not work too well with ipython -wthread (even with the -tk option). SO try running Ipython as is without any extra options and see if that helps. Ryan> Thanks again for your help Prabhu. I think we are getting Ryan> close. Yes, I'll try and create a new ZIP file and fix the vtkRenderingPythonTkWidgets issue this weekend. I am not sure why you get the wglMakeCurrent error. cheers, prabhu From ryanfedora at comcast.net Wed Jul 20 09:42:17 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Wed, 20 Jul 2005 09:42:17 -0400 Subject: [SciPy-user] Re: Enthought python In-Reply-To: <17118.21066.736872.354282@monster.linux.in> References: <42D91FC3.2020001@comcast.net> <1121676222.24543.3.camel@bryan.teraview.local> <17115.54772.288161.241596@monster.linux.in> <42DC3484.3080802@comcast.net> <17116.25843.995725.573251@monster.linux.in> <42DCFF08.8080009@comcast.net> <17117.1818.255431.651027@monster.linux.in> <42DD1C99.2050304@comcast.net> <17117.9270.71761.672915@monster.linux.in> <42DD284E.30909@comcast.net> <17118.21066.736872.354282@monster.linux.in> Message-ID: <42DE54B9.6000208@comcast.net> Thanks again. Running Ipython without any switches gets rid of that error. I normally run Ipython with the -pylab switch for 2d plotting. It would be great not to have to run seperate sessions for 2d and 3d visualization. Is there any way we can make this work with the -pylab switch? Thanks, Ryan Prabhu Ramachandran wrote: >>>>>>"Ryan" == Ryan Krauss writes: >>>>>> >>>>>> > > Ryan> Alright, we are getting close. I added C:\Python23\scripts > Ryan> to the windows path and moved the dll there (I don't think > Ryan> it was already there), and now tesk_vtk finishes correctly. >[...] > Ryan> v.Render() # Re-render the scene. > Ryan> (Aftter running the preceding portion to generate the data.) > > Ryan> The visualization pops up but so does an error message that > Ryan> says: ERROR: In > Ryan> C:\aap\src\VTK\Rendering\vtkWin32OpenGLRenderWindow.cxx, > Ryan> line 216 vtkWin32OpenGLRenderWindow (0x06592F70): > Ryan> wglMakeCurrent failed in MakeCurrent(), error: The requested > Ryan> resource is in use. > >Great, atleast we have something that atleast displays something on >screen. I've never seen this error but think I've seen similar >messages on the VTK mailing list a while back. > >How exactly did you run the example? Did you use IPython or IDLE or >the vanilla interpreter? It looks like a threading issue. > > Ryan> I was getting this same error last night at home. I had > Ryan> installed EntoughtPython and the above example worked out of > Ryan> the box. But as soon as I updated either Ipython or > Ryan> Matplotlib to the current versions, I started getting the > Ryan> above error. > >If you are using IPython, Enthought's IPython icon starts ipython as >ipython -wthread -p enthought or something like that. MayaVi is a >Tkinter application and does not work too well with ipython -wthread >(even with the -tk option). SO try running Ipython as is without any >extra options and see if that helps. > > Ryan> Thanks again for your help Prabhu. I think we are getting > Ryan> close. > >Yes, I'll try and create a new ZIP file and fix the >vtkRenderingPythonTkWidgets issue this weekend. I am not sure why you >get the wglMakeCurrent error. > >cheers, >prabhu > > >_______________________________________________ >SciPy-user mailing list >SciPy-user at scipy.net >http://www.scipy.net/mailman/listinfo/scipy-user > > > From zelakiew at crd.ge.com Wed Jul 20 10:11:14 2005 From: zelakiew at crd.ge.com (Zelakiewicz, Scott (Research)) Date: Wed, 20 Jul 2005 10:11:14 -0400 Subject: [SciPy-user] Scipy and freeze.py Message-ID: I am trying to use freeze.py to make a binary executable using scipy_3.2 on a Linux box using gcc3.2 and Python 2.4. After I compile and try to run the binary I get the following error: from scipy.io import numpyio File "/home/zelakiew/emperor/lib/python/scipy/__init__.py", line 11, in ? from scipy_base import * File "/home/zelakiew/emperor/lib/python/scipy_base/__init__.py", line 16, in ? import fastumath # no need to use scipy_base.fastumath ImportError: No module named fastumath I have found lots of talk about py2exe but nothing about freeze. Has anyone got this to work? Thanks, Scott. From p.schnizer at gsi.de Wed Jul 20 11:39:22 2005 From: p.schnizer at gsi.de (Pierre SCHNIZER) Date: Wed, 20 Jul 2005 17:39:22 +0200 Subject: [SciPy-user] Logarithm of the determinant In-Reply-To: References: <42D6B33B.5050103@colorado.edu> Message-ID: <42DE702A.8000205@gsi.de> >> Nils Wagner wrote: >> >>> Hi all, >>> >>> The GSL library has a function >>> gsl_linalg_LU_lndet and gsl_linalg_complex_LU_lndet. >> >> >> [...] >> >> > Sorry I am a user not a developer. > > Nils > If the GPL license is okay for you It is covered by the linalg module in pygsl: http://pygsl.sf.net Pierre From Fernando.Perez at colorado.edu Wed Jul 20 12:07:17 2005 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Wed, 20 Jul 2005 10:07:17 -0600 Subject: [SciPy-user] Re: Enthought python In-Reply-To: <42DE54B9.6000208@comcast.net> References: <42D91FC3.2020001@comcast.net> <1121676222.24543.3.camel@bryan.teraview.local> <17115.54772.288161.241596@monster.linux.in> <42DC3484.3080802@comcast.net> <17116.25843.995725.573251@monster.linux.in> <42DCFF08.8080009@comcast.net> <17117.1818.255431.651027@monster.linux.in> <42DD1C99.2050304@comcast.net> <17117.9270.71761.672915@monster.linux.in> <42DD284E.30909@comcast.net> <17118.21066.736872.354282@monster.linux.in> <42DE54B9.6000208@comcast.net> Message-ID: <42DE76B5.5040903@colorado.edu> Ryan Krauss wrote: > Thanks again. Running Ipython without any switches gets rid of that error. > > I normally run Ipython with the -pylab switch for 2d plotting. It would > be great not to have to run seperate sessions for 2d and 3d > visualization. Is there any way we can make this work with the -pylab > switch? The problem is that mayavi is a Tk app, and you probably have GTK, WX or Qt as your pylab backend. That means conflicting thread models (unless you are in debian, where the libs have enough thread support that ipython can make them all dance together). When you use -pylab, ipython will magically configure its threading model to match your ~/.matplotlibrc choice. But when you run mayavi, you'll have problems. The easiest solution (which is what I use, given that I need both matplotlib and mayavi) is to run matplotlib with the TkAgg backend as your default. In that case you gain: - no threading conflicts of any kind (everything is Tk) - the ability to stop a long computation via Ctrl-C. This can't be done with any of the other backends, because the code and the interface have to run in different threads and there is no way in python to send signals across threads. Cheers, f From ryanfedora at comcast.net Wed Jul 20 12:20:20 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Wed, 20 Jul 2005 12:20:20 -0400 Subject: [SciPy-user] Re: Enthought python In-Reply-To: <42DE76B5.5040903@colorado.edu> References: <42D91FC3.2020001@comcast.net> <1121676222.24543.3.camel@bryan.teraview.local> <17115.54772.288161.241596@monster.linux.in> <42DC3484.3080802@comcast.net> <17116.25843.995725.573251@monster.linux.in> <42DCFF08.8080009@comcast.net> <17117.1818.255431.651027@monster.linux.in> <42DD1C99.2050304@comcast.net> <17117.9270.71761.672915@monster.linux.in> <42DD284E.30909@comcast.net> <17118.21066.736872.354282@monster.linux.in> <42DE54B9.6000208@comcast.net> <42DE76B5.5040903@colorado.edu> Message-ID: <42DE79C4.5@comcast.net> Fernando's suggestion works quite well and I can run mayavi and matplotlib in the same session with the TkAgg backend. I was using the WXAgg backend as my default for matplotlib because the TkAgg seems to chew up a lot more ram (I am running Windows XP) and is slightly slower when calling show(). Thanks to Fernando and Prabhu for getting me through this. Ryan Fernando Perez wrote: > Ryan Krauss wrote: > >> Thanks again. Running Ipython without any switches gets rid of that >> error. >> >> I normally run Ipython with the -pylab switch for 2d plotting. It >> would be great not to have to run seperate sessions for 2d and 3d >> visualization. Is there any way we can make this work with the >> -pylab switch? > > > The problem is that mayavi is a Tk app, and you probably have GTK, WX > or Qt as your pylab backend. That means conflicting thread models > (unless you are in debian, where the libs have enough thread support > that ipython can make them all dance together). > > When you use -pylab, ipython will magically configure its threading > model to match your ~/.matplotlibrc choice. But when you run mayavi, > you'll have problems. The easiest solution (which is what I use, > given that I need both matplotlib and mayavi) is to run matplotlib > with the TkAgg backend as your default. In that case you gain: > > - no threading conflicts of any kind (everything is Tk) > > - the ability to stop a long computation via Ctrl-C. This can't be > done with any of the other backends, because the code and the > interface have to run in different threads and there is no way in > python to send signals across threads. > > Cheers, > > f > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From Fernando.Perez at colorado.edu Wed Jul 20 12:25:12 2005 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Wed, 20 Jul 2005 10:25:12 -0600 Subject: [SciPy-user] Re: Enthought python In-Reply-To: <42DE79C4.5@comcast.net> References: <42D91FC3.2020001@comcast.net> <1121676222.24543.3.camel@bryan.teraview.local> <17115.54772.288161.241596@monster.linux.in> <42DC3484.3080802@comcast.net> <17116.25843.995725.573251@monster.linux.in> <42DCFF08.8080009@comcast.net> <17117.1818.255431.651027@monster.linux.in> <42DD1C99.2050304@comcast.net> <17117.9270.71761.672915@monster.linux.in> <42DD284E.30909@comcast.net> <17118.21066.736872.354282@monster.linux.in> <42DE54B9.6000208@comcast.net> <42DE76B5.5040903@colorado.edu> <42DE79C4.5@comcast.net> Message-ID: <42DE7AE8.3030005@colorado.edu> Ryan Krauss wrote: > Fernando's suggestion works quite well and I can run mayavi and > matplotlib in the same session with the TkAgg backend. I was using the > WXAgg backend as my default for matplotlib because the TkAgg seems to > chew up a lot more ram (I am running Windows XP) and is slightly slower > when calling show(). You can TRY the following: ipython -pylab -tk with the WXAgg backend. I doubt it will work, as the only person to ever report it working is Prabhu, and I'm 50/50 on whether it's debian's good threading lib support, or some dark powers granted to him by the python gods for having written mayavi. In Fedora, this always causes a crash, but in the odd chance it might work for WinXP, this would solve your problems and let you keep WX. If not, stick to TkAgg and be happy :) Cheers, f From ryanfedora at comcast.net Wed Jul 20 12:34:21 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Wed, 20 Jul 2005 12:34:21 -0400 Subject: [SciPy-user] Re: Enthought python In-Reply-To: <42DE7AE8.3030005@colorado.edu> References: <42D91FC3.2020001@comcast.net> <1121676222.24543.3.camel@bryan.teraview.local> <17115.54772.288161.241596@monster.linux.in> <42DC3484.3080802@comcast.net> <17116.25843.995725.573251@monster.linux.in> <42DCFF08.8080009@comcast.net> <17117.1818.255431.651027@monster.linux.in> <42DD1C99.2050304@comcast.net> <17117.9270.71761.672915@monster.linux.in> <42DD284E.30909@comcast.net> <17118.21066.736872.354282@monster.linux.in> <42DE54B9.6000208@comcast.net> <42DE76B5.5040903@colorado.edu> <42DE79C4.5@comcast.net> <42DE7AE8.3030005@colorado.edu> Message-ID: <42DE7D0D.3060503@comcast.net> -pylab -tk didn't work. I ran a script first that did 2D plotting with matplotlib and that worked o.k. But a script that starts mayavi caused a crash. I will use the TkAgg backend and be happy. Fernando Perez wrote: > Ryan Krauss wrote: > >> Fernando's suggestion works quite well and I can run mayavi and >> matplotlib in the same session with the TkAgg backend. I was using >> the WXAgg backend as my default for matplotlib because the TkAgg >> seems to chew up a lot more ram (I am running Windows XP) and is >> slightly slower when calling show(). > > > You can TRY the following: > > ipython -pylab -tk > > with the WXAgg backend. I doubt it will work, as the only person to > ever report it working is Prabhu, and I'm 50/50 on whether it's > debian's good threading lib support, or some dark powers granted to > him by the python gods for having written mayavi. > > In Fedora, this always causes a crash, but in the odd chance it might > work for WinXP, this would solve your problems and let you keep WX. > > If not, stick to TkAgg and be happy :) > > Cheers, > > f > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From aisaac at american.edu Wed Jul 20 12:54:44 2005 From: aisaac at american.edu (Alan G Isaac) Date: Wed, 20 Jul 2005 12:54:44 -0400 Subject: [SciPy-user] Re: Enthought python In-Reply-To: <42DE7D0D.3060503@comcast.net> References: <42D91FC3.2020001@comcast.net><1121676222.24543.3.camel@bryan.teraview.local><17115.54772.288161.241596@monster.linux.in> <42DC3484.3080802@comcast.net><17116.25843.995725.573251@monster.linux.in> <42DCFF08.8080009@comcast.net><17117.1818.255431.651027@monster.linux.in> <42DD1C99.2050304@comcast.net><17117.9270.71761.672915@monster.linux.in> <42DD284E.30909@comcast.net><17118.21066.736872.354282@monster.linux.in> <42DE54B9.6000208@comcast.net><42DE76B5.5040903@colorado.edu> <42DE79C4.5@comcast.net><42DE7AE8.3030005@colorado.edu><42DE7D0D.3060503@comcast.net> Message-ID: On Wed, 20 Jul 2005, Ryan Krauss apparently wrote: > I will use the TkAgg backend and be happy. Can you please post a summary of your experience getting MayaVi to work? Sort of a step by step guide of how to do it right? Thank you, Alan Isaac From ryanfedora at comcast.net Wed Jul 20 13:06:19 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Wed, 20 Jul 2005 13:06:19 -0400 Subject: [SciPy-user] Re: Enthought python In-Reply-To: References: <42D91FC3.2020001@comcast.net><1121676222.24543.3.camel@bryan.teraview.local><17115.54772.288161.241596@monster.linux.in> <42DC3484.3080802@comcast.net><17116.25843.995725.573251@monster.linux.in> <42DCFF08.8080009@comcast.net><17117.1818.255431.651027@monster.linux.in> <42DD1C99.2050304@comcast.net><17117.9270.71761.672915@monster.linux.in> <42DD284E.30909@comcast.net><17118.21066.736872.354282@monster.linux.in> <42DE54B9.6000208@comcast.net><42DE76B5.5040903@colorado.edu> <42DE79C4.5@comcast.net><42DE7AE8.3030005@colorado.edu><42DE7D0D.3060503@comcast.net> Message-ID: <42DE848B.4000600@comcast.net> An HTML attachment was scrubbed... URL: From prabhu_r at users.sf.net Wed Jul 20 13:28:12 2005 From: prabhu_r at users.sf.net (Prabhu Ramachandran) Date: Wed, 20 Jul 2005 22:58:12 +0530 Subject: [SciPy-user] Re: Enthought python In-Reply-To: <42DE7AE8.3030005@colorado.edu> References: <42D91FC3.2020001@comcast.net> <1121676222.24543.3.camel@bryan.teraview.local> <17115.54772.288161.241596@monster.linux.in> <42DC3484.3080802@comcast.net> <17116.25843.995725.573251@monster.linux.in> <42DCFF08.8080009@comcast.net> <17117.1818.255431.651027@monster.linux.in> <42DD1C99.2050304@comcast.net> <17117.9270.71761.672915@monster.linux.in> <42DD284E.30909@comcast.net> <17118.21066.736872.354282@monster.linux.in> <42DE54B9.6000208@comcast.net> <42DE76B5.5040903@colorado.edu> <42DE79C4.5@comcast.net> <42DE7AE8.3030005@colorado.edu> Message-ID: <17118.35244.517734.463096@monster.linux.in> >>>>> "Fernando" == Fernando Perez writes: Fernando> with the WXAgg backend. I doubt it will work, as the Fernando> only person to ever report it working is Prabhu, and I'm Fernando> 50/50 on whether it's debian's good threading lib Fernando> support, or some dark powers granted to him by the Fernando> python gods for having written mayavi. I can assure you there are no dark powers granting me special powers over threading issues. :) I actually can't get -wthread and -tk working with mayavi under XP. Under Debian, it works. Yet another reason why everyone should use Debian... :-D Fernando> If not, stick to TkAgg and be happy :) Probably the best bet for now. cheers, prabhu From ryanfedora at comcast.net Wed Jul 20 14:47:52 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Wed, 20 Jul 2005 14:47:52 -0400 Subject: [SciPy-user] Re: Enthought python In-Reply-To: References: <42D91FC3.2020001@comcast.net><1121676222.24543.3.camel@bryan.teraview.local><17115.54772.288161.241596@monster.linux.in> <42DC3484.3080802@comcast.net><17116.25843.995725.573251@monster.linux.in> <42DCFF08.8080009@comcast.net><17117.1818.255431.651027@monster.linux.in> <42DD1C99.2050304@comcast.net><17117.9270.71761.672915@monster.linux.in> <42DD284E.30909@comcast.net><17118.21066.736872.354282@monster.linux.in> <42DE54B9.6000208@comcast.net><42DE76B5.5040903@colorado.edu> <42DE79C4.5@comcast.net><42DE7AE8.3030005@colorado.edu><42DE7D0D.3060503@comcast.net> Message-ID: <42DE9C58.4090303@comcast.net> An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: maya_datagen.py Type: text/x-python Size: 522 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: maya_vis.py Type: text/x-python Size: 575 bytes Desc: not available URL: From ryanfedora at comcast.net Wed Jul 20 15:13:21 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Wed, 20 Jul 2005 15:13:21 -0400 Subject: [SciPy-user] Re: Enthought python Message-ID: <42DEA251.9060401@comcast.net> (I am resubmitting this without HTML for the sake of cleaner archives. I have scipy-users in my address book as preferring plain-text, but apparently having Alan Isaac listed as the first recipient screwed this up. I am developing a reputation for being an HTML posting stooge.) Steps for installing mayavi (with Python interactivity) in Windows XP and compatible with matplotlib I am starting with a computer that does not have a Python installation, so I will completely document everything I do. Assumptions (initial steps) 1. Python 2.3.5 is installed 2. Numeric is installed (I am using 23.8 from http://sourceforge.net/project/showfiles.php?group_id=1369) 3. SciPy 0.3.2 is installed (SciPy_complete-0.3.2-win32-py2.3-num23.5.exe or P4 or PIII binary from www.scipy.org/download 4. Ipython is installed (I am using 0.5.16.win32.exe from ipython.scipy.org/dist 5. matplotlib is installed (I am using 0.83.1 from http://matplotlib.sourceforge.net/ following the download link on the left hand side -> http://sourceforge.net/project/showfiles.php?group_id=80706&package_id=82474&release_id=340606) Mayavi specific installation 1. Download VTK-Python-4.4.zip from http://mayavi.sourceforge.net/dwnld/vtk/win32/ 2. Unzip VTK-Python-4.4.zip into C:\Python23 3. Added C:\Python23\Scripts to you windows path variable 4. There is a file in C:\Python\Scripts that appears to be incorrectly named: vtkRenderingPythonTkWidgets1.dll rename it by deleting the 1 (i.e. vtkRenderingPythonTkWidgets.dll) 5. Download the mayavi source tarball and unzip it anywhere (Download MayaVi-1.4.tar.gz from http://sourceforge.net/project/showfiles.php?group_id=27020&release_id=301941) 6. open a command prompt in the directory where you unzipped the mayavi source and type "python setup.py install" (assuming C:\python23 is in your windows path) 7. You will probably also want pyVTK to generate date in vtk formats: http://cens.ioc.ee/projects/pyvtk/ download, unzip the tarball and run python setup.py install 8. If you want to use matplotlib and mayavi in the same session, you must set you matplotlibrc file to use the TkAgg backend (unless you are running Debian) 9. Launch Ipython with the -pylab or -tk flags (or both on Debian) 10. Run that attached scripts from within Ipython for testing. You should be in business. Attached are two test scripts stolen from the online mayavi manual. maya_datagen uses pyvtk to create a data file called test.vtk. maya_vis uses mayavi to visualize the data in test.vtk. If someone else running win32 could try these and reply to the list that would be great. It would be great to post instructions tested by more than just me. Ryan From harkal at sylphis3d.com Wed Jul 20 16:51:51 2005 From: harkal at sylphis3d.com (Harry Kalogirou) Date: Wed, 20 Jul 2005 23:51:51 +0300 Subject: [SciPy-user] RQ Decomposition In-Reply-To: References: <1121862744.3586.5.camel@cool> <42DE48E3.1080002@mecha.uni-stuttgart.de> <42DE4BC6.8090304@mecha.uni-stuttgart.de> <42DE4EB7.3080800@mecha.uni-stuttgart.de> Message-ID: <1121892711.9828.1.camel@cool> I would be glad to contribute, but is there a document on what is needed to wrap new functions? What is involved? Harry ???? 20-07-2005, ????? ???, ??? ??? 07:27 -0500, ?/? Pearu Peterson ??????: > > On Wed, 20 Jul 2005, Nils Wagner wrote: > > > Ryan Krauss wrote: > > > >> I didn't know they were different. A list of scipy.linalg.lapack.flapack > >> includes scipy.linalg.lapack.flapack.dgeqrf but no dgerqf. Maybe it was > >> left out. > >> > > Pearu, > > > > Is there any special reason why flapack is "incomplete" ? > > No, there isn't. Patches with unittests to complete flapack are welcome. > Note that scipy.lib.lapack.flapack will be replace > scipy.linalg.lapack.flapack in future. scipy.lib.lapack .pyf.src files > document which lapack routines are wrapped and which are not. > > Pearu > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user -- ___ ___ |___|--|arry |___| References: Message-ID: <42DECAA2.5000206@telus.net> Try McMillan's Installer. Works for me every time. I've had mixed results with other similar packages like py2exe. Dave Zelakiewicz, Scott (Research) wrote: >I am trying to use freeze.py to make a binary executable using scipy_3.2 on a Linux box using gcc3.2 and Python 2.4. After I compile and try to run the binary I get the following error: > > from scipy.io import numpyio > File "/home/zelakiew/emperor/lib/python/scipy/__init__.py", line 11, in ? > from scipy_base import * > File "/home/zelakiew/emperor/lib/python/scipy_base/__init__.py", line 16, in ? > import fastumath # no need to use scipy_base.fastumath >ImportError: No module named fastumath > >I have found lots of talk about py2exe but nothing about freeze. Has anyone got this to work? > > From haase at msg.ucsf.edu Wed Jul 20 19:53:01 2005 From: haase at msg.ucsf.edu (Sebastian Haase) Date: Wed, 20 Jul 2005 16:53:01 -0700 Subject: [SciPy-user] scipy for win32 and python2.4 - howto ... Message-ID: <200507201653.01722.haase@msg.ucsf.edu> Hi, I was ready to build scipy for windows with python2.4 ... I have got the (now free!) Microsoft compiler VC7. I have been using it for a month or so on a couple of projects. I did the necessary tweaking for distutil. BUT: 1) before I can even start: "setup.py build" complains about many things nor being available: 1a) I think I can ignore fftw - for now ... 1b) I downloaded the ATLAS source - but that seems to be "tricky" (seems to be meant more for linux) ==> I thought for the py24 build one should be able to just reuse whatever was done for py23 - ATLAS and LAPACK and BLAS - right ? Can someone make those available ? 1c) f2py ... is that available as binary ? 2) Really I'm mostly (only) in need of the plt module (for now). Is there an easier way in this case ? I read that the free (optimizing!) MS compiler is now generally preferred over the cygwin/mingw solution - supposedly better performance... Further info is here ("Python 2.4 Extensions w/ the MS Toolkit Compiler" http://www.vrplumber.com/programming/mstoolkit/) Thanks, Sebastian Haase From rkern at ucsd.edu Wed Jul 20 19:59:30 2005 From: rkern at ucsd.edu (Robert Kern) Date: Wed, 20 Jul 2005 16:59:30 -0700 Subject: [SciPy-user] scipy for win32 and python2.4 - howto ... In-Reply-To: <200507201653.01722.haase@msg.ucsf.edu> References: <200507201653.01722.haase@msg.ucsf.edu> Message-ID: <42DEE562.9090208@ucsd.edu> Sebastian Haase wrote: > Hi, > I was ready to build scipy for windows with python2.4 ... > I have got the (now free!) Microsoft compiler VC7. I have been using it for a > month or so on a couple of projects. I did the necessary tweaking for > distutil. What FORTRAN compiler do you intend to use? > BUT: > 1) before I can even start: "setup.py build" complains about many things nor > being available: > 1a) I think I can ignore fftw - for now ... > 1b) I downloaded the ATLAS source - but that seems to be "tricky" (seems to > be meant more for linux) ==> I thought for the py24 build one should be able > to just reuse whatever was done for py23 - ATLAS and LAPACK and BLAS - > right ? Can someone make those available ? http://www.scipy.org/download/atlasbinaries/ > 1c) f2py ... is that available as binary ? It is pure Python. > 2) Really I'm mostly (only) in need of the plt module (for now). Is there an > easier way in this case ? Possibly, but plt, gplt and xplt are deprecated. It is suggested that you use matplotlib instead. -- 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 haase at msg.ucsf.edu Wed Jul 20 20:21:12 2005 From: haase at msg.ucsf.edu (Sebastian Haase) Date: Wed, 20 Jul 2005 17:21:12 -0700 Subject: [SciPy-user] scipy for win32 and python2.4 - howto ... In-Reply-To: <42DEE562.9090208@ucsd.edu> References: <200507201653.01722.haase@msg.ucsf.edu> <42DEE562.9090208@ucsd.edu> Message-ID: <200507201721.12729.haase@msg.ucsf.edu> On Wednesday 20 July 2005 16:59, Robert Kern wrote: > Sebastian Haase wrote: > > Hi, > > I was ready to build scipy for windows with python2.4 ... > > I have got the (now free!) Microsoft compiler VC7. I have been using it > > for a month or so on a couple of projects. I did the necessary tweaking > > for distutil. > > What FORTRAN compiler do you intend to use? > Good point ;-) Does that mean that cygwin/MINGW is then really the only choice ? > > BUT: > > 1) before I can even start: "setup.py build" complains about many things > > nor being available: > > 1a) I think I can ignore fftw - for now ... > > 1b) I downloaded the ATLAS source - but that seems to be "tricky" > > (seems to be meant more for linux) ==> I thought for the py24 build one > > should be able to just reuse whatever was done for py23 - ATLAS and > > LAPACK and BLAS - right ? Can someone make those available ? > > http://www.scipy.org/download/atlasbinaries/ > I'll take a look - thanks. > > 1c) f2py ... is that available as binary ? > > It is pure Python. > > > 2) Really I'm mostly (only) in need of the plt module (for now). Is > > there an easier way in this case ? > > Possibly, but plt, gplt and xplt are deprecated. It is suggested that > you use matplotlib instead. I know about matplotlib. I thought it would be quite a "big" thing to use for "just a graph". I'm using wx which still seems to be matplotlib's weakest platform. I really don't need "publication quality" plots. I would rather want to look into wxPyPlot again. That one is VERY fast and quite thin. Is matplotlib not getting to heavy for "really simple" plotting ? Thanks, Sebastian From rkern at ucsd.edu Wed Jul 20 21:02:29 2005 From: rkern at ucsd.edu (Robert Kern) Date: Wed, 20 Jul 2005 18:02:29 -0700 Subject: [SciPy-user] scipy for win32 and python2.4 - howto ... In-Reply-To: <200507201721.12729.haase@msg.ucsf.edu> References: <200507201653.01722.haase@msg.ucsf.edu> <42DEE562.9090208@ucsd.edu> <200507201721.12729.haase@msg.ucsf.edu> Message-ID: <42DEF425.50209@ucsd.edu> Sebastian Haase wrote: > On Wednesday 20 July 2005 16:59, Robert Kern wrote: > >>Sebastian Haase wrote: >> >>>Hi, >>>I was ready to build scipy for windows with python2.4 ... >>>I have got the (now free!) Microsoft compiler VC7. I have been using it >>>for a month or so on a couple of projects. I did the necessary tweaking >>>for distutil. >> >>What FORTRAN compiler do you intend to use? > > Good point ;-) Does that mean that cygwin/MINGW is then really the only > choice ? It's entirely possible. >>>2) Really I'm mostly (only) in need of the plt module (for now). Is >>>there an easier way in this case ? >> >>Possibly, but plt, gplt and xplt are deprecated. It is suggested that >>you use matplotlib instead. > > I know about matplotlib. I thought it would be quite a "big" thing to use for > "just a graph". I'm using wx which still seems to be matplotlib's weakest > platform. For "just a graph," there really aren't any differences in "strength" of the major GUI platforms. They all use AGG underneath. Embedding in a GUI app is something else, but you don't seem to be interested in that. > I really don't need "publication quality" plots. I would rather > want to look into wxPyPlot again. That one is VERY fast and quite thin. > Is matplotlib not getting to heavy for "really simple" plotting ? It depends on how slow is too slow for you. Since it is distributed as a binary on Windows, it should be easy enough to try. Easier than, say, trying to extract plt from scipy. -- 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 prabhu_r at users.sf.net Wed Jul 20 22:34:35 2005 From: prabhu_r at users.sf.net (Prabhu Ramachandran) Date: Thu, 21 Jul 2005 08:04:35 +0530 Subject: [SciPy-user] Re: Enthought python In-Reply-To: <42DEA251.9060401@comcast.net> References: <42DEA251.9060401@comcast.net> Message-ID: <17119.2491.462585.820154@monster.linux.in> >>>>> "Ryan" == Ryan Krauss writes: Ryan> Mayavi specific installation Ryan> 1. Download VTK-Python-4.4.zip from Ryan> http://mayavi.sourceforge.net/dwnld/vtk/win32/ Ryan> 2. Unzip VTK-Python-4.4.zip into C:\Python23 Ryan> 3. Added C:\Python23\Scripts to you windows path variable Ryan> 4. There is a file in C:\Python\Scripts that appears to be Ryan> incorrectly named: Ryan> vtkRenderingPythonTkWidgets1.dll rename it by deleting the 1 Ryan> (i.e. vtkRenderingPythonTkWidgets.dll) Just FYI, thanks to Ryan's patient testing, I've fixed the ZIP file and uploaded it to the SF site. So if you download the latest version you will not need to rename the file. cheers, prabhu From prabhu_r at users.sf.net Thu Jul 21 10:24:06 2005 From: prabhu_r at users.sf.net (Prabhu Ramachandran) Date: Thu, 21 Jul 2005 19:54:06 +0530 Subject: [SciPy-user] Re: Enthought python In-Reply-To: <42DEA251.9060401@comcast.net> References: <42DEA251.9060401@comcast.net> Message-ID: <17119.45062.795024.523414@monster.linux.in> >>>>> "Ryan" == Ryan Krauss writes: Ryan> (I am resubmitting this without HTML for the sake of cleaner Ryan> archives. I have scipy-users in my address book as Ryan> preferring plain-text, but apparently having Alan Isaac Ryan> listed as the first recipient screwed this up. I am Ryan> developing a reputation for being an HTML posting stooge.) Ryan> Steps for installing mayavi (with Python interactivity) in Ryan> Windows XP and compatible with matplotlib FWIW, I've added a rough version of this to the MayaVi wiki. http://mayavi.sourceforge.net/cgi-bin/moin.cgi/InstallVTKPythonOnWin32 If you'd like to edit it you'll need a login and will have to let me know so I can add you to the trusted group. cheers, prabhu From zelakiew at crd.ge.com Thu Jul 21 13:08:39 2005 From: zelakiew at crd.ge.com (Zelakiewicz, Scott (Research)) Date: Thu, 21 Jul 2005 13:08:39 -0400 Subject: [SciPy-user] Scipy and freeze.py Message-ID: I have google'd around and all the sites I found to download Installer are no longer active. Do you kow where I can grab McMillan's Installer from? Thanks, Scott. From wjdandreta at att.net Thu Jul 21 14:22:46 2005 From: wjdandreta at att.net (Bill Dandreta) Date: Thu, 21 Jul 2005 14:22:46 -0400 Subject: [SciPy-user] Scipy and freeze.py In-Reply-To: References: Message-ID: <42DFE7F6.1000500@att.net> http://davidf.sjsoft.com/mirrors/mcmillan-inc/installer_dnld.html Zelakiewicz, Scott (Research) wrote: >I have google'd around and all the sites I found to download Installer >are no longer active. Do you kow where I can grab McMillan's Installer from? > >Thanks, >Scott. > >_______________________________________________ >SciPy-user mailing list >SciPy-user at scipy.net >http://www.scipy.net/mailman/listinfo/scipy-user > > > From eric at enthought.com Thu Jul 21 11:40:55 2005 From: eric at enthought.com (eric jones) Date: Thu, 21 Jul 2005 10:40:55 -0500 Subject: [SciPy-user] 2D interpolation from a set of irregularly spaced In-Reply-To: <42DD26D1.6020601@obs.univ-lyon1.fr> References: <42DD26D1.6020601@obs.univ-lyon1.fr> Message-ID: <42DFC207.1020003@enthought.com> Hey Eric, We recently wrapped toms 526: Algorithm 526: Bivariate Interpolation and Smooth Surface Fitting for Irregularly Distributed Data Points It is available here: http://www.netlib.no/netlib/toms/526 Algorithm paper info here: http://portal.acm.org/citation.cfm?id=355787 The wrapper is "good enough" for what we needed, but hasn't gotten the attention it needs to go into SciPy yet. So, I've attached the code as a zip file. If you are on windows, the binaries are included for you. Otherwise, run setup.py. Here is what I usually do when testing: setup.py build_ext --inplace example2.py provides an example of using the algorithm. There is also a png file showing a plot of the results from example2.py. hope that helps, eric Eric Emsellem wrote: > Hi again, > Robert Kern provided me some input with a link to Scientific Python > (thanks!) > > ==> However this is again using an ORTHOGONAL GRID! > The set of points I am using are NOT on an orthogonal grid but are > RANDOMLY positioned points... > > So any idea on how to interpolate a set of randomly positioned x,y ?? > (so I have three 1D arrays: x, y for the positions, and z for the > values. I need to know z at other positions...) > > Thanks > > Eric > P.S.: please cc to my email too. > -------------- next part -------------- A non-text attachment was scrubbed... Name: interp.zip Type: application/x-zip-compressed Size: 134744 bytes Desc: not available URL: From nwagner at mecha.uni-stuttgart.de Fri Jul 22 05:09:56 2005 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Fri, 22 Jul 2005 11:09:56 +0200 Subject: [SciPy-user] Simulated annealing in scipy Message-ID: <42E0B7E4.8010905@mecha.uni-stuttgart.de> Hi all, I tried to find the smallest eigenvalue of a generalized eigenvalue problem K x = \lambda M x by minimizing the Rayleigh quotient R = x^T K x / x^T M x where K and M are symmetric positive definite. I have used optimize.anneal for this purpose (annealing.py for details). However, the simulated annealing algorithm doesn't terminate with the global optimal solution. But for what reason ? Any pointer would be appreciated. Regards, Nils -------------- next part -------------- A non-text attachment was scrubbed... Name: annealing.py Type: text/x-python Size: 537 bytes Desc: not available URL: From rkern at ucsd.edu Fri Jul 22 08:44:06 2005 From: rkern at ucsd.edu (Robert Kern) Date: Fri, 22 Jul 2005 05:44:06 -0700 Subject: [SciPy-user] Simulated annealing in scipy In-Reply-To: <42E0B7E4.8010905@mecha.uni-stuttgart.de> References: <42E0B7E4.8010905@mecha.uni-stuttgart.de> Message-ID: <42E0EA16.1060508@ucsd.edu> Nils Wagner wrote: > Hi all, > > I tried to find the smallest eigenvalue of a generalized > eigenvalue problem > > K x = \lambda M x > > by minimizing the Rayleigh quotient > > R = x^T K x / x^T M x > > where K and M are symmetric positive definite. > I have used optimize.anneal for this purpose (annealing.py for details). > However, the simulated annealing algorithm doesn't terminate with the > global optimal solution. > But for what reason ? Simulated annealing isn't perfect. It has quite a number of tweakable parameters. Finding the right values for those is something of an art. -- 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 Fri Jul 22 08:48:47 2005 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Fri, 22 Jul 2005 14:48:47 +0200 Subject: [SciPy-user] Simulated annealing in scipy In-Reply-To: <42E0EA16.1060508@ucsd.edu> References: <42E0B7E4.8010905@mecha.uni-stuttgart.de> <42E0EA16.1060508@ucsd.edu> Message-ID: <42E0EB2F.1080900@mecha.uni-stuttgart.de> Robert Kern wrote: > Nils Wagner wrote: > >> Hi all, >> >> I tried to find the smallest eigenvalue of a generalized >> eigenvalue problem >> >> K x = \lambda M x >> >> by minimizing the Rayleigh quotient >> >> R = x^T K x / x^T M x >> >> where K and M are symmetric positive definite. >> I have used optimize.anneal for this purpose (annealing.py for details). >> However, the simulated annealing algorithm doesn't terminate with the >> global optimal solution. >> But for what reason ? > > > Simulated annealing isn't perfect. It has quite a number of tweakable > parameters. Finding the right values for those is something of an art. > Do you think that genetic algorithms are an option for my task ? Nils From rkern at ucsd.edu Fri Jul 22 08:51:54 2005 From: rkern at ucsd.edu (Robert Kern) Date: Fri, 22 Jul 2005 05:51:54 -0700 Subject: [SciPy-user] Simulated annealing in scipy In-Reply-To: <42E0EB2F.1080900@mecha.uni-stuttgart.de> References: <42E0B7E4.8010905@mecha.uni-stuttgart.de> <42E0EA16.1060508@ucsd.edu> <42E0EB2F.1080900@mecha.uni-stuttgart.de> Message-ID: <42E0EBEA.2050506@ucsd.edu> Nils Wagner wrote: > Do you think that genetic algorithms are an option for my task ? I have not the slightest idea. -- 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 elcorto at gmx.net Fri Jul 22 10:59:06 2005 From: elcorto at gmx.net (Steve Schmerler) Date: Fri, 22 Jul 2005 16:59:06 +0200 Subject: [SciPy-user] Simulated annealing in scipy In-Reply-To: <42E0EB2F.1080900@mecha.uni-stuttgart.de> References: <42E0B7E4.8010905@mecha.uni-stuttgart.de> <42E0EA16.1060508@ucsd.edu> <42E0EB2F.1080900@mecha.uni-stuttgart.de> Message-ID: <42E109BA.7070108@gmx.net> Hi If you have an rather complicated parameter optimization problem (e.g. many local optima (minima in your case, find x which globally minimizes your R(x))) where you have to have a very good starting guess you won't get too far with the usual gradient based methods. You can use "Evolution Strategies". These are simmilar to GAs but are said to be more effective when it comes to continuous optimization because GAs work on the basis of binary gene representations. Some literature hints: http://www.tu-chemnitz.de/informatik/HomePages/ThIS/Seminare/ss02/ES/reichelt.pdf www.el-tec.de/lecture/040518block2.pdf Look at http://citeseer.ist.psu.edu for papers from T. B?ck, H.P. Schwefel (these guys did at lot of basic work related to ESs), e.g. http://citeseer.ist.psu.edu/schwefel95contemporary.html as well as http://citeseer.ist.psu.edu/yao97fast.html Like SA algorithms the work with ESs requires al lot of empirical testing with your specific problem to find the optimal settings for the algorithm (e.g. population size, recombination and selection operators etc.) Another downside is the computation time. I would suggest to write the whole thing in C or at least weave the bottlenecks. Good Luck :) cheers, steve Nils Wagner wrote: > Robert Kern wrote: > >> Nils Wagner wrote: >> >>> Hi all, >>> >>> I tried to find the smallest eigenvalue of a generalized >>> eigenvalue problem >>> >>> K x = \lambda M x >>> >>> by minimizing the Rayleigh quotient >>> >>> R = x^T K x / x^T M x >>> >>> where K and M are symmetric positive definite. >>> I have used optimize.anneal for this purpose (annealing.py for details). >>> However, the simulated annealing algorithm doesn't terminate with the >>> global optimal solution. >>> But for what reason ? >> >> >> >> Simulated annealing isn't perfect. It has quite a number of tweakable >> parameters. Finding the right values for those is something of an art. >> > Do you think that genetic algorithms are an option for my task ? > > Nils > > > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > > From eric at enthought.com Fri Jul 22 12:46:19 2005 From: eric at enthought.com (eric jones) Date: Fri, 22 Jul 2005 11:46:19 -0500 Subject: [SciPy-user] 2D interpolation from a set of irregularly spaced In-Reply-To: <42E0FC77.6030100@obs.univ-lyon1.fr> References: <42DD26D1.6020601@obs.univ-lyon1.fr> <42DFC207.1020003@enthought.com> <42E0FC77.6030100@obs.univ-lyon1.fr> Message-ID: <42E122DB.3000204@enthought.com> Eric Emsellem wrote: > wonderful; Seems to work fine!! > In fact in the meantime I had solved this problem by wrapping a > routine I had (trmesh) with SWIG... Yes, is toms algorithm 624. If 526 didn't work well for our needs, that was the next one on the list to try. :-) > However your implementation is quite nice since I can easily install > it in my python lib. 1 question for a naive python user: how do I > manage to include your interp.py in? At the moment it only created the > interp_526.so in my lib path so I can access that routine but not > interp2d for example (is it as simple as creating a dir "interp" and > putting it in the right place?) For this version of the code, I have set it up as a package named "interp." Hmmm. I just noticed the setup.py doesn't contain the package information in it. Here is a new setup.py file that installs everything as a package: #!/usr/bin/env python # setup.py from scipy_distutils.core import Extension def dot_join(*args): return '.'.join(args) package = 'interp' ext1 = Extension(name = dot_join(package,'interp_526'), sources = ['interp_526.pyf','interp_526.f']) if __name__ == "__main__": from scipy_distutils.core import setup setup(name = 'interp_526', package_dir = {package:''}, packages = [package], description = "Bivariate interpolation", author = "Eric Jones", author_email = "eric at enthought.com", ext_modules = [ext1] ) # file end When it is installed, it should become a directory in your python "site-packages" directory with three files in it: interp __init__.py interp.py interp_526.so Once this is installed correctly, you should be able to do the following: >>> from interp.interp import interp2d Now, this looks a little silly, but that is the configuration at the moment. Names and the organization of things will change to protect the innocent once it goes into SciPy. We should probably put 624 in when we everything to SciPy also. Also, looking at the toms list, http://www.netlib.no/netlib/toms/, there are a ton of methods that handle interpolation. Does anyone no of a survey or study that categorizes these in a convenient way? thanks, eric > > thanks again, > > Eric > > eric jones wrote: > >> Hey Eric, >> >> We recently wrapped toms 526: >> >> Algorithm 526: Bivariate Interpolation and Smooth Surface Fitting >> for Irregularly Distributed Data Points >> >> It is available here: >> http://www.netlib.no/netlib/toms/526 >> Algorithm paper info here: >> http://portal.acm.org/citation.cfm?id=355787 >> >> The wrapper is "good enough" for what we needed, but hasn't gotten >> the attention it needs to go into SciPy yet. So, I've attached the >> code as a zip file. If you are on windows, the binaries are included >> for you. Otherwise, run setup.py. >> Here is what I usually do when testing: setup.py build_ext --inplace >> >> example2.py provides an example of using the algorithm. >> There is also a png file showing a plot of the results from example2.py. >> >> hope that helps, >> eric >> >> Eric Emsellem wrote: >> >>> Hi again, >>> Robert Kern provided me some input with a link to Scientific Python >>> (thanks!) >>> >>> ==> However this is again using an ORTHOGONAL GRID! >>> The set of points I am using are NOT on an orthogonal grid but are >>> RANDOMLY positioned points... >>> >>> So any idea on how to interpolate a set of randomly positioned x,y ?? >>> (so I have three 1D arrays: x, y for the positions, and z for the >>> values. I need to know z at other positions...) >>> >>> Thanks >>> >>> Eric >>> P.S.: please cc to my email too. >>> >> > From david.grant at telus.net Fri Jul 22 16:49:11 2005 From: david.grant at telus.net (David Grant) Date: Fri, 22 Jul 2005 13:49:11 -0700 Subject: [SciPy-user] Scipy and freeze.py In-Reply-To: References: Message-ID: <42E15BC7.3080602@telus.net> Zelakiewicz, Scott (Research) wrote: >I have google'd around and all the sites I found to download Installer >are no longer active. Do you kow where I can grab McMillan's Installer from? > > > McMillan disapeared off the face of the earth a couple years ago... There are mirrors around, like that given by Bill Dandreta. Dave From joris at ster.kuleuven.ac.be Fri Jul 22 17:35:42 2005 From: joris at ster.kuleuven.ac.be (joris at ster.kuleuven.ac.be) Date: Fri, 22 Jul 2005 23:35:42 +0200 Subject: [SciPy-user] Simulated annealing in scipy Message-ID: <1122068142.42e166aed9e6c@webmail.ster.kuleuven.ac.be> Hi, An interesting alternative to GAs or SA for global optimization is the so-called Neighbourhood-algorithm: http://wwwrses.anu.edu.au/~malcolm/na/na.html Features of this algorithm are: - suitable for a multidimensional parameter space - derivative free - it only uses the rank of the function to be optimized (that is, no need to rescale your function to make it work) - only 2 control parameters - a theoretical framework to derive estimates of your model parameters, the covariance matrix, and even Bayesian posteriori PDFs, has been developed and implemented - well-documented - Fortran code is freely available upon request I've used this algorithm in the past, with success. Cheers, Joris From jeremy at jeremysanders.net Sat Jul 23 13:45:01 2005 From: jeremy at jeremysanders.net (Jeremy Sanders) Date: Sat, 23 Jul 2005 18:45:01 +0100 (BST) Subject: [SciPy-user] ANN: Veusz 0.7 - a scientific plotting package Message-ID: Veusz 0.7 --------- Velvet Ember Under Sky Zenith ----------------------------- http://home.gna.org/veusz/ Veusz is Copyright (C) 2003-2005 Jeremy Sanders Licenced under the GPL (version 2 or greater) Veusz is a scientific plotting package written in Python (currently 100% Python). It uses PyQt for display and user-interfaces, and numarray for handling the numeric data. Veusz is designed to produce publication-ready Postscript output. Veusz provides a GUI, command line and scripting interface (based on Python) to its plotting facilities. The plots are built using an object-based system to provide a consistent interface. Changes from 0.6: Please refer to ChangeLog for all the changes. Highlights include: * 2D image support * FITS file data import (1D + 2D) with PyFITS module * Support for line separated blocks of data when importing * Reversed axes supported * Key length option * Linked dataset reload UI * Plot functions over specific range * Several UI improvements Features of package: * X-Y plots (with errorbars) * Images (with colour mappings) * Stepped plots (for histograms) * Line plots * Function plots * Fitting functions to data * Stacked plots and arrays of plots * Plot keys * Plot labels * LaTeX-like formatting for text * EPS output * Simple data importing * Scripting interface * Save/Load plots * Dataset manipulation * Embed Veusz within other programs To be done: * Contour plots * UI improvements * Import filters (for qdp and other plotting packages, fits, csv) Requirements: Python (probably 2.3 or greater required) http://www.python.org/ Qt (free edition) http://www.trolltech.com/products/qt/ PyQt (SIP is required to be installed first) http://www.riverbankcomputing.co.uk/pyqt/ http://www.riverbankcomputing.co.uk/sip/ numarray http://www.stsci.edu/resources/software_hardware/numarray Microsoft Core Fonts (recommended) http://corefonts.sourceforge.net/ PyFITS (optional) http://www.stsci.edu/resources/software_hardware/pyfits For documentation on using Veusz, see the "Documents" directory. The manual is in pdf, html and text format (generated from docbook). If you enjoy using Veusz, I would love to hear from you. Please join the mailing lists at https://gna.org/mail/?group=veusz to discuss new features or if you'd like to contribute code. The newest code can always be found in CVS. If non GPL projects are interested in using Veusz code, please contact me. I am happy to consider relicencing code for other free projects, if I am legally allowed to do so. Cheers Jeremy From joe at enthought.com Sun Jul 24 20:38:10 2005 From: joe at enthought.com (Joe Cooper) Date: Sun, 24 Jul 2005 19:38:10 -0500 Subject: [SciPy-user] Another attempt at converting SciPy CVS to Subversion Message-ID: <42E43472.8000707@enthought.com> Hi all, Just a heads up: I'm shutting down access to the scipy CVS repository for a few minutes, as I'm going to give another go to converting to Subversion. It should return shortly. I will give more warning before the actual conversion takes place...which could be as soon as Monday, if testing goes well. From d.howey at imperial.ac.uk Mon Jul 25 08:00:11 2005 From: d.howey at imperial.ac.uk (Howey, David A) Date: Mon, 25 Jul 2005 13:00:11 +0100 Subject: [SciPy-user] Clarification Message-ID: <056D32E9B2D93B49B01256A88B3EB218766E6A@icex2.ic.ac.uk> Why didn't you just try gplt (for 3D) as well as matplotlib (for 2D)?!? See http://www.scipy.org/documentation/plottutorial.html/view?searchterm=gpl t Dave -----Original Message----- From: scipy-user-bounces at scipy.net [mailto:scipy-user-bounces at scipy.net] On Behalf Of Alan G Isaac Sent: 16 July 2005 22:47 To: SciPy Users List Subject: Re[2]: [SciPy-user] Clarification On Sat, 16 Jul 2005, Prabhu Ramachandran apparently wrote: > I think a more constructive thing to do would be to make prebuilt VTK > binaries available. I am a relatively new SciPy user. Here was my experience. 1. After some messing around, learn that I should use Matplotlib rather than *plt. 2. Learn that Matplotlib does not support 3D surface plots. 3. Learn that people are recommending MayaVi. 4. Go to MayaVi website and give thanks that there is a Win32 binary that "comes bundled with everything necessary to run MayaVi." (Of course this means that I read past the "recommendation" to install from sources ...) 5. Install the binary and discover, alas, that I did not get the pyvtk module with it. And test_vtk.py wants in addition a vtkpython module. Then I find this: "If you have installed MayaVi from the sources and are not using a binary release, then you can use MayaVi as a Python module." Aha. That is what that "recommendation" was about. Can we agree that "recommendation" at this point appears a bit understated? 6. Find nothing in the docs about how to add the module(s) to work with my MayaVi installation, except of course the recommendation to install from source. (Of course, despite the sanguine assessment on the MayaVi page, I recall the various warnings of others, plus I now feel "once burned".) 7. Give up and keep using gnuplot for now. If this sounds like a complaint, it is not. It is meant to be informational. Cheers, Alan Isaac _______________________________________________ SciPy-user mailing list SciPy-user at scipy.net http://www.scipy.net/mailman/listinfo/scipy-user From ckkart at hoc.net Mon Jul 25 08:41:26 2005 From: ckkart at hoc.net (Christian Kristukat) Date: Mon, 25 Jul 2005 14:41:26 +0200 Subject: [SciPy-user] 2D interpolation - displaying results Message-ID: <42E4DDF6.6020404@hoc.net> Hi, how can I display the results of a triangulation of unstructered data with matplotlib? The data from triangulation is still not on a regular grid. I have tried the bivariate interpolation which works quite well but I think my data will look nicer if passed through the triangulation as it is a regular grid (with very slight deviations, which could be ignored) rotated by 45 degrees. MayaVi does this quite nice but I'd prefer using matplotlib for the nice output. Regards, Christian From d.howey at imperial.ac.uk Mon Jul 25 09:16:43 2005 From: d.howey at imperial.ac.uk (Howey, David A) Date: Mon, 25 Jul 2005 14:16:43 +0100 Subject: [SciPy-user] Using external files in a simulation Message-ID: <056D32E9B2D93B49B01256A88B3EB218766E6E@icex2.ic.ac.uk> I'm about to embark on rewriting some code that I have in matlab, into python, with a number of improvements, and making good use of python's object-oriented approach. Before I start, however, I wondered if I could ask the advice of the list, as I'm sure you will have had experience with this sort of thing: As part of the simulation, I want to read in start up parameters (physical properties, initial + boundary conditions etc.) from an external text file (traditionally I suppose you might call this a '.dat' file). In matlab, I was just using a matlab script for this (ie just like a bit of the main program, but in another file, allowing easy changes for different simulations). I could do the same in python and just import the data based on a filename name entered by the user. Is this a good approach? It makes sense to keep it simple, although I was toying with the idea of using XML files for such data storage, to allow them to be manipulated by some other front/back end stuff. Seems a bit pointless to add unnecessary complexity at this stage, though. I'm not sure if I've put that across particularly clearly.. but.. any thoughts? Dave Ps. A slight subtlety is that in fact my simulation engine is modular to cope with lots of different system configurations and I actually need to store an arbitrary list of objects which are then solved in sequence for a bunch of unknowns. I need to represent this somehow in an external set up file as well. Aargh! From Jim.Vickroy at noaa.gov Mon Jul 25 09:55:30 2005 From: Jim.Vickroy at noaa.gov (Jim.Vickroy at noaa.gov) Date: Mon, 25 Jul 2005 07:55:30 -0600 Subject: [SciPy-user] Using external files in a simulation Message-ID: <29d57e5.7e529d5@noaa.gov> Hello David, In case you are not familiar with them, you might want to take a look at the following standard Python modules: ConfigParser csv optparse pickle I have used all of the above at one time or another (frequently in combination) to manage configuration information. -- jv ----- Original Message ----- From: "Howey, David A" Date: Monday, July 25, 2005 7:16 am Subject: [SciPy-user] Using external files in a simulation > I'm about to embark on rewriting some code that I have in matlab, into > python, with a number of improvements, and making good use of python's > object-oriented approach. Before I start, however, I wondered if I > couldask the advice of the list, as I'm sure you will have had > experiencewith this sort of thing: > As part of the simulation, I want to read in start up parameters > (physical properties, initial + boundary conditions etc.) from an > external text file (traditionally I suppose you might call this a > '.dat'file). In matlab, I was just using a matlab script for this > (ie just > like a bit of the main program, but in another file, allowing easy > changes for different simulations). I could do the same in python and > just import the data based on a filename name entered by the user. Is > this a good approach? It makes sense to keep it simple, although I was > toying with the idea of using XML files for such data storage, to > allowthem to be manipulated by some other front/back end stuff. > Seems a bit > pointless to add unnecessary complexity at this stage, though. > > I'm not sure if I've put that across particularly clearly.. but.. any > thoughts? > > Dave > > Ps. A slight subtlety is that in fact my simulation engine is > modular to > cope with lots of different system configurations and I actually > need to > store an arbitrary list of objects which are then solved in > sequence for > a bunch of unknowns. I need to represent this somehow in an > external set > up file as well. Aargh! > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From haase at msg.ucsf.edu Mon Jul 25 12:20:02 2005 From: haase at msg.ucsf.edu (Sebastian Haase) Date: Mon, 25 Jul 2005 09:20:02 -0700 Subject: [SciPy-user] Re: WxPyPlot In-Reply-To: <42E4B2CA.5030308@gmail.com> References: <42E4B2CA.5030308@gmail.com> Message-ID: <200507250920.02889.haase@msg.ucsf.edu> Hi Arie, Thanks for your comment. Is WxPyPlot being further developed ? (what are those other features you mention ??) I am actually using both in my code: WxPyPlot for regularly updating temperature graph plot, but I am using Plt for all other interactive things, mainly because it seems to me that WxPyPlot needs lot's more user set-up calls; e.g. In plt I just use plt.figure() to open a new plot window and also it already has a nice interactive (meaning: short) syntax for choosing colors and markers. The good news is that I decoupled Plt from scipy yesterday. I'm happy to post that version somewhere if that's OK with the scipy license. Cheers, Sebastian (Please note I cc'ed the list, because I always hope for other's comments ...) On Monday 25 July 2005 02:37, you wrote: > Hi, > I've seen your msgs on SciPy user mailing list, and I couldn't agree more. > > Anyway, wanted to inform you that WxPyPlot is a part of wx distribution > these days (renamed plot.py). > At win platform you might find it at: > C:\Python24\Lib\site-packages\wx-2.6-msw-unicode\wx\lib\plot.py > (or at some similar locatiotion of other wx version). > It has also acquired some extra features, but is still "light". > > Cheers, > Arie. From haase at msg.ucsf.edu Mon Jul 25 14:26:22 2005 From: haase at msg.ucsf.edu (Sebastian Haase) Date: Mon, 25 Jul 2005 11:26:22 -0700 Subject: [SciPy-user] Re: WxPyPlot In-Reply-To: <8B3E03343914D411A51000062938C7960DAC4655@golf.npl.co.uk> References: <8B3E03343914D411A51000062938C7960DAC4655@golf.npl.co.uk> Message-ID: <200507251126.23552.haase@msg.ucsf.edu> Hi Simon, I actually don't know what a 'stripchart' is; but in case it is what a EKG looks like then that's what I do: The right edge of my plot is alway "now" the left is "3h ago" and the graphs are shifting to the left as goes on and new data gets appended to the right. I only measure twice a minute ! But I understand that wxPyPlot should easily handle twice a second. The ugly part it in my code is the copying data for implementing the "shifting" - I suppose there is no nice "circular-array" thingy in numerical python: but this is only 5 lines of code anyway ... My whole module including setting up the window frame is not more then 100 lines! What are you data sources: Some custom hardware/C-code or does it come over the network, ... ? Generally wx-people say stay with 'events' and don't use threads just because "It looks like you could use threads for this" !! I would be curious if matplotlib could update twice a second. Because sometimes I actually would like to interact with the plots (like zooming and panning) and also nice plots would be great. WxPyPlot allows zooming and screenshots for printing is so far acceptable to us. Cheers, Sebastian Haase UCSF (Please note I cc'ed the list, because I always hope for other's comments ...) On Monday 25 July 2005 10:50, you wrote: > Sebastian > > "...regularly updating temperature graph plot..." sounds like the sort of > thing I'd like to do: would you describe your plot as like a stripchart? I > have in mind a monitoring program, with several sources of data, one thread > per source (each forwarding data, as they become available, to a shared > queue), and the stripchart (being part of the graphical interface, that'd > be in the main thread) collecting data from the queue and updating itself. > About twice a second, half a dozen data items, and (screen resolution > permitting) about 10 minutes' worth of recent data visible, in case that > helps. > > Sorry if that sounds a bit garbled, but I am trying to do a bit of > instrument reading/device control from python, and a stripchart would be a > real bonus. > > Cheers > Simon Duane > > PS - thanks for cc'ing the list! > > -----Original Message----- > From: Sebastian Haase > To: Arie S. > Cc: SciPy Users List > Sent: 7/25/05 5:20 PM > Subject: [SciPy-user] Re: WxPyPlot > > Hi Arie, > Thanks for your comment. Is WxPyPlot being further developed ? (what are > those > other features you mention ??) > I am actually using both in my code: > WxPyPlot for regularly updating temperature graph plot, > but I am using Plt for all other interactive things, mainly because it > seems > to me that WxPyPlot needs lot's more user set-up calls; e.g. In plt I > just > use plt.figure() to open a new plot window and also it already has a > nice > interactive (meaning: short) syntax for choosing colors and markers. > > The good news is that I decoupled Plt from scipy yesterday. I'm happy > to post > that version somewhere if that's OK with the scipy license. > > Cheers, > Sebastian > > (Please note I cc'ed the list, because I always hope for other's > comments ...) > > On Monday 25 July 2005 02:37, you wrote: > > Hi, > > I've seen your msgs on SciPy user mailing list, and I couldn't agree > > more. > > > Anyway, wanted to inform you that WxPyPlot is a part of wx > > distribution > > > these days (renamed plot.py). > > At win platform you might find it at: > > C:\Python24\Lib\site-packages\wx-2.6-msw-unicode\wx\lib\plot.py > > (or at some similar locatiotion of other wx version). > > It has also acquired some extra features, but is still "light". > > > > Cheers, > > Arie. > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > > ------------------------------------------------------------------- > This e-mail and any attachments may contain confidential and/or > privileged material; it is for the intended addressee(s) only. > If you are not a named addressee, you must not use, retain or > disclose such information. > > NPL Management Ltd cannot guarantee that the e-mail or any > attachments are free from viruses. > > NPL Management Ltd. Registered in England and Wales. No: 2937881 > Registered Office: Serco House, 16 Bartley Wood Business Park, > Hook, Hampshire, United Kingdom RG27 9UY > ------------------------------------------------------------------- From aisaac at american.edu Mon Jul 25 11:00:38 2005 From: aisaac at american.edu (Alan G Isaac) Date: Mon, 25 Jul 2005 11:00:38 -0400 Subject: [SciPy-user] Clarification In-Reply-To: <056D32E9B2D93B49B01256A88B3EB218766E6A@icex2.ic.ac.uk> References: <056D32E9B2D93B49B01256A88B3EB218766E6A@icex2.ic.ac.uk> Message-ID: On Mon, 25 Jul 2005, David A Howey apparently wrote: > Why didn't you just try gplt (for 3D) as well as matplotlib (for 2D)?!? > See > http://www.scipy.org/documentation/plottutorial.html/view?searchterm=gplt I did try gplt. Once past the fine basics, I found it unacceptable. Certain gnuplot functionality was apparently intentionally crippled. Additionally, when I raised questions about this, nobody seemed particularly interested. Indeed, the best advice I got was that if I want to use gnuplot from Python, I should try Gnuplot.py instead. I am uncertain why you mention Matplotlib, which I have consistently praised for 2-D plotting (including contour plots). It is an amazing package. Cheers, Alan Isaac From d.howey at imperial.ac.uk Tue Jul 26 09:03:46 2005 From: d.howey at imperial.ac.uk (Howey, David A) Date: Tue, 26 Jul 2005 14:03:46 +0100 Subject: [SciPy-user] Clarification Message-ID: <056D32E9B2D93B49B01256A88B3EB21835E6EE@icex2.ic.ac.uk> apologies - I didn't mean to sound short. For me, I find matplotlib great for 2D, and gplt works pretty well for simple 3D stuff. What are you trying to plot in 3D, if you don't mind me asking? Dave -----Original Message----- From: scipy-user-bounces at scipy.net on behalf of Alan G Isaac Sent: Mon 25/07/2005 16:00 To: SciPy Users List Subject: Re[4]: [SciPy-user] Clarification On Mon, 25 Jul 2005, David A Howey apparently wrote: > Why didn't you just try gplt (for 3D) as well as matplotlib (for 2D)?!? > See > http://www.scipy.org/documentation/plottutorial.html/view?searchterm=gplt I did try gplt. Once past the fine basics, I found it unacceptable. Certain gnuplot functionality was apparently intentionally crippled. Additionally, when I raised questions about this, nobody seemed particularly interested. Indeed, the best advice I got was that if I want to use gnuplot from Python, I should try Gnuplot.py instead. I am uncertain why you mention Matplotlib, which I have consistently praised for 2-D plotting (including contour plots). It is an amazing package. Cheers, Alan Isaac _______________________________________________ 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: winmail.dat Type: application/ms-tnef Size: 3086 bytes Desc: not available URL: From spk at ldeo.columbia.edu Tue Jul 26 11:50:13 2005 From: spk at ldeo.columbia.edu (samar khatiwala) Date: Tue, 26 Jul 2005 11:50:13 -0400 (EDT) Subject: [SciPy-user] can't login to CVS Message-ID: Hello I've been unable to do an anonymous login to the CVS repository: cvs -d :pserver:anonymous at scipy.org:/home/cvsroot login Logging in to :pserver:anonymous at scipy.org:2401/home/cvsroot CVS password: cvs [login aborted]: connect to scipy.org(216.62.213.228):2401 failed: Connection refused Any help would be appreciated Thanks, Samar From aisaac at american.edu Tue Jul 26 10:19:13 2005 From: aisaac at american.edu (Alan G Isaac) Date: Tue, 26 Jul 2005 10:19:13 -0400 Subject: [SciPy-user] Clarification In-Reply-To: <056D32E9B2D93B49B01256A88B3EB21835E6EE@icex2.ic.ac.uk> References: <056D32E9B2D93B49B01256A88B3EB21835E6EE@icex2.ic.ac.uk> Message-ID: On Tue, 26 Jul 2005, David A Howey apparently wrote: > What are you trying to plot in 3D, if you don't mind me asking? My 3-D needs are pretty trivial. - Function illustrations in the classroom (and supporting notes). For this gnuplot is really quite nice, however gplt disabled its own plot_func function so this functionality was missing from gplt. (And gplt did not allow easy access to gnuplot for setting a variety of global options, even though an easy workaround was possible for the gnuplot literate http://www.scipy.org/mailinglists/mailman?fn=scipy-user/2004-August/003062.html.) - Scatter plots, with easy interactive axis rotation a plus. fwiw, Alan Isaac From pbagora at yahoo.com Tue Jul 26 15:47:02 2005 From: pbagora at yahoo.com (Pranav Bagora) Date: Tue, 26 Jul 2005 12:47:02 -0700 (PDT) Subject: [SciPy-user] Getting error in building atlas Message-ID: <20050726194702.63996.qmail@web32408.mail.mud.yahoo.com> Hello, i m trying to build scipy with python 2.4 on windows XP using Cygwin/MINGW. I am getting an error while building atlas library i.e. while installing atlas_buildinfo.h is required but it is not present in any directory, this is the error that i m getting , $ make install arch=$ARCH make -f Make.top install arch=WinNT_P4SSE3 make[1]: Entering directory `/cygdrive/u/builds/src/atlas' cd bin/WinNT_P4SSE3 ; make xatlas_install make[2]: Entering directory `/cygdrive/u/builds/src/atlas/bin/WinNT_P4SSE3' make[2]: `xatlas_install' is up to date. make[2]: Leaving directory `/cygdrive/u/builds/src/atlas/bin/WinNT_P4SSE3' cd bin/WinNT_P4SSE3 ; ./xatlas_install -d IN STAGE 1 INSTALL: SYSTEM PROBE/AUX COMPILE make[2]: Entering directory `/cygdrive/u/builds/src/atlas/bin/WinNT_P4SSE3' cd /cygdrive/u/builds/src/atlas/src/auxil/WinNT_P4SSE3 ; make -s ATL_buildinfo.o make[3]: Entering directory `/cygdrive/u/builds/src/atlas/src/auxil/WinNT_P4SSE3' Makefile:1: Make.inc: No such file or directory make[3]: *** No rule to make target `Make.inc'. Stop. make[3]: Leaving directory `/cygdrive/u/builds/src/atlas/src/auxil/WinNT_P4SSE3' make[2]: [IStage1] Error 2 (ignored) cd /cygdrive/u/builds/src/atlas/src/auxil/WinNT_P4SSE3 ; make lib make[3]: Entering directory `/cygdrive/u/builds/src/atlas/src/auxil/WinNT_P4SSE3' Makefile:1: Make.inc: No such file or directory make[3]: *** No rule to make target `Make.inc'. Stop. make[3]: Leaving directory `/cygdrive/u/builds/src/atlas/src/auxil/WinNT_P4SSE3' make[2]: *** [IStage1] Error 2 make[2]: Leaving directory `/cygdrive/u/builds/src/atlas/bin/WinNT_P4SSE3' ERROR 396 DURING CACHESIZE SEARCH!!. CHECK INSTALL_LOG/Stage1.log FOR DETAILS. make[2]: Entering directory `/cygdrive/u/builds/src/atlas/bin/WinNT_P4SSE3' cd ../.. ; make error_report arch=WinNT_P4SSE3 make[3]: Entering directory `/cygdrive/u/builds/src/atlas' make -f Make.top error_report arch=WinNT_P4SSE3 make[4]: Entering directory `/cygdrive/u/builds/src/atlas' uname -a 2>&1 >> bin/WinNT_P4SSE3/INSTALL_LOG/ERROR.LOG /bin/gcc.exe -v 2>&1 >> bin/WinNT_P4SSE3/INSTALL_LOG/ERROR.LOG Reading specs from /usr/lib/gcc/i686-pc-cygwin/3.4.4/specs Configured with: /gcc/gcc-3.4.4/gcc-3.4.4-1/configure --verbose --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-languages=c,ada,c++,d,f77,java,objc --enable-nls --without-included-gettext --enable-version-specific-runtime-libs --without-x --enable-libgcj --disable-java-awt --with-system-zlib --enable-interpreter --disable-libgcj-debug --enable-threads=posix --enable-java-gc=boehm --disable-win32-registry --enable-sjlj-exceptions --enable-hash-synchronization --enable-libstdcxx-debug : (reconfigured) Thread model: posix gcc version 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125) /bin/gcc.exe -V 2>&1 >> bin/WinNT_P4SSE3/INSTALL_LOG/ERROR.LOG gcc: `-V' option must have argument make[4]: [error_report] Error 1 (ignored) /bin/gcc.exe --version 2>&1 >> bin/WinNT_P4SSE3/INSTALL_LOG/ERROR.LOG /usr/bin/tar.exe cf error_WinNT_P4SSE3.tar Make.WinNT_P4SSE3 bin/WinNT_P4SSE3/INSTALL_LOG/* /usr/bin/gzip.exe --best error_WinNT_P4SSE3.tar mv error_WinNT_P4SSE3.tar.gz error_WinNT_P4SSE3.tgz make[4]: Leaving directory `/cygdrive/u/builds/src/atlas' make[3]: Leaving directory `/cygdrive/u/builds/src/atlas' make[2]: Leaving directory `/cygdrive/u/builds/src/atlas/bin/WinNT_P4SSE3' Error report error_.tgz has been created in your top-level ATLAS directory. Be sure to include this file in any help request. Any suggestions what should be done ? Thanks, Pranav ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs From pbagora at yahoo.com Tue Jul 26 15:55:18 2005 From: pbagora at yahoo.com (Pranav Bagora) Date: Tue, 26 Jul 2005 12:55:18 -0700 (PDT) Subject: [Scipy-user] Getting error in building atlas Message-ID: <20050726195518.27779.qmail@web32412.mail.mud.yahoo.com> hello, I am trying to build atlas for using scipy on python2.4 on a win XP machine. While building atlas_buildinfo.h file is required but it is not present anywhere. I am getting the following error ... $ make install arch=$ARCH make -f Make.top install arch=WinNT_P4SSE3 make[1]: Entering directory `/cygdrive/u/builds/src/atlas' cd bin/WinNT_P4SSE3 ; make xatlas_install make[2]: Entering directory `/cygdrive/u/builds/src/atlas/bin/WinNT_P4SSE3' make[2]: `xatlas_install' is up to date. make[2]: Leaving directory `/cygdrive/u/builds/src/atlas/bin/WinNT_P4SSE3' cd bin/WinNT_P4SSE3 ; ./xatlas_install -d IN STAGE 1 INSTALL: SYSTEM PROBE/AUX COMPILE make[2]: Entering directory `/cygdrive/u/builds/src/atlas/bin/WinNT_P4SSE3' cd /cygdrive/u/builds/src/atlas/src/auxil/WinNT_P4SSE3 ; make -s ATL_buildinfo.o make[3]: Entering directory `/cygdrive/u/builds/src/atlas/src/auxil/WinNT_P4SSE3' Makefile:1: Make.inc: No such file or directory make[3]: *** No rule to make target `Make.inc'. Stop. make[3]: Leaving directory `/cygdrive/u/builds/src/atlas/src/auxil/WinNT_P4SSE3' make[2]: [IStage1] Error 2 (ignored) cd /cygdrive/u/builds/src/atlas/src/auxil/WinNT_P4SSE3 ; make lib make[3]: Entering directory `/cygdrive/u/builds/src/atlas/src/auxil/WinNT_P4SSE3' Makefile:1: Make.inc: No such file or directory make[3]: *** No rule to make target `Make.inc'. Stop. make[3]: Leaving directory `/cygdrive/u/builds/src/atlas/src/auxil/WinNT_P4SSE3' make[2]: *** [IStage1] Error 2 make[2]: Leaving directory `/cygdrive/u/builds/src/atlas/bin/WinNT_P4SSE3' ERROR 396 DURING CACHESIZE SEARCH!!. CHECK INSTALL_LOG/Stage1.log FOR DETAILS. make[2]: Entering directory `/cygdrive/u/builds/src/atlas/bin/WinNT_P4SSE3' cd ../.. ; make error_report arch=WinNT_P4SSE3 make[3]: Entering directory `/cygdrive/u/builds/src/atlas' make -f Make.top error_report arch=WinNT_P4SSE3 make[4]: Entering directory `/cygdrive/u/builds/src/atlas' uname -a 2>&1 >> bin/WinNT_P4SSE3/INSTALL_LOG/ERROR.LOG /bin/gcc.exe -v 2>&1 >> bin/WinNT_P4SSE3/INSTALL_LOG/ERROR.LOG Reading specs from /usr/lib/gcc/i686-pc-cygwin/3.4.4/specs Configured with: /gcc/gcc-3.4.4/gcc-3.4.4-1/configure --verbose --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-languages=c,ada,c++,d,f77,java,objc --enable-nls --without-included-gettext --enable-version-specific-runtime-libs --without-x --enable-libgcj --disable-java-awt --with-system-zlib --enable-interpreter --disable-libgcj-debug --enable-threads=posix --enable-java-gc=boehm --disable-win32-registry --enable-sjlj-exceptions --enable-hash-synchronization --enable-libstdcxx-debug : (reconfigured) Thread model: posix gcc version 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125) /bin/gcc.exe -V 2>&1 >> bin/WinNT_P4SSE3/INSTALL_LOG/ERROR.LOG gcc: `-V' option must have argument make[4]: [error_report] Error 1 (ignored) /bin/gcc.exe --version 2>&1 >> bin/WinNT_P4SSE3/INSTALL_LOG/ERROR.LOG /usr/bin/tar.exe cf error_WinNT_P4SSE3.tar Make.WinNT_P4SSE3 bin/WinNT_P4SSE3/INSTALL_LOG/* /usr/bin/gzip.exe --best error_WinNT_P4SSE3.tar mv error_WinNT_P4SSE3.tar.gz error_WinNT_P4SSE3.tgz make[4]: Leaving directory `/cygdrive/u/builds/src/atlas' make[3]: Leaving directory `/cygdrive/u/builds/src/atlas' make[2]: Leaving directory `/cygdrive/u/builds/src/atlas/bin/WinNT_P4SSE3' Error report error_.tgz has been created in your top-level ATLAS directory. Be sure to include this file in any help request. Any suggestions what should be done ??? Thanks , Pranav __________________________________ Yahoo! Mail Stay connected, organized, and protected. Take the tour: http://tour.mail.yahoo.com/mailtour.html From zhiwen.chong at elf.mcgill.ca Tue Jul 26 19:50:44 2005 From: zhiwen.chong at elf.mcgill.ca (Zhiwen Chong) Date: Tue, 26 Jul 2005 19:50:44 -0400 Subject: [SciPy-user] DASSL in SciPy Message-ID: <070C2141-A3C2-4098-B203-C628C2C9414F@elf.mcgill.ca> Hello, Does anyone know if any work is being done to include dassl or daspk into SciPy? Or is F2PY the way to go? Link1 http://moncs.cs.mcgill.ca/people/slacoste/research/report/ SummerReport.html#tth_sEc3 Link2 http://moncs.cs.mcgill.ca/people/slacoste/research/report/ SummerReport.html#tth_sEc3.5 Zhiwen -- "If the women don't find you handsome, they should at least find you handy." - Red Green From rkern at ucsd.edu Tue Jul 26 23:34:16 2005 From: rkern at ucsd.edu (Robert Kern) Date: Tue, 26 Jul 2005 20:34:16 -0700 Subject: [SciPy-user] DASSL in SciPy In-Reply-To: <070C2141-A3C2-4098-B203-C628C2C9414F@elf.mcgill.ca> References: <070C2141-A3C2-4098-B203-C628C2C9414F@elf.mcgill.ca> Message-ID: <42E700B8.50807@ucsd.edu> Zhiwen Chong wrote: > Hello, > > Does anyone know if any work is being done to include dassl or daspk > into SciPy? > > Or is F2PY the way to go? I don't think anyone is actively working on such. DASSL at least is part of ODEPACK which is partially wrapped for scipy.integrate. If you would like to take a crack at wrapping DASSL, we would welcome such a contribution. F2PY is by far the preferred method for new wrappers. DASPK 2.0[1] is public domain and suitable for inclusion in Scipy, but I don't believe anyone has wrapped it, yet. DASPK 3, however, is only available for research purposes, so is not suitable for Scipy. [1] http://www.engineering.ucsb.edu/~cse/software.html -- 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 w.northcott at unsw.edu.au Wed Jul 27 02:12:06 2005 From: w.northcott at unsw.edu.au (Bill Northcott) Date: Wed, 27 Jul 2005 16:12:06 +1000 Subject: [SciPy-user] can't login to CVS Message-ID: Samar wrote: > I've been unable to do an anonymous login to the CVS repository: It definitely seems to be broken: [PBG4-BN:~/Public/Python] billn% cvs -d :pserver:anonymous at scipy.org:/ home/cvsroot login Logging in to :pserver:anonymous at scipy.org:2401/home/cvsroot CVS password: cvs [login aborted]: connect to scipy.org(216.62.213.228):2401 failed: Connection refused [PBG4-BN:~/Public/Python] billn% telnet 216.62.213.228 2401 Trying 216.62.213.228... telnet: connect to address 216.62.213.228: Connection refused telnet: Unable to connect to remote host Bill Northcott From rng7 at cornell.edu Wed Jul 27 08:11:35 2005 From: rng7 at cornell.edu (Ryan Gutenkunst) Date: Wed, 27 Jul 2005 08:11:35 -0400 Subject: [SciPy-user] DASSL in SciPy In-Reply-To: <42E700B8.50807@ucsd.edu> References: <070C2141-A3C2-4098-B203-C628C2C9414F@elf.mcgill.ca> <42E700B8.50807@ucsd.edu> Message-ID: <7c1af58cb1c840cd6ab6cea717c0f3a2@cornell.edu> I'm somewhat of an f2py newbie, but I recently wrapped up one new integrator. (LSODAR, and I'd love to see that work make it into the SciPy core.) I also have a half-completed wrapper of DASKR (http://www.netlib.org/ode/), which is a successor to DASPK 2.0 that adds root-finding. I ran into some mysterious problems, but haven't spent too much effort on them yet. Zhiwen, I'll contact you off-list in a day or so. Maybe we can work together to get it working well and design a convenient interface. In terms of getting things into SciPy, I'm not at all familiar with the process, or what conventions exist. Is there a set of developer documentation with guidelines, etc? Or will one of the devs hold my hand when it comes to tweaking the wrapper for SciPy inclusion? :-) Cheers, Ryan On Jul 26, 2005, at 11:34 PM, Robert Kern wrote: > Zhiwen Chong wrote: >> Hello, >> Does anyone know if any work is being done to include dassl or daspk >> into SciPy? >> Or is F2PY the way to go? > > I don't think anyone is actively working on such. DASSL at least is > part of ODEPACK which is partially wrapped for scipy.integrate. If you > would like to take a crack at wrapping DASSL, we would welcome such a > contribution. F2PY is by far the preferred method for new wrappers. > > DASPK 2.0[1] is public domain and suitable for inclusion in Scipy, but > I don't believe anyone has wrapped it, yet. DASPK 3, however, is only > available for research purposes, so is not suitable for Scipy. > > [1] http://www.engineering.ucsb.edu/~cse/software.html -- Ryan Gutenkunst | Cornell Dept. of Physics | "It is not the mountain | we conquer but ourselves." Clark 535 / (607)255-6068 | -- Sir Edmund Hillary AIM: JepettoRNG | http://www.physics.cornell.edu/~rgutenkunst/ From perry at stsci.edu Wed Jul 27 09:49:50 2005 From: perry at stsci.edu (Perry Greenfield) Date: Wed, 27 Jul 2005 09:49:50 -0400 Subject: [SciPy-user] "Using Python for Interactive Data Analysis" tutorial available Message-ID: <0b142e5bdd9a4f5996f579e0e6afb751@stsci.edu> A tutorial that illustrates how Python can be used to analyze and visualize astronomical data (much like one can do in IDL) has been written and now is available at: http://www.scipy.org/wikis/topical_software/Tutorial While much of the focus is on astronomical data, most of it probably could serve as a general tutorial as well if sections on more advanced pyfits usage are skipped (only a few pages). There are appendices that contrast Python/numarray with IDL, I'd be happy to include the equivalent for Matlab if anyone who is familiar with both would like to write such appendices. Suggestions for improvements are welcome. Perry From d.howey at imperial.ac.uk Wed Jul 27 11:57:25 2005 From: d.howey at imperial.ac.uk (Howey, David A) Date: Wed, 27 Jul 2005 16:57:25 +0100 Subject: [SciPy-user] Re: nan puzzle Message-ID: <056D32E9B2D93B49B01256A88B3EB21835E6F4@icex2.ic.ac.uk> Just found this, thought it might be of interest-- gurus probably know this already, I wasn't aware: http://www.cs.ucla.edu/classes/winter04/cs131/hw/hw4.html Dave ________________________________ From: scipy-user-bounces at scipy.net on behalf of Grant Edwards Sent: Wed 13/07/2005 05:16 To: scipy-user at scipy.org Subject: [SciPy-user] Re: nan puzzle On 2005-07-13, Alan G Isaac wrote: > Is this expected behavior? >>>> x is nan > True >>>> x=z[2] >>>> x > -1.#IND >>>> x is nan > False May I ask why you care? The expression "x is nan" seems pretty useless to me. The "is" operator isn't really useful for other floating point values, why would it be useful for nans? >>> x = 1.234 >>> x is 1.234 False >>> >>> y = 1.234 >>> x is y False >>> x == y True >>> What you probably want to be checking is if x has a nan value, not whether x is the same object as some other object that has a nan value. -- Grant Edwards grante Yow! Is this my STOP?? at visi.com _______________________________________________ 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: winmail.dat Type: application/ms-tnef Size: 5164 bytes Desc: not available URL: From genietdev0 at iol.ie Wed Jul 27 12:13:22 2005 From: genietdev0 at iol.ie (Victor Reijs) Date: Wed, 27 Jul 2005 17:13:22 +0100 Subject: [SciPy-user] PSP8 and scipy Message-ID: <42E7B2A2.6090809@iol.ie> Hello all of you, I want to import scipy into the scripting possibilities of PSP8 (Paint Shop Pro which uses phyton 2.2.0). When I try to install scipy, I get the message that phyton can't be found in registry; I can image this because I assume PSP uses python within its one environment. PSP has a python library so perhaps I could install scipy into there, but the windows installer does not allow me to input the to be used directory anywhere. Who can help me here? Thanks for your help. All the best, Victor From Fernando.Perez at colorado.edu Wed Jul 27 14:06:19 2005 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Wed, 27 Jul 2005 12:06:19 -0600 Subject: [SciPy-user] DASSL in SciPy In-Reply-To: <7c1af58cb1c840cd6ab6cea717c0f3a2@cornell.edu> References: <070C2141-A3C2-4098-B203-C628C2C9414F@elf.mcgill.ca> <42E700B8.50807@ucsd.edu> <7c1af58cb1c840cd6ab6cea717c0f3a2@cornell.edu> Message-ID: <42E7CD1B.2060809@colorado.edu> Ryan Gutenkunst wrote: > I'm somewhat of an f2py newbie, but I recently wrapped up one new > integrator. (LSODAR, and I'd love to see that work make it into the > SciPy core.) > > I also have a half-completed wrapper of DASKR > (http://www.netlib.org/ode/), which is a successor to DASPK 2.0 that > adds root-finding. I ran into some mysterious problems, but haven't > spent too much effort on them yet. Zhiwen, I'll contact you off-list in > a day or so. Maybe we can work together to get it working well and > design a convenient interface. > > In terms of getting things into SciPy, I'm not at all familiar with the > process, or what conventions exist. Is there a set of developer > documentation with guidelines, etc? Or will one of the devs hold my > hand when it comes to tweaking the wrapper for SciPy inclusion? :-) Look at the xxx module in the scipy sources. That's what I used recently to guide myself into how to make a new project scipy-compatible, so that once it's ready I can just drop it into the scipy sources without a single change. Note the presence of special dirs and files for docstrings and unit tests: this ensures that the automated scipy machinery picks them up for you. Cheers, f From meesters at uni-mainz.de Thu Jul 28 10:15:06 2005 From: meesters at uni-mainz.de (Christian Meesters) Date: Thu, 28 Jul 2005 16:15:06 +0200 Subject: [SciPy-user] Error message I don't understand Message-ID: <01e857e468d553d37fd086101ecf1a42@uni-mainz.de> Hi I get this weird Traceback from my script: Traceback (most recent call last): File "FP.py", line 111, in ? main() File "FP.py", line 67, in main fitter(OD,ml) File "FP.py", line 98, in fitter tck = interpolate.splrep(ml,OD) File "/platlib/scipy/interpolate/fitpack.py", line 339, in splrep SystemError: error return without exception set The "fitter"-function so far contains only this line which causes the error. 'OD' and 'ml' are array objects. Running the example code from the tutorial does not result in any error. (And looking into fitpack.py didn't help.) Has anybody seen this error before and knows how to solve the problem? It's probably something really stupid, but I failed finding the solution. TIA Regards, Christian From swisher at enthought.com Thu Jul 28 14:54:20 2005 From: swisher at enthought.com (Janet M. Swisher) Date: Thu, 28 Jul 2005 13:54:20 -0500 Subject: [SciPy-user] ANN: SciPy 2005 Conf: Abstracts and early registration due 7/29/05 Message-ID: <42E929DC.2080507@enthought.com> Friday, July 29, 2005 is the deadline for abstract submission for the 2005 Scientific Computing in Python Conference, scheduled for September 22 and 23, at Caltech. More information on the conference, including abstract guidelines, can be found at The 29th is also the deadline for early registration for the conference. The early registration fee is US$100; regular registration is US$150. The conference fee includes breakfast and lunch both days, and dinner on the first day. -- Janet Swisher --- Senior Technical Writer Enthought, Inc. http://www.enthought.com From rkern at ucsd.edu Thu Jul 28 15:26:10 2005 From: rkern at ucsd.edu (Robert Kern) Date: Thu, 28 Jul 2005 12:26:10 -0700 Subject: [SciPy-user] Error message I don't understand In-Reply-To: <01e857e468d553d37fd086101ecf1a42@uni-mainz.de> References: <01e857e468d553d37fd086101ecf1a42@uni-mainz.de> Message-ID: <42E93152.7090205@ucsd.edu> Christian Meesters wrote: > Hi > > I get this weird Traceback from my script: > > Traceback (most recent call last): > File "FP.py", line 111, in ? > main() > File "FP.py", line 67, in main > fitter(OD,ml) > File "FP.py", line 98, in fitter > tck = interpolate.splrep(ml,OD) > File "/platlib/scipy/interpolate/fitpack.py", line 339, in splrep > SystemError: error return without exception set > > The "fitter"-function so far contains only this line which causes the > error. 'OD' and 'ml' are array objects. Running the example code from > the tutorial does not result in any error. (And looking into fitpack.py > didn't help.) > > Has anybody seen this error before and knows how to solve the problem? > It's probably something really stupid, but I failed finding the solution. It's an obscure error stating that somewhere inside the extension module, a function returned NULL instead of a real pointer to a PyObject. That's the signal for raising an error in extension functions. However, there is a bug somewhere, and the actual exception has not been set. Looking at the source, I believe that the bug is on line 367 of Lib/interpolate/__fitpack.h in fitpack_curfit(). It's just after the call to the computation routine: if (ier==10) goto fail; An appropriate exception needs to be set here. In the meantime, here is the FITPACK documentation about this error code: c ier=10 : error. on entry, the input data are controlled on validity c the following restrictions must be satisfied. c -1<=iopt<=1, 1<=k<=5, m>k, nest>2*k+2, w(i)>0,i=1,2,...,m c xb<=x(1)=(k+1)*m+nest*(7+3*k) c if iopt=-1: 2*k+2<=n<=min(nest,m+k+1) c xb=0: s>=0 c if s=0 : nest >= m+k+1 c if one of these conditions is found to be violated,control c is immediately repassed to the calling program. in that c case there is no approximation returned. -- 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 dimitri.dor at fssintl.com Fri Jul 29 04:57:08 2005 From: dimitri.dor at fssintl.com (Dimitri D'Or) Date: Fri, 29 Jul 2005 10:57:08 +0200 Subject: [SciPy-user] Numerical gradient approximation on matrix Message-ID: <200507290857.j6T8vawB027050@outmx010.isp.belgacom.be> Hi all, I have a two-dimensional array from which I wish to compute the gradient (i.e. the slope against the first and second dimension). With Matlab, I can do it easily using the gradient.m function. Is there something similar in Scipy or matplotlib? I've browsed the documentation but couldn't found anything but approximate gradient computations on functions in the optimize module. Nothing about computations on matrices. Thank you for your help, Dimitri -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.howey at imperial.ac.uk Fri Jul 29 07:16:29 2005 From: d.howey at imperial.ac.uk (Howey, David A) Date: Fri, 29 Jul 2005 12:16:29 +0100 Subject: [SciPy-user] Ipython "run" Message-ID: <056D32E9B2D93B49B01256A88B3EB218766E7C@icex2.ic.ac.uk> Perhaps someone could share their experience using the magic command %run in Ipython? I'm just testing it out, and unfortunately it doesn't seem to do a full reload of all imported modules etc. IDLE's , on the other hand, does. This is annoying! Any tips? Dave -----Original Message----- From: scipy-user-bounces at scipy.net [mailto:scipy-user-bounces at scipy.net] On Behalf Of Fernando Perez Sent: 13 July 2005 17:42 To: SciPy Users List Subject: Re: [SciPy-user] wxpython Howey, David A wrote: > yeah, I've got it running in colour.. I just meant the 'inline' colour > changes as you type > > also, what editor do you use with ipython? I quite liked the idle > built in editor You can use any editor you want, as ipython has very poor editing capabilities (limited to single-line changes). Some users like to call %edit with ipython, which will invoke your $EDITOR, try %edit? for more info. I personally don't like %edit, and my normal modus operandi is to run Xemacs with my files open, along with an ipython session where I use '%run foo' over and over as I modify the file foo.py. I find this to be a good balance: I get a good editor for the heavy lifting, and in the interactive ipython session I get good tracebacks, %pdb debugging, the ability to inspect objects resulting from my runs, and no expensive reinitialization of the interpreter for each test (this can be a HUGE deal if you are using complex/large libraries like scipy or VTK). Cheers, f _______________________________________________ SciPy-user mailing list SciPy-user at scipy.net http://www.scipy.net/mailman/listinfo/scipy-user From jdhunter at ace.bsd.uchicago.edu Fri Jul 29 10:11:36 2005 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Fri, 29 Jul 2005 09:11:36 -0500 Subject: [SciPy-user] Ipython "run" In-Reply-To: <056D32E9B2D93B49B01256A88B3EB218766E7C@icex2.ic.ac.uk> ("Howey, David A"'s message of "Fri, 29 Jul 2005 12:16:29 +0100") References: <056D32E9B2D93B49B01256A88B3EB218766E7C@icex2.ic.ac.uk> Message-ID: <878xzpu2g7.fsf@peds-pc311.bsd.uchicago.edu> >>>>> "Howey," == Howey, David A writes: Howey> Perhaps someone could share their experience using the Howey> magic command %run in Ipython? I'm just testing it out, Howey> and unfortunately it doesn't seem to do a full reload of Howey> all imported modules etc. IDLE's , on the other hand, Howey> does. This is annoying! Any tips? Dave One man's annoyance, another man's feature. When you are *using* really big modules that can take tens of seconds to import, it's nice not to have to pay the cost of the reload with each run. When you are *developing* modules that the script imports, it's a pain not to have your code reloaded. A good rule of thumb is to use run when you are using a module, not when you are developing it. You can achieve the desired behavior by doing In [7]: !python myscript.py Fernando, would it be useful to have a -python or -force or -reload option to run which produces the equivalent of the above. If only for didactic purposes, it would make it clearer in the docstring that a reload is not taking place. Perhaps the current run documentation is a bit misleading, where it reads: This is similar to running at a system prompt: $ python file args JDH From ryanfedora at comcast.net Fri Jul 29 10:34:03 2005 From: ryanfedora at comcast.net (Ryan Krauss) Date: Fri, 29 Jul 2005 10:34:03 -0400 Subject: [SciPy-user] Ipython "run" In-Reply-To: <056D32E9B2D93B49B01256A88B3EB218766E7C@icex2.ic.ac.uk> References: <056D32E9B2D93B49B01256A88B3EB218766E7C@icex2.ic.ac.uk> Message-ID: <42EA3E5B.9000401@comcast.net> If you only want to reload one or two modules that you are developing, you can try two approaches. One is to use the %macro command to combined reload with run. The other is to hard code into your scripts to reload modules that you are developing after you have imported them. Fernando may have better advice. Ryan Howey, David A wrote: > Perhaps someone could share their experience using the magic command > %run in Ipython? I'm just testing it out, and unfortunately it doesn't > seem to do a full reload of all imported modules etc. IDLE's , on > the other hand, does. This is annoying! > Any tips? > Dave > > -----Original Message----- > From: scipy-user-bounces at scipy.net [mailto:scipy-user-bounces at scipy.net] > On Behalf Of Fernando Perez > Sent: 13 July 2005 17:42 > To: SciPy Users List > Subject: Re: [SciPy-user] wxpython > > Howey, David A wrote: > >>yeah, I've got it running in colour.. I just meant the 'inline' colour > > >>changes as you type >> >>also, what editor do you use with ipython? I quite liked the idle >>built in editor > > > You can use any editor you want, as ipython has very poor editing > capabilities (limited to single-line changes). Some users like to call > %edit with ipython, which will invoke your $EDITOR, try %edit? for more > info. > > I personally don't like %edit, and my normal modus operandi is to run > Xemacs with my files open, along with an ipython session where I use > '%run foo' over and over as I modify the file foo.py. I find this to be > a good balance: I get a good editor for the heavy lifting, and in the > interactive ipython session I get good tracebacks, %pdb debugging, the > ability to inspect objects resulting from my runs, and no expensive > reinitialization of the interpreter for each test (this can be a HUGE > deal if you are using complex/large libraries like scipy or VTK). > > Cheers, > > f > > _______________________________________________ > 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 Fri Jul 29 12:03:16 2005 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Fri, 29 Jul 2005 10:03:16 -0600 Subject: [SciPy-user] Ipython "run" In-Reply-To: <42EA3E5B.9000401@comcast.net> References: <056D32E9B2D93B49B01256A88B3EB218766E7C@icex2.ic.ac.uk> <42EA3E5B.9000401@comcast.net> Message-ID: <42EA5344.9020905@colorado.edu> Ryan Krauss wrote: > If you only want to reload one or two modules that you are developing, > you can try two approaches. One is to use the %macro command to > combined reload with run. The other is to hard code into your scripts > to reload modules that you are developing after you have imported them. > > Fernando may have better advice. Not really: what you describe is pretty much what I always do. Many of my 'top-level' scripts which use modules I'm in the middle of modifying, look like: import foo reload(foo) foo.dostuff() It's not terribly elegant, but it works. And as John said, wholesale reloading of everything can be very expensive, so it's not a good idea as a default. Having said that, I should mention dreload(), part of ipython. It _tries_ to do a recursive ('deep') reload of a given module, and I know many ipython users love it. Given that there is no way for any tool to guess, out of the many modules in memory, which ones the user actually _wants_ reloaded, I think the manual solution is not all that bad. I should finally add that extension modules can NOT be reoloaded, to the best of my knowledge. I just checked what Idle does: it runs the user's code in a separate process altogether: fperez 10662 1.4 0.9 15192 9936 pts/15 S+ 09:54 0:00 /usr/bin/python /usr/bin/idle fperez 10673 1.0 0.5 13884 5360 pts/15 Sl+ 09:55 0:00 /usr/bin/python -c __import__('idlelib.run').run.main(True) 8833 And after hitting F5: fperez 10662 0.9 0.9 15192 9936 pts/15 S+ 09:54 0:00 /usr/bin/python /usr/bin/idle fperez 10691 1.6 0.5 13884 5360 pts/15 Sl+ 09:55 0:00 /usr/bin/python -c __import__('idlelib.run').run.main(True) 8833 Notice the process number for the user code execution has just changed. In summary, Idle's F5 is equivalent to John's solution, to use !python foo.py. Unfortunately because this runs in a separate process, you lose nice exception tracebacks, integrated debugging, etc. It would not be impossible to write a little magic that does something similar for ipython, while retaining the settings for exceptions, pdb and other things. I'll keep it in mind for a future release, unless somebody beats me to it. Cheers, f From aisaac at american.edu Fri Jul 29 12:09:06 2005 From: aisaac at american.edu (Alan G Isaac) Date: Fri, 29 Jul 2005 12:09:06 -0400 Subject: [SciPy-user] Numerical gradient approximation on matrix In-Reply-To: <200507290857.j6T8vawB027050@outmx010.isp.belgacom.be> References: <200507290857.j6T8vawB027050@outmx010.isp.belgacom.be> Message-ID: On Fri, 29 Jul 2005, Dimitri D'Or apparently wrote: > I have a two-dimensional array from which I wish to > compute the gradient (i.e. the slope against the first and > second dimension). With Matlab, I can do it easily using > the gradient.m function. Is there something similar in > Scipy or matplotlib? I've browsed the documentation but > couldn't found anything but approximate gradient > computations on functions in the optimize module. Nothing > about computations on matrices. Look at scipy.diff. E.g., for the two dimensions grad0=scipy.diff(x,axis=0) grad1=scipy.diff(x,axis=1) hth, Alan Isaac From spk at ldeo.columbia.edu Fri Jul 29 12:47:47 2005 From: spk at ldeo.columbia.edu (samar khatiwala) Date: Fri, 29 Jul 2005 12:47:47 -0400 (EDT) Subject: [SciPy-user] where can I get latest source? Message-ID: Hello I would like to acquire the most recent source code to compile on darwin (OS 10.3). The source from: http://www.scipy.org/download/ does NOT compile on my machine, and looking at past postings on the mailing list and the error messages I get, the solution seems to be to get a more recent version from the CVS repository. But the CVS server has been down for several days and no one has replied to my posting regarding that. Can anyone suggest alternate places to download the code from. Or better yet, perhaps some kind soul has a recent CVS snapshot and can stage it for me to download. Thanks very much Samar From Fernando.Perez at colorado.edu Fri Jul 29 12:52:24 2005 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Fri, 29 Jul 2005 10:52:24 -0600 Subject: [SciPy-user] where can I get latest source? In-Reply-To: References: Message-ID: <42EA5EC8.5090809@colorado.edu> samar khatiwala wrote: > Hello > > I would like to acquire the most recent source code to compile on darwin > (OS 10.3). > > The source from: http://www.scipy.org/download/ > does NOT compile on my machine, and looking at past postings on the > mailing list and the error messages I get, the solution seems to be to get > a more recent version from the CVS repository. But the CVS server has been > down for several days and no one has replied to my posting regarding that. > > Can anyone suggest alternate places to download the code from. Or better > yet, perhaps some kind soul has a recent CVS snapshot and can stage it for > me to download. CVS is in the process of moving over to SVN, so it will be down today. In the meantime: http://ipython.scipy.org/tmp/scipy_cvs_2005-07-29.tgz I just made this, and I _think_ it has the latest CVS, since I had updated just before the server went down. In any case, it's missing at most one or two last-minute changes. Cheers, f From Fernando.Perez at colorado.edu Fri Jul 29 13:13:06 2005 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Fri, 29 Jul 2005 11:13:06 -0600 Subject: [SciPy-user] where can I get latest source? In-Reply-To: <42EA5EC8.5090809@colorado.edu> References: <42EA5EC8.5090809@colorado.edu> Message-ID: <42EA63A2.9060707@colorado.edu> Fernando Perez wrote: > CVS is in the process of moving over to SVN, so it will be down today. In the > meantime: > > http://ipython.scipy.org/tmp/scipy_cvs_2005-07-29.tgz > > I just made this, and I _think_ it has the latest CVS, since I had updated > just before the server went down. In any case, it's missing at most one or > two last-minute changes. Scratch that: it _is_ up to date. I just did a cvs update (the ssh access is still up, it's only anon which is down), and nothing changed. So that tarball is confirmed to be up-to-date CVS as of right now. We can keep it around for a while as a reference, until the transition to svn is completed. Cheers, f From guillem at torroja.dmt.upm.es Fri Jul 29 14:18:54 2005 From: guillem at torroja.dmt.upm.es (guillem at torroja.dmt.upm.es) Date: Fri, 29 Jul 2005 20:18:54 +0200 (CEST) Subject: [SciPy-user] Numerical gradient approximation on matrix In-Reply-To: References: <200507290857.j6T8vawB027050@outmx010.isp.belgacom.be> Message-ID: Hi all On Fri, 29 Jul 2005, Alan G Isaac wrote: > On Fri, 29 Jul 2005, Dimitri D'Or apparently wrote: > > I have a two-dimensional array from which I wish to > > compute the gradient (i.e. the slope against the first and > > second dimension). With Matlab, I can do it easily using > > the gradient.m function. Is there something similar in > > Scipy or matplotlib? I've browsed the documentation but > > couldn't found anything but approximate gradient > > computations on functions in the optimize module. Nothing > > about computations on matrices. > > Look at scipy.diff. > E.g., for the two dimensions > grad0=scipy.diff(x,axis=0) > grad1=scipy.diff(x,axis=1) I had the same problem and I was about to write an equivalent function. The difference is that gradient.m computes the gradient and keeps the array's shape: EDU>> size(meshgrid(-2:.2:2,-2:.2:2)) ans = 21 21 EDU>> size(gradient(meshgrid(-2:.2:2,-2:.2:2))) ans = 21 21 And ready to use it in a quiver plot. I think that one equivalent function would be very useful in scipy_base Just my oppinion Regards ________________________________ guillem at torroja.dmt.upm.es guillem at peret.dmt.upm.es www://torroja.dmt.upm.es/~guillem/ From aisaac at american.edu Fri Jul 29 14:42:12 2005 From: aisaac at american.edu (Alan G Isaac) Date: Fri, 29 Jul 2005 14:42:12 -0400 Subject: [SciPy-user] Numerical gradient approximation on matrix In-Reply-To: References: <200507290857.j6T8vawB027050@outmx010.isp.belgacom.be> Message-ID: On Fri, 29 Jul 2005, T) guillem at torroja.dmt.upm.es apparently wrote: > The difference is that gradient.m computes the gradient > and keeps the array's shape: How's that supposed to work. I'm not a Matlab user, but the docs say it uses diff. Cheers, Alan Isaac From genietdev0 at iol.ie Sat Jul 30 07:00:55 2005 From: genietdev0 at iol.ie (Victor Reijs) Date: Sat, 30 Jul 2005 12:00:55 +0100 Subject: [SciPy-user] 'crashing' python Message-ID: <42EB5DE7.60408@iol.ie> Hello all of you, I am trying to use scipy but I get some crashes. So here is the behavior: . I have now python 2.2.2 and 2.3.5 on my system . my system is a Dell Latitude D400, using WIndows XP, version 2002, SP2. Intel Pentium M . I installed SciPy-0.3.2.win32-py2.3-num23.5.exe and Win32 SciPy-0.3.2.win32-py2.2-num22.0.exe (I don't know what the P4SSE2 and PIII mean for my system, so U down loaded the generic ones). . When I do 'from scipy import *' in python 2.2.2 The application crashes and I get the "pythonw.exe has encountered a problem and needs to close. We are sorry for the inconvenience." window (and it wants to send things to microsoft). After this the python window is gone. . When I do 'from scipy import *' in python 2.3.5 The application crashes and I get the "pythonw.exe has encountered a problem and needs to close. We are sorry for the inconvenience." window (and it wants to send things to microsoft). In this case the python window does not close but it restarts: ">>> from scipy import * >>> ================================ RESTART ================================ >>>" What do I do wrong? Thanks for your feedback. All the best, Victor From genietdev0 at iol.ie Sat Jul 30 08:25:41 2005 From: genietdev0 at iol.ie (Victor Reijs) Date: Sat, 30 Jul 2005 13:25:41 +0100 Subject: [SciPy-user] 'crashing' python In-Reply-To: <42EB5DE7.60408@iol.ie> References: <42EB5DE7.60408@iol.ie> Message-ID: <42EB71C5.9090506@iol.ie> Hello all of you, Just to let you know; I uninstalled, rebooted system and installed the python versions and the scipy versions several times. All the best, Victor Victor Reijs wrote: > Hello all of you, > > I am trying to use scipy but I get some crashes. So here is the behavior: > . I have now python 2.2.2 and 2.3.5 on my system > . my system is a Dell Latitude D400, using WIndows XP, version 2002, > SP2. Intel Pentium M > . I installed SciPy-0.3.2.win32-py2.3-num23.5.exe and > Win32 SciPy-0.3.2.win32-py2.2-num22.0.exe > (I don't know what the P4SSE2 and PIII mean for my system, so U down > loaded the generic ones). > . When I do 'from scipy import *' in python 2.2.2 > The application crashes and I get the "pythonw.exe has encountered a > problem and needs to close. We are sorry for the inconvenience." window > (and it wants to send things to microsoft). After this the python window > is gone. > . When I do 'from scipy import *' in python 2.3.5 > The application crashes and I get the "pythonw.exe has encountered a > problem and needs to close. We are sorry for the inconvenience." window > (and it wants to send things to microsoft). In this case the python > window does not close but it restarts: > ">>> from scipy import * > >>> ================================ RESTART > ================================ > >>>" > > What do I do wrong? > > Thanks for your feedback. > > > All the best, > > > Victor > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > > From bdurette at enthought.com Sat Jul 30 09:53:49 2005 From: bdurette at enthought.com (Brandon DuRette) Date: Sat, 30 Jul 2005 08:53:49 -0500 Subject: [SciPy-user] 'crashing' python In-Reply-To: <42EB5DE7.60408@iol.ie> References: <42EB5DE7.60408@iol.ie> Message-ID: <42EB866D.6040302@enthought.com> Victor, > What do I do wrong? If you are not set on a specific version of Python, you could try installing the Enthought Python Distribution (Enthon). It bundles Python, SciPy, and a bunch of other useful Python libraries into one neat installable package. It's been pretty well tested and widely used. The website is: http://www.enthought.com/python/ Cheers, Brandon From genietdev0 at iol.ie Sat Jul 30 14:57:08 2005 From: genietdev0 at iol.ie (Victor Reijs) Date: Sat, 30 Jul 2005 19:57:08 +0100 Subject: [SciPy-user] 'crashing' python In-Reply-To: <42EB866D.6040302@enthought.com> References: <42EB5DE7.60408@iol.ie> <42EB866D.6040302@enthought.com> Message-ID: <42EBCD84.6050706@iol.ie> Hello Brandon, This package indeed works for me! Now I am able to do some testing and getting familiar with the scipy software. It still would be nice to get Python plus only scipy working (less memory needed;-), so feedback is still welcome on that. But thanks very much! All the best, Victor Brandon DuRette wrote: > Victor, > >> What do I do wrong? > > > > If you are not set on a specific version of Python, you could try > installing the Enthought Python Distribution (Enthon). It bundles > Python, SciPy, and a bunch of other useful Python libraries into one > neat installable package. It's been pretty well tested and widely > used. The website is: > > http://www.enthought.com/python/ > > Cheers, > Brandon > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > > From meesters at uni-mainz.de Sun Jul 31 10:26:13 2005 From: meesters at uni-mainz.de (Christian Meesters) Date: Sun, 31 Jul 2005 16:26:13 +0200 Subject: [SciPy-user] Error message I don't understand In-Reply-To: <42E93152.7090205@ucsd.edu> References: <01e857e468d553d37fd086101ecf1a42@uni-mainz.de> <42E93152.7090205@ucsd.edu> Message-ID: <2ebe2ed521b04bf50bc3c744c5b5f02f@uni-mainz.de> Hi Robert, After tinkering a bit with my code and the actual data I discovered my mistake. Instead of having, say on the x-axis, data like 0,1,2,3,... I had 10,9,8,7,6 ... . Same on the y-axis. I don't quite understand how that could raise this error message, but at least the script is running now. Anyhow, even though it turned out to be just my stupidity: Thank you for helping me. Cheers, Christian From bdurette at enthought.com Sun Jul 31 11:09:27 2005 From: bdurette at enthought.com (Brandon DuRette) Date: Sun, 31 Jul 2005 10:09:27 -0500 Subject: [SciPy-user] 'crashing' python In-Reply-To: <42EC9CD2.2070001@iol.ie> References: <42EB5DE7.60408@iol.ie> <42EB866D.6040302@enthought.com> <42EBD647.7030006@iol.ie> <42EBDD0D.1060305@enthought.com> <42EC9CD2.2070001@iol.ie> Message-ID: <42ECE9A7.5000008@enthought.com> Hi Victor, > That looks to be working and I can repeat it, which is good;-) > But why is this 'from scipy.optimize import fmin' needed even if I did > 'from scipy import *' before that? > If I read in the scipy documentation, I thought, that 'from scipy > import *' would be enough. I think your confusion is probably with the word 'package'. The code 'from scipy import *' imports everything from the 'scipy' package. But that's not 'all of scipy'. Scipy has subpackages, such as optimize, that are not imported as part of the main scipy package. For more on Python packages, check here: http://www.python.org/doc/current/tut/node8.html#SECTION008400000000000000000 > Just to let you know, I am a novice to python, so perhaps I > misunderstand the basics of it! No worries. We were all novices at one point. ;-) > I just am learning it because it is needed to do scripting in Paint > Shop Pro (PSP). PSP8 has Python 2.2 in it, but not the optimization > function fmin (which I need for optimizing colors in pictures: > http://www.iol.ie/~geniet/eng/IFRAOcoloropt.htm ) > >> * Does sys.path refer to the correct path (i.e., where you installed >> Enthon)? > > > I can't run the python code from the normal python GUI (IDLE). I get > this: > ">>> ================================ RESTART > ================================ > >>> > > Traceback (most recent call last): > File "C:\Documents and Settings\vreijs\My Documents\My PSP8 > Files\Scripts-Trusted\scipy.py", line 1, in -toplevel- > from scipy import * > File "C:\Documents and Settings\vreijs\My Documents\My PSP8 > Files\Scripts-Trusted\scipy.py", line 2, in -toplevel- > from scipy.optimize import fmin > ImportError: No module named optimize > >>> " Ah... I think I know what the problem is. Rename scipy.py to something else. By naming it scipy.py, you have shadowed the scipy package (and also the scipy.optimize subpackage). > Aoso 'print sys.path' gives no results: > ">>> print sys.path > > Traceback (most recent call last): > File "", line 1, in -toplevel- > print sys.path > NameError: name 'sys' is not defined > >>> " Yeah. I forgot to mention, you need to import sys first. 'import sys; print sys.path'. But that may be irrelevant at this point. Cheers, Brandon From genietdev0 at iol.ie Sun Jul 31 11:39:34 2005 From: genietdev0 at iol.ie (Victor Reijs) Date: Sun, 31 Jul 2005 16:39:34 +0100 Subject: [SciPy-user] 'crashing' python In-Reply-To: <42ECE9A7.5000008@enthought.com> References: <42EB5DE7.60408@iol.ie> <42EB866D.6040302@enthought.com> <42EBD647.7030006@iol.ie> <42EBDD0D.1060305@enthought.com> <42EC9CD2.2070001@iol.ie> <42ECE9A7.5000008@enthought.com> Message-ID: <42ECF0B6.3060504@iol.ie> Hello Brandon, Brandon DuRette wrote: > I think your confusion is probably with the word 'package'. The code > 'from scipy import *' imports everything from the 'scipy' package. But > that's not 'all of scipy'. Scipy has subpackages, such as optimize, > that are not imported as part of the main scipy package. For more on > Python packages, check here: > > http://www.python.org/doc/current/tut/node8.html#SECTION008400000000000000000 Thanks for this explanation, I now understand it better! >> Just to let you know, I am a novice to python, so perhaps I >> misunderstand the basics of it! > > No worries. We were all novices at one point. ;-) Thanks for this understanding. > Ah... I think I know what the problem is. Rename scipy.py to something > else. By naming it scipy.py, you have shadowed the scipy package (and > also the scipy.optimize subpackage). You are right! I renamed my scipy.py to something else (scipytest.py) and it indeed works now in IDLE. THANKS. >> Aoso 'print sys.path' gives no results: >> ">>> print sys.path >> >> Traceback (most recent call last): >> File "", line 1, in -toplevel- >> print sys.path >> NameError: name 'sys' is not defined >> >>> " > > > Yeah. I forgot to mention, you need to import sys first. 'import sys; > print sys.path'. But that may be irrelevant at this point. Thanks for this also, indeed now path is known. My knowledge is growing, but it seems I still am not able to run the scipytest.py (renamed for PSP to scipytest.PspScript). So I must be doing something wrong... I get the error: "Executing RunScript Traceback (most recent call last): File "C:\Documents and Settings\vreijs\My Documents\My PSP8 Files\Scripts-Trusted\scipytest.PspScript", line 1, in ? from scipy import * ImportError: No module named scipy" Perhaps I have my scipy packages wrongly loaded in PSP directory structure... All the best, Victor From pwang at enthought.com Sun Jul 31 17:04:06 2005 From: pwang at enthought.com (Peter Wang) Date: Sun, 31 Jul 2005 16:04:06 -0500 (CDT) Subject: [SciPy-user] 'crashing' python In-Reply-To: <42ECF0B6.3060504@iol.ie> Message-ID: <1122843846.7527@mail.enthought.com> Victor Reijs wrote .. > My knowledge is growing, but it seems I still am not able to run the > scipytest.py (renamed for PSP to scipytest.PspScript). So I must be > doing something wrong... Hi Victor, It seems to me that if you can get your script running in IDLE but not from PSP's RunScript, then there is a problem with the PYTHONPATH. This may be repeated info, but the PYTHONPATH environment variable defines what directories the python interpreter searches for modules. If PSP ships with its own version of Python 2.2, they probably modified the installation a bit so that it ignores the system PYTHONPATH variable. If this is the case, then you have to modify the path inside your script. You can do this by appending to sys.path. If you did a normal installation of Enthon/SciPy, then the scipy module resides in your c:\python23\lib\site-packages directory. Consequently, you need to add this to the python path of your script after it gets launched by the RunScript hook, but before it tries to import scipy: import sys sys.path.append("c:/python23/lib/site-packages") from scipy import * from scipy.optimize import fmin Note that I used forward slashes instead of backslashes; Windows doesn't care. If you choose to use backslashes, you should be aware that python will treat backslashes as escape characters, so you need to do "c:\\path\\to\\directory". (There are also some other ways to get around this.) Give that a go and let us know if you still have problems. -Peter From genietdev0 at iol.ie Sun Jul 31 17:24:10 2005 From: genietdev0 at iol.ie (Victor Reijs) Date: Sun, 31 Jul 2005 22:24:10 +0100 Subject: [SciPy-user] 'crashing' python In-Reply-To: <1122843846.7527@mail.enthought.com> References: <1122843846.7527@mail.enthought.com> Message-ID: <42ED417A.2010807@iol.ie> Hello Peter, Thanks, I did this now. My sys.path is now: ['', 'C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro 8\\Python Libraries', 'C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro 8\\Python Libraries\\DLLs', 'C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro 8\\Python Libraries\\lib', 'C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro 8\\Python Libraries\\lib\\plat-win', 'C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro 8\\Python Libraries\\lib\\lib-tk', '', 'c:/python22/lib/site-packages', 'c:/python22/lib/site-packages', 'c:/python22/lib/site-packages', 'c:/python22/lib/site-packages'] But I still get this as errors (every line with 'Executing RunScript' means a RUN-command for the script; it seems something is changing while re-running the script): "Executing RunScript [1.3, 0.69999999999999996, 0.80000000000000004, 1.8999999999999999, 1.2] Unknown error occurred with command: RunScript Executing RunScript ImportError: No module named _numpy Executing RunScript [1.3, 0.69999999999999996, 0.80000000000000004, 1.8999999999999999, 1.2] Traceback (most recent call last): File "C:\Documents and Settings\vreijs\My Documents\My PSP8 Files\Scripts-Trusted\pickcolorb.PspScript", line 19, in ? from scipy.optimize import fmin File "C:\Python22\Lib\site-packages\scipy\optimize\__init__.py", line 7, in ? from optimize import * File "C:\Python22\Lib\site-packages\scipy\optimize\optimize.py", line 56, in ? import Numeric ImportError: No module named Numeric Executing RunScript [1.3, 0.69999999999999996, 0.80000000000000004, 1.8999999999999999, 1.2] Traceback (most recent call last): File "C:\Documents and Settings\vreijs\My Documents\My PSP8 Files\Scripts-Trusted\pickcolorb.PspScript", line 19, in ? from scipy.optimize import fmin ImportError: cannot import name fmin " Does this provide some info, what I do wrong? All the best, Victor Peter Wang wrote: > import sys > sys.path.append("c:/python23/lib/site-packages") > from scipy import * > from scipy.optimize import fmin From rkern at ucsd.edu Sun Jul 31 17:32:11 2005 From: rkern at ucsd.edu (Robert Kern) Date: Sun, 31 Jul 2005 14:32:11 -0700 Subject: [SciPy-user] 'crashing' python In-Reply-To: <42ED417A.2010807@iol.ie> References: <1122843846.7527@mail.enthought.com> <42ED417A.2010807@iol.ie> Message-ID: <42ED435B.7060105@ucsd.edu> Victor Reijs wrote: > Hello Peter, > > Thanks, I did this now. My sys.path is now: > ['', 'C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro 8\\Python > Libraries', 'C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro > 8\\Python Libraries\\DLLs', 'C:\\Program Files\\Jasc Software Inc\\Paint > Shop Pro 8\\Python Libraries\\lib', 'C:\\Program Files\\Jasc Software > Inc\\Paint Shop Pro 8\\Python Libraries\\lib\\plat-win', 'C:\\Program > Files\\Jasc Software Inc\\Paint Shop Pro 8\\Python > Libraries\\lib\\lib-tk', '', 'c:/python22/lib/site-packages', > 'c:/python22/lib/site-packages', 'c:/python22/lib/site-packages', > 'c:/python22/lib/site-packages'] > I should not add it again with the next run> Numeric is a bit more complicated than other packages. For reasons that I don't care to explain right now, instead of appending to sys.path, put the following lines into C:\Program Files\...\Python Libraries\lib\sitecustomize.py import site site.addsitedir('c:/python22/lib/site-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 genietdev0 at iol.ie Sun Jul 31 17:46:03 2005 From: genietdev0 at iol.ie (Victor Reijs) Date: Sun, 31 Jul 2005 22:46:03 +0100 Subject: [SciPy-user] PSP python (was crashing python) In-Reply-To: <42ED435B.7060105@ucsd.edu> References: <1122843846.7527@mail.enthought.com> <42ED417A.2010807@iol.ie> <42ED435B.7060105@ucsd.edu> Message-ID: <42ED469B.1090304@iol.ie> Hello Robert, Robert Kern wrote: > Numeric is a bit more complicated than other packages. For reasons that > I don't care to explain right now, instead of appending to sys.path, put > the following lines into > C:\Program Files\...\Python Libraries\lib\sitecustomize.py This file was not present, thus I made the sitecustomize.py file in this directory: "C:\Program Files\Jasc Software Inc\Paint Shop Pro 8\Python Libraries\Lib" with the below content: import site site.addsitedir('c:/python22/lib/site-packages') This is my script in PSP8: #==== x0 = [1.3, 0.7, 0.8, 1.9, 1.2] import sys #sys.path.append("c:/python22/lib/site-packages") print sys.path print x0 from scipy import * print x0 from scipy.optimize import fmin print x0 #==== The error message I get is now: "Executing RunScript ['', 'C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro 8\\Python Libraries', 'C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro 8\\Python Libraries\\DLLs', 'C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro 8\\Python Libraries\\lib', 'C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro 8\\Python Libraries\\lib\\plat-win', 'C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro 8\\Python Libraries\\lib\\lib-tk', ''] [1.3, 0.69999999999999996, 0.80000000000000004, 1.8999999999999999, 1.2] Traceback (most recent call last): File "C:\Documents and Settings\vreijs\My Documents\My PSP8 Files\Scripts-Trusted\pickcolorb.PspScript", line 19, in ? from scipy import * ImportError: No module named scipy" All the best, Victor From genietdev0 at iol.ie Sun Jul 31 17:56:29 2005 From: genietdev0 at iol.ie (Victor Reijs) Date: Sun, 31 Jul 2005 22:56:29 +0100 Subject: [SciPy-user] PSP python (was crashing python) In-Reply-To: <42ED4795.8070907@iol.ie> References: <1122843846.7527@mail.enthought.com> <42ED417A.2010807@iol.ie> <42ED435B.7060105@ucsd.edu> <42ED469B.1090304@iol.ie> <42ED4795.8070907@iol.ie> Message-ID: <42ED490D.1000903@iol.ie> Hello Robert, Sorry, I think I should have stopped and restarted PSP8. So now I get the following output after resatrting PSP8: "Executing RunScript ['C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro 8', 'C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro 8\\Python Libraries', 'C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro 8\\Python Libraries\\DLLs', 'C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro 8\\Python Libraries\\lib', 'C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro 8\\Python Libraries\\lib\\lib-tk', 'C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro 8\\Python Libraries\\lib\\site-packages', 'c:\\python22\\lib\\site-packages'] [1.3, 0.69999999999999996, 0.80000000000000004, 1.8999999999999999, 1.2] Unknown error occurred with command: RunScript Executing RunScript ImportError: No module named _numpy Executing RunScript ['C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro 8', 'C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro 8\\Python Libraries', 'C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro 8\\Python Libraries\\DLLs', 'C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro 8\\Python Libraries\\lib', 'C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro 8\\Python Libraries\\lib\\lib-tk', 'C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro 8\\Python Libraries\\lib\\site-packages', 'c:\\python22\\lib\\site-packages'] [1.3, 0.69999999999999996, 0.80000000000000004, 1.8999999999999999, 1.2] [1.3, 0.69999999999999996, 0.80000000000000004, 1.8999999999999999, 1.2] Traceback (most recent call last): File "C:\Documents and Settings\vreijs\My Documents\My PSP8 Files\Scripts-Trusted\pickcolorb.PspScript", line 23, in ? from scipy.optimize import fmin File "C:\Python22\Lib\site-packages\scipy\optimize\__init__.py", line 7, in ? from optimize import * File "C:\Python22\Lib\site-packages\scipy\optimize\optimize.py", line 56, in ? import Numeric ImportError: No module named Numeric Executing RunScript ['C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro 8', 'C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro 8\\Python Libraries', 'C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro 8\\Python Libraries\\DLLs', 'C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro 8\\Python Libraries\\lib', 'C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro 8\\Python Libraries\\lib\\lib-tk', 'C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro 8\\Python Libraries\\lib\\site-packages', 'c:\\python22\\lib\\site-packages'] [1.3, 0.69999999999999996, 0.80000000000000004, 1.8999999999999999, 1.2] [1.3, 0.69999999999999996, 0.80000000000000004, 1.8999999999999999, 1.2] Traceback (most recent call last): File "C:\Documents and Settings\vreijs\My Documents\My PSP8 Files\Scripts-Trusted\pickcolorb.PspScript", line 23, in ? from scipy.optimize import fmin ImportError: cannot import name fmin" All the best, Victor > my script is now: > #==== > import sitecustomize > x0 = [1.3, 0.7, 0.8, 1.9, 1.2] > import sys > #sys.path.append("c:/python22/lib/site-packages") > print sys.path > print x0 > from scipy import * > print x0 > from scipy.optimize import fmin > print x0 > #==== From genietdev0 at iol.ie Sun Jul 31 18:17:15 2005 From: genietdev0 at iol.ie (Victor Reijs) Date: Sun, 31 Jul 2005 23:17:15 +0100 Subject: [SciPy-user] PSP python (was crashing python) In-Reply-To: <42ED490D.1000903@iol.ie> References: <1122843846.7527@mail.enthought.com> <42ED417A.2010807@iol.ie> <42ED435B.7060105@ucsd.edu> <42ED469B.1090304@iol.ie> <42ED4795.8070907@iol.ie> <42ED490D.1000903@iol.ie> Message-ID: <42ED4DEB.9050602@iol.ie> Hello all of you, I have now downloaded Numeric and added it to my sitecustomize.py module as said by Robert (it seems I am slowly understanding things...). So no Numeric problem anymore;-) But now I get: "Executing RunScript ['C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro 8', 'C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro 8\\Python Libraries', 'C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro 8\\Python Libraries\\DLLs', 'C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro 8\\Python Libraries\\lib', 'C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro 8\\Python Libraries\\lib\\lib-tk', 'C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro 8\\Python Libraries\\lib\\site-packages', 'c:\\python22\\lib\\site-packages', 'c:\\python22\\lib\\site-packages\\Numeric'] [1.3, 0.69999999999999996, 0.80000000000000004, 1.8999999999999999, 1.2] [1.3, 0.69999999999999996, 0.80000000000000004, 1.8999999999999999, 1.2] Traceback (most recent call last): File "C:\Documents and Settings\vreijs\My Documents\My PSP8 Files\Scripts-Trusted\pickcolorb.PspScript", line 22, in ? from scipy.optimize import fmin File "C:\Python22\Lib\site-packages\scipy_base\ppimport.py", line 303, in __getattr__ module = self._ppimport_importer() File "C:\Python22\Lib\site-packages\scipy_base\ppimport.py", line 262, in _ppimport_importer raise PPImportError,\ scipy_base.ppimport.PPImportError: Traceback (most recent call last): File "C:\Python22\Lib\site-packages\scipy_base\ppimport.py", line 273, in _ppimport_importer module = __import__(name,None,None,['*']) File "C:\Python22\Lib\site-packages\scipy\optimize\__init__.py", line 11, in ? from lbfgsb import fmin_l_bfgs_b File "C:\Python22\Lib\site-packages\scipy\optimize\lbfgsb.py", line 33, in ? def fmin_l_bfgs_b(func, x0, fprime=None, args=(), NameError: name 'False' is not defined" This is with the below PSP script: ... #=== import sitecustomize x0 = [1.3, 0.7, 0.8, 1.9, 1.2] import sys print sys.path print x0 from scipy import * print x0 from scipy.optimize import fmin print x0 #=== Intersting the 'False' definition missing... Ideas? All the best, Victor Victor Reijs wrote: > Hello Robert, > > Sorry, I think I should have stopped and restarted PSP8. So now I get > the following output after resatrting PSP8: > "Executing RunScript > ['C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro 8', 'C:\\Program > Files\\Jasc Software Inc\\Paint Shop Pro 8\\Python Libraries', > 'C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro 8\\Python > Libraries\\DLLs', 'C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro > 8\\Python Libraries\\lib', 'C:\\Program Files\\Jasc Software Inc\\Paint > Shop Pro 8\\Python Libraries\\lib\\lib-tk', 'C:\\Program Files\\Jasc > Software Inc\\Paint Shop Pro 8\\Python Libraries\\lib\\site-packages', > 'c:\\python22\\lib\\site-packages'] > [1.3, 0.69999999999999996, 0.80000000000000004, 1.8999999999999999, 1.2] > Unknown error occurred with command: RunScript > > Executing RunScript > ImportError: No module named _numpy > > Executing RunScript > ['C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro 8', 'C:\\Program > Files\\Jasc Software Inc\\Paint Shop Pro 8\\Python Libraries', > 'C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro 8\\Python > Libraries\\DLLs', 'C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro > 8\\Python Libraries\\lib', 'C:\\Program Files\\Jasc Software Inc\\Paint > Shop Pro 8\\Python Libraries\\lib\\lib-tk', 'C:\\Program Files\\Jasc > Software Inc\\Paint Shop Pro 8\\Python Libraries\\lib\\site-packages', > 'c:\\python22\\lib\\site-packages'] > [1.3, 0.69999999999999996, 0.80000000000000004, 1.8999999999999999, 1.2] > [1.3, 0.69999999999999996, 0.80000000000000004, 1.8999999999999999, 1.2] > Traceback (most recent call last): > File "C:\Documents and Settings\vreijs\My Documents\My PSP8 > Files\Scripts-Trusted\pickcolorb.PspScript", line 23, in ? > from scipy.optimize import fmin > File "C:\Python22\Lib\site-packages\scipy\optimize\__init__.py", line > 7, in ? > from optimize import * > File "C:\Python22\Lib\site-packages\scipy\optimize\optimize.py", line > 56, in ? > import Numeric > ImportError: No module named Numeric > > Executing RunScript > ['C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro 8', 'C:\\Program > Files\\Jasc Software Inc\\Paint Shop Pro 8\\Python Libraries', > 'C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro 8\\Python > Libraries\\DLLs', 'C:\\Program Files\\Jasc Software Inc\\Paint Shop Pro > 8\\Python Libraries\\lib', 'C:\\Program Files\\Jasc Software Inc\\Paint > Shop Pro 8\\Python Libraries\\lib\\lib-tk', 'C:\\Program Files\\Jasc > Software Inc\\Paint Shop Pro 8\\Python Libraries\\lib\\site-packages', > 'c:\\python22\\lib\\site-packages'] > [1.3, 0.69999999999999996, 0.80000000000000004, 1.8999999999999999, 1.2] > [1.3, 0.69999999999999996, 0.80000000000000004, 1.8999999999999999, 1.2] > Traceback (most recent call last): > File "C:\Documents and Settings\vreijs\My Documents\My PSP8 > Files\Scripts-Trusted\pickcolorb.PspScript", line 23, in ? > from scipy.optimize import fmin > ImportError: cannot import name fmin" > > solved, but I still have the issues with Numeric, _numpy, fmin, etc.> > > All the best, > > > Victor > >> my script is now: >> #==== >> import sitecustomize >> x0 = [1.3, 0.7, 0.8, 1.9, 1.2] >> import sys >> #sys.path.append("c:/python22/lib/site-packages") >> print sys.path >> print x0 >> from scipy import * >> print x0 >> from scipy.optimize import fmin >> print x0 >> #==== > > > > > From rkern at ucsd.edu Sun Jul 31 18:23:56 2005 From: rkern at ucsd.edu (Robert Kern) Date: Sun, 31 Jul 2005 15:23:56 -0700 Subject: [SciPy-user] PSP python (was crashing python) In-Reply-To: <42ED4DEB.9050602@iol.ie> References: <1122843846.7527@mail.enthought.com> <42ED417A.2010807@iol.ie> <42ED435B.7060105@ucsd.edu> <42ED469B.1090304@iol.ie> <42ED4795.8070907@iol.ie> <42ED490D.1000903@iol.ie> <42ED4DEB.9050602@iol.ie> Message-ID: <42ED4F7C.3010403@ucsd.edu> Victor Reijs wrote: > File "C:\Python22\Lib\site-packages\scipy\optimize\lbfgsb.py", line > 33, in ? > def fmin_l_bfgs_b(func, x0, fprime=None, args=(), > NameError: name 'False' is not defined" Oops. Looks like we introduced a Python 2.3 dependency. You can just change False to 0. -- 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 genietdev0 at iol.ie Sun Jul 31 18:54:43 2005 From: genietdev0 at iol.ie (Victor Reijs) Date: Sun, 31 Jul 2005 23:54:43 +0100 Subject: [SciPy-user] PSP python (was crashing python) In-Reply-To: <42ED4F7C.3010403@ucsd.edu> References: <1122843846.7527@mail.enthought.com> <42ED417A.2010807@iol.ie> <42ED435B.7060105@ucsd.edu> <42ED469B.1090304@iol.ie> <42ED4795.8070907@iol.ie> <42ED490D.1000903@iol.ie> <42ED4DEB.9050602@iol.ie> <42ED4F7C.3010403@ucsd.edu> Message-ID: <42ED56B3.4040308@iol.ie> Hello Robert, That helped! Thanks. It now looks to work. I will do some more testing. All the best, Victor Robert Kern wrote: > Victor Reijs wrote: > >> File "C:\Python22\Lib\site-packages\scipy\optimize\lbfgsb.py", line >> 33, in ? >> def fmin_l_bfgs_b(func, x0, fprime=None, args=(), >> NameError: name 'False' is not defined" > > > Oops. Looks like we introduced a Python 2.3 dependency. You can just > change False to 0. >