From sigidagi at hotmail.com Tue Jul 1 06:19:10 2003 From: sigidagi at hotmail.com (Sigis Dagilis) Date: Tue, 01 Jul 2003 10:19:10 +0000 Subject: [SciPy-user] scipy.plt and py2exe problem Message-ID: Hi, I build an application with wxPython (GUI) and use scipy.plt module to plot a data. The application works OK - "python myfile.py". The problem appears when I tryed to compile script to exe file using py2exe: The following modules were not found: Image line_endings scipy_base.transpose curses utilsc scipy_base.sqrt scipy_base.imag scipy_base.product scipy_base.diag scipy.fftpack.ifft2 scipy_base.shape scipy_base.polydiv reportlab.pdfbase.pdfmetrics scipy_base.roots scipy_base.expand_dims scipy_base.polyder scipy_base.nan scipy_base.atleast_2d scipy_base.sort controls2c sizersc scipy_base.where scipy_base.array scipy_base.reshape scipy_base.poly1d f2py2e scipy_base.amin scipy_base.isscalar scipy_base.eye scipy.fftpack.fft2 scipy_base.around scipy_base.poly scipy_base.polyint scipy_base.NewAxis .... ... Can enyone help me to solve this problem? _________________________________________________________________ F? MSN Hotmail p? mobilen http://www.msn.dk/mobile From "oliphant." at ee.byu.edu Tue Jul 1 19:43:51 2003 From: "oliphant." at ee.byu.edu (Travis Oliphant) Date: Tue, 01 Jul 2003 17:43:51 -0600 Subject: [SciPy-user] read_array References: <3F00E5A3.40005@snet.net> Message-ID: <3F021CB7.8080907@ee.byu.edu> Cliff Martin wrote: > I'm trying to read a large ASCII file (each line has a carraige return) > with elements separated by spaces(it can be variable due to large number > differences). My code is below and the error message from the code > follows. By the way the size of the array is 223 by 221. This read > works quite well with a smaller file. What is the problem? > > A = scipy.io.read_array('c:/transfer/av56tst1.int') > Traceback (most recent call last): > File "", line 1, in ? > File "C:\Python22\Lib\site-packages\scipy\io\array_import.py", line > 369, in read_array > outarr[k][row] = vals[k] > ValueError: matrices are not aligned for copy > This looks like one of the lines is not the same as the others (or is not being interpreted as the same). Are you sure each line has the same number of elements? Are there lines with text on them? If you send a copy of your file I can tell you specifically what's wrong. -Travis O. From guest at guest.com Wed Jul 2 00:15:18 2003 From: guest at guest.com (guest) Date: Wed, 2 Jul 2003 12:15:18 +0800 Subject: [SciPy-user] The Uncertainty Principle Is Untenable Message-ID: <20030702053650.A2F373EB0C@www.scipy.com> please reply to hdgbyi at public.guangzhou.gd.cn thank you. THE UNCERTAINTY PRINCIPLE IS UNTENABLE By re-analysing Heisenberg's Gamma-Ray Microscope experiment and the ideal experiment from which the uncertainty principle is derived, it is actually found that the uncertainty principle can not be obtained from them. It is therefore found to be untenable. Key words: uncertainty principle; Heisenberg's Gamma-Ray Microscope Experiment; ideal experiment Ideal Experiment 1 Heisenberg's Gamma-Ray Microscope Experiment A free electron sits directly beneath the center of the microscope's lens (please see AIP page http://www.aip.org/history/heisenberg/p08b.htm or diagram below) . The circular lens forms a cone of angle 2A from the electron. The electron is then illuminated from the left by gamma rays--high energy light which has the shortest wavelength. These yield the highest resolution, for according to a principle of wave optics, the microscope can resolve (that is, "see" or distinguish) objects to a size of dx, which is related to and to the wavelength L of the gamma ray, by the expression: dx = L/(2sinA) (1) However, in quantum mechanics, where a light wave can act like a particle, a gamma ray striking an electron gives it a kick. At the moment the light is diffracted by the electron into the microscope lens, the electron is thrust to the right. To be observed by the microscope, the gamma ray must be scattered into any angle within the cone of angle 2A. In quantum mechanics, the gamma ray carries momentum as if it were a particle. The total momentum p is related to the wavelength by the formula, p = h / L, where h is Planck's constant. (2) In the extreme case of diffraction of the gamma ray to the right edge of the lens, the total momentum would be the sum of the electron's momentum P'x in the x direction and the gamma ray's momentum in the x direction: P' x + (h sinA) / L', where L' is the wavelength of the deflected gamma ray. In the other extreme, the observed gamma ray recoils backward, just hitting the left edge of the lens. In this case, the total momentum in the x direction is: P''x - (h sinA) / L''. The final x momentum in each case must equal the initial x momentum, since momentum is conserved. Therefore, the final x momenta are equal to each other: P'x + (h sinA) / L' = P''x - (h sinA) / L'' (3) If A is small, then the wavelengths are approximately the same, L' ~ L" ~ L. So we have P''x - P'x = dPx ~ 2h sinA / L (4) Since dx = L/(2 sinA), we obtain a reciprocal relationship between the minimum uncertainty in the measured position, dx, of the electron along the x axis and the uncertainty in its momentum, dPx, in the x direction: dPx ~ h / dx or dPx dx ~ h. (5) For more than minimum uncertainty, the "greater than" sign may added. Except for the factor of 4pi and an equal sign, this is Heisenberg's uncertainty relation for the simultaneous measurement of the position and momentum of an object. Re-analysis To be seen by the microscope, the gamma ray must be scattered into any angle within the cone of angle 2A. The microscope can resolve (that is, "see" or distinguish) objects to a size of dx, which is related to and to the wavelength L of the gamma ray, by the expression: dx = L/(2sinA) (1) This is the resolving limit of the microscope and it is the uncertain quantity of the object's position. The microscope can not see the object whose size is smaller than its resolving limit, dx. Therefore, to be seen by the microscope, the size of the electron must be larger than or equal to the resolving limit. But if the size of the electron is larger than or equal to the resolving limit dx, the electron will not be in the range dx. Therefore, dx can not be deemed to be the uncertain quantity of the electron's position which can be seen by the microscope, but deemed to be the uncertain quantity of the electron's position which can not be seen by the microscope. To repeat, dx is uncertainty in the electron's position which can not be seen by the microscope. To be seen by the microscope, the gamma ray must be scattered into any angle within the cone of angle 2A, so we can measure the momentum of the electron. dPx is the uncertainty in the electron's momentum which can be seen by microscope. What relates to dx is the electron where the size is smaller than the resolving limit. When the electron is in the range dx, it can not be seen by the microscope, so its position is uncertain. What relates to dPx is the electron where the size is larger than or equal to the resolving limit .The electron is not in the range dx, so it can be seen by the microscope and its position is certain. Therefore, the electron which relates to dx and dPx respectively is not the same. What we can see is the electron where the size is larger than or equal to the resolving limit dx and has a certain position, dx = 0. Quantum mechanics does not rely on the size of the object, but on Heisenberg's Gamma-Ray Microscope experiment. The use of the microscope must relate to the size of the object. The size of the object which can be seen by the microscope must be larger than or equal to the resolving limit dx of the microscope, thus the uncertain quantity of the electron's position does not exist. The gamma ray which is diffracted by the electron can be scattered into any angle within the cone of angle 2A, where we can measure the momentum of the electron. What we can see is the electron which has a certain position, dx = 0, so that in no other position can we measure the momentum of the electron. In Quantum mechanics, the momentum of the electron can be measured accurately when we measure the momentum of the electron only, therefore, we have gained dPx = 0. And, dPx dx =0. (6) Ideal experiment 2 Single Slit Diffraction Experiment Suppose a particle moves in the Y direction originally and then passes a slit with width dx(Please see diagram below) . The uncertain quantity of the particle's position in the X direction is dx, and interference occurs at the back slit . According to Wave Optics , the angle where No.1 min of interference pattern is can be calculated by following formula: sinA=L/2dx (1) and L=h/p where h is Planck's constant. (2) So the uncertainty principle can be obtained dPx dx ~ h (5) Re-analysis According to Newton first law , if an external force in the X direction does not affect the particle, it will move in a uniform straight line, ( Motion State or Static State) , and the motion in the Y direction is unchanged .Therefore , we can learn its position in the slit from its starting point. The particle can have a certain position in the slit and the uncertain quantity of the position is dx =0. According to Newton first law , if the external force at the X direction does not affect particle, and the original motion in the Y direction is not changed , the momentum of the particle int the X direction will be Px=0 and the uncertain quantity of the momentum will be dPx =0. This gives: dPx dx =0. (6) No experiment negates NEWTON FIRST LAW. Whether in quantum mechanics or classical mechanics, it applies to the microcosmic world and is of the form of the Energy-Momentum conservation laws. If an external force does not affect the particle and it does not remain static or in uniform motion, it has disobeyed the Energy-Momentum conservation laws. Under the above ideal experiment , it is considered that the width of the slit is the uncertain quantity of the particle's position. But there is certainly no reason for us to consider that the particle in the above experiment has an uncertain position, and no reason for us to consider that the slit's width is the uncertain quantity of the particle. Therefore, the uncertainty principle, dPx dx ~ h (5) which is derived from the above experiment is unreasonable. Conclusion >From the above re-analysis , it is realized that the ideal experiment demonstration for the uncertainty principle is untenable. Therefore, the uncertainty principle is untenable. Reference: 1. Max Jammer. (1974) The philosophy of quantum mechanics (John wiley & sons , Inc New York ) Page 65 2. Ibid, Page 67 3. http://www.aip.org/history/heisenberg/p08b.htm Author : BingXin Gong Postal address : P.O.Box A111 YongFa XiaoQu XinHua HuaDu GuangZhou 510800 P.R.China E-mail: hdgbyi at public.guangzhou.gd.cn Tel: 86---20---86856616 From bettycld99 at netscape.net Wed Jul 2 10:21:50 2003 From: bettycld99 at netscape.net (betty claudia) Date: Wed, 02 Jul 2003 16:21:50 +0200 Subject: [SciPy-user] CONGRATULATIONS (CLAIM YOUR WINNINGS) Message-ID: <20030702154410.3F7223EB09@www.scipy.com> Subject: LOTTERY WINNING INFORMATION PREMIUM TRUST AGENCY (ACCREDITED LICENSED AGENT TO GLOBAL LOTTERY INTERNATIONAL) Ref. Nnumbe: 132/756/4007 Batch Number: 538901527-BB67 Sir/Madam We are pleased to inform you of the result of the Lottery Winners International programs held on the 1st may, 2003. Your e-mail address attached to ticket number 27511465896-6410 with serial number 3772-510 drew lucky numbers 7-14-88-23-31-45 which consequently won in the 1st category, you have therefore been approved for a lump sum pay out of US$ 1,000,000.00 (One Million United States Dollars) CONGRATULATIONS!!! Due to mix up of some numbers and names, we ask that you keep your winning information confidential until your claims has been processed and your money Remitted to you. This is part of our security protocol to avoid double claiming and unwarranted abuse of this program by some participants. All participants were selected through a computer ballot system drawn from over 20,000 company and 30,000,000 individual email addresses and names from all over the world. This promotional program takes place every three year. This lottery was promoted by the software corporation to compensate some few individuals with website and email addresses, we hope with part of your winning you will take part in our next year USD50 million international lottery. To file for your claim, please contact our FIDUCIAL Agent MR. ERIC DONALDS of GLOBAL Trust Agency of TEL: 0031-630-436-827 FAX: 0031-645-260-302 Email: ericdonaldson at hotmail.com Remember, all winning must be claimed not later than 28th of May 2003. After this date all unclaimed funds will be included in the next stake. Please note in order to avoid unnecessary delays and complications please remember to quote your reference number and batch numbers in all correspondence. Furthermore, should there be any change of address do inform our agent as soon as possible. Congratulations once more from our members of staff and thank you for being part of our promotional program. Note: Anybody under the age of 18 is automatically disqualified. Sincerely yours, Mrs. Betty Claudia Lottery Coordinator Subject: LOTTERY WINNING INFORMATION PREMIUM TRUST AGENCY (ACCREDITED LICENSED AGENT TO GLOBAL LOTTERY INTERNATIONAL) Ref. Nnumbe: 132/756/4007 Batch Number: 538901527-BB67 Sir/Madam We are pleased to inform you of the result of the Lottery Winners International programs held on the 1st may, 2003. Your e-mail address attached to ticket number 27511465896-6410 with serial number 3772-510 drew lucky numbers 7-14-88-23-31-45 which consequently won in the 1st category, you have therefore been approved for a lump sum pay out of US$ 1,000,000.00 (One Million United States Dollars) CONGRATULATIONS!!! Due to mix up of some numbers and names, we ask that you keep your winning information confidential until your claims has been processed and your money Remitted to you. This is part of our security protocol to avoid double claiming and unwarranted abuse of this program by some participants. All participants were selected through a computer ballot system drawn from over 20,000 company and 30,000,000 individual email addresses and names from all over the world. This promotional program takes place every three year. This lottery was promoted by the software corporation to compensate some few individuals with website and email addresses, we hope with part of your winning you will take part in our next year USD50 million international lottery. To file for your claim, please contact our FIDUCIAL Agent MR. ERIC DONALDS of GLOBAL Trust Agency of TEL: 0031-630-436-827 FAX: 0031-645-260-302 Email: ericdonaldson at hotmail.com Remember, all winning must be claimed not later than 28th of May 2003. After this date all unclaimed funds will be included in the next stake. Please note in order to avoid unnecessary delays and complications please remember to quote your reference number and batch numbers in all correspondence. Furthermore, should there be any change of address do inform our agent as soon as possible. Congratulations once more from our members of staff and thank you for being part of our promotional program. Note: Anybody under the age of 18 is automatically disqualified. Sincerely yours, Mrs. Betty Claudia Lottery Coordinator From astraw at insightscientific.com Wed Jul 2 06:17:47 2003 From: astraw at insightscientific.com (Andrew Straw) Date: Wed, 2 Jul 2003 12:17:47 +0200 Subject: [SciPy-user] help for the math-challenged Message-ID: <6D83DA96-AC76-11D7-BE9A-00039311EA24@insightscientific.com> Hi, I have what I presume is an easy question for anyone who knows their math, which I don't: What is the "critical frequency", as mentioned in the help for scipy.signal.iirfilter? ("Wn -- a scalar or length-2 sequence giving the critical frequencies.") More specifically, for a 1st order filter, how is the classical time constant related to the critical frequency? By trial and error, I find 1.0/(3.19*tau*hz) works. In other words, this is the code I use: b,a=scipy.signal.iirfilter(1,1.0/(3.19*tau*hz),btype='lowpass') So, my question, more specifically, is what is this 3.19 constant? Is there any way I could have gleaned that from reading the docstring or reading the source (which I did)? Or should I really go take that engineering math 101 course I've been avoiding all these years? Cheers! Andrew From camartin at snet.net Wed Jul 2 12:43:45 2003 From: camartin at snet.net (Cliff Martin) Date: Wed, 02 Jul 2003 12:43:45 -0400 Subject: [SciPy-user] Re: SciPy-user digest, Vol 1 #430 - 4 msgs References: <20030702170001.6620.92756.Mailman@scipy.org> Message-ID: <3F030BC1.8090203@snet.net> Cliff Martin wrote: >> I'm trying to read a large ASCII file (each line has a carraige return) >> with elements separated by spaces(it can be variable due to large number >> differences). My code is below and the error message from the code >> follows. By the way the size of the array is 223 by 221. This read >> works quite well with a smaller file. What is the problem? >> >> A = scipy.io.read_array('c:/transfer/av56tst1.int') >> Traceback (most recent call last): >> File "", line 1, in ? >> File "C:\Python22\Lib\site-packages\scipy\io\array_import.py", line >> 369, in read_array >> outarr[k][row] = vals[k] >> ValueError: matrices are not aligned for copy >> > > This looks like one of the lines is not the same as the others (or is not being interpreted as the same). Are you sure each line has the same number of elements? Are there lines with text on them? If you send a copy of your file I can tell you specifically what's wrong. -Travis O. Travis, Attached is the file. Re-looking at the file , because it is different rows than columns the last line has only three elements vs. the other lines each having 10. This is an interferometry file in ASCII. I've stripped the headers because I know how to handle them and what I'm going to do. Thanks for the help. Cliff Martin -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: AV56tst1.INT URL: From Marketinger at yaomail.vicp.net Tue Jul 1 21:36:00 2003 From: Marketinger at yaomail.vicp.net (Judy) Date: Wed, 2 Jul 2003 09:36:00 +0800 Subject: [SciPy-user] Marketing Expert Message-ID: <20030703025109.0BB5A3EB0C@www.scipy.com> E-mail Marketing is one of the most effective and inexpensive ways to promote your products and services. We offer a complete E-mail Marketing solution with quality service and the lowest prices. The result is that you will enjoy more success. 1. Targeted E-mail Addresses We can supply targeted e-mail addresses according to your requirements, which are compiled only on your order, such as region / country / field / occupation / Domain Name etc. We will customize your customer e-mail addresses. * We have millions of e-mail addresses in a wide variety of categories. 2. Targeted Mailing If you are worried about any complications or consequences with sending out targeted e-mails, or want to avoid the work of sending out targeted e-mails. We will do it for you! We will send your e-mail message to your targeted customers. * We can Bullet Proof your Web Site. We also offer a wide variety of e-mail marketing software. For more details, you can refer to our web site: http://www.biz-aiding.com Our services will help you get more business opportunities. Regards! Mrs Judy Customer Support www.biz-aiding.com E-mail Marketing, at Great Fees. ************************************************************************ Receiving this email because you registered to receive special offers from one of our partners. If you would prefer not to receive future e-mail, mail to:Contacter at yiwu.com?subject=REMOVE ************************************************************************ From jdhunter at ace.bsd.uchicago.edu Thu Jul 3 10:01:52 2003 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Thu, 03 Jul 2003 09:01:52 -0500 Subject: [SciPy-user] help for the math-challenged In-Reply-To: <6D83DA96-AC76-11D7-BE9A-00039311EA24@insightscientific.com> (Andrew Straw's message of "Wed, 2 Jul 2003 12:17:47 +0200") References: <6D83DA96-AC76-11D7-BE9A-00039311EA24@insightscientific.com> Message-ID: >>>>> "Andrew" == Andrew Straw writes: Andrew> What is the "critical frequency", as mentioned in the help Andrew> for scipy.signal.iirfilter? ("Wn -- a scalar or length-2 Andrew> sequence giving the critical frequencies.") More Andrew> specifically, for a 1st order filter, how is the classical Andrew> time constant related to the critical frequency? By trial Andrew> and error, I find 1.0/(3.19*tau*hz) works. In other Andrew> words, this is the code I use: The critical frequency is the frequency at which there is 3dB of attenuation of the signal amplitude. For a first order RC filter, this is 1/RC = 1/tau (Hz). JDH From andrew.straw at adelaide.edu.au Thu Jul 3 12:38:31 2003 From: andrew.straw at adelaide.edu.au (Andrew Straw) Date: Thu, 3 Jul 2003 18:38:31 +0200 Subject: [SciPy-user] Fwd: scipy.signal.lfilter: memory leak fixed Message-ID: From: Andrew Straw Date: Thu Jul 3, 2003 6:31:52 PM Europe/Berlin To: scipy-user at scipy.net Subject: scipy.signal.lfilter: memory leak fixed Hi All, I found and fixed a memory leak when lfilter was called with initial conditions for the filter delays set in zi. Here's the patch. Please apply it to CVS. Cheers! Andrew -------------- next part -------------- A non-text attachment was scrubbed... Name: lfilter_mem_leak.patch Type: application/octet-stream Size: 569 bytes Desc: not available URL: From andrew.straw at adelaide.edu.au Thu Jul 3 12:37:45 2003 From: andrew.straw at adelaide.edu.au (Andrew Straw) Date: Thu, 3 Jul 2003 18:37:45 +0200 Subject: [SciPy-user] help for the math-challenged Message-ID: John Hunter wrote: >>>>>> "Andrew" == Andrew Straw writes: > > Andrew> What is the "critical frequency", as mentioned in the help > Andrew> for scipy.signal.iirfilter? ("Wn -- a scalar or length-2 > Andrew> sequence giving the critical frequencies.") More > Andrew> specifically, for a 1st order filter, how is the classical > Andrew> time constant related to the critical frequency? By trial > Andrew> and error, I find 1.0/(3.19*tau*hz) works. In other > Andrew> words, this is the code I use: > > The critical frequency is the frequency at which there is 3dB of > attenuation of the signal amplitude. For a first order RC filter, > this is 1/RC = 1/tau (Hz). That's what I originally thought (and hence the question). However, my code (which you snipped out) works, which is a state I acheived only after I actually playing around with the output. Therefore, my question is not "is my code wrong?", but "why is my code right?". Then again I suppose there could be a bug in scipy and my code actually was right! Nah! Cheers! Andrew From andrew.straw at adelaide.edu.au Thu Jul 3 12:39:29 2003 From: andrew.straw at adelaide.edu.au (Andrew Straw) Date: Thu, 3 Jul 2003 18:39:29 +0200 Subject: [SciPy-user] Re: help for the math-challenged Message-ID: John Hunter wrote: >>>>>> "Andrew" == Andrew Straw writes: > > Andrew> What is the "critical frequency", as mentioned in the help > Andrew> for scipy.signal.iirfilter? ("Wn -- a scalar or length-2 > Andrew> sequence giving the critical frequencies.") More > Andrew> specifically, for a 1st order filter, how is the classical > Andrew> time constant related to the critical frequency? By trial > Andrew> and error, I find 1.0/(3.19*tau*hz) works. In other > Andrew> words, this is the code I use: > > The critical frequency is the frequency at which there is 3dB of > attenuation of the signal amplitude. For a first order RC filter, > this is 1/RC = 1/tau (Hz). That's what I originally thought (and hence the question). However, my code (which you snipped out) works, which is a state I acheived only after I actually playing around with the output. Therefore, my question is not "is my code wrong?", but "why is my code right?". Then again I suppose there could be a bug in scipy and my code actually was right! Nah! Cheers! Andrew From "oliphant." at ee.byu.edu Thu Jul 3 15:01:44 2003 From: "oliphant." at ee.byu.edu (Travis Oliphant) Date: Thu, 03 Jul 2003 13:01:44 -0600 Subject: [SciPy-user] Re: SciPy-user digest, Vol 1 #430 - 4 msgs References: <20030702170001.6620.92756.Mailman@scipy.org> <3F030BC1.8090203@snet.net> Message-ID: <3F047D98.2030107@ee.byu.edu> It looks like this line will read it >>> a = io.read_array('AV56tst1.INT',lines=((0,4928),),atype='l') The problem is the last line is too short. Notice I just use the lines option to read in all but the last line. (I used wc to find out how many lines there were). Note the atype argument specifies long integer array output (instead of the default double). We should probably change the behavior here to just insert zeros in the missing columns. I will look into this too see if it makes sense with the other features. The error message is a bit cryptic. > Travis, > > Attached is the file. Re-looking at the file , because it is different > rows than columns the last line has only three elements vs. the other > lines each having 10. This is an interferometry file in ASCII. I've > stripped the headers because I know how to handle them and what I'm > going to do. Thanks for the help. > > Cliff Martin From nwagner at mecha.uni-stuttgart.de Fri Jul 4 03:54:26 2003 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Fri, 04 Jul 2003 09:54:26 +0200 Subject: [SciPy-user] SuperLU, UMFPACK, ... Message-ID: <3F0532B2.126E55E1@mecha.uni-stuttgart.de> Hi all, How do I invoke SuperLU and UMFPACK in scipy ? A small example illustrating the main features would be appreciated. Thanks in advance. Nils From nwagner at mecha.uni-stuttgart.de Fri Jul 4 04:03:18 2003 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Fri, 04 Jul 2003 10:03:18 +0200 Subject: [SciPy-user] The Matrix Computation Toolbox Message-ID: <3F0534C6.DFC6F14F@mecha.uni-stuttgart.de> Hi all, There exists an interesting matrix computation toolbox that has been developed by Nicholas J. Higham. http://www.maths.man.ac.uk/~higham/mctoolbox/ The toolbox is distributed under the terms of the GNU General Public License (version 2 of the License, or any later version) as published by the Free Software Foundation. Maybe the features of scipy can benefit from this toolbox. However, it is a collection of Matlab m-files. Nils From Pierre.Vern at fr.thalesgroup.com Fri Jul 4 12:26:34 2003 From: Pierre.Vern at fr.thalesgroup.com (Vern Pierre) Date: Fri, 4 Jul 2003 18:26:34 +0200 Subject: [SciPy-user] unsubscribe Message-ID: <29513D596CA7534EABE9C2D193A2EAA25E9BE8@colombe.tus.fr.thales> unsubscribe -----Message d'origine----- De : scipy-user-request at scipy.net [mailto:scipy-user-request at scipy.net] Envoy? : vendredi 4 juillet 2003 19:00 ? : scipy-user at scipy.net Objet : SciPy-user digest, Vol 1 #433 - 6 msgs Send SciPy-user mailing list submissions to scipy-user at scipy.net To subscribe or unsubscribe via the World Wide Web, visit http://www.scipy.net/mailman/listinfo/scipy-user or, via email, send a message with subject or body 'help' to scipy-user-request at scipy.net You can reach the person managing the list at scipy-user-admin at scipy.net When replying, please edit your Subject line so it is more specific than "Re: Contents of SciPy-user digest..." Today's Topics: 1. Fwd: scipy.signal.lfilter: memory leak fixed (Andrew Straw) 2. help for the math-challenged (Andrew Straw) 3. Re: help for the math-challenged (Andrew Straw) 4. Re: Re: SciPy-user digest, Vol 1 #430 - 4 msgs (Travis Oliphant) 5. SuperLU, UMFPACK, ... (Nils Wagner) 6. The Matrix Computation Toolbox (Nils Wagner) --__--__-- Message: 1 Date: Thu, 3 Jul 2003 18:38:31 +0200 From: Andrew Straw To: scipy-user at scipy.net Subject: [SciPy-user] Fwd: scipy.signal.lfilter: memory leak fixed Reply-To: scipy-user at scipy.net --Apple-Mail-14--513782946 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed From: Andrew Straw Date: Thu Jul 3, 2003 6:31:52 PM Europe/Berlin To: scipy-user at scipy.net Subject: scipy.signal.lfilter: memory leak fixed Hi All, I found and fixed a memory leak when lfilter was called with initial conditions for the filter delays set in zi. Here's the patch. Please apply it to CVS. Cheers! Andrew --Apple-Mail-14--513782946 Content-Disposition: attachment; filename=lfilter_mem_leak.patch Content-Transfer-Encoding: 7bit Content-Type: application/octet-stream; x-unix-mode=0666; name="lfilter_mem_leak.patch" Index: sigtoolsmodule.c =================================================================== RCS file: /home/cvsroot/world/scipy/Lib/signal/sigtoolsmodule.c,v retrieving revision 1.9 diff -c -r1.9 sigtoolsmodule.c *** sigtoolsmodule.c 1 Feb 2003 00:10:01 -0000 1.9 --- sigtoolsmodule.c 3 Jul 2003 17:24:24 -0000 *************** *** 2135,2141 **** } else { free(vi); free(vf); ! return Py_BuildValue("(OO)",arY,arVf); } fail: --- 2135,2141 ---- } else { free(vi); free(vf); ! return Py_BuildValue("(NN)",arY,arVf); } fail: --Apple-Mail-14--513782946-- --__--__-- Message: 2 Date: Thu, 3 Jul 2003 18:37:45 +0200 Subject: [SciPy-user] help for the math-challenged From: Andrew Straw To: scipy-user at scipy.net Reply-To: scipy-user at scipy.net John Hunter wrote: >>>>>> "Andrew" == Andrew Straw writes: > > Andrew> What is the "critical frequency", as mentioned in the help > Andrew> for scipy.signal.iirfilter? ("Wn -- a scalar or length-2 > Andrew> sequence giving the critical frequencies.") More > Andrew> specifically, for a 1st order filter, how is the classical > Andrew> time constant related to the critical frequency? By trial > Andrew> and error, I find 1.0/(3.19*tau*hz) works. In other > Andrew> words, this is the code I use: > > The critical frequency is the frequency at which there is 3dB of > attenuation of the signal amplitude. For a first order RC filter, > this is 1/RC = 1/tau (Hz). That's what I originally thought (and hence the question). However, my code (which you snipped out) works, which is a state I acheived only after I actually playing around with the output. Therefore, my question is not "is my code wrong?", but "why is my code right?". Then again I suppose there could be a bug in scipy and my code actually was right! Nah! Cheers! Andrew --__--__-- Message: 3 Date: Thu, 3 Jul 2003 18:39:29 +0200 Subject: [SciPy-user] Re: help for the math-challenged From: Andrew Straw To: scipy-user at scipy.net Reply-To: scipy-user at scipy.net John Hunter wrote: >>>>>> "Andrew" == Andrew Straw writes: > > Andrew> What is the "critical frequency", as mentioned in the help > Andrew> for scipy.signal.iirfilter? ("Wn -- a scalar or length-2 > Andrew> sequence giving the critical frequencies.") More > Andrew> specifically, for a 1st order filter, how is the classical > Andrew> time constant related to the critical frequency? By trial > Andrew> and error, I find 1.0/(3.19*tau*hz) works. In other > Andrew> words, this is the code I use: > > The critical frequency is the frequency at which there is 3dB of > attenuation of the signal amplitude. For a first order RC filter, > this is 1/RC = 1/tau (Hz). That's what I originally thought (and hence the question). However, my code (which you snipped out) works, which is a state I acheived only after I actually playing around with the output. Therefore, my question is not "is my code wrong?", but "why is my code right?". Then again I suppose there could be a bug in scipy and my code actually was right! Nah! Cheers! Andrew --__--__-- Message: 4 Date: Thu, 03 Jul 2003 13:01:44 -0600 From: Travis Oliphant <"oliphant."@ee.byu.edu> To: scipy-user at scipy.net, camartin at snet.net Subject: Re: [SciPy-user] Re: SciPy-user digest, Vol 1 #430 - 4 msgs Reply-To: scipy-user at scipy.net It looks like this line will read it >>> a = io.read_array('AV56tst1.INT',lines=((0,4928),),atype='l') The problem is the last line is too short. Notice I just use the lines option to read in all but the last line. (I used wc to find out how many lines there were). Note the atype argument specifies long integer array output (instead of the default double). We should probably change the behavior here to just insert zeros in the missing columns. I will look into this too see if it makes sense with the other features. The error message is a bit cryptic. > Travis, > > Attached is the file. Re-looking at the file , because it is different > rows than columns the last line has only three elements vs. the other > lines each having 10. This is an interferometry file in ASCII. I've > stripped the headers because I know how to handle them and what I'm > going to do. Thanks for the help. > > Cliff Martin --__--__-- Message: 5 Date: Fri, 04 Jul 2003 09:54:26 +0200 From: Nils Wagner To: "scipy-user at scipy.net" Subject: [SciPy-user] SuperLU, UMFPACK, ... Reply-To: scipy-user at scipy.net Hi all, How do I invoke SuperLU and UMFPACK in scipy ? A small example illustrating the main features would be appreciated. Thanks in advance. Nils --__--__-- Message: 6 Date: Fri, 04 Jul 2003 10:03:18 +0200 From: Nils Wagner To: scipy-dev at scipy.net, "scipy-user at scipy.net" Subject: [SciPy-user] The Matrix Computation Toolbox Reply-To: scipy-user at scipy.net Hi all, There exists an interesting matrix computation toolbox that has been developed by Nicholas J. Higham. http://www.maths.man.ac.uk/~higham/mctoolbox/ The toolbox is distributed under the terms of the GNU General Public License (version 2 of the License, or any later version) as published by the Free Software Foundation. Maybe the features of scipy can benefit from this toolbox. However, it is a collection of Matlab m-files. Nils --__--__-- _______________________________________________ SciPy-user mailing list SciPy-user at scipy.net http://www.scipy.net/mailman/listinfo/scipy-user End of SciPy-user Digest From chris at fonnesbeck.org Sun Jul 6 14:53:56 2003 From: chris at fonnesbeck.org (Christopher Fonnesbeck) Date: Sun, 6 Jul 2003 14:53:56 -0400 Subject: [SciPy-user] gplt font question Message-ID: <322F2838-AFE3-11D7-9B03-000A956FDAC0@fonnesbeck.org> Quick question to anyone familiar with gplt: How can you manipulate font size in gplt? The default axis labels are way to small for publication-quality plots. Thanks, Chris -- Christopher J. Fonnesbeck (chris at fonnesbeck dot org) GA Coop. Fish & Wildlife Research Unit, University of Georgia From arnd.baecker at web.de Sun Jul 6 16:30:28 2003 From: arnd.baecker at web.de (Arnd Baecker) Date: Sun, 6 Jul 2003 22:30:28 +0200 (CEST) Subject: [SciPy-user] gplt font question In-Reply-To: <322F2838-AFE3-11D7-9B03-000A956FDAC0@fonnesbeck.org> References: <322F2838-AFE3-11D7-9B03-000A956FDAC0@fonnesbeck.org> Message-ID: Hi, within gnuplot you can for example use something like gnuplot> set term post enh port "Times-Roman" 20 Terminal type set to 'postscript' Options are 'portrait enhanced monochrome blacktext \ dashed dashlength 1.0 linewidth 1.0 defaultplex \ "Times-Roman" 20' If this is not enough information please let me know and I will cook up a small example tomorrow. Arnd On Sun, 6 Jul 2003, Christopher Fonnesbeck wrote: > Quick question to anyone familiar with gplt: How can you manipulate > font size in gplt? The default axis labels are way to small for > publication-quality plots. > > Thanks, > Chris > -- > Christopher J. Fonnesbeck (chris at fonnesbeck dot org) > GA Coop. Fish & Wildlife Research Unit, University of Georgia > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From gvermeul at grenoble.cnrs.fr Mon Jul 7 09:03:05 2003 From: gvermeul at grenoble.cnrs.fr (Gerard Vermeulen) Date: Mon, 7 Jul 2003 15:03:05 +0200 Subject: [SciPy-user] Announcing PyQwt-3.7 Message-ID: <20030707150305.0ab78e50.gvermeul@grenoble.cnrs.fr> PyQwt-3.7 = FAST and EASY data plotting for Python and Qt. PyQwt is a set of Python bindings for the Qwt C++ class library. Qwt extends the Qt framework with widgets for scientific and engineering applications. PyQwt really shines with Numeric and/or numarray. Numeric and numarray extend Python with new data types that make Python an ideal language for numerical computing and experimentation. PyQwt requires and extends PyQt, a set of Python bindings for Qt. PyQwt runs on Windows and Unix/Linux. The home page of PyQwt has moved to http://pyqwt.sourceforge.net. New features in PyQwt-3.7: 1. PyQwt will work with either Numeric, or numarray or both (depending on the presence of Numeric and numarray during PyQwt's build). 2. PyQwt will work without Numeric and numarray (is not recommended). 3. PyQwt is compatible with the Python Command Line Interpreter or IPython, provided that the readline module is installed: Qt's event processing is scheduled by the readline library through (int)(*PyOS_InputHook)(void). 4. PyQwt is always rlcompleter-friendly, even though PyQt-3.6 and earlier are not (the dir() function has been enhanced in PyQt-3.7). 5. The module qwt.qplt is enhanced: qwt.qplt is sugar coating for the QwtPlot widget to facilitate plotting from an interpreter. 6. QwtImagePlot maps a 2-dimensional array of z-values on a QImage using a color scale. 7. New Qwt widgets: QwtDial and QwtCompass. 8. Works with PyQt-3.7, PyQt-3.6, PyQt-3.5 and PyQt-3.4. 9. Works with Qt-2.3.x, Qt-3.0.x and Qt-3.1.x. Gerard Vermeulen From chris at fonnesbeck.org Mon Jul 7 11:47:55 2003 From: chris at fonnesbeck.org (Christopher Fonnesbeck) Date: Mon, 7 Jul 2003 11:47:55 -0400 Subject: [SciPy-user] gplt font question In-Reply-To: <20030707170001.30992.81611.Mailman@scipy.org> Message-ID: <6062E54C-B092-11D7-A64A-000A956FDAC0@fonnesbeck.org> How do you make such a change from scipy? I would like to avoid having to open gnuplot to fine-tune the plots. Thanks for your help, Chris On Monday, July 7, 2003, at 01:00 PM, scipy-user-request at scipy.net wrote: > Hi, > > within gnuplot you can for example use something like > gnuplot> set term post enh port "Times-Roman" 20 > Terminal type set to 'postscript' > Options are 'portrait enhanced monochrome blacktext \ > dashed dashlength 1.0 linewidth 1.0 defaultplex \ > "Times-Roman" 20' > If this is not enough information please let me know > and I will cook up a small example tomorrow. > > Arnd > > > -- Christopher J. Fonnesbeck (chris at fonnesbeck dot org) GA Coop. Fish & Wildlife Research Unit, University of Georgia From dmorrill at austin.rr.com Mon Jul 7 12:19:53 2003 From: dmorrill at austin.rr.com (David C. Morrill) Date: Mon, 7 Jul 2003 11:19:53 -0500 Subject: [SciPy-user] Updated version of Python 2.2.3 (Enthought Edition) now available Message-ID: <002701c344a3$99220f10$757ba8c0@brutus> Just wanted to let everyone know that an updated version of Python 2.2.3 (Enthought Edition) for Windows is available at: http://www.enthought.com/python/ The main changes are several new packages: a.. MayaVi 1.2: 3D Data Visualization Tool b.. ScientificPython 2.4.3: A collection of Python modules for scientific computing c.. F2PY 2.32.225-1419: A Fortran to Python interface generator d.. ZODB3 3.1: ZODB and ZEO Object DataBase e.. Gadfly 1.0.0: An SQL Relational Database in Python f.. PySQLite 0.4.3: A Python Extension for the SQLite embedded relational database Also, nearly all of the documentation has been collected together into a single, searchable Windows Compiled Help Module (.chm) file. Enjoy! The Python guys at Enthought, Inc. From fperez at colorado.edu Mon Jul 7 13:07:17 2003 From: fperez at colorado.edu (Fernando Perez) Date: Mon, 07 Jul 2003 11:07:17 -0600 Subject: [SciPy-user] gplt font question In-Reply-To: <6062E54C-B092-11D7-A64A-000A956FDAC0@fonnesbeck.org> References: <6062E54C-B092-11D7-A64A-000A956FDAC0@fonnesbeck.org> Message-ID: <3F09A8C5.8030709@colorado.edu> Christopher Fonnesbeck wrote: > How do you make such a change from scipy? I would like to avoid having > to open gnuplot to fine-tune the plots. I hope the attached files help you a bit, at least to get started. I can send you much more complicated examples if you want. Best, f. -------------- next part -------------- A non-text attachment was scrubbed... Name: make_plot.py Type: text/x-python Size: 3299 bytes Desc: not available URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: make_plot_data.dat URL: From arnd.baecker at web.de Mon Jul 7 14:37:51 2003 From: arnd.baecker at web.de (Arnd Baecker) Date: Mon, 7 Jul 2003 20:37:51 +0200 (CEST) Subject: [SciPy-user] gplt font question In-Reply-To: <6062E54C-B092-11D7-A64A-000A956FDAC0@fonnesbeck.org> References: <6062E54C-B092-11D7-A64A-000A956FDAC0@fonnesbeck.org> Message-ID: alright, first let me answer your question within the scipy context and turn to some more general remarks below. from scipy import * g=gplt.current() #g._send('set mouse;') # if you want to use the mouse x=arange(0,10,0.1) y=sin(x) gplt.plot(x,y) g._send('set size 1.0,0.5') g._send('set term post port enh "Times-Roman" 40') g._send('set output "test.ps"; replot') g._send('set out ; set term x11') # set terminal back to original # with a recent gnuplot: you can use # push/pop (see "help set terminal" # from within gnuplot) Hope this helps... Somehow I think that there should be something shorter than the last three lines (of course, you can always define a function for this job) - anyone having an idea here ? ((Actually, first, I tried to figure this out by using the built-in help, but failed miserably (scipy.info("scipy.gplt") does not give anything and help("scipy.gplt") also does not help... Fortunately I kept a note of Eric Jones email a while ago on using the mouse in gplt which contained the g=gplt.current() trick)) More generally, I am aware of three different possibilities to access gnuplot: a) scipy.gplt b) Gnuplot.py (at sourceforge) c) via IPython (uses b)+lots of enhancements) I strongly recommend IPython (not just for plotting ;-). There you can do: In [1]: from Numeric import * In [2]: x=arange(0,10,0.1) In [3]: y=sin(x) In [4]: from IPython.GnuplotInteractive import * *** Type `gphelp` for help on the Gnuplot integration features. In [5]: plot(x,y) In [6]: replot("cos(x)") In [7]: hardcopy("test.ps",fontsize="50",fontname="Times-Roman") In [8]: ! gv test.ps & For non-interactive sessions you could use In [1]: from Numeric import * In [2]: import IPython.GnuplotRuntime In [3]: gp=IPython.GnuplotRuntime.gp In [4]: x=arange(0,10,0.1) In [5]: y=sin(x) In [6]: gp.plot(x,y) In [7]: gp.replot("cos(x)") In [8]: gp.hardcopy("test.ps",fontsize="50",fontname="Times-Roman") In [9]: ! gv test.ps Arnd On Mon, 7 Jul 2003, Christopher Fonnesbeck wrote: > How do you make such a change from scipy? I would like to avoid having > to open gnuplot to fine-tune the plots. > > Thanks for your help, > Chris > > On Monday, July 7, 2003, at 01:00 PM, scipy-user-request at scipy.net > wrote: > > > Hi, > > > > within gnuplot you can for example use something like > > gnuplot> set term post enh port "Times-Roman" 20 > > Terminal type set to 'postscript' > > Options are 'portrait enhanced monochrome blacktext \ > > dashed dashlength 1.0 linewidth 1.0 defaultplex \ > > "Times-Roman" 20' > > If this is not enough information please let me know > > and I will cook up a small example tomorrow. > > > > Arnd > > > > > > > -- > Christopher J. Fonnesbeck (chris at fonnesbeck dot org) > GA Coop. Fish & Wildlife Research Unit, University of Georgia > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From fperez at colorado.edu Mon Jul 7 14:48:57 2003 From: fperez at colorado.edu (Fernando Perez) Date: Mon, 07 Jul 2003 12:48:57 -0600 Subject: [SciPy-user] gplt font question In-Reply-To: References: <6062E54C-B092-11D7-A64A-000A956FDAC0@fonnesbeck.org> Message-ID: <3F09C099.9010902@colorado.edu> Arnd Baecker wrote: > I strongly recommend IPython (not just for plotting ;-). Thanks for the endorsement :) > > For non-interactive sessions you could use > > In [1]: from Numeric import * > In [2]: import IPython.GnuplotRuntime > In [3]: gp=IPython.GnuplotRuntime.gp > In [4]: x=arange(0,10,0.1) > In [5]: y=sin(x) > In [6]: gp.plot(x,y) > In [7]: gp.replot("cos(x)") > In [8]: gp.hardcopy("test.ps",fontsize="50",fontname="Times-Roman") > In [9]: ! gv test.ps An alternative is to set your PS options once: In [21]: gp.set_ps(' "Times-Roman" 50') Note above, PS font names must be quoted for Gnuplot to understand them. Then, call the plot method directly for eps output at each plot: In [22]: gp.plot(x,y,"cos(x)",filename='test.eps') The advantage of this method is that it never produces X11 output, so it lends itself well to automated plot generation by scripts. These may be run in the background or over lines where only plain terminal access is available (without X11). Best, f From mandrews at no-more-accent.com Tue Jul 8 05:15:25 2003 From: mandrews at no-more-accent.com (Martin Andrews) Date: Tue, 08 Jul 2003 04:15:25 -0500 Subject: [SciPy-user] - Are you learning English? Message-ID: <20030708103736.5AA503EB09@www.scipy.com> An HTML attachment was scrubbed... URL: From alnesbit at students.cs.mu.OZ.AU Thu Jul 10 06:39:15 2003 From: alnesbit at students.cs.mu.OZ.AU (Andrew Nesbit) Date: Thu, 10 Jul 2003 20:39:15 +1000 (EST) Subject: [SciPy-user] Bugs in SciPy/Numeric on Mac OS X Message-ID: For the information of the list... I've been investigating the cause of several scipy.test(level=1) failures on my Mac OS X machine. In particular, there a few fails that are like this: ====================================================================== FAIL: check_nd (test_function_base.test_all) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python/scipy_base/tests/test_function_base.py", line 42, in check_nd assert_array_equal(all(y1),[0,0,1]) File "/usr/local/lib/python/scipy_test/testing.py", line 390, in assert_array_equal assert alltrue(ravel(reduced)),\ AssertionError: Arrays are not equal: ====================================================================== FAIL: check_nd (test_function_base.test_any) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python/scipy_base/tests/test_function_base.py", line 25, in check_nd assert_array_equal(any(y1),[1,1,0]) File "/usr/local/lib/python/scipy_test/testing.py", line 390, in assert_array_equal assert alltrue(ravel(reduced)),\ AssertionError: Arrays are not equal: I've tracked them down to the sometrue() and alltrue() functions in /usr/local/lib/python/Numeric/Numeric.py . It seems that the return values of these functions, given by logical_or() and logical_and(), return incorrect results. For example: >>> scipy.logical_or([0, 1, 1], [0, 1, 1]) array([ 0, 16777216, 16777216]) when the result /should/ have values of 1 in the "true" positions, and that seems to be why the tests are failing. I've submitted a bug report to the NumPy Sourceforge bug tracking system. Just letting you all know. Andrew. From jamesugan at netscape.net Thu Jul 10 13:02:11 2003 From: jamesugan at netscape.net (MR.JAMES UGAN) Date: Thu, 10 Jul 2003 19:02:11 +0200 Subject: [SciPy-user] PARTNERSHIP Message-ID: <20030710182751.05E123EB09@www.scipy.com> FROM: JAMES UGAN E-MAIL: jamesugan at netscape.net THE NETHERLANDS, Dear sir, SOLICITING FOR A BUSINESS VENTURE AND PARTNERSHIP. Before I proceed, I must be very greatful to introduce myself .My name is Mr.James Ugan, a Zimbabwean.I was formerly a personal aid to one of the top ministers (minister of finnance) of robert mugabe's former government.Due to my position and closeness with the minister, I absconded with fifteen .five million united state dollars (us$15.5m). which was part of the money meant for campainning for president robert Mugabe's re-election into office under Zanu PF Party. Presently I have been able to move the funds diplomatically to a security company in Netherlands where I now reside as a refugee. MY REQUEST: As a result of my present situation as a refugee who cannot have access to own an account or accounts,I am looking for a trustworthy individual /firm to advice me in making the rightful investment as wellas to provide account(s)where the funds will be lodge into,more also we are at the interim interested in buying properties for residence as my family will be residing there and in the near future. COMMISSION/REMUNERATION: As regards your commission/remuneration,I and my immediate family have decidedto offer you 25% of the total sum and also set aside 5% for all your expenses (i.e) telephone bills,travelling expenses, hotelbills and other miscellaneous expenses. NOTE: I shall commit half of my own share of the total sum into a joint venture project preferably in the purchase of real estate or other profitable business venture.Be assured that you stand no risk of any kind as the funds in question belong to me alone. As soon as I get your consent , I will furnish you with the details and contact of the security company and a face to face meeting will be arrange in order to know each other better. I strongly believe that associating with you to emback on this and other business ventures will derive a huge success hereafter and it will be a long lasting business association. if you have any question, do not hesitate to contact me with the above telephone number and e-mail address. I also want you to know that I kept this all along,not because I am self sentered,or greedy,but for the common interest of my people. I await your anticipated co-operation. yours truly Mr. James Ugan. From Giselle at scipy.com Fri Jul 11 16:39:13 2003 From: Giselle at scipy.com (Giselle at scipy.com) Date: Fri, 11 Jul 03 16:39:13 Hora oficial do Brasil Subject: [SciPy-user] Soluções de Marketing!!! Message-ID: <20030711215812.855B73EB09@www.scipy.com> An HTML attachment was scrubbed... URL: From cjw at sympatico.ca Sat Jul 12 08:20:44 2003 From: cjw at sympatico.ca (Colin J. Williams) Date: Sat, 12 Jul 2003 08:20:44 -0400 Subject: [SciPy-user] Python's various numeric packages Message-ID: <3F0FFD1C.9010600@sympatico.ca> Is there some place where there is an overview of the various packages, their relationships and their present stages of development? I have downloaded SciPy: SciPy-0.2.0_alpha_202.4187.win32-py2.1.exe The install fails. It does not permit the install directory to be entered. It does not detect the registered (XP) Python installation to suggest site-packages as a likely install directory. Does SciPy depend on Numeric? Numeric appears to be fully operational, but no longer being developed as it is being replaced eventually by numarray. The intended time frame for this evolution is not clear. numarray appears to be largely operable, but speed problems have been reported. NDArray and NumArray are the basic classes of numarray, but the design decision seems to have been made to deprecate the use of class methods in favour of factory functions. This appears to inhibit the development of sub-classes to NumArray. MatPy is an effort to facilitate matrix operations. It seems to have resulted from a lot of work by Huaiyu Zhu. An extended discussion took place during 2000 to 2001, but there seems to be little current interest. The project was originally based on Numeric, but appears to be in transition to numarray. Again, the decision to use factory functions, rather than exploiting the full capability of the Python class structure, appears to hav been made. Source Forge advertises the availability of version 0.4 as a downloadable Win 32 package, but it seems to have regressed to version 0.3. I would appreciate any advice. Colin W. From zhirigarba88 at netscape.net Sun Jul 13 08:12:53 2003 From: zhirigarba88 at netscape.net (Mr Mathosa Garba Zhiri) Date: Sun, 13 Jul 2003 14:12:53 +0200 Subject: [SciPy-user] PLEA FOR ASSISTANCE Message-ID: <20030713133645.090DA3EB09@www.scipy.com> Good Day, With warm heart I offer my friendship, and my greetings, and I hope this letter meet you in good time. It will be surprising to you to receive this proposal from me since you do not know me personally. However, I am sincerely seeking your confidence in this transaction, which I propose with my free mind and as a person of integrity. My name is MATHOSA GARBA,the son of ZHIRI GARBA, a farmer from Zimbabwe, murdered in the land dispute in my country. As led by my instinct, I decided to contact you through email, after searching for contacts via the internet, as it is the only means I can contact anybody since I am cutting off ties with Zimbabwe for now. I apologize if this is not acceptable to you. The purpose of this letter is to seek your most needed assistance in a business venture. Due to the land and political problems in Zimbabwe, as a result of President Robert Mugabe's introduction of new Land Act Reform wholly affecting the rich white farmers and the few rich black farmers, all white farmers were asked to surrender their farms to the government for re-distribution and infact to his political party members and my father though black was the treasurer of the farmers association and a strong member of an opposition party that did not support the president's idea. He then ordered his party members and the police under his pay row to invade my father's farm and burn down everything in the farm. They killed my father and took away a lot of items from his farm. After the death of my father, our local pastor and a close friend of my father handed us over will documents with instructions from my father that we should leave Zimbabwe incase anything happen to him. The will documents has a certificate of deposit, confirming a cash deposit totaling Fifteen million five hundred thousand united state dollars. [15.5m] Kept in custody for us in a security company unknown to the company that the content is money hence it was deposited as personal valuable items. This money was deposited with this Private Security Company for safety and security reasons, and was to be used for the purchase of land, new machines, chemicals and establishment of new farms in Botswana. This violent and barbaric act by Mugabe has since led to the death of my beloved mother and other innocent lives. I was continually threatened to abandon my inheritance from my father after he was murdered. I resisted for a while, but when the danger became unbearable, and I survived two murder attempts, I fled Zimbabwe with the help of my father's close friend Mr. John Casahans from Australia also a farmer who was leaving in Zimbabwe with us but left with his family following this ugly development I have tried to reach him but all to no avail. I am currently staying in the Netherlands where I am seeking political asylum. In fact my decision to come here to seek asylum, is because the security company has a branch here in the netherlands. I need to transfer this money to an account and invest part of the money. Since the law of Netherlands prohibits assylum seeker to open any bank account or to be involved in any financial transaction, this is why I am seeking a genuine and reliable partner, whose account this money can be transferred, hence this proposal to you. You have to understand that this decision taken by me is a very big and brave one, and it entrusts my future in your hands, as a result of the safe keeping of this money. If you accept to assist me, all I want you to do for me, is to assist with arrangements to claim the deposit from the security company. For your assistance, I have two options for you. Firstly you can choose to have 20% of the money for your assistance, and helping me open an account for the money to be deposited here, or you can go into partnership with me for the proper profitable investment of the money in your country. Whichever of the option you choose, please do notify me in your reply. I have also set aside 1 % of this money for all kinds of expenses that come our way in the process of this transaction, and 4% for Charity donation. If you prefer to accept the 20% for your moral and financial assistance then the balance will be left in the account here for me. Please, I want you to maintain absolute secrecy for the purpose of smooth handling of this transaction. You can reach me through my private email box: zhirigarba88 at netscape.net I look forward to your reply and I thank you in advance as I anticipate your co-operation. Sincerely, Mathosa Garba. From james.analytis at physics.ox.ac.uk Mon Jul 14 08:35:34 2003 From: james.analytis at physics.ox.ac.uk (J Analytis) Date: Mon, 14 Jul 2003 13:35:34 +0100 Subject: [SciPy-user] Python's various numeric packages In-Reply-To: <3F0FFD1C.9010600@sympatico.ca> References: <3F0FFD1C.9010600@sympatico.ca> Message-ID: <200307141335.34207.analytis@nodens.physics.ox.ac.uk> On Saturday 12 July 2003 13:20, Colin J. Williams wrote: > Does SciPy depend on Numeric? Yes. To quote from http://www.scipy.org/site_content/tutorials/build_instructions "Numeric 20 or higher - This is the core to Numeric computing in Python. SciPy relies heavily on it. SciPy expects the source version of this library to live in a directory named 'Numerical' within the scipy directory. " Cheers, J From nwagner at mecha.uni-stuttgart.de Mon Jul 14 09:29:18 2003 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Mon, 14 Jul 2003 15:29:18 +0200 Subject: [SciPy-user] Possible bug in linalg.lu Message-ID: <3F12B02E.407872FC@mecha.uni-stuttgart.de> Hi all, >>> C array([[ 3.003+0.j, 1. +0.j, 0. +0.j, 0. +0.j], [ 3. +0.j, 3.003+0.j, 2. +0.j, 0. +0.j], [ 0. +0.j, 2. +0.j, 3.003+0.j, 3. +0.j], [ 0. +0.j, 0. +0.j, 1. +0.j, 2. +0.j]]) >>> linalg.lu(C) Traceback (most recent call last): File "", line 1, in ? File "/usr/local/lib/python2.1/site-packages/scipy/linalg/decomp.py", line 238, in lu p,l,u,info = flu(a1,permute_l=permute_l,overwrite_a = overwrite_a) TypeError: object of type 'None' is not callable >>> For what reason ? Nils From p.berkes at biologie.hu-berlin.de Mon Jul 14 10:23:15 2003 From: p.berkes at biologie.hu-berlin.de (Pietro Berkes) Date: Mon, 14 Jul 2003 16:23:15 +0200 Subject: [SciPy-user] Possible bug in linalg.lu In-Reply-To: <3F12B02E.407872FC@mecha.uni-stuttgart.de> References: <3F12B02E.407872FC@mecha.uni-stuttgart.de> Message-ID: <200307141623.15317.p.berkes@biologie.hu-berlin.de> the function linalg.lu seems to be defined for real matrices only. if you want to use it for complex ones, the fastest solution is probably to write a wrapper to the lapack function ZGETRF. it should work like in the real case (cfr. linalg/src/lu.f). regards, pietro. On Monday 14 July 2003 15:29, Nils Wagner wrote: > Hi all, > > >>> C > > array([[ 3.003+0.j, 1. +0.j, 0. +0.j, 0. +0.j], > [ 3. +0.j, 3.003+0.j, 2. +0.j, 0. +0.j], > [ 0. +0.j, 2. +0.j, 3.003+0.j, 3. +0.j], > [ 0. +0.j, 0. +0.j, 1. +0.j, 2. +0.j]]) > > >>> linalg.lu(C) > > Traceback (most recent call last): > File "", line 1, in ? > File "/usr/local/lib/python2.1/site-packages/scipy/linalg/decomp.py", > line 238, in lu > p,l,u,info = flu(a1,permute_l=permute_l,overwrite_a = overwrite_a) > TypeError: object of type 'None' is not callable > > > For what reason ? > > Nils > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From p.berkes at biologie.hu-berlin.de Mon Jul 14 11:09:55 2003 From: p.berkes at biologie.hu-berlin.de (Pietro Berkes) Date: Mon, 14 Jul 2003 17:09:55 +0200 Subject: [SciPy-user] Possible bug in linalg.lu In-Reply-To: <200307141623.15317.p.berkes@biologie.hu-berlin.de> References: <3F12B02E.407872FC@mecha.uni-stuttgart.de> <200307141623.15317.p.berkes@biologie.hu-berlin.de> Message-ID: <200307141709.55696.p.berkes@biologie.hu-berlin.de> even faster, if you don't need to permute the matrix: linalg.lu_factor(C) On Monday 14 July 2003 16:23, Pietro Berkes wrote: > the function linalg.lu seems to be defined for real matrices only. if you > want to use it for complex ones, the fastest solution is probably to write > a wrapper to the lapack function ZGETRF. it should work like in the real > case (cfr. linalg/src/lu.f). > > regards, > pietro. > > On Monday 14 July 2003 15:29, Nils Wagner wrote: > > Hi all, > > > > >>> C > > > > array([[ 3.003+0.j, 1. +0.j, 0. +0.j, 0. +0.j], > > [ 3. +0.j, 3.003+0.j, 2. +0.j, 0. +0.j], > > [ 0. +0.j, 2. +0.j, 3.003+0.j, 3. +0.j], > > [ 0. +0.j, 0. +0.j, 1. +0.j, 2. +0.j]]) > > > > >>> linalg.lu(C) > > > > Traceback (most recent call last): > > File "", line 1, in ? > > File "/usr/local/lib/python2.1/site-packages/scipy/linalg/decomp.py", > > line 238, in lu > > p,l,u,info = flu(a1,permute_l=permute_l,overwrite_a = overwrite_a) > > TypeError: object of type 'None' is not callable > > > > > > For what reason ? > > > > 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 nwagner at mecha.uni-stuttgart.de Mon Jul 14 11:26:16 2003 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Mon, 14 Jul 2003 17:26:16 +0200 Subject: [SciPy-user] Possible bug in linalg.lu References: <3F12B02E.407872FC@mecha.uni-stuttgart.de> <200307141709.55696.p.berkes@biologie.hu-berlin.de> Message-ID: <3F12CB98.A444537B@mecha.uni-stuttgart.de> Pietro Berkes schrieb: > > even faster, if you don't need to permute the matrix: > linalg.lu_factor(C) BTW, how can I check the sign of \det(C)= \pm \det(U) ? P,L,U,info = linalg.lu(C) detA = \pm prod(diag(U)) Nils Remarks: \pm denotes plus minus... \det(A) = \det(P) \det(L) \det(U) = \det(P) \det(U) > > On Monday 14 July 2003 16:23, Pietro Berkes wrote: > > the function linalg.lu seems to be defined for real matrices only. if you > > want to use it for complex ones, the fastest solution is probably to write > > a wrapper to the lapack function ZGETRF. it should work like in the real > > case (cfr. linalg/src/lu.f). > > > > regards, > > pietro. > > > > On Monday 14 July 2003 15:29, Nils Wagner wrote: > > > Hi all, > > > > > > >>> C > > > > > > array([[ 3.003+0.j, 1. +0.j, 0. +0.j, 0. +0.j], > > > [ 3. +0.j, 3.003+0.j, 2. +0.j, 0. +0.j], > > > [ 0. +0.j, 2. +0.j, 3.003+0.j, 3. +0.j], > > > [ 0. +0.j, 0. +0.j, 1. +0.j, 2. +0.j]]) > > > > > > >>> linalg.lu(C) > > > > > > Traceback (most recent call last): > > > File "", line 1, in ? > > > File "/usr/local/lib/python2.1/site-packages/scipy/linalg/decomp.py", > > > line 238, in lu > > > p,l,u,info = flu(a1,permute_l=permute_l,overwrite_a = overwrite_a) > > > TypeError: object of type 'None' is not callable > > > > > > > > > For what reason ? > > > > > > 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 haase at msg.ucsf.edu Mon Jul 14 13:41:09 2003 From: haase at msg.ucsf.edu (Sebastian Haase) Date: Mon, 14 Jul 2003 10:41:09 -0700 Subject: [SciPy-user] Python's various numeric packages References: <3F0FFD1C.9010600@sympatico.ca> Message-ID: <013801c34a2f$1c09d2b0$421ee6a9@rodan> Hi Colin, thanks for asking these questions. I also thing the situation isn't very clear. For what I know the latest version on numarray (0.5) is supposed to have fixed lot's of speed problems; that is: for small arrays, since for arrays larger than about 10000 it (reportedly) always was faster. My specific question is: WHY does SciPy claim (for a long time !) that it can work with both Numeric and with numarry. But instructions or even further comments on that are nowhere to be found ???? My impression is that currently Numeric is still supported if not further developed (as python's main numeric library) and the numarray is still being hold back - even though it shouldn't, ... [ some kind of Roadmap would be nice ] For the data-structures of numarray: NDArray was used (until) 0.3.6 but is nowhere to be found since 0.4. The reason is a political one: They what to make it as close to Numeric as possible to simplify (encourage) the transition [[ the doc says (said) that there is now one main structure, called PyArrayObject, and so it a"first class citizen" - just like it is in Numeric --- what is a "first class citizen" anyway?? ]] Hope this thread continues (and then get's copy&pasted to www.python.org/cgi-bin/moinmoin/NumArray -- once they have space again ;-) Cheers, Sebastian Haase > Is there some place where there is an overview of the various > packages, their relationships and their present stages of development? > > I have downloaded SciPy: SciPy-0.2.0_alpha_202.4187.win32-py2.1.exe > The install fails. > It does not permit the install directory to be entered. It does not > detect the > registered (XP) Python installation to suggest site-packages as a likely > install directory. > > Does SciPy depend on Numeric? > > Numeric appears to be fully operational, but no longer being developed > as it is > being replaced eventually by numarray. The intended time frame for this > evolution is not clear. > > numarray appears to be largely operable, but speed problems have been > reported. > NDArray and NumArray are the basic classes of numarray, but the design > decision > seems to have been made to deprecate the use of class methods in favour of > factory functions. This appears to inhibit the development of > sub-classes to > NumArray. > > MatPy is an effort to facilitate matrix operations. It seems to have > resulted from > a lot of work by Huaiyu Zhu. An extended discussion took place during 2000 > to 2001, but there seems to be little current interest. > > The project was originally based on Numeric, but appears to be in > transition to > numarray. Again, the decision to use factory functions, rather than > exploiting > the full capability of the Python class structure, appears to hav been made. > > Source Forge advertises the availability of version 0.4 as a downloadable > Win 32 package, but it seems to have regressed to version 0.3. > > I would appreciate any advice. > > Colin W. > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From j_r_fonseca at yahoo.co.uk Mon Jul 14 18:57:37 2003 From: j_r_fonseca at yahoo.co.uk (=?iso-8859-15?Q?Jos=E9?= Fonseca) Date: Mon, 14 Jul 2003 23:57:37 +0100 Subject: [SciPy-user] Debian packages of scipy and f2py Message-ID: <20030714225737.GB1869@prometeu> I've make Debian packages of scipy and f2py. They are available from my apt-get repository at: http://jrfonseca.dyndns.org/debian/ I referred to Joe Reinhardt's packages http://people.debian.org/~jmr/ but have done these packages from scratch. These come for all python versions in debian unstable (2.1, 2.2 and 2.3). I've run the standard tests successfully but I'd appreciate that problems with these packages to be reported to me [privately] as I'd like to have these on Debian proper at some time. One tricky issue I'd like to address with the scipy and f2py maintainers is the the scipy_distutils. Both scipy and f2py attempt to install to /usr/lib/python*/site-packages/scipy_distutils and at least on Debian this is not admissible so the packages conflict with each other and are mutually exclusive. This is particularly even more annoying for me, since for building scipy f2py is needed, so I need to install and uninstall them as a maniac. Is there any solution that allow both these packages to happily co-exist in a tree without overlapping? Enjoy, Jos? Fonseca PS: Please CC'me on any reply as I'm not subscribed to all these lists. From alnesbit at students.cs.mu.OZ.AU Mon Jul 14 22:43:11 2003 From: alnesbit at students.cs.mu.OZ.AU (Andrew Nesbit) Date: Tue, 15 Jul 2003 12:43:11 +1000 (EST) Subject: [SciPy-user] Python's various numeric packages In-Reply-To: <013801c34a2f$1c09d2b0$421ee6a9@rodan> References: <3F0FFD1C.9010600@sympatico.ca> <013801c34a2f$1c09d2b0$421ee6a9@rodan> Message-ID: > My specific question is: WHY does SciPy claim (for a long time !) that it > can work with both Numeric and with numarry. But instructions or even > further comments on that are nowhere to be found ???? I have had problems with Numeric... in particular, a bug that I found and reported, but seeing as Numeric is no longer being developed, I'm not holding my breath as to when it's going to be fixed. I had a look at fixing it myself, but the code is extremely hairy, and I'm totally lost in it. Which leads me to the following extension of your question: has anybody here had experience in using Numarray with SciPy? Andrew. From eric at enthought.com Tue Jul 15 02:18:59 2003 From: eric at enthought.com (eric jones) Date: Mon, 14 Jul 2003 22:18:59 -0800 Subject: [SciPy-user] Python's various numeric packages In-Reply-To: <3F0FFD1C.9010600@sympatico.ca> Message-ID: <000501c34a98$fa82daf0$957ba8c0@ericlaptop> Hey Colin, > Is there some place where there is an overview of the various > packages, their relationships and their present stages of development? Numeric is the only required prerequisite. wxPython for plotting and a C++ compiler for weave are helpful but not required. > > I have downloaded SciPy: SciPy-0.2.0_alpha_202.4187.win32-py2.1.exe > The install fails. It does not permit the install directory to be entered. > It does not detect the registered (XP) Python installation to suggest site- > packages as a likely install directory. I am not sure why it doesn't work on your machine. I just installed the 2.2 version of the same file, and it found my Python2.2 installation and installed fine. Are others having problem with the 2.1 file? The easiest way to get a windows installation is to use the full python installation found here: http://www.enthought.com/python/ > Does SciPy depend on Numeric? Yes. I believe that 20.3 or beyond should work. Most people are probably using 22 or 23 currently. > Numeric appears to be fully operational, but no longer being developed > as it is being replaced eventually by numarray. The intended time frame for > this evolution is not clear. Numarray will be the successor to Numeric. I talked with Perry Greenfield from STSci at OSCON last week. STSci is developing numarray. He said that pretty much the only things left before numarray is a "feature complete" replacement for Numeric are PyObject array support and Paul Dubois Masked Array (MA) classes. He wants a full replacement before releasing 1.0. I'll let him pronounce the official release dates, but it is not so far off. Numarray and Numeric will co-exist for a long while. Numarray is new and therefore less well tested. It also has slower performance for small arrays by about a factor of 3, but is faster for large arrays. There are also many packages that rely on Numeric out in the wild, and the transition will be slow. At some point, SciPy will cut over to using Numarray. STSci folks are working on getting the major portions of the port to work. The process and time for doing this hasn't been decided. If it is easy to support both Numeric and numarray, we will. If it isn't, we'll have to think hard about when and how to do the transition. > > numarray appears to be largely operable, but speed problems have been > reported. NDArray and NumArray are the basic classes of numarray, but the > design decision seems to have been made to deprecate the use of class > methods in favour of factory functions. This appears to inhibit the > development of sub-classes to NumArray. Not sure what this is about because I haven't followed it that closely, but I will say that sub-classing arrays isn't all that it is cracked up to be in practice. One of the nicest things about arrays is there array arithmetic. They allow you to write mathematic formula-like code for numerical operations. When you sub-class an array, say with an Image class, all mathematic operations work, but they return arrays instead of images -- not so nice. You end up having to do a lot of work to get the behavior you want from the sub-classing. I'm not saying it isn't occasionally useful, it just isn't as nice as it first sounds... > MatPy is an effort to facilitate matrix operations. It seems to have > resulted from a lot of work by Huaiyu Zhu. An extended discussion took > place during 2000 to 2001, but there seems to be little current interest. Don't know much about this. > The project was originally based on Numeric, but appears to be in > transition to > numarray. Again, the decision to use factory functions, rather than > exploiting > the full capability of the Python class structure, appears to hav been made. > > Source Forge advertises the availability of version 0.4 as a downloadable > Win 32 package, but it seems to have regressed to version 0.3. > > I would appreciate any advice. > > Colin W. > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From eric at enthought.com Tue Jul 15 02:23:23 2003 From: eric at enthought.com (eric jones) Date: Mon, 14 Jul 2003 22:23:23 -0800 Subject: [SciPy-user] Python's various numeric packages In-Reply-To: Message-ID: <000701c34a99$9b55d090$957ba8c0@ericlaptop> Hey Andrew, > > My specific question is: WHY does SciPy claim (for a long time !) that it > > can work with both Numeric and with numarry. But instructions or even > > further comments on that are nowhere to be found ???? > > I have had problems with Numeric... in particular, a bug that I found > and reported, but seeing as Numeric is no longer being developed, I'm > not holding my breath as to when it's going to be fixed. Bugs are periodically fixed by Travis Oliphant, but he is pretty much the only one pitching in on this now. > I had a look at fixing it myself, but the code is extremely hairy, and I'm > totally lost in it. Hence, numarray. :-) > Which leads me to the following extension of your question: has > anybody here had experience in using Numarray with SciPy? Not I. It isn't ported yet. eric From eric at enthought.com Tue Jul 15 02:29:55 2003 From: eric at enthought.com (eric jones) Date: Mon, 14 Jul 2003 22:29:55 -0800 Subject: [SciPy-user] Python's various numeric packages In-Reply-To: <013801c34a2f$1c09d2b0$421ee6a9@rodan> Message-ID: <000801c34a9a$84b1f520$957ba8c0@ericlaptop> > Hi Colin, > thanks for asking these questions. I also thing the situation isn't very > clear. > > For what I know the latest version on numarray (0.5) is supposed to have > fixed lot's of speed problems; that is: for small arrays, since for arrays > larger than about 10000 it (reportedly) always was faster. It is much better now than it was even a few months ago -- Perry presented results at OSCON last week. It is still slower, but not cripplingly so as it was before. > My specific question is: WHY does SciPy claim (for a long time !) that it > can work with both Numeric and with numarry. But instructions or even > further comments on that are nowhere to be found ???? I wasn't aware of this claim, so I apologize if I made it. Where is this information posted? Anyway, numarray support will come as the STSci people have time to work on the port. F2py support apparently exists now, which is a huge step. Perry mentioned that the special function library is one of the harder things remaining with all of its ufunc support. After that, it will just be working through the issues that come up. Generally though, the API, both Python and C level, for Numeric and Numarray are fairly compatible. > > My impression is that currently Numeric is still supported if not further > developed (as python's main numeric library) and the numarray is still > being hold back - even though it shouldn't, ... [ some kind of > Roadmap would be nice ] The numarray folks are doing periodic releases and CVS is available to anyone wishing to tinker with it. eric From cjw at sympatico.ca Tue Jul 15 16:21:30 2003 From: cjw at sympatico.ca (Colin J. Williams) Date: Tue, 15 Jul 2003 16:21:30 -0400 Subject: [SciPy-user] Re: SciPy-user digest, Vol 1 #445 - 6 msgs In-Reply-To: <20030715170001.15241.42787.Mailman@scipy.org> References: <20030715170001.15241.42787.Mailman@scipy.org> Message-ID: <3F14624A.5090204@sympatico.ca> An HTML attachment was scrubbed... URL: From cjw at sympatico.ca Tue Jul 15 16:59:10 2003 From: cjw at sympatico.ca (Colin J. Williams) Date: Tue, 15 Jul 2003 16:59:10 -0400 Subject: [SciPy-user] Matrix Arithmetic In-Reply-To: <20030715170001.15241.42787.Mailman@scipy.org> References: <20030715170001.15241.42787.Mailman@scipy.org> Message-ID: <3F146B1E.1000607@sympatico.ca> An HTML attachment was scrubbed... URL: From perry at stsci.edu Tue Jul 15 19:37:59 2003 From: perry at stsci.edu (Perry Greenfield) Date: Tue, 15 Jul 2003 19:37:59 -0400 Subject: [SciPy-user] Matrix Arithmetic In-Reply-To: Message-ID: I haven't had much time to respond to these comments and queries, but I'll do my best. > Behalf Of Colin J. Williams > From: "eric jones" > [snip] > >>> numarray appears to be largely operable, but speed problems have been >>> reported. NDArray and NumArray are the basic classes of numarray, but >>> >>> the >>> >>> design decision seems to have been made to deprecate the use of class >>> methods in favour of factory functions. This appears to inhibit the >>> development of sub-classes to NumArray. > I'm not sure what this comment refers to. If it is important, can you be more explicit about the inhibition regarding subclasses? > >> Not sure what this is about because I haven't followed it that closely, >> but I will say that sub-classing arrays isn't all that it is cracked up >> to be in practice. One of the nicest things about arrays is there array >> arithmetic. They allow you to write mathematic formula-like code for >> numerical operations. When you sub-class an array, say with an Image >> class, all mathematic operations work, but they return arrays instead of >> images -- not so nice. You end up having to do a lot of work to get the >> behavior you want from the sub-classing. I'm not saying it isn't >> occasionally useful, it just isn't as nice as it first sounds... > My 2 cents on subclassing: It isn't useless, but it is rarely trivial. Eric is right that most subclassing involves overriding all the operators and that will generally involve some work. On the other hand, subclassing is generally far more preferable to writing your own stuff from scratch (I'm guessing anyway). But on the third hand, outside of the customizations referred to below, I haven't seen a good practical example of subclassing numeric arrays yet so I can't comment on how useful it is yet (not to say we won't eventually come up with some). > I have been looking at the sub-classing of NumArray to provide matrix > arithmetic, along > the lines of Huaiyu Zhu, but not quite as ambitious. > > So that A + B, A * B, A / B all make sense, where A and B are matrices. > > Similarly A.T delivers the transpose of A or B.I delivers the > inverse of B. > > Does anyone have any thoughts? > > Colin W. > Yes, I do. Doing this would be (relatively) easy. But it would be wrong (IMHO). If you do this, you will break interoperability with other numarray modules and packages. There will be lots of code that will assume that * means element-by-element multiplication, not matrix multiplication. So by doing this you in effect will be fracturing the numeric community. If the judgement is that there is very little shared code (e.g., FFT, signal processing, linear algebra, etc.) between the two, little harm would be done. I tend to think that isn't the case. Now one has to wrap these modules to work with the matrix arrays, or if there are matrix modules available, then they have to be wrapped to work with numarray. I'd rather see one of the proposals to allow extending operator syntax to allow defining new Python operators so that matrix multiplication and the small number of other matrix operations can be accomodated rather than making incompatible types of arrays/matrices. I believe Guido will accomodate this should enough of the community make a case for it. > >>> MatPy is an effort to facilitate matrix operations. It seems to have >>> resulted from a lot of work by Huaiyu Zhu. An extended discussion >>> >>> took >>> >>> place during 2000 to 2001, but there seems to be little current >>> >>> interest. > >> Don't know much about this. > > > The project was originally based on Numeric, but appears to be in > transition to > numarray. Again, the decision to use factory functions, rather than > exploiting > the full capability of the Python class structure, appears to hav been > > made. > Again, not sure what this refers to. Also, I'm not aware of any work that that Huaiyu is doing with regard to this or numarray recently. > Source Forge advertises the availability of version 0.4 as a > > downloadable > > Win 32 package, but it seems to have regressed to version 0.3. > numarray? The latest version should be 0.5 (and 0.6 will be released very shortly). Perry Greenfield From perry at stsci.edu Tue Jul 15 19:45:52 2003 From: perry at stsci.edu (Perry Greenfield) Date: Tue, 15 Jul 2003 19:45:52 -0400 Subject: [SciPy-user] Python's various numeric packages In-Reply-To: <000501c34a98$fa82daf0$957ba8c0@ericlaptop> Message-ID: > -----Original Message----- > From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net]On > Behalf Of eric jones > Sent: Tuesday, July 15, 2003 2:19 AM > To: scipy-user at scipy.net > Subject: RE: [SciPy-user] Python's various numeric packages > > > Numeric appears to be fully operational, but no longer being developed > > as it is being replaced eventually by numarray. The intended time > frame for > > this evolution is not clear. > > Numarray will be the successor to Numeric. I talked with Perry > Greenfield from STSci at OSCON last week. STSci is developing numarray. > He said that pretty much the only things left before numarray is a > "feature complete" replacement for Numeric are PyObject array support > and Paul Dubois Masked Array (MA) classes. He wants a full replacement > before releasing 1.0. I'll let him pronounce the official release > dates, but it is not so far off. > No dates fixed in stone, but here is the basic plan 0.6 to be released this week, this reorganizes numarray as a package 0.7 (few weeks?) Will include PyObject support 0.8 (2 months?) Will include MA support. At this point we hope to replicate all Numeric functionality (other than the planned changes). v1.0 will come out when 0.8 has been tested by users for a little while (with perhaps a 0.9 if many changes and fixes are needed) > Numarray and Numeric will co-exist for a long while. Numarray is new > and therefore less well tested. It also has slower performance for > small arrays by about a factor of 3, but is faster for large arrays. > There are also many packages that rely on Numeric out in the wild, and > the transition will be slow. > There may be some rough corners where performance of numarray needs optimization that haven't yet been handled (e.g. printing? slicing?) > At some point, SciPy will cut over to using Numarray. STSci folks are > working on getting the major portions of the port to work. The process > and time for doing this hasn't been decided. If it is easy to support > both Numeric and numarray, we will. If it isn't, we'll have to think > hard about when and how to do the transition. > yep Perry Greenfield From perry at stsci.edu Tue Jul 15 19:48:47 2003 From: perry at stsci.edu (Perry Greenfield) Date: Tue, 15 Jul 2003 19:48:47 -0400 Subject: [SciPy-user] Python's various numeric packages In-Reply-To: <000801c34a9a$84b1f520$957ba8c0@ericlaptop> Message-ID: > -----Original Message----- > From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net]On > Behalf Of eric jones > Sent: Tuesday, July 15, 2003 2:30 AM > To: scipy-user at scipy.net > Subject: RE: [SciPy-user] Python's various numeric packages > > > > > My specific question is: WHY does SciPy claim (for a long time !) that > it > > can work with both Numeric and with numarry. But instructions or even > > further comments on that are nowhere to be found ???? > > I wasn't aware of this claim, so I apologize if I made it. > Where is this information posted? > I wasn't aware of this claim either. There is a module in kiva that implies this (num_compat if I recall correctly), but I wasn't aware of any explicit claim to this effect. > Anyway, numarray support will come as the STSci people have time to work > on the port. F2py support apparently exists now, which is a huge step. > Perry mentioned that the special function library is one of the harder > things remaining with all of its ufunc support. After that, it will > just be working through the issues that come up. Generally though, the > API, both Python and C level, for Numeric and Numarray are fairly > compatible. > We will start working on this when we get to v0.8. > From pajer at iname.com Tue Jul 15 21:58:03 2003 From: pajer at iname.com (Gary Pajer) Date: Tue, 15 Jul 2003 21:58:03 -0400 Subject: [SciPy-user] MacNewbie needs MacHelp References: <000501c34a98$fa82daf0$957ba8c0@ericlaptop> Message-ID: <008201c34b3d$b170bdf0$c0135544@playroom> I have a perfectly functional system on WinXP, and a serviceable one on Linux. So of course my new employer is Mac centric. I have no religious attachement to anything, but I am all thumbs on the Mac. Never touched one. it's OS X, 10.1 I have the fink version of python running, and the fink version of Numeric. and X11. Idle runs. Numeric works. How the heck do I get scipy up? I started with the fink version because I want to use the visual package, which claims to work only with the fink python. There's a fink package called scipy-2002xxxxx in the unstable area. As an example of my expertise with Mac, I can't figure out how to copy the .info file from the "unstable" directory to the "local" directory (as directed by some instructions somewhere). Any help? Once I get this nailed down, I'll start looking for a mouse with three buttons ... -gary From cjw at sympatico.ca Wed Jul 16 06:55:40 2003 From: cjw at sympatico.ca (Colin J. Williams) Date: Wed, 16 Jul 2003 06:55:40 -0400 Subject: [SciPy-user] Enthought package of various Python related stuff Message-ID: <3F152F2C.6020209@sympatico.ca> I have downloaded this, it is massive - 62MB. It includes BTrees and freetype, which are not referenced in the included documentation, also massive - 29MB. Colin W. From nwagner at mecha.uni-stuttgart.de Wed Jul 16 07:54:32 2003 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Wed, 16 Jul 2003 13:54:32 +0200 Subject: [SciPy-user] Detecting clusters in an array Message-ID: <3F153CF8.FF9705@mecha.uni-stuttgart.de> Hi all, Let us assume that we have a one-dimensional array, let's say A, of complex and/or real numbers. Now, I am interested in the detection of clusters. Each cluster, if any, consists of the elements of A, which lie inside a circle with fixed radius epsilon) How can I solve this problem most efficiently in scipy. A small example would be appreciated. Thanks in advance Nils nc, nec, cl = cluster(A, epsilon) Output nc : total number of clusters nec[i] : number of elements of cluster i cl[0:sum(nec)] : elements of all clusters From eric at enthought.com Wed Jul 16 11:46:02 2003 From: eric at enthought.com (eric jones) Date: Wed, 16 Jul 2003 10:46:02 -0500 Subject: [SciPy-user] Enthought package of various Python related stuff In-Reply-To: <3F152F2C.6020209@sympatico.ca> Message-ID: <008601c34bb1$5f45f260$8901a8c0@ERICDESKTOP> > I have downloaded this, it is massive - 62MB. It includes a lot of tools. > It includes BTrees and freetype, which are not referenced in the included > documentation, also massive - 29MB. Those are components used by other mentioned libraries. Freetype is part of Chaco/Kiva. You could use it on its own, but I'm not sure what for. I'm not sure what BTrees is used in, but I'm betting it is part of SQLite (most likely), GadFly or ZODB. eric From jdhunter at ace.bsd.uchicago.edu Wed Jul 16 16:56:11 2003 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Wed, 16 Jul 2003 15:56:11 -0500 Subject: [SciPy-user] finding djbfft Message-ID: I am trying to build scipy SciPy-0.2.0_alpha_200.4161 with djbfft on a linux box. I have built djbfft, ran install and instcheck. This created /usr/local/djbfft/lib/ which contains djbfft.a. When I build scipy with > python setup.py build I get djbfft_info: NOT AVAILABLE DJBFFT (http://cr.yp.to/djbfft.html) libraries not found. Directories to search for the libraries can be specified in the scipy_distutils/site.cfg file (section [djbfft]) or by setting the DJBFFT environment variable. I have tried setting setenv DJBFFT /usr/local/djbfft/lib and setenv DJBFFT /usr/local/djbfft as well as placing djbfft.a in /usr/lib and when that failed, renaming it to libdjbfft.a. To no avail. I find no site.cfg file in the scipy src tree to modify. How do I build scipy with djbfft? Thanks, John Hunter From cjw at sympatico.ca Wed Jul 16 21:00:23 2003 From: cjw at sympatico.ca (Colin J. Williams) Date: Wed, 16 Jul 2003 21:00:23 -0400 Subject: [SciPy-user] Using NumArray to facilitate Matrix arithmetic Message-ID: <3F15F527.4070404@sympatico.ca> -------- Original Message -------- [Perry Greenfield] I haven't had much time to respond to these comments and queries, but I'll do my best. [Colin W. >>> NDArray and NumArray are the basic classes of numarray, but >>> the design decision seems to have been made to deprecate the use >>> of class methods in favour of factory functions. This appears >>> to inhibit the development of sub-classes to NumArray. > [Perry Greenfield] I'm not sure what this comment refers to. If it is important, can you be more explicit about the inhibition regarding subclasses? [Colin W.] I feel that it could be important and will try to put together an illustrative example over the next week or so. There are a number of functions in the package which might, with benefit, be replaced with methods of NumArray. Such methods could then be inherited by any sub-classes. In the case of a possible Matrix class, there are some functions/methods which my be represented, in a more user friendly way by class properties. For example, in matrix algebra, one typically represents transpose with a superscript T or an inverse with a superscript -1. Using properties, we could use A.T or B.I to represent the transpose or the inverse of matrices A and B respectively. These are not new ideas. Huaiyu Zhu started implementing them in his MatPy project. [Eric Jones] >> Not sure what this is about because I haven't followed it that closely, >> but I will say that sub-classing arrays isn't all that it is cracked up >> to be in practice. One of the nicest things about arrays is there array >> arithmetic. They allow you to write mathematic formula-like code for >> numerical operations. When you sub-class an array, say with an Image >> class, all mathematic operations work, but they return arrays instead of >> images -- not so nice. You end up having to do a lot of work to get the >> behavior you want from the sub-classing. I'm not saying it isn't >> occasionally useful, it just isn't as nice as it first sounds... > [Colin W.] This notion of being able to write mathematics like code is at the root of this. Suppose that A is a Matrix and B is an array, then A + B ==> a matrix, with coercion, is not that much different from array operations. A * B ==> a matrix is similar but the multiplication implies the operation of linear algebra, rather than a simple element by element multiplication. If we wished to find the common norm for A, it is a little simpler to write A.Norm than to write A.Norm(), using a method or Norm(A), for a function. [Perry Greenfield] My 2 cents on subclassing: It isn't useless, but it is rarely trivial. Eric is right that most subclassing involves overriding all the operators and that will generally involve some work. On the other hand, subclassing is generally far more preferable to writing your own stuff from scratch (I'm guessing anyway). But on the third hand, outside of the customizations referred to below, I haven't seen a good practical example of subclassing numeric arrays yet so I can't comment on how useful it is yet (not to say we won't eventually come up with some). [Colin W.] Let's look at each of these: Overriding: Yes, that's a chore, but a boiler plate could be prepared for the class and then be used by each sub-class builder. Less work: The sub-class constructor is largely riding on the back of the class builder. Labour saving is one of the potential benefits of the object oriented approach. An example: Since Huaiyu Zhu was working largely with Numeric, he could not sub-class. The latest version of Matrix.py that I've seen is of 26-Aug-01. I'll put a simple illustrative example together. [Colin W.] > I have been looking at the sub-classing of NumArray to provide > matrix arithmetic, along the lines of Huaiyu Zhu, but not quite > as ambitious. > > So that A + B, A * B, A / B all make sense, where A and B are matrices. > > Similarly A.T delivers the transpose of A or B.I delivers the > inverse of B. > > Does anyone have any thoughts? > [Perry Greenfield] Yes, I do. Doing this would be (relatively) easy. But it would be wrong (IMHO). If you do this, you will break interoperability with other numarray modules and packages. There will be lots of code that will assume that * means element-by-element multiplication, not matrix multiplication. So by doing this you in effect will be fracturing the numeric community. If the judgement is that there is very little shared code (e.g., FFT, signal processing, linear algebra, etc.) between the two, little harm would be done. I tend to think that isn't the case. Now one has to wrap these modules to work with the matrix arrays, or if there are matrix modules available, then they have to be wrapped to work with numarray. [Colin W.] I agree that interoperability with other numarray modules and packages is essential and doubt that very much would need to be changed in NumArray to facilitate inheritance. For some, the idea of element by element operations takes a little getting use to. For multi-dimensional arrays, it is the only way to go. For two dimensional array, there could well be a choice, which the user makes by choosing to work with a NumArray class or a Matrix class. The latter is based on an extensive literature which has grown over that last 50 and more years. It would seem to be mutually beneficial to have these classes from the same root. [Perry Greenfield] I'd rather see one of the proposals to allow extending operator syntax to allow defining new Python operators so that matrix multiplication and the small number of other matrix operations can be accomodated rather than making incompatible types of arrays/matrices. I believe Guido will accomodate this should enough of the community make a case for it. [Colin W] It would be nice if there were more functional characters available on the keyboard. However, groupings of characters to achieve operations on particular data types would complicate Python and would not likely appeal to our BDFL. The idea of operator overloading is already well established for Python. [Colin W] >>> MatPy is an effort to facilitate matrix operations. It >>> seems to have resulted from a lot of work by Huaiyu Zhu. >>> >>> An extended discussion took place during 2000 to 2001, >>> but there seems to be little current interest. [Eric Jones] >>> >>> Don't know much about this. [Colin W] >>> The project was originally based on Numeric, but appears >>> to be in transition to numarray. Again, the decision >>> to use factory functions, rather than exploiting the >>> full capability of the Python class structure, appears >>> to have been made. > [Perry Greenfield] Again, not sure what this refers to. Also, I'm not aware of any work that that Huaiyu is doing with regard to this or numarray recently. [Colin W.] > Source Forge advertises the availability of version 0.4 > as a downloadable Win 32 package, but it seems to have > regressed to version 0.3. > [Perry Greenfield] numarray? The latest version should be 0.5 (and 0.6 will be released very shortly). [Colin W.] No, my comments here were with regard to MatPy. Please see: http://matpy.sourceforge.net/ The last change appears to be about August 2001. From nwagner at mecha.uni-stuttgart.de Thu Jul 17 11:46:42 2003 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Thu, 17 Jul 2003 17:46:42 +0200 Subject: [SciPy-user] linalg.lu_factor Message-ID: <3F16C4E2.EE284952@mecha.uni-stuttgart.de> Hi all, How can I use linalg.lu_factor to compute the determinant of a matrix A ? Of course I know, that I can use linalg.det(A) directly. detA = linalg.det(A) d,piv = linalg.lu_factor(A) Afaik prod(diag(d)) is the determinant except the sign. Am I missing something ? How do I find the sign of det(A) Nils From chris at fonnesbeck.org Thu Jul 17 15:06:24 2003 From: chris at fonnesbeck.org (Christopher Fonnesbeck) Date: Thu, 17 Jul 2003 15:06:24 -0400 Subject: [SciPy-user] using scipy.stats.distributions Message-ID: Is there a tutorial or some examples on how to use the distributions in scipy.stats? I am putting together some Markov chain Monte Carlo code, and need to use several different distributions, but cannot get the hang of distribution classes (e.g. setting parameters, generating values). Thanks, chris -- Christopher J. Fonnesbeck (chris at fonnesbeck dot org) GA Coop. Fish & Wildlife Research Unit, University of Georgia From TravisOliphant at netscape.net Fri Jul 18 01:19:20 2003 From: TravisOliphant at netscape.net (Travis Oliphant) Date: Thu, 17 Jul 2003 23:19:20 -0600 Subject: [SciPy-user] Matrix Arithmetic References: <20030715170001.15241.42787.Mailman@scipy.org> <3F146B1E.1000607@sympatico.ca> Message-ID: <3F178358.406@netscape.net> Numeric has a very nice matrix object called Matrix. This is why Zhu's MatPy has received little attention from SciPy. I'm not sure if Numarray has this Matrix object or not, but I think it should. Travis O. From cjw at sympatico.ca Fri Jul 18 09:53:57 2003 From: cjw at sympatico.ca (Colin J. Williams) Date: Fri, 18 Jul 2003 09:53:57 -0400 Subject: [SciPy-user] Matrix Arithmetic In-Reply-To: <3F178358.406@netscape.net> References: <20030715170001.15241.42787.Mailman@scipy.org> <3F146B1E.1000607@sympatico.ca> <3F178358.406@netscape.net> Message-ID: <3F17FBF5.9060909@sympatico.ca> Travis Oliphant wrote: > Numeric has a very nice matrix object called Matrix. This is why > Zhu's MatPy has received little attention from SciPy. > > I'm not sure if Numarray has this Matrix object or not, but I think it > should. > > > Travis O. Many thanks, I hadn't spotted this. It is just what I had in mind for my example. I will abandon my endeavours with the example. There is a bit more to Matrix.py than the Numpy.pdf let's on. Matrix.py The Matrix.py python module defines a class Matrix which is a subclass of UserArray. The only differences between Matrix instances and UserArray instances is that the * operator on Matrix performs a matrix multiplication, as opposed to element-wise multiplication, and that the power operator ** is disallowed for Matrix instances. numarray appears to rely on array functions to perform matrix functions. There is no equivalent of Matrix.py in Numeric. A rewrite for numarray might use the class property to provide for transpose, inverse etc. Similarly, Matrix might become a sub-class of NumArray. I would be glad to help with the transfer of Matrix to numarray. Please let be know. Colin W. From soneh at metri.re.kr Sat Jul 19 00:22:29 2003 From: soneh at metri.re.kr (=?ks_c_5601-1987?B?vNXAusfP?=) Date: Sat, 19 Jul 2003 13:22:29 +0900 Subject: [SciPy-user] K-MEANS ALGORITHM(ASKING) Message-ID: <000801c34dad$5e26ade0$6c0310ac@LocalHost> Hi I Have stuck up with a project based on clustering using K-Means algorithm Please help me find the relevent C code for theK-Means algorithm Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From philippe.dalet at voila.fr Tue Jul 22 13:38:17 2003 From: philippe.dalet at voila.fr (=?utf-8?Q?philippe.dalet@voila.fr?=) Date: Tue, 22 Jul 2003 19:38:17 +0200 Subject: [SciPy-user] =?iso-8859-1?Q?chaco?= Message-ID: under win2k and py22 and wxPythonWIN32-2.4.1.2-Py22.exe I've downloaded the last update of sciPy (SciPy-0.2.0_alpha_202.4187.win32-py2.2.exe) and I could not execute chaco wx_plt_demo.py If I setup the version of chaco (installer) It runs. If I run a simple demo I have a system memory bug. before all was running. Do You know this bug ? Thanks a lot DALET philippe Laboratoire STS ?lectronique Lyp champollion avenue pezet 46100 FIGEAC FRANCE ------------------------------------------ Faites un voeu et puis Voila ! www.voila.fr From helen.kemp at tesco.net Wed Jul 23 03:34:21 2003 From: helen.kemp at tesco.net (Helen Kemp) Date: Wed, 23 Jul 2003 08:34:21 +0100 Subject: [SciPy-user] chaco References: Message-ID: <004001c350ec$d60b13e0$18ec89d9@pc> Sorry, I think this e-mail was sent to me by mistake. Helen ----- Original Message ----- From: To: Sent: Tuesday, July 22, 2003 6:38 PM Subject: [SciPy-user] chaco under win2k and py22 and wxPythonWIN32-2.4.1.2-Py22.exe I've downloaded the last update of sciPy (SciPy-0.2.0_alpha_202.4187.win32-py2.2.exe) and I could not execute chaco wx_plt_demo.py If I setup the version of chaco (installer) It runs. If I run a simple demo I have a system memory bug. before all was running. Do You know this bug ? Thanks a lot DALET philippe Laboratoire STS ?lectronique Lyp champollion avenue pezet 46100 FIGEAC FRANCE ------------------------------------------ Faites un voeu et puis Voila ! www.voila.fr _______________________________________________ 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 23 08:37:37 2003 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Wed, 23 Jul 2003 14:37:37 +0200 Subject: [SciPy-user] xplt.plot Message-ID: <3F1E8191.ADB364A8@mecha.uni-stuttgart.de> Hi all, How can I plot two curves on two different graphs with xplt ? A small example would be appreciated. Thanks in advance, Nils From arnd.baecker at web.de Wed Jul 23 09:30:40 2003 From: arnd.baecker at web.de (Arnd Baecker) Date: Wed, 23 Jul 2003 15:30:40 +0200 (CEST) Subject: [SciPy-user] xplt.plot In-Reply-To: <3F1E8191.ADB364A8@mecha.uni-stuttgart.de> References: <3F1E8191.ADB364A8@mecha.uni-stuttgart.de> Message-ID: Hi Nils, do you mean something like this? ########### from scipy import * from scipy.xplt import * x=arange(0.0,2.0*pi,0.01) y1=sin(x) y2=cos(x) window(0) plot(x,y1) title ("sin") # yes, the title has to be after the plot ! window(1) plot(x,y2) title ("cos") ############ Notice that only up to 7 windows can be opened (moreover scipy.xplt has its rough edges ... ;-), for example I never understood, why the title has to be given after the plot ...) Arnd On Wed, 23 Jul 2003, Nils Wagner wrote: > Hi all, > > How can I plot two curves on two different graphs with xplt ? > 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 > From nwagner at mecha.uni-stuttgart.de Wed Jul 23 09:36:55 2003 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Wed, 23 Jul 2003 15:36:55 +0200 Subject: [SciPy-user] xplt.plot References: <3F1E8191.ADB364A8@mecha.uni-stuttgart.de> Message-ID: <3F1E8F76.2120BE03@mecha.uni-stuttgart.de> Arnd Baecker schrieb: > > Hi Nils, > > do you mean something like this? Yes, and how about labels ? Nils > > ########### > from scipy import * > from scipy.xplt import * > > x=arange(0.0,2.0*pi,0.01) > y1=sin(x) > y2=cos(x) > > window(0) > plot(x,y1) > title ("sin") # yes, the title has to be after the plot ! > window(1) > plot(x,y2) > title ("cos") > ############ > > Notice that only up to 7 windows can be opened > (moreover scipy.xplt has its rough edges ... ;-), > for example I never understood, why the title has to > be given after the plot ...) > > Arnd > > On Wed, 23 Jul 2003, Nils Wagner wrote: > > > Hi all, > > > > How can I plot two curves on two different graphs with xplt ? > > 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 > > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From arnd.baecker at web.de Wed Jul 23 09:48:24 2003 From: arnd.baecker at web.de (Arnd Baecker) Date: Wed, 23 Jul 2003 15:48:24 +0200 (CEST) Subject: [SciPy-user] xplt.plot In-Reply-To: <3F1E8F76.2120BE03@mecha.uni-stuttgart.de> References: <3F1E8191.ADB364A8@mecha.uni-stuttgart.de> <3F1E8F76.2120BE03@mecha.uni-stuttgart.de> Message-ID: On Wed, 23 Jul 2003, Nils Wagner wrote: > Arnd Baecker schrieb: > > > > Hi Nils, > > > > do you mean something like this? > > Yes, and how about labels ? In general you can try (* remark below!) help("scipy.xplt") which guides you to help("scipy.xplt.xlabel") So in the example you just have to add xlabel("xlabel text") ylabel("ylabel text") Remark concerning help("scipy.xplt"): If you start with a clean python interactive session, the first call to help("scipy.xplt") will just give """ Help on instance of _ModuleLoader in scipy: scipy.xplt = """ Only a second call gives the expected help (scipy.__version__: '0.2.0_alpha_200.4160') Personally I find this pretty annoying, and also problematic for new-comers.. Maybe this is due to the "delayed import" stuff ? (does any of the scipy experts have a clue on this ?) Arnd From TravisOliphant at netscape.net Wed Jul 23 11:20:14 2003 From: TravisOliphant at netscape.net (Travis Oliphant) Date: Wed, 23 Jul 2003 09:20:14 -0600 Subject: [SciPy-user] xplt.plot References: <3F1E8191.ADB364A8@mecha.uni-stuttgart.de> Message-ID: <3F1EA7AE.1040103@netscape.net> from scipy import xplt xplt.subplot(2,1) xplt.plsys(1) xplt.plot(x1,y1,x2,y2) xplt.plsys(2) xplt.plot(x1,y1,x2,y2) Nils Wagner wrote: > Hi all, > > How can I plot two curves on two different graphs with xplt ? > 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 -- Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop at Netscape! http://shopnow.netscape.com/ From eric at enthought.com Wed Jul 23 17:30:20 2003 From: eric at enthought.com (eric jones) Date: Wed, 23 Jul 2003 16:30:20 -0500 Subject: [SciPy-user] K-MEANS ALGORITHM(ASKING) In-Reply-To: <000801c34dad$5e26ade0$6c0310ac@LocalHost> Message-ID: <00ba01c35161$a1082910$8901a8c0@ERICDESKTOP> The following link has the C++ code for the vq algorithm. http://www.scipy.org/site_content/remap?rmurl=http%3A//scipy.net/cgi-bin /viewcvsx.cgi/scipy/Lib/cluster/src/vq.h%3Frev%3D1.2%26content-type%3Dte xt/vnd.viewcvs-markup The kmeans algorithm was written in pure python and lives here. http://www.scipy.org/site_content/remap?rmurl=http%3A//scipy.net/cgi-bin /viewcvsx.cgi/scipy/Lib/cluster/vq.py%3Frev%3D1.16%26content-type%3Dtext /vnd.viewcvs-markup If you get the SciPy source code, look in the scipy/Lib/cluster directory. see ya, eric ---------------------------------------------- eric jones 515 Congress Ave www.enthought.com Suite 1614 512 536-1057 Austin, Tx 78701 -----Original Message----- From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net] On Behalf Of ?????? Sent: Friday, July 18, 2003 10:22 PM To: SciPy-user at scipy.net Subject: [SciPy-user] K-MEANS ALGORITHM(ASKING) Hi I Have stuck up with a project based on clustering using K-Means algorithm Please help me find the relevent C code for theK-Means algorithm Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From Paul_Kunz at SLAC.Stanford.EDU Thu Jul 24 20:39:08 2003 From: Paul_Kunz at SLAC.Stanford.EDU (Paul F. Kunz) Date: Thu, 24 Jul 2003 17:39:08 -0700 Subject: [SciPy-user] How to submit a paper Message-ID: <200307250039.h6P0d8Q06783@libra3.slac.stanford.edu> I'm interested in submitting a paper to SciPy '03. How to I do that? This list seems to be the only contact point to thw workshop. From travis at enthought.com Thu Jul 24 21:40:41 2003 From: travis at enthought.com (Travis N. Vaught) Date: Thu, 24 Jul 2003 20:40:41 -0500 Subject: [SciPy-user] How to submit a paper In-Reply-To: <200307250039.h6P0d8Q06783@libra3.slac.stanford.edu> Message-ID: <000e01c3524d$c66bf870$0200a8c0@tvlaptop> Hey Paul, Please contact Eric Jones at eric at enthought.com regarding presentations. Look for a formal announcement in a few minutes. Travis > -----Original Message----- > From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net] On > Behalf Of Paul F. Kunz > Sent: Thursday, July 24, 2003 6:39 PM > To: scipy-user at scipy.org > Subject: [SciPy-user] How to submit a paper > > I'm interested in submitting a paper to SciPy '03. How to I do that? > This list seems to be the only contact point to thw workshop. > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From travis at enthought.com Thu Jul 24 21:53:20 2003 From: travis at enthought.com (Travis N. Vaught) Date: Thu, 24 Jul 2003 20:53:20 -0500 Subject: [SciPy-user] [ANN] SciPy 03 Workshop - Scientific Computing with Python Message-ID: <001401c3524f$8d372000$0200a8c0@tvlaptop> ------------------ SciPy '03 Workshop ------------------ The SciPy '03 Workshop on Scientific Computing with Python is being held at Cal Tech again this year. Online registration is now available. After last year's success, we expect another great turnout with compelling presentations/tutorials. It is a two day workshop held September 11-12 in Pasadena, CA. More information may be found at: http://www.scipy.org/site_content/scipy03 Online registration is available at: https://www.enthought.com/scipy03 Please register early. Last minute registrants will have to suffer the indignity of a handwritten name tag. It currently looks like breakfast (bagels, etc.), lunch and supper will be provided Thursday, and breakfast and lunch will be provided Friday. Discussion about the workshop may be directed to the SciPy-user mailing list (http://www.scipy.org/site_content/MailList) to which you may post messages at scipy-user at scipy.org. Presenters: If you would like to present at the workshop, there are two formats: - Lightning Talks: Short (5-15 minute) presentations of a particular scientific problem solved with Python. - Presentations: Traditional presentation format ~45 minute talks. If you would like to present, contact Eric Jones at eric at enthought.com. For any other questions, please feel free to call or email Travis Vaught: travis at enthought.com, (512)536-1057. You can call the same number to register via phone (Business Hours CST). Links: SciPy.org community site: http://www.scipy.org Workshop Home: http://www.scipy.org/site_content/scipy03 Summary of last year's workshop: http://www.scipy.org/site_content/scipy02/scipy02summary.htm From nwagner at mecha.uni-stuttgart.de Fri Jul 25 07:30:26 2003 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Fri, 25 Jul 2003 13:30:26 +0200 Subject: [SciPy-user] TypeError: object has read-only attributes Message-ID: <3F2114D2.25E9A838@mecha.uni-stuttgart.de> Hi all, I would like to change an entry of a complex array. >>> t array([ 0.30993965+0.21102825j, 0.40232318+0.48098591j, 0.30927754+0.3310895j , 0.36197345+0.36041015j]) >>> t[0] (0.30993964566340926+0.21102825078044135j) >>> t[0].real 0.30993964566340926 >>> t[0].real=0 Traceback (most recent call last): File "", line 1, in ? TypeError: object has read-only attributes >>> t[0]=1 >>> t[0] (1+0j) >>> What's the trouble ? Nils From cjw at sympatico.ca Fri Jul 25 14:15:39 2003 From: cjw at sympatico.ca (Colin J. Williams) Date: Fri, 25 Jul 2003 14:15:39 -0400 Subject: [SciPy-user] TypeError: object has read-only attributes In-Reply-To: <3F2114D2.25E9A838@mecha.uni-stuttgart.de> References: <3F2114D2.25E9A838@mecha.uni-stuttgart.de> Message-ID: <3F2173CB.6000504@sympatico.ca> Nils Wagner wrote: >Hi all, > >I would like to change an entry of a complex array. > > > >>>>t >>>> >>>> >array([ 0.30993965+0.21102825j, 0.40232318+0.48098591j, > 0.30927754+0.3310895j , 0.36197345+0.36041015j]) > > >>>>t[0] >>>> >>>> >(0.30993964566340926+0.21102825078044135j) > > >>>>t[0].real >>>> >>>> >0.30993964566340926 > > >>>>t[0].real=0 >>>> >>>> >Traceback (most recent call last): > File "", line 1, in ? >TypeError: object has read-only attributes > > > >>>>t[0]=1 >>>>t[0] >>>> >>>> >(1+0j) > > > >What's the trouble ? > >Nils > >_______________________________________________ >SciPy-user mailing list >SciPy-user at scipy.net >http://www.scipy.net/mailman/listinfo/scipy-user > > > Nils, You probably need something like: a= t[0].imag t[0]= complex(0, a) Colin W. From nwagner at mecha.uni-stuttgart.de Mon Jul 28 06:27:07 2003 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Mon, 28 Jul 2003 12:27:07 +0200 Subject: [SciPy-user] Use and abuse of floating point operations Message-ID: <3F24FA7B.72ACE975@mecha.uni-stuttgart.de> Hi all, I would like to compare two different algorithms with respect to their performance. What is a suitable measure for that task and what is obsolete ? Any suggestion ? Nils From nwagner at mecha.uni-stuttgart.de Mon Jul 28 09:36:51 2003 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Mon, 28 Jul 2003 15:36:51 +0200 Subject: [SciPy-user] Removing rows and columns of a matrix Message-ID: <3F2526F3.70F9B095@mecha.uni-stuttgart.de> Hi all, How can I delete a column/row from a matrix. In Matlab: >> a=rand(4,4) a = 0.9501 0.8913 0.8214 0.9218 0.2311 0.7621 0.4447 0.7382 0.6068 0.4565 0.6154 0.1763 0.4860 0.0185 0.7919 0.4057 use >> a(:,2)=[] a = 0.9501 0.8214 0.9218 0.2311 0.4447 0.7382 0.6068 0.6154 0.1763 0.4860 0.7919 0.4057 >> a(2,:)=[] a = 0.9501 0.8214 0.9218 0.6068 0.6154 0.1763 0.4860 0.7919 0.4057 >> Is there something similar in scipy, numpy or numarray ? Any suggestion ? Nils From nwagner at mecha.uni-stuttgart.de Mon Jul 28 10:26:41 2003 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Mon, 28 Jul 2003 16:26:41 +0200 Subject: [SciPy-user] Re: [Numpy-discussion] Removing rows and columns of a matrix References: <3F2526F3.70F9B095@mecha.uni-stuttgart.de> <200307281609.18652.hinsen@cnrs-orleans.fr> Message-ID: <3F2532A1.1DD9418E@mecha.uni-stuttgart.de> Konrad Hinsen schrieb: > > > How can I delete a column/row from a matrix. > > As an in-place operation, not at all. To get a copy of an array with some > columns/rows removed, use Numeric.take. > The in-place operation of matlab is a nice feature. Is it thinkable to have this in scipy or numarray at a later date ? Nils > Konrad. > -- > ------------------------------------------------------------------------------- > Konrad Hinsen | E-Mail: hinsen at cnrs-orleans.fr > Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.56.24 > Rue Charles Sadron | Fax: +33-2.38.63.15.17 > 45071 Orleans Cedex 2 | Deutsch/Esperanto/English/ > France | Nederlands/Francais > ------------------------------------------------------------------------------- > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are available now. > Download today and enter to win an XBOX or Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 > _______________________________________________ > Numpy-discussion mailing list > Numpy-discussion at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/numpy-discussion From perry at stsci.edu Mon Jul 28 10:34:16 2003 From: perry at stsci.edu (Perry Greenfield) Date: Mon, 28 Jul 2003 10:34:16 -0400 Subject: [SciPy-user] RE: [Numpy-discussion] Removing rows and columns of a matrix In-Reply-To: <3F2532A1.1DD9418E@mecha.uni-stuttgart.de> Message-ID: > > Konrad Hinsen schrieb: > > > > > How can I delete a column/row from a matrix. > > > > As an in-place operation, not at all. To get a copy of an array > with some > > columns/rows removed, use Numeric.take. > > > The in-place operation of matlab is a nice feature. Is it thinkable to > have this > in scipy or numarray at a later date ? > > Nils > Speaking for numarray, no, not really. But I wonder what is really done for matlab. Either they have a more complex representation of arrays, or all they really are doing is making a new copy of the array and giving you the impression it is being done in place. After all you are changing the size and structure of the array. Perry From nwagner at mecha.uni-stuttgart.de Mon Jul 28 11:19:30 2003 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Mon, 28 Jul 2003 17:19:30 +0200 Subject: [SciPy-user] Re: [Numpy-discussion] Removing rows and columns of a matrix References: <3F2526F3.70F9B095@mecha.uni-stuttgart.de> <200307281609.18652.hinsen@cnrs-orleans.fr> <3F2532A1.1DD9418E@mecha.uni-stuttgart.de> <200307281640.34643.hinsen@cnrs-orleans.fr> Message-ID: <3F253F02.F953C6D6@mecha.uni-stuttgart.de> Konrad Hinsen schrieb: > > On Monday 28 July 2003 16:26, Nils Wagner wrote: > > Konrad Hinsen schrieb: > > > > How can I delete a column/row from a matrix. > > > > > > As an in-place operation, not at all. To get a copy of an array with some > > > columns/rows removed, use Numeric.take. > > > > The in-place operation of matlab is a nice feature. Is it thinkable to > > have this > > in scipy or numarray at a later date ? > > I'd say that the obvious way to implement it is as > > del a[2:3,:] > > That can certainly be done, but someone has to do it. > > Personally, I am not convinced that it is very useful. The consequences of an > in-place change can be disastrous when many references point to that array. > But then, we have other in-place operations which sometimes are handy, so my > usefulness estimation may be wrong. > > Konrad. In my opinion, this operation is quite useful. For example a finite element model where we have to impose several homogeneous boundary conditions. This can be done by deleting columns and associated rows. Nils In any case I am interested in a reliable workaround for this feature. A small example would be appreciated. Thanks in advance. > -- > ------------------------------------------------------------------------------- > Konrad Hinsen | E-Mail: hinsen at cnrs-orleans.fr > Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.56.24 > Rue Charles Sadron | Fax: +33-2.38.63.15.17 > 45071 Orleans Cedex 2 | Deutsch/Esperanto/English/ > France | Nederlands/Francais > ------------------------------------------------------------------------------- > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are available now. > Download today and enter to win an XBOX or Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 > _______________________________________________ > Numpy-discussion mailing list > Numpy-discussion at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/numpy-discussion From nwagner at mecha.uni-stuttgart.de Tue Jul 29 09:32:42 2003 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Tue, 29 Jul 2003 15:32:42 +0200 Subject: [SciPy-user] xplt.hold Message-ID: <3F267779.F560C85D@mecha.uni-stuttgart.de> Hi all, Is it possible to use xplt.hold('on') for window(1) and xplot.hold('off') for window(2) ? A small example would be appreciated. Nils From nwagner at mecha.uni-stuttgart.de Tue Jul 29 10:21:45 2003 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Tue, 29 Jul 2003 16:21:45 +0200 Subject: [SciPy-user] generalized eigenvalue problem with singular matrices a,b Message-ID: <3F2682F9.ABF061DD@mecha.uni-stuttgart.de> Hi all, Attention should be paid to the output of linalg.eig when both matrices are singular. Please find attached a small example. Any comment ? Nils from scipy import * a = diag(arange(0,10)) b = identity(10) b[0,0] = b[0,0]-1 # # Uncomment #w,vr = linalg.eig(a,b) #print w w = linalg.eigvals(a,b) print w Traceback (most recent call last): File "singular.py", line 7, in ? w,vr = linalg.eig(a,b) File "/usr/local/lib/python2.1/site-packages/scipy/linalg/decomp.py", line 108, in eig return _geneig(a1,b,left,right,overwrite_a,overwrite_b) File "/usr/local/lib/python2.1/site-packages/scipy/linalg/decomp.py", line 68, in _geneig vr = _make_complex_eigvecs(w, vr, t) File "/usr/local/lib/python2.1/site-packages/scipy/linalg/decomp.py", line 29, in _make_complex_eigvecs vnew.real = scipy_base.take(vin,ind[::2],1) ValueError: matrices are not aligned for copy From perry at stsci.edu Tue Jul 29 14:23:53 2003 From: perry at stsci.edu (Perry Greenfield) Date: Tue, 29 Jul 2003 14:23:53 -0400 Subject: [SciPy-user] RE: [Numpy-discussion] Removing rows and columns of a matrix Message-ID: Nils Wagner writes: > > In any case I am interested in a reliable workaround for this feature. > > A small example would be appreciated. > Thanks in advance. > Numarray (and Numeric to a certain extent) currently is centered around what rows or columns you want rather than those you don't. Writing a reasonably efficient function to do this in a more convenient way is not hard. Here is an example for numarray (not tested, nor does it have any error checking to ensure the input array has sufficient dimensions or that the index is within the array bounds): def remove(arr, index, dim=0): """Remove subarray at index and dimension specified""" # make selected dimension the first one swparr = swapaxes(arr, 0, dim) indices = range(swparr.shape[0]) del indices[index] newarray = swparr[indices] # reorder axes as they originally appeared. return swapaxes(newarray, 0, dim) Then you can say x = remove(x, 5) to remove the 6th row or x = remove(x, 4, dim=1) to remove the 5th column. (depending on what you call rows or columns; in the examples I'm taking an image-oriented view rather than a matrix-oriented view) Perry From wagner.nils at vdi.de Tue Jul 29 15:03:16 2003 From: wagner.nils at vdi.de (Nils Wagner) Date: Tue, 29 Jul 2003 21:03:16 +0200 Subject: [SciPy-user] RE: [Numpy-discussion] Removing rows and columns of a matrix In-Reply-To: Message-ID: <20030729203315.C44B63EB0C@www.scipy.com> ------------------- Nils Wagner writes: > > In any case I am interested in a reliable workaround for this feature. > > A small example would be appreciated. > Thanks in advance. > Numarray (and Numeric to a certain extent) currently is centered around what rows or columns you want rather than those you don't. Writing a reasonably efficient function to do this in a more convenient way is not hard. Here is an example for numarray (not tested, nor does it have any error checking to ensure the input array has sufficient dimensions or that the index is within the array bounds): def remove(arr, index, dim=0): """Remove subarray at index and dimension specified""" # make selected dimension the first one swparr = swapaxes(arr, 0, dim) indices = range(swparr.shape[0]) del indices[index] newarray = swparr[indices] # reorder axes as they originally appeared. return swapaxes(newarray, 0, dim) Then you can say x = remove(x, 5) to remove the 6th row or x = remove(x, 4, dim=1) to remove the 5th column. (depending on what you call rows or columns; in the examples I'm taking an image-oriented view rather than a matrix-oriented view) Perry Perry, Thank you for your reply. Unfortunately, I am not familiar with numarray. This is the output of my test program. from scipy import * from RandomArray import * from numarray import * def remove(arr, index, dim=0): """Remove subarray at index and dimension specified""" # make selected dimension the first one swparr = swapaxes(arr, 0, dim) indices = range(swparr.shape[0]) del indices[index] newarray = swparr[indices] # reorder axes as they originally appeared. return swapaxes(newarray, 0, dim) #Then you can say a = rand(5,5) print a a = remove(a, 2) print a #to remove the 3th row or #to remove the 3th column a = remove(a, 2, dim=1) print a [[ 0.87329948 0.81829292 0.72929943 0.13012239 0.49291104] [ 0.58665377 0.78030288 0.85906255 0.11409029 0.77719343] [ 0.01325159 0.03389675 0.25417367 0.51117259 0.61979091] [ 0.32406124 0.24500449 0.06147733 0.04323368 0.64497042] [ 0.10133368 0.25028452 0.33645368 0.34395722 0.34052679]] Traceback (most recent call last): File "nils.py", line 19, in ? a = remove(a, 2) File "nils.py", line 8, in remove swparr = swapaxes(arr, 0, dim) File "/usr/lib/python2.2/site-packages/numarray/generic.py", line 855, in swapaxes v = _nc.inputarray(array).view() File "/usr/lib/python2.2/site-packages/numarray/numarraycore.py", line 310, in inputarray return array(seq, type=type, typecode=typecode, copy=0) File "/usr/lib/python2.2/site-packages/numarray/numarraycore.py", line 303, in array raise ValueError("Unknown input type") ValueError: Unknown input type Any idea ? Nils _______________________________________________ SciPy-user mailing list SciPy-user at scipy.net http://www.scipy.net/mailman/listinfo/scipy-user From wagner.nils at vdi.de Tue Jul 29 15:03:16 2003 From: wagner.nils at vdi.de (Nils Wagner) Date: Tue, 29 Jul 2003 21:03:16 +0200 Subject: [SciPy-user] RE: [Numpy-discussion] Removing rows and columns of a matrix In-Reply-To: Message-ID: <20030729203315.BA6743EB09@www.scipy.com> ------------------- Nils Wagner writes: > > In any case I am interested in a reliable workaround for this feature. > > A small example would be appreciated. > Thanks in advance. > Numarray (and Numeric to a certain extent) currently is centered around what rows or columns you want rather than those you don't. Writing a reasonably efficient function to do this in a more convenient way is not hard. Here is an example for numarray (not tested, nor does it have any error checking to ensure the input array has sufficient dimensions or that the index is within the array bounds): def remove(arr, index, dim=0): """Remove subarray at index and dimension specified""" # make selected dimension the first one swparr = swapaxes(arr, 0, dim) indices = range(swparr.shape[0]) del indices[index] newarray = swparr[indices] # reorder axes as they originally appeared. return swapaxes(newarray, 0, dim) Then you can say x = remove(x, 5) to remove the 6th row or x = remove(x, 4, dim=1) to remove the 5th column. (depending on what you call rows or columns; in the examples I'm taking an image-oriented view rather than a matrix-oriented view) Perry Perry, Thank you for your reply. Unfortunately, I am not familiar with numarray. This is the output of my test program. from scipy import * from RandomArray import * from numarray import * def remove(arr, index, dim=0): """Remove subarray at index and dimension specified""" # make selected dimension the first one swparr = swapaxes(arr, 0, dim) indices = range(swparr.shape[0]) del indices[index] newarray = swparr[indices] # reorder axes as they originally appeared. return swapaxes(newarray, 0, dim) #Then you can say a = rand(5,5) print a a = remove(a, 2) print a #to remove the 3th row or #to remove the 3th column a = remove(a, 2, dim=1) print a [[ 0.87329948 0.81829292 0.72929943 0.13012239 0.49291104] [ 0.58665377 0.78030288 0.85906255 0.11409029 0.77719343] [ 0.01325159 0.03389675 0.25417367 0.51117259 0.61979091] [ 0.32406124 0.24500449 0.06147733 0.04323368 0.64497042] [ 0.10133368 0.25028452 0.33645368 0.34395722 0.34052679]] Traceback (most recent call last): File "nils.py", line 19, in ? a = remove(a, 2) File "nils.py", line 8, in remove swparr = swapaxes(arr, 0, dim) File "/usr/lib/python2.2/site-packages/numarray/generic.py", line 855, in swapaxes v = _nc.inputarray(array).view() File "/usr/lib/python2.2/site-packages/numarray/numarraycore.py", line 310, in inputarray return array(seq, type=type, typecode=typecode, copy=0) File "/usr/lib/python2.2/site-packages/numarray/numarraycore.py", line 303, in array raise ValueError("Unknown input type") ValueError: Unknown input type Any idea ? Nils _______________________________________________ SciPy-user mailing list SciPy-user at scipy.net http://www.scipy.net/mailman/listinfo/scipy-user From perry at stsci.edu Tue Jul 29 15:23:54 2003 From: perry at stsci.edu (Perry Greenfield) Date: Tue, 29 Jul 2003 15:23:54 -0400 Subject: [SciPy-user] RE: [Numpy-discussion] Removing rows and columns of a matrix In-Reply-To: Message-ID: > from scipy import * > from RandomArray import * > from numarray import * > I believe the problem is in this part. You are getting some functions (like rand) which return a numeric array which some numarray functions don't recognize (we will be fixing this soon, they should accept any Python sequence that fits the basic requirements). For the moment you will need to generate a numarray array for that function to work. In the latest release you would do the imports as follows (for version 0.6 and later) from numarray.numeric import * from numarray.random_array import * a = random((5,5)) and so forth Perry From daishi at egcrc.net Tue Jul 29 22:23:18 2003 From: daishi at egcrc.net (daishi at egcrc.net) Date: Tue, 29 Jul 2003 19:23:18 -0700 Subject: [SciPy-user] gui_thread Message-ID: <3F272C16.3040606@egcrc.net> I'm having some problems following the tutorial found here: http://www.scipy.org/site_content/tutorials/plot_tutorial In particular, when in the Python interpreter I do >>> import gui_thread nothing seems to happen - I simply get an interpreter prompt. I took a look at gui_thread/__init__.py, and it appears that there are only import statements - is there something that I'm missing? I noticed that in a previous version of __init__.py there was a call to main.start(), so I tried re-inserting that into the file, but this simply hangs the interpreter. (The interpreter must be killed from another terminal). What is somewhat odd is that if I leave the code as is (i.e., without the explicit call to main.start()), and do: >>> import gui_thread >>> gui_thread.main.start() Things seem to work as advertised. I.e., >>> from scipy import plt >>> plt.plot(range(3)) >>> shows an appropriate window. Is there a reason why calling main.start() from the interpreter behaves differently then when called from within the __init__.py? (I realize the contexts are different, but having looked at what main.start() does, it's not clear to me why that would matter). On a separate note, trying to use Chaco results in the following: >>> from chaco import wxplt Traceback (most recent call last): File "", line 1, in ? File "/usr/local/lib/python2.2/site-packages/chaco/wxplt.py", line 19, in ? from wxplot import * File "/usr/local/lib/python2.2/site-packages/chaco/wxplot.py", line 17, in ? from wxplot_window import PlotWindow, PlotTraitSheet File "/usr/local/lib/python2.2/site-packages/chaco/wxplot_window.py", line 25, in ? from wxplot_trait_sheet import TraitPanel, TraitSheet, trait_sheet_handler File "/usr/local/lib/python2.2/site-packages/chaco/wxplot_trait_sheet.py", line 18, in ? from traits.wxtrait_sheet import * File "/usr/local/lib/python2.2/site-packages/traits/__init__.py", line 20, in ? from traits import HasTraits, HasDynamicTraits, Trait, Disallow, \ File "/usr/local/lib/python2.2/site-packages/traits/traits.py", line 100, in ? from trait_delegates import TraitDelegate File "/usr/local/lib/python2.2/site-packages/traits/trait_delegates.py", line 38, in ? class TraitDelegate: File "/usr/local/lib/python2.2/site-packages/traits/trait_delegates.py", line 40, in TraitDelegate def __init__ ( self, delegate = None, mutate_or_prefix = False ): NameError: name 'False' is not defined >>> Does one need Python 2.3 to use Chaco? (I know that wxPython uses 'True' and 'False' without requiring 2.3 - I believe it's dynamically bound when one does 'import wx'?) Thanks in advance for any insight, d Some system info follows: ------ os.name='posix' ------ sys.platform='linux2' ------ sys.version: 2.2 (#1, Feb 26 2002, 15:49:15) [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-81)] ------ sys.prefix: /usr/local ------ Found Numeric version '21.3' in /usr/local/lib/python2.2/site-packages/Numeric/Numeric.pyc ------ Found f2py2e version '2.35.229-1492' in /usr/local/lib/python2.2/site-packages/f2py2e/f2py2e.pyc ------ Found scipy_distutils version '0.2.0_alpha_3.288' in '/usr/local/lib/python2.2/site-packages/scipy_distutils/__init__.pyc' Importing scipy_distutils.command.build_flib ... ok ------ atlas_info: FOUND: libraries = ['lapack', 'f77blas', 'cblas', 'atlas'] library_dirs = ['/usr/local/lib'] blas_info: FOUND: libraries = ['blas'] library_dirs = ['/usr/lib'] blas_src_info: NOT AVAILABLE dfftw_info: NOT AVAILABLE dfftw_threads_info: NOT AVAILABLE djbfft_info: NOT AVAILABLE fftw_info: FOUND: libraries = ['rfftw', 'fftw'] library_dirs = ['/usr/local/lib'] define_macros = [('SCIPY_FFTW_H', None)] include_dirs = ['/usr/local/include'] fftw_threads_info: NOT AVAILABLE lapack_info: FOUND: libraries = ['lapack'] library_dirs = ['/usr/local/lib'] lapack_src_info: NOT AVAILABLE sfftw_info: NOT AVAILABLE sfftw_threads_info: NOT AVAILABLE x11_info: FOUND: libraries = ['X11'] library_dirs = ['/usr/X11R6/lib'] include_dirs = ['/usr/X11R6/include'] ------ Gnu version='0.5.26' F77='g77' F77FLAGS=' -Wall -fno-second-underscore -fPIC ' F77OPT=' -O3 -funroll-loops -march=i686 -malign-double -fomit-frame-pointer ' LIBS='-lg2c' From pajer at iname.com Tue Jul 29 23:53:27 2003 From: pajer at iname.com (Gary Pajer) Date: Tue, 29 Jul 2003 23:53:27 -0400 Subject: [SciPy-user] more on gui_thread; plus chaco.tkplt References: <3F272C16.3040606@egcrc.net> Message-ID: <004301c3564e$2445d520$c0135544@playroom> daishi at egcrc.net reported problems with gui_thread under linux. I have been having the same problem in XP. The only way I can use chaco.wxplt is to run it from PyCrust. Also, I cannot run anything from chaco.tkplt at all. The begining of the error stream is reproduced below. About twice this amount of additional errors follows after. I had been having other problems with my XP installation, so I thought that something was screwed up in my system. (supported by a lack of similar reports here) . I was about to reformat my hard drive when I decided to do a completely fresh python installation on an NT machine that never had python on it. I get *exactly* the same results. No difference between Numeric 22.0 and Numeric 23.0 Perhaps there's something I should have installed ????? I'm perplexed that I've seen no mention of these problems, yet I have it on two different machines with two different OSs. off topic, but maybe related: I frequently get a windows error concerning an unreadable memory location when I close a Tkinter app. Idle and Idlefork always give this error when closing. On both XP and NT. I'm happy to provide whatever info you want ... just tell me what you need. I have posted this problem on the chaco list but I've gotten no responses. Any takers? Gary >>> from chaco import tkplt >>> tkplt.plot((1,2,3)) Traceback (most recent call last): File "C:\PYTHON22\Lib\site-packages\chaco\plot_window.py", line 227, in _min_size dx, dy = canvas._min_size() File "C:\PYTHON22\Lib\site-packages\chaco\plot_canvas.py", line 619, in _min_size title_info = self._title_info() File "C:\PYTHON22\Lib\site-packages\chaco\plot_canvas.py", line 596, in _title_info return TitleInfo( self._titles ) File "C:\PYTHON22\Lib\site-packages\chaco\plot_info.py", line 67, in __init__ self.add_titles( titles ) File "C:\PYTHON22\Lib\site-packages\chaco\plot_info.py", line 76, in add_titles self.min_size( title_item ) File "C:\PYTHON22\Lib\site-packages\chaco\plot_info.py", line 94, in min_size dx, dy = title._min_size() File "C:\PYTHON22\Lib\site-packages\chaco\plot_frame.py", line 515, in _min_size ( min_dx, min_dy, File "C:\PYTHON22\Lib\site-packages\kiva\basecore2d.py", line 1266, in get_full_text_extent return self.device_get_full_text_extent(textstring) File "C:\PYTHON22\Lib\site-packages\kiva\basecore2d.py", line 1274, in device_get_full_text_extent ft_engine.select_font( f.name, f.size, f.style, f.encoding ) ### TEMPORARY ### AttributeError: Font instance has no attribute 'name' From msajec at tqs.com Wed Jul 30 15:09:25 2003 From: msajec at tqs.com (Sajec, Mike TQO) Date: Wed, 30 Jul 2003 12:09:25 -0700 Subject: [SciPy-user] Please help : wxplt line-plot to box-plot? Message-ID: <2E5FEA6E71B22B46BBD13D126F719209026C27FD@STARBURST.tqs.com> Hello, Can anyone give an example (or fill in below) how to change a value's plot-type from line to bar without manually editing through chaco? I'd like to create a histogram generating function based on wxplt.plot . Thanks in advance, Mike ################################### from scipy import * from chaco import wxplt as plt import RandomArray as ra #data for testing... data = ra.normal(0,3,100) mu = mean(data) sigma = std(data) mhist = stats.histogram(data) xhist = mhist[1] yhist = mhist[0] fig1 = plt.plot(xhist,yhist) ## CHANGE FROM LINE PLOT TO BAR PLOT????? ## # fig1.canvas.??? From falted at openlc.org Thu Jul 31 18:54:21 2003 From: falted at openlc.org (Francesc Alted) Date: Fri, 1 Aug 2003 00:54:21 +0200 Subject: [SciPy-user] ANN: PyTables 0.7 Message-ID: <200308010054.21757.falted@openlc.org> Announcing PyTables 0.7 ----------------------- PyTables is a hierarchical database package designed to efficently manage very large amounts of data. PyTables is built on top of the HDF5 library and the numarray package and features an object-oriented interface that, combined with C-code generated from Pyrex sources, makes it a fast, yet extremely easy to use tool for interactively save and retrieve large amounts of data. Release 0.7 is the third public beta release. The version 0.6 was internal and will never be released. On this release you will find: - new AttributeSet class - 25% I/O speed improvement - fully multidimensional table cells support - new column descriptors - row deletion in tables is finally here - much more! More in detail: What's new ----------- - A new AttributeSet class has been added. This will allow the addition and deletion of generic attributes (any scalar type plus any Python object supported by Pickle) as easy as this: table.attrs.date = "2003/07/28 10:32" # Attach a string to table group._v_attrs.tempShift = 1.2 # Attach a float to group array.attrs.detectorList = [1,2,3,4] # Attach a list to array del array.attrs.detectorList # Detach detectorList attr from array - PyTables now has support for fully multidimensional table cells. This has been made possible in part by implementation of multidimensional cells in numarray.records.RecArray object. Thanks to numarray crew, and especially to Jin-chung Hsu, for willingly accepting to do that, and also for including some cache improvements in RecArray. - New column descriptors added: IntCol, Int8Col, UInt8Col, Int16Col, UInt16Col, Int32Col, UInt32Col, Int64Col, UInt64Col, FloatCol, Float32Col, Float64Col and StringCol. I think they are more explicit and easy-to-use than the now deprecated (but still supported) Col() descriptor. All the examples and user's manual has been accordingly updated. - The new Table.removeRows(start, stop) function allows you to remove rows from tables. This feature was requested a long time ago. There are still limitations, however: you cannot delete rows in extremely large Tables (as the remaining rows after the stop parameter are stored in memory). Nor is the performance optimized. These issues will hopefully be addressed in future releases. - Added iterators to File, Group and Table (they now support the special __iter__() method). They make the object much more user-friendly, especially in interactive mode. See documentation for usage examples. - Added a __getitem__() method to Table that works more or less like read(), but with extended slices support. - As a consequence of rewriting table iterators in C (with the help of Pyrex, of course) the table read performance has been improved between 20% and 30%. Data selections in PyTables are now starting to beat powerful relational databases like SQLite, even compared to in-core selects (!). I think there is still room for another 20% or 30% speed improvement, so stay tuned. - A checksum is now added automatically when using LZO (not with UCL where I'm having some difficulties implementing that capability). The Adler32 algorithm has been chosen because of its speed. With that, the compressing/decompressing speed has dropped 1% or 2%, which is hardly noticeable. I think this addition will allow the cautious user to be a bit more confident about this excellent compressor. Code has been added to be able to read files created without this checksum (so you can be confident that you will be able to read your existing files compressed with LZO and UCL). - Recursion has been removed from PyTables. Before, this made the maximum depth tree to be less than the Python recursion limit (which depends on implementation, but is around 900, at least in Linux). Now, the limit has been set (somewhat arbitrarily) at 2048. Thanks to John Nielsen for implementing the new iterative method!. - A new rootUEP parameter to openFile() has been added. You can now define the root from which you want to start to build the object tree. Thanks to John Nielsen for the suggestion and a first implementation. - A small bug fixed when dealing with non-native PyTables files that prevented the use of the "classname" filter during a listNodes() call. Thanks to Jeff Robbins for reporting that. - Some (non-serious) bugs were discovered and fixed. - Updated documentation to explain all these new bells and whistles. It is also available on the web: http://pytables.sourceforge.net/html-doc/usersguide-html.html - Added more unit tests (more than 350 now!) - PyTables 0.7 *needs* numarray 0.6 or higher and HDF-1.6.0 or higher to compile and work. It has been tested with Python 2.2 and 2.3 and should work fine on both versions. 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" seems to be quite a strange requirement for an 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 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 --------- I'm using Linux as the main development platform, but PyTables should be easy to compile/install on other UNIX machines. This package has also passed all the tests on a UltraSparc platform with Solaris 7 and Solaris 8. It also compiles and passes all the tests on a SGI Origin2000 with MIPS R12000 processors and running IRIX 6.5. Regarding Windows platforms, PyTables has been tested with Windows 2000 and Windows XP, but it should also work with other flavors. An example? ----------- For online code examples, have a look at http://pytables.sourceforge.net/tut/tutorial1-1.html and http://pytables.sourceforge.net/tut/tutorial1-2.html Web site -------- Go to the PyTables web site for more details: http://pytables.sourceforge.net/ Share your experience --------------------- Let me know of any bugs, suggestions, gripes, kudos, etc. you may have. Have fun! -- Francesc Alted falted at openlc.org