From duncan at enthought.com Fri Apr 1 17:22:50 2005 From: duncan at enthought.com (Duncan Child) Date: Fri, 01 Apr 2005 16:22:50 -0600 Subject: [SciPy-user] Units in SciPy In-Reply-To: <424C0961.9050508@iname.com> References: <424B24F6.4010104@enthought.com> <424C0961.9050508@iname.com> Message-ID: <424DC9BA.90300@enthought.com> Hi all, After reading all the emails I think the problem splits down like this: 1) Algebra of Units It feels like you should be able to divide a distance by a time and get a velocity. If you then try and add a velocity to a temperature you should get an error. This may be what Gary had in mind when he said "I've tried units packages in other systems. (notably Mathcad) After 30 minutes I abandon them. Much typing, little payback." 2) Quantities (Robert's "numerical quantities tagged with their unit system") This is what I need to provide to scientists who are developing libraries of geophysical algorithms. They know what units they expect eg their algoritm needs a velocity in m/s. As long as I can tag the data that flows through the system with a description of what it's units are then I can add a 'shim' that will do the necessary unit conversions. The problem is that some of the units packages are targetted towards 'units algebra' and then punt on issues like temperature gradients which makes it hard for me to tag all the quantities. In fact, I would almost be better off passing around a string because that would at least allow me to hack around the special cases in my 'shim' code. 3) Map Projections Describing lat lon data is harder because if you don't also specify the datum (effectively where you are assuming the center of the Earth is) your position can be miscontrued by 100s of meters. To convert from lat lon to xy you have to specify a bunch of parameters so this is trickier than converting something like meters to km. So I am not sure where this type of data fits in relation to the more usual conversions. Summary: 1) no one has suggested a better approach than than the one we are already using for Quantities 2) Enthought has not overlooked a clearly superior implementation of a units package that we could include in SciPy 3) Frink is indeed very cool. 4) POSC has a fairly complete database of units http://www.posc.org/UConvert Regards, Duncan From rkern at ucsd.edu Fri Apr 1 19:11:59 2005 From: rkern at ucsd.edu (Robert Kern) Date: Fri, 01 Apr 2005 16:11:59 -0800 Subject: [SciPy-user] Units in SciPy In-Reply-To: <424DC9BA.90300@enthought.com> References: <424B24F6.4010104@enthought.com> <424C0961.9050508@iname.com> <424DC9BA.90300@enthought.com> Message-ID: <424DE34F.1000602@ucsd.edu> Duncan Child wrote: > 3) Map Projections > > Describing lat lon data is harder because if you don't also specify the > datum (effectively where you are assuming the center of the Earth is) > your position can be miscontrued by 100s of meters. To convert from lat > lon to xy you have to specify a bunch of parameters so this is trickier > than converting something like meters to km. So I am not sure where this > type of data fits in relation to the more usual conversions. It's just an example of the most general kind of conversions: ones that you have to code yourself. You would have two measurement systems reified as smart objects, not just dumb tags. You can parameterize all you like. class LatLon(MeasurementSystem): ... latlon = LatLon() class MapProjection(MeasurementSystem): ... class DatumShifted(MapProjection): def __init__(self, datum): ... nad83 = DatumShifted('NAD83') nad27 = DatumShifted('NAD27') x1 = quantity([35.94, -120.43], latlon) x2 = quantity([35.31, -120.66], latlon) y1 = convert(x2, nad83) y2 = convert(x2, nad83) In short, it's the same code you'd have to write anyways (and, in fact, I've already written), but it fits into a framework that reduces the amount of *interfaces* I have to write and think about and litter around my code. And with DatumShifted suitably implemented, you could do y2 - y1 and get quantity([-69880.73534289,-20899.29905468], meters) -- Robert Kern rkern at ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter From ariciputi at pito.com Tue Apr 5 05:32:55 2005 From: ariciputi at pito.com (Andrea Riciputi) Date: Tue, 5 Apr 2005 11:32:55 +0200 Subject: [SciPy-user] Least Squares error message. Message-ID: Hi all, I'm trying scipy.optimize.leastsq routine and I get the following warning message as output: > In [100]: lstSquareEstimate > Out[100]: > (0.029000567127575108, > 'Both actual and predicted relative reductions in the sum of > squares\n are at most 0.000000') The message doesn't seem too much explicative (at least to me), and even after looking at scipy and MINPACK source codes, I've not got any further insight. Could someone try to explain what was going wrong here? Thanks in advance, Andrea. From elcorto at gmx.net Tue Apr 5 09:58:41 2005 From: elcorto at gmx.net (steve schmerler) Date: Tue, 05 Apr 2005 15:58:41 +0200 Subject: [SciPy-user] Least Squares error message. In-Reply-To: References: Message-ID: <42529991.9050805@gmx.net> Hi Well it looks as if the algorithm met one of its termination criterias ('ftol', at least mpfit (see earlier posts for mpfit) gives exactly the same message). Maybe you should post your code part which calls leastsq. Cheers, Steve Andrea Riciputi wrote: > Hi all, > I'm trying scipy.optimize.leastsq routine and I get the following > warning message as output: > >> In [100]: lstSquareEstimate >> Out[100]: >> (0.029000567127575108, >> 'Both actual and predicted relative reductions in the sum of >> squares\n are at most 0.000000') > > > The message doesn't seem too much explicative (at least to me), and even > after looking at scipy and MINPACK source codes, I've not got any > further insight. Could someone try to explain what was going wrong here? > > Thanks in advance, > Andrea. > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > > From ariciputi at pito.com Tue Apr 5 10:50:34 2005 From: ariciputi at pito.com (Andrea Riciputi) Date: Tue, 5 Apr 2005 16:50:34 +0200 Subject: [SciPy-user] Least Squares error message. In-Reply-To: <42529991.9050805@gmx.net> References: <42529991.9050805@gmx.net> Message-ID: <10A4DB92-A5E2-11D9-9ABB-000A95C0BC68@pito.com> I see, but what I can't understand is the meaning of the error message. By the way, if I try the example given at page 16 of "SciPy Tutorial" (by Travis), I get the same error message. Any other hint? TIA, Andrea. On 5 Apr 2005, at 15:58, steve schmerler wrote: > Hi > > Well it looks as if the algorithm met one of its termination criterias > ('ftol', at least mpfit (see earlier posts for mpfit) gives exactly > the same message). > > Maybe you should post your code part which calls leastsq. > > Cheers, > Steve From elcorto at gmx.net Tue Apr 5 11:25:15 2005 From: elcorto at gmx.net (steve schmerler) Date: Tue, 05 Apr 2005 17:25:15 +0200 Subject: [SciPy-user] Least Squares error message. In-Reply-To: <10A4DB92-A5E2-11D9-9ABB-000A95C0BC68@pito.com> References: <42529991.9050805@gmx.net> <10A4DB92-A5E2-11D9-9ABB-000A95C0BC68@pito.com> Message-ID: <4252ADDB.1020907@gmx.net> Hi What do you mean? It is rather a status message telling you why termination occured. If I try Travis's example I also get In [10]: reload mytest -------> reload(mytest) (array([-10.33422249, 32.88295995, 3.7880052 ]), 'Both actual and predicted relative reductions in the sum of squares\n are at most 0.000000') My default values are: leastsq(func, x0, args=(), Dfun=None, full_output=0, col_deriv=0, ftol=1.49012e-008, xtol=1.49012e-008, gtol=0.0, maxfev=0, epsfcn=0.0, factor=100, diag=None) The 0.0000 is in fact 'ftol' = 1.49012e-008 (in my opinion). Cheers, Steve Andrea Riciputi wrote: > I see, but what I can't understand is the meaning of the error message. > By the way, if I try the example given at page 16 of "SciPy Tutorial" > (by Travis), I get the same error message. > > Any other hint? > > TIA, > Andrea. > > On 5 Apr 2005, at 15:58, steve schmerler wrote: > >> Hi >> >> Well it looks as if the algorithm met one of its termination criterias >> ('ftol', at least mpfit (see earlier posts for mpfit) gives exactly >> the same message). >> >> Maybe you should post your code part which calls leastsq. >> >> Cheers, >> Steve > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > > From ariciputi at pito.com Tue Apr 5 12:25:29 2005 From: ariciputi at pito.com (Andrea Riciputi) Date: Tue, 5 Apr 2005 18:25:29 +0200 Subject: [SciPy-user] Least Squares error message. In-Reply-To: <4252ADDB.1020907@gmx.net> References: <42529991.9050805@gmx.net> <10A4DB92-A5E2-11D9-9ABB-000A95C0BC68@pito.com> <4252ADDB.1020907@gmx.net> Message-ID: <533EA024-A5EF-11D9-9ABB-000A95C0BC68@pito.com> Sorry, I had misunderstod MINPACK documentation, and I thought that the message stated a failure. If I get the point the message says that the routine has stopped because it has found the minimum of the residual function. Isn't it? Thanks, Andrea. On 5 Apr 2005, at 17:25, steve schmerler wrote: > Hi > > What do you mean? It is rather a status message telling you why > termination occured. From jdgleeson at mac.com Tue Apr 5 12:25:49 2005 From: jdgleeson at mac.com (John Gleeson) Date: Tue, 5 Apr 2005 10:25:49 -0600 Subject: [SciPy-user] Least Squares error message. In-Reply-To: References: Message-ID: On Apr 5, 2005, at 3:32 AM, Andrea Riciputi wrote: > Hi all, > I'm trying scipy.optimize.leastsq routine and I get the following > warning message as output: > >> In [100]: lstSquareEstimate >> Out[100]: >> (0.029000567127575108, >> 'Both actual and predicted relative reductions in the sum of >> squares\n are at most 0.000000') > > The message doesn't seem too much explicative (at least to me), and > even after looking at scipy and MINPACK source codes, I've not got any > further insight. Could someone try to explain what was going wrong > here? > > Thanks in advance, > Andrea. > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > > Andrea, As Steve explained, this message means that the algorithm terminated normally. The documentation you are missing is here (see page 22). -John From elcorto at gmx.net Tue Apr 5 13:10:29 2005 From: elcorto at gmx.net (steve schmerler) Date: Tue, 05 Apr 2005 19:10:29 +0200 Subject: [SciPy-user] Least Squares error message. In-Reply-To: <533EA024-A5EF-11D9-9ABB-000A95C0BC68@pito.com> References: <42529991.9050805@gmx.net> <10A4DB92-A5E2-11D9-9ABB-000A95C0BC68@pito.com> <4252ADDB.1020907@gmx.net> <533EA024-A5EF-11D9-9ABB-000A95C0BC68@pito.com> Message-ID: <4252C685.1090905@gmx.net> Andrea Riciputi wrote: > Sorry, I had misunderstod MINPACK documentation, and I thought that the > message stated a failure. > > If I get the point the message says that the routine has stopped because > it has found the minimum of the residual function. Isn't it? > Exactly. At least a local one :) depending on the starting guess x0. Cheers, Steve > Thanks, > Andrea. > > On 5 Apr 2005, at 17:25, steve schmerler wrote: > >> Hi >> >> What do you mean? It is rather a status message telling you why >> termination occured. > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > > From simon at arrowtheory.com Tue Apr 5 20:12:59 2005 From: simon at arrowtheory.com (Simon Burton) Date: Wed, 6 Apr 2005 10:12:59 +1000 Subject: [SciPy-user] loadmat: TypeError Array can not be safely cast to required type Message-ID: <20050406101259.1cc385f8.simon@arrowtheory.com> Hi, I am having the same problem as mentioned here: http://www.scipy.net/pipermail/scipy-user/2004-December/003910.html Attached is a small example V6 .mat file that demonstrates the problem (scipy 0.3.2). A collegue says it works on his (older) scipy. I couldn't find where to download the old versions of scipy. thanks, Simon. Python 2.3.3 (#1, Dec 16 2004, 12:18:55) [GCC 3.3.3 (Debian)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import scipy.io.mio as sp >>> sp.loadmat('x') # version 4 files work OK {'x': array([ 1.])} >>> sp.loadmat('x') # version 6 file Traceback (most recent call last): File "", line 1, in ? File "/home/groups/SML/lib/python2.3/site-packages/scipy/io/mio.py", line 692, in loadmat thisdict = _loadv5(fid,basename) File "/home/groups/SML/lib/python2.3/site-packages/scipy/io/mio.py", line 631, in _loadv5 el, varname = _get_element(fid) File "/home/groups/SML/lib/python2.3/site-packages/scipy/io/mio.py", line 619, in _get_element el, name = _parse_mimatrix(fid,numbytes) File "/home/groups/SML/lib/python2.3/site-packages/scipy/io/mio.py", line 510, in _parse_mimatrix result = squeeze(transpose(reshape(result,dims[::-1]))) TypeError: Array can not be safely cast to required type >>> -- Simon Burton, B.Sc. Licensed PO Box 8066 ANU Canberra 2601 Australia Ph. 61 02 6249 6940 http://arrowtheory.com -------------- next part -------------- A non-text attachment was scrubbed... Name: x.mat Type: application/octet-stream Size: 184 bytes Desc: not available URL: From oliphant at ee.byu.edu Wed Apr 6 00:32:46 2005 From: oliphant at ee.byu.edu (Travis Oliphant) Date: Tue, 05 Apr 2005 22:32:46 -0600 Subject: [SciPy-user] loadmat: TypeError Array can not be safely cast to required type In-Reply-To: <20050406101259.1cc385f8.simon@arrowtheory.com> References: <20050406101259.1cc385f8.simon@arrowtheory.com> Message-ID: <4253666E.4070500@ee.byu.edu> Simon Burton wrote: >Hi, > >I am having the same problem as mentioned here: >http://www.scipy.net/pipermail/scipy-user/2004-December/003910.html > >Attached is a small example V6 .mat file that demonstrates the problem (scipy 0.3.2). >A collegue says it works on his (older) scipy. I couldn't find where >to download the old versions of scipy. > >thanks, > >Simon. > >Python 2.3.3 (#1, Dec 16 2004, 12:18:55) >[GCC 3.3.3 (Debian)] on linux2 >Type "help", "copyright", "credits" or "license" for more information. > > >>>>import scipy.io.mio as sp >>>>sp.loadmat('x') # version 4 files work OK >>>> >>>> >{'x': array([ 1.])} > > >>>>sp.loadmat('x') # version 6 file >>>> >>>> >Traceback (most recent call last): > File "", line 1, in ? > File "/home/groups/SML/lib/python2.3/site-packages/scipy/io/mio.py", line 692, in loadmat > thisdict = _loadv5(fid,basename) > File "/home/groups/SML/lib/python2.3/site-packages/scipy/io/mio.py", line 631, in _loadv5 > el, varname = _get_element(fid) > File "/home/groups/SML/lib/python2.3/site-packages/scipy/io/mio.py", line 619, in _get_element > el, name = _parse_mimatrix(fid,numbytes) > File "/home/groups/SML/lib/python2.3/site-packages/scipy/io/mio.py", line 510, in _parse_mimatrix > result = squeeze(transpose(reshape(result,dims[::-1]))) >TypeError: Array can not be safely cast to required > > I think this is a problem with the Numeric version you are using. There were some 64-bit "fixes" that broke a few things that were later fixed. Try installing a later version of Numeric. -Travis From nwagner at mecha.uni-stuttgart.de Wed Apr 6 04:00:06 2005 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Wed, 06 Apr 2005 10:00:06 +0200 Subject: [SciPy-user] errors=31 in scipy.test() with latest cvs versions of scipy and Numerical Message-ID: <42539706.3000503@mecha.uni-stuttgart.de> Hi all, Using Numeric 24.0 >>> scipy.__version__ '0.3.3_303.4599' scipy.test() results in ====================================================================== ERROR: check_simple_todense (scipy.io.mmio.test_mmio.test_mmio_coordinate) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/scipy/io/tests/test_mmio.py", line 152, in check_simple_todense b = mmread(fn).todense() File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 254, in todense csc = self.tocsc() File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 1437, in tocsc return csc_matrix(a, (rowa, ptra), M=self.shape[0], N=self.shape[1]) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 357, in __init__ self._check() File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 375, in _check if (nnz>0) and (max(self.rowind[:nnz]) >= M): IndexError: invalid slice ====================================================================== ERROR: check_add (scipy.sparse.Sparse.test_Sparse.test_csc) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py", line 30, in setUp self.datsp = self.spmatrix(self.dat) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 357, in __init__ self._check() File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 375, in _check if (nnz>0) and (max(self.rowind[:nnz]) >= M): IndexError: invalid slice ====================================================================== ERROR: check_elmul (scipy.sparse.Sparse.test_Sparse.test_csc) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py", line 30, in setUp self.datsp = self.spmatrix(self.dat) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 357, in __init__ self._check() File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 375, in _check if (nnz>0) and (max(self.rowind[:nnz]) >= M): IndexError: invalid slice ====================================================================== ERROR: check_getelement (scipy.sparse.Sparse.test_Sparse.test_csc) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py", line 30, in setUp self.datsp = self.spmatrix(self.dat) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 357, in __init__ self._check() File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 375, in _check if (nnz>0) and (max(self.rowind[:nnz]) >= M): IndexError: invalid slice ====================================================================== ERROR: check_matmat (scipy.sparse.Sparse.test_Sparse.test_csc) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py", line 30, in setUp self.datsp = self.spmatrix(self.dat) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 357, in __init__ self._check() File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 375, in _check if (nnz>0) and (max(self.rowind[:nnz]) >= M): IndexError: invalid slice ====================================================================== ERROR: check_matvec (scipy.sparse.Sparse.test_Sparse.test_csc) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py", line 30, in setUp self.datsp = self.spmatrix(self.dat) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 357, in __init__ self._check() File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 375, in _check if (nnz>0) and (max(self.rowind[:nnz]) >= M): IndexError: invalid slice ====================================================================== ERROR: check_setelement (scipy.sparse.Sparse.test_Sparse.test_csc) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py", line 30, in setUp self.datsp = self.spmatrix(self.dat) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 357, in __init__ self._check() File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 375, in _check if (nnz>0) and (max(self.rowind[:nnz]) >= M): IndexError: invalid slice ====================================================================== ERROR: check_tocoo (scipy.sparse.Sparse.test_Sparse.test_csc) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py", line 30, in setUp self.datsp = self.spmatrix(self.dat) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 357, in __init__ self._check() File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 375, in _check if (nnz>0) and (max(self.rowind[:nnz]) >= M): IndexError: invalid slice ====================================================================== ERROR: check_tocsc (scipy.sparse.Sparse.test_Sparse.test_csc) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py", line 30, in setUp self.datsp = self.spmatrix(self.dat) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 357, in __init__ self._check() File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 375, in _check if (nnz>0) and (max(self.rowind[:nnz]) >= M): IndexError: invalid slice ====================================================================== ERROR: check_tocsr (scipy.sparse.Sparse.test_Sparse.test_csc) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py", line 30, in setUp self.datsp = self.spmatrix(self.dat) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 357, in __init__ self._check() File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 375, in _check if (nnz>0) and (max(self.rowind[:nnz]) >= M): IndexError: invalid slice ====================================================================== ERROR: check_todense (scipy.sparse.Sparse.test_Sparse.test_csc) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py", line 30, in setUp self.datsp = self.spmatrix(self.dat) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 357, in __init__ self._check() File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 375, in _check if (nnz>0) and (max(self.rowind[:nnz]) >= M): IndexError: invalid slice ====================================================================== ERROR: check_constructor1 (scipy.sparse.Sparse.test_Sparse.test_csc) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py", line 30, in setUp self.datsp = self.spmatrix(self.dat) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 357, in __init__ self._check() File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 375, in _check if (nnz>0) and (max(self.rowind[:nnz]) >= M): IndexError: invalid slice ====================================================================== ERROR: check_constructor2 (scipy.sparse.Sparse.test_Sparse.test_csc) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py", line 30, in setUp self.datsp = self.spmatrix(self.dat) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 357, in __init__ self._check() File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 375, in _check if (nnz>0) and (max(self.rowind[:nnz]) >= M): IndexError: invalid slice ====================================================================== ERROR: check_constructor3 (scipy.sparse.Sparse.test_Sparse.test_csc) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py", line 30, in setUp self.datsp = self.spmatrix(self.dat) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 357, in __init__ self._check() File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 375, in _check if (nnz>0) and (max(self.rowind[:nnz]) >= M): IndexError: invalid slice ====================================================================== ERROR: check_add (scipy.sparse.Sparse.test_Sparse.test_csr) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py", line 30, in setUp self.datsp = self.spmatrix(self.dat) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 712, in __init__ ocsc = csc_matrix(transpose(s)) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 357, in __init__ self._check() File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 375, in _check if (nnz>0) and (max(self.rowind[:nnz]) >= M): IndexError: invalid slice ====================================================================== ERROR: check_elmul (scipy.sparse.Sparse.test_Sparse.test_csr) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py", line 30, in setUp self.datsp = self.spmatrix(self.dat) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 712, in __init__ ocsc = csc_matrix(transpose(s)) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 357, in __init__ self._check() File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 375, in _check if (nnz>0) and (max(self.rowind[:nnz]) >= M): IndexError: invalid slice ====================================================================== ERROR: check_getelement (scipy.sparse.Sparse.test_Sparse.test_csr) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py", line 30, in setUp self.datsp = self.spmatrix(self.dat) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 712, in __init__ ocsc = csc_matrix(transpose(s)) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 357, in __init__ self._check() File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 375, in _check if (nnz>0) and (max(self.rowind[:nnz]) >= M): IndexError: invalid slice ====================================================================== ERROR: check_matmat (scipy.sparse.Sparse.test_Sparse.test_csr) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py", line 30, in setUp self.datsp = self.spmatrix(self.dat) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 712, in __init__ ocsc = csc_matrix(transpose(s)) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 357, in __init__ self._check() File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 375, in _check if (nnz>0) and (max(self.rowind[:nnz]) >= M): IndexError: invalid slice ====================================================================== ERROR: check_matvec (scipy.sparse.Sparse.test_Sparse.test_csr) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py", line 30, in setUp self.datsp = self.spmatrix(self.dat) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 712, in __init__ ocsc = csc_matrix(transpose(s)) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 357, in __init__ self._check() File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 375, in _check if (nnz>0) and (max(self.rowind[:nnz]) >= M): IndexError: invalid slice ====================================================================== ERROR: check_setelement (scipy.sparse.Sparse.test_Sparse.test_csr) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py", line 30, in setUp self.datsp = self.spmatrix(self.dat) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 712, in __init__ ocsc = csc_matrix(transpose(s)) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 357, in __init__ self._check() File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 375, in _check if (nnz>0) and (max(self.rowind[:nnz]) >= M): IndexError: invalid slice ====================================================================== ERROR: check_tocoo (scipy.sparse.Sparse.test_Sparse.test_csr) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py", line 30, in setUp self.datsp = self.spmatrix(self.dat) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 712, in __init__ ocsc = csc_matrix(transpose(s)) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 357, in __init__ self._check() File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 375, in _check if (nnz>0) and (max(self.rowind[:nnz]) >= M): IndexError: invalid slice ====================================================================== ERROR: check_tocsc (scipy.sparse.Sparse.test_Sparse.test_csr) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py", line 30, in setUp self.datsp = self.spmatrix(self.dat) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 712, in __init__ ocsc = csc_matrix(transpose(s)) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 357, in __init__ self._check() File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 375, in _check if (nnz>0) and (max(self.rowind[:nnz]) >= M): IndexError: invalid slice ====================================================================== ERROR: check_tocsr (scipy.sparse.Sparse.test_Sparse.test_csr) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py", line 30, in setUp self.datsp = self.spmatrix(self.dat) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 712, in __init__ ocsc = csc_matrix(transpose(s)) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 357, in __init__ self._check() File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 375, in _check if (nnz>0) and (max(self.rowind[:nnz]) >= M): IndexError: invalid slice ====================================================================== ERROR: check_todense (scipy.sparse.Sparse.test_Sparse.test_csr) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py", line 30, in setUp self.datsp = self.spmatrix(self.dat) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 712, in __init__ ocsc = csc_matrix(transpose(s)) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 357, in __init__ self._check() File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 375, in _check if (nnz>0) and (max(self.rowind[:nnz]) >= M): IndexError: invalid slice ====================================================================== ERROR: check_constructor1 (scipy.sparse.Sparse.test_Sparse.test_csr) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py", line 30, in setUp self.datsp = self.spmatrix(self.dat) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 712, in __init__ ocsc = csc_matrix(transpose(s)) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 357, in __init__ self._check() File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 375, in _check if (nnz>0) and (max(self.rowind[:nnz]) >= M): IndexError: invalid slice ====================================================================== ERROR: check_constructor2 (scipy.sparse.Sparse.test_Sparse.test_csr) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py", line 30, in setUp self.datsp = self.spmatrix(self.dat) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 712, in __init__ ocsc = csc_matrix(transpose(s)) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 357, in __init__ self._check() File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 375, in _check if (nnz>0) and (max(self.rowind[:nnz]) >= M): IndexError: invalid slice ====================================================================== ERROR: check_constructor3 (scipy.sparse.Sparse.test_Sparse.test_csr) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py", line 30, in setUp self.datsp = self.spmatrix(self.dat) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 712, in __init__ ocsc = csc_matrix(transpose(s)) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 357, in __init__ self._check() File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 375, in _check if (nnz>0) and (max(self.rowind[:nnz]) >= M): IndexError: invalid slice ====================================================================== ERROR: check_elmul (scipy.sparse.Sparse.test_Sparse.test_dok) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py", line 60, in check_elmul c = a ** b File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 186, in __pow__ return csc ** other File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 485, in __pow__ return csc_matrix(c,(rowc,ptrc),M=M,N=N) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 357, in __init__ self._check() File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 375, in _check if (nnz>0) and (max(self.rowind[:nnz]) >= M): IndexError: invalid slice ====================================================================== ERROR: check_matmat (scipy.sparse.Sparse.test_Sparse.test_dok) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py", line 71, in check_matmat assert_array_almost_equal((asp*bsp).todense(),dot(asp.todense(),bsp.todense())) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 1184, in __mul__ return self.matmat(other) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 239, in matmat res = csc.matmat(other) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 568, in matmat return csc_matrix(c, (rowc, ptrc), M=M, N=N) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 357, in __init__ self._check() File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 375, in _check if (nnz>0) and (max(self.rowind[:nnz]) >= M): IndexError: invalid slice ====================================================================== ERROR: check_tocoo (scipy.sparse.Sparse.test_Sparse.test_dok) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py", line 75, in check_tocoo assert_array_almost_equal(a.todense(),self.dat) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 254, in todense csc = self.tocsc() File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 1437, in tocsc return csc_matrix(a, (rowa, ptra), M=self.shape[0], N=self.shape[1]) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 357, in __init__ self._check() File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 375, in _check if (nnz>0) and (max(self.rowind[:nnz]) >= M): IndexError: invalid slice ====================================================================== ERROR: check_mult (scipy.sparse.Sparse.test_Sparse.test_dok) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py", line 155, in check_mult D = A*A.T File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 1184, in __mul__ return self.matmat(other) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 239, in matmat res = csc.matmat(other) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 568, in matmat return csc_matrix(c, (rowc, ptrc), M=M, N=N) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 357, in __init__ self._check() File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 375, in _check if (nnz>0) and (max(self.rowind[:nnz]) >= M): IndexError: invalid slice ---------------------------------------------------------------------- Ran 1173 tests in 3.113s FAILED (errors=31) >>> From david.grant at telus.net Wed Apr 6 05:04:21 2005 From: david.grant at telus.net (David Grant) Date: Wed, 06 Apr 2005 02:04:21 -0700 Subject: [SciPy-user] ode45 Message-ID: <4253A615.7010304@telus.net> What's the closest thing to Matlab's ode45 in scipy/Numeric? Thanks, David -- David J. Grant http://www.davidandnasha.ca -------------- next part -------------- A non-text attachment was scrubbed... Name: david.grant.vcf Type: text/x-vcard Size: 180 bytes Desc: not available URL: From cookedm at physics.mcmaster.ca Wed Apr 6 05:44:38 2005 From: cookedm at physics.mcmaster.ca (David M. Cooke) Date: Wed, 6 Apr 2005 05:44:38 -0400 Subject: [SciPy-user] Re: [Numpy-discussion] errors=31 in scipy.test() with latest cvs versions of scipy and Numerical In-Reply-To: <42539706.3000503@mecha.uni-stuttgart.de> References: <42539706.3000503@mecha.uni-stuttgart.de> Message-ID: <20050406094438.GA32297@arbutus.physics.mcmaster.ca> On Wed, Apr 06, 2005 at 10:00:06AM +0200, Nils Wagner wrote: > Hi all, > > Using Numeric 24.0 > >>> scipy.__version__ > '0.3.3_303.4599' > > scipy.test() results in > > ====================================================================== > ERROR: check_simple_todense (scipy.io.mmio.test_mmio.test_mmio_coordinate) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/usr/lib/python2.3/site-packages/scipy/io/tests/test_mmio.py", > line 152, in check_simple_todense > b = mmread(fn).todense() > File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line > 254, in todense > csc = self.tocsc() > File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line > 1437, in tocsc > return csc_matrix(a, (rowa, ptra), M=self.shape[0], N=self.shape[1]) > File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line > 357, in __init__ > self._check() > File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line > 375, in _check > if (nnz>0) and (max(self.rowind[:nnz]) >= M): > IndexError: invalid slice (etc. -- note to self: use scipy for regression testing :-) nnz is coming from nnz = self.indptr[-1] where self.indptr is an array of Int32. Hmm, this corresponds to the behaviour I just responded to Sebastien de Menten about. The problem is that nnz is *not* an Python integer; it's an array, so the slice fails. I think I was wrong in that email about saying this was expected behaviour :-) This comes from the recent fix of a[0,0] and a[0][0] returning the same type. Either change that back, or else we need to spruce up the slicing logic to consider 0-dimensional integer arrays as scalars. A minimal test case: a = Numeric.array([5,6,7,8]) b = Numeric.array([0,1,2,3], 'i') n = b[-1] assert a[:n] == 8 (I'm not tackling this right now) -- |>|\/|< /--------------------------------------------------------------------------\ |David M. Cooke http://arbutus.physics.mcmaster.ca/dmc/ |cookedm at physics.mcmaster.ca From aurelien.gourrier at free.fr Wed Apr 6 10:50:38 2005 From: aurelien.gourrier at free.fr (aurelien.gourrier at free.fr) Date: Wed, 6 Apr 2005 16:50:38 +0200 Subject: [SciPy-user] using optimize.leastsq with numarray in python 2.3 Message-ID: <1112799038.4253f73e49ac2@imp2-q.free.fr> Dear all, First of all, as I'm new to this list, hi ! I discovered SciPy about 2 weeks ago and joined the list and I'm quite impressed with the level of some of the discussions... I myself am quite a beginner in the field of scientific programming and am learning a lot by following the discussions eventhough I don't get it all... So far, I have been trying some features, in particular, I'm very interested in the least-square fitting routine of the optimize function. I tried it for very simple functions and a reduced number of params and it seems to do a very good job. However, with some data, I just couldn't get the right fit... In this case, I read a simple data file into a list, transformed it into an array (numarray) with type = float32. After quite some fighting wondering what was wrong with my data, I found out that this format (i.e. explicitely specifying float32) induces a pb in the result. I am aware of some possible conflicts when using numarray, but still haven't got a clue as why, does anyone know ? Thanks in advance, Cheers, Aur?lien PS : Also, is it possible to use scipy under python 2.4 ? From jdhunter at ace.bsd.uchicago.edu Wed Apr 6 10:55:21 2005 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Wed, 06 Apr 2005 09:55:21 -0500 Subject: [SciPy-user] ode45 In-Reply-To: <4253A615.7010304@telus.net> (David Grant's message of "Wed, 06 Apr 2005 02:04:21 -0700") References: <4253A615.7010304@telus.net> Message-ID: >>>>> "David" == David Grant writes: David> What's the closest thing to Matlab's ode45 in David> scipy/Numeric? Thanks, David I don't know how specific an answer you want -- eg something that matches the specific adaptive step-size algorithm of ode45 or just an ODE solver....) but the place to start looking is scipy.integrate, specifically scipy.integrate.odeint. http://oliphant.ee.byu.edu:81/scipy/integrate/odeint Have you seen section 4.4 on numeric ODE integration of the scipy tutorial at http://www.scipy.org/documentation/tutorial.pdf Hope this helps, JDH From david.grant at telus.net Wed Apr 6 14:31:35 2005 From: david.grant at telus.net (David Grant) Date: Wed, 06 Apr 2005 11:31:35 -0700 Subject: [SciPy-user] kron and outerproduct Message-ID: <42542B07.1040709@telus.net> I'm using the kron() function in scipy.linalg.basic but I get an error I do this: >>> from scipy.linalg.basic import kron >>> from Numeric import * >>> a=ones((2,2)) >>> b=ones((2,2)) >>> kron(a,b) Traceback (most recent call last): File "", line 1, in ? File "/usr/lib/python2.3/site-packages/scipy/linalg/basic.py", line 506, in kron o = outerproduct(a,b) NameError: global name 'outerproduct' is not defined I cannot understand why outerproduct would not be imported in basic.py.... -- David J. Grant http://www.davidandnasha.ca -------------- next part -------------- A non-text attachment was scrubbed... Name: david.grant.vcf Type: text/x-vcard Size: 180 bytes Desc: not available URL: From david.grant at telus.net Fri Apr 8 19:01:40 2005 From: david.grant at telus.net (David Grant) Date: Fri, 08 Apr 2005 16:01:40 -0700 Subject: [SciPy-user] matrixmultiply() Message-ID: <42570D54.2090509@telus.net> Can anyone tell me why the * operation on matrices is for element-wise multiplcation and not matrix multiplication for Numeric/numpy arrays? Or at least tell me a nice way to do A*B*C*D*E*F, where the * denotes matrix multiplication. I once wrote a function where I passed those to a function as arrary of arrays, so mult([A,B,C,D,E,F]) and the function multiplied them all together. But I can't remember where I put this function, and I was wondering if there was an easier way. -- David J. Grant http://www.davidandnasha.ca -------------- next part -------------- A non-text attachment was scrubbed... Name: david.grant.vcf Type: text/x-vcard Size: 180 bytes Desc: not available URL: From aisaac at american.edu Fri Apr 8 19:11:53 2005 From: aisaac at american.edu (Alan G Isaac) Date: Fri, 8 Apr 2005 19:11:53 -0400 (Eastern Daylight Time) Subject: [SciPy-user] Re: [SciPy-dev] matrixmultiply() In-Reply-To: <42570D54.2090509@telus.net> References: <42570D54.2090509@telus.net> Message-ID: On Fri, 08 Apr 2005, David Grant apparently wrote: > Can anyone tell me why the * operation on matrices is for element-wise > multiplcation and not matrix multiplication for Numeric/numpy arrays? Because they're arrays. > Or at least tell me a nice way to do A*B*C*D*E*F, where the * denotes > matrix multiplication. Try matrices. >>> from scipy import * >>> help(mat) hth, Alan Isaac From rkern at ucsd.edu Fri Apr 8 19:32:16 2005 From: rkern at ucsd.edu (Robert Kern) Date: Fri, 08 Apr 2005 16:32:16 -0700 Subject: [SciPy-user] Re: [SciPy-dev] matrixmultiply() In-Reply-To: <42570D54.2090509@telus.net> References: <42570D54.2090509@telus.net> Message-ID: <42571480.10303@ucsd.edu> David Grant wrote: > Can anyone tell me why the * operation on matrices is for element-wise > multiplcation and not matrix multiplication for Numeric/numpy arrays? Not everyone is using Numeric for linear algebra on matrices. Element-wise multiplication is the most consistent interpretation for * in this general-purpose context. Sine you *are* doing linear algebra on matrices, you can use Matrix objects, which do define the * operator to be matrix multiplication. In [8]:A = mat([[0,1],[2,3]]) In [9]:B = mat([[5,6],[7,8]]) In [10]:A*B Out[10]: Matrix([[ 7, 8], [31, 36]]) In [11]:dot(A, B) Out[11]: array([[ 7, 8], [31, 36]]) > Or at least tell me a nice way to do A*B*C*D*E*F, where the * denotes > matrix multiplication. I once wrote a function where I passed those to a > function as arrary of arrays, so mult([A,B,C,D,E,F]) and the function > multiplied them all together. But I can't remember where I put this > function, and I was wondering if there was an easier way. Alternatively, you can do a bit of magic with this recipe: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/384122 In [25]:d = Infix(dot) In [26]:a = array([[0,1],[2,3]]) In [27]:b = array([[5,6],[7,8]]) In [28]:dot(a,b) Out[28]: array([[ 7, 8], [31, 36]]) In [29]:a |d| b Out[29]: array([[ 7, 8], [31, 36]]) -- Robert Kern rkern at ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter From reder at jpl.nasa.gov Sat Apr 9 00:12:53 2005 From: reder at jpl.nasa.gov (Leonard J. Reder) Date: Fri, 08 Apr 2005 21:12:53 -0700 Subject: [SciPy-user] cow loop_apply method and external modules?? Message-ID: <42575645.6040201@jpl.nasa.gov> Hello, I am attempting to use cow and the loop_apply method of machine_clusters to execute a simple function within a custom python module. This same example using the math.py module and pow(x,y) function worked fine but this one gives the error message: chimera:/home/soa/dev/users/reder/src/Cow>./test3.py Slave machine list: [('inu', 10000), ('chimera', 10001), ('hertz', 10002)] List of numbers to give to a function [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] Instance machine_cluster. Traceback (most recent call last): File "./test3.py", line 31, in ? result = cluster.loop_apply(squared.fn,0,(L,)) File "/home/atbe/pkgs/i486-fedora3-linux/stow/python-2.4/lib/python2.4/site-packages/scipy/cow/cow.py", line 797, in loop_apply return self.loop_send_recv(package,loop_data,loop_var) File "/home/atbe/pkgs/i486-fedora3-linux/stow/python-2.4/lib/python2.4/site-packages/scipy/cow/cow.py", line 847, in loop_send_recv results = self._send_recv(package,addendums) File "/home/atbe/pkgs/i486-fedora3-linux/stow/python-2.4/lib/python2.4/site-packages/scipy/cow/cow.py", line 347, in _send_recv self.handle_error() File "/home/atbe/pkgs/i486-fedora3-linux/stow/python-2.4/lib/python2.4/site-packages/scipy/cow/cow.py", line 408, in handle_error raise ClusterError, msg ClusterError: The same error occured on all workers: exceptions.ImportError: No module named squared########### Traceback text from remote machine ########### Traceback (most recent call last): File "/home/atbe/pkgs/i486-fedora3-linux/stow/python-2.4/lib/python2.4/site-packages/scipy/cow/sync_cluster.py", line 549, in handle recv_msg = self.recv() File "/home/atbe/pkgs/i486-fedora3-linux/stow/python-2.4/lib/python2.4/site-packages/scipy/cow/sync_cluster.py", line 608, in recv task = self.packer.funpack(packed_msg) File "/home/atbe/pkgs/i486-fedora3-linux/stow/python-2.4/lib/python2.4/site-packages/scipy/cow/sync_cluster.py", line 78, in funpack res = pickle.load(f) ImportError: No module named squared ################# End remote traceback ################## chimera:/home/soa/dev/users/reder/src/Cow> For some reason it cannot find my custom module called squared. My PYTHONPATH variable includes all directories. Here is the code: ====start of squared.py # # Test module for cow # def fn(x): return x*x ======start of test3.py #!/home/atbe/pkgs/i486-fedora3-linux/bin/python # # Initial test3 of scipy.cow # Import a custom module squared and see if the apply works ok? # import sys sys.path.append("/home/atbe/pkgs/i486-fedora3-linux/lib") sys.path.append("/home/soa/dev/users/reder/src/Cow") sys.path.append(".") import scipy slave_list = [] slave_list.append(('inu',10000)) slave_list.append(('chimera',10001)) slave_list.append(('hertz',10002)) print "Slave machine list: ", slave_list print "List of numbers to give to a function", L = range(10) print L print "Instance machine_cluster." cluster = scipy.cow.machine_cluster(slave_list) cluster.start() cluster.system("setenv PYTHONPATH /home/soa/dev/users/reder/src/Cow") # process a list of number in parallel applying function fn to them. import squared result = cluster.loop_apply(squared.fn,0,(L,)) print "Result of x**2 are ", result # cluster.info() print "clean up /tmp/crud* files on all machines." cluster.system("rm -f /tmp/crud*") print "stop machine_cluster" cluster.stop() =====end of test3.py All replies to this would be very much appreciated. From looking at the sync_cluster.py I think this should work? Regards, Len -- ____________________________________________________ Leonard J. Reder Jet Propulsion Laboratory Interferometry Systems and Technology Section 383 Email: reder at huey.jpl.nasa.gov Phone (Voice): 818-354-3639 Phone (FAX): 818-354-4357 Mail Address: Mail Stop: 171-113 4800 Oak Grove Dr. Pasadena, CA. 91109 --------------------------------------------------- From borgulya at gyer2.sote.hu Sat Apr 9 08:03:02 2005 From: borgulya at gyer2.sote.hu (BORGULYA =?iso-8859-2?q?G=E1bor?=) Date: Sat, 9 Apr 2005 14:03:02 +0200 Subject: [SciPy-user] subclassing matrix Message-ID: <200504091403.05227@gaborgulya> Hi List! I would like to subclass the matrix class to add a method 'as_html' which generates a html table displaying the matrix. Could anyone tell me what the problem is with the following code? >>> from scipy import * >>> class mat2(mat): ... pass ... Traceback (most recent call last): File "", line 1, in ? TypeError: __init__() takes exactly 3 arguments (4 given) >>> G?bor From borgulya at gyer2.sote.hu Sat Apr 9 08:11:10 2005 From: borgulya at gyer2.sote.hu (BORGULYA =?iso-8859-2?q?G=E1bor?=) Date: Sat, 9 Apr 2005 14:11:10 +0200 Subject: [SciPy-user] tools for nice output? Message-ID: <200504091411.12628@gaborgulya> Hi again! Although I made some steps to write code that generates readable output of my statistical analyses done with scipy + rpy I still think that a ready solution could help me a lot. Do you know any packages that ease generating HTML, TEX, PDF, PS or other format texts with straitforward conversion of python / scipy objects? If the graphs could be incuded, too, that would be a big plus. G?bor From oliphant at ee.byu.edu Sat Apr 9 12:47:07 2005 From: oliphant at ee.byu.edu (Travis Oliphant) Date: Sat, 09 Apr 2005 10:47:07 -0600 Subject: [SciPy-user] subclassing matrix In-Reply-To: <200504091403.05227@gaborgulya> References: <200504091403.05227@gaborgulya> Message-ID: <4258070B.7030305@ee.byu.edu> BORGULYA G?bor wrote: >Hi List! > >I would like to subclass the matrix class to add a method 'as_html' which >generates a html table displaying the matrix. >Could anyone tell me what the problem is with the following code? > > > >>>>from scipy import * >>>>class mat2(mat): >>>> >>>> >... pass >... >Traceback (most recent call last): > File "", line 1, in ? >TypeError: __init__() takes exactly 3 arguments (4 given) > > The delayed import mechanism means that mat is not the same thing as the Matrix.Matrix class. Try import Matrix class mat2(Matrix.Matrix): pass From david.grant at telus.net Sat Apr 9 14:23:29 2005 From: david.grant at telus.net (David Grant) Date: Sat, 09 Apr 2005 11:23:29 -0700 Subject: [SciPy-user] Re: [SciPy-dev] matrixmultiply() In-Reply-To: <42571480.10303@ucsd.edu> References: <42570D54.2090509@telus.net> <42571480.10303@ucsd.edu> Message-ID: <42581DA1.9050309@telus.net> Robert Kern wrote: > David Grant wrote: > >> Can anyone tell me why the * operation on matrices is for element-wise >> multiplcation and not matrix multiplication for Numeric/numpy arrays? > > > Not everyone is using Numeric for linear algebra on matrices. > Element-wise multiplication is the most consistent interpretation for > * in this general-purpose context. > > Sine you *are* doing linear algebra on matrices, you can use Matrix > objects, which do define the * operator to be matrix multiplication. > > Cool, I found the Matrix object you talk about hidden in the Numeric documentation. What if I start by declaring my arrays using zeros() and ones(), do I have to pass it through mat()? That seems like a rather annoying second step. -- David J. Grant http://www.davidandnasha.ca From borgulya at gyer2.sote.hu Sat Apr 9 16:13:12 2005 From: borgulya at gyer2.sote.hu (BORGULYA =?iso-8859-2?q?G=E1bor?=) Date: Sat, 9 Apr 2005 22:13:12 +0200 Subject: [SciPy-user] subclassing matrix In-Reply-To: <4258070B.7030305@ee.byu.edu> References: <200504091403.05227@gaborgulya> <4258070B.7030305@ee.byu.edu> Message-ID: <200504092213.14352@gaborgulya> On Saturday 09 April 2005 18.47, Travis Oliphant wrote: > import Matrix > class mat2(Matrix.Matrix): > ? ? ? ? ?pass Thank you Travis, it works. -- G?bor From rkern at ucsd.edu Sat Apr 9 16:24:19 2005 From: rkern at ucsd.edu (Robert Kern) Date: Sat, 09 Apr 2005 13:24:19 -0700 Subject: [SciPy-user] Re: [SciPy-dev] matrixmultiply() In-Reply-To: <42581DA1.9050309@telus.net> References: <42570D54.2090509@telus.net> <42571480.10303@ucsd.edu> <42581DA1.9050309@telus.net> Message-ID: <425839F3.50001@ucsd.edu> David Grant wrote: > What if I start by declaring my arrays using zeros() and ones(), do I > have to pass it through mat()? That seems like a rather annoying second > step. def mzeros(shape, typecode=Float): return mat(zeros(shape, typecode)) or class mymat(Matrix.Matrix): def zeros(cls, shape, typecode=Float): return cls(zeros(shape, typecode)) zeroes = classmethod(zeros) mymat.zeros((3,3)) There's no way to make things syntactically convenient for everyone. *Someone* will always pay a bit of a price. -- Robert Kern rkern at ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter From pecontal at obs.univ-lyon1.fr Sat Apr 9 16:47:40 2005 From: pecontal at obs.univ-lyon1.fr (emmanuel pecontal) Date: Sat, 9 Apr 2005 22:47:40 +0200 Subject: [SciPy-user] tnc bug Message-ID: <200504092247.41297.pecontal@obs.univ-lyon1.fr> Hi, It appeared that tnc.py had a bug which made it unusable. On february 9, Christian Kristukat proposed a patch which solved the problem. I now try to install the CVS scipy version and it seems that this patch has not been reported to the CVS. Is it envision to put a patched version of this routine in the CVS? Cheers Emmanuel Pecontal From oliphant at ee.byu.edu Sat Apr 9 18:17:31 2005 From: oliphant at ee.byu.edu (Travis Oliphant) Date: Sat, 09 Apr 2005 16:17:31 -0600 Subject: [SciPy-user] tnc bug In-Reply-To: <200504092247.41297.pecontal@obs.univ-lyon1.fr> References: <200504092247.41297.pecontal@obs.univ-lyon1.fr> Message-ID: <4258547B.8030206@ee.byu.edu> emmanuel pecontal wrote: >Hi, > >It appeared that tnc.py had a bug which made it unusable. On february 9, >Christian Kristukat proposed a patch which solved the problem. >I now try to install the CVS scipy version and it seems that this patch has >not been reported to the CVS. Is it envision to put a patched version of this >routine in the CVS? > > > Should be there now. -Travis From sullivan at mathcom.com Wed Apr 13 10:24:42 2005 From: sullivan at mathcom.com (Steve Sullivan Why does the scipy ufunc "greater" differ from Numeric ... and what is the 'b' in scipy's result? >>> import Numeric, scipy >>> Numeric.greater( [1,2,3,4,5], 2) array([0, 0, 1, 1, 1]) >>> scipy.greater( [1,2,3,4,5], 2) array([0, 0, 1, 1, 1],'b') >>> scipy.info(scipy.greater) greater(x,y) is array of 1's where x > y, 0 otherwise. I looked for more complete docs on scipy's version, but found none. Many thanks, Steve -- ======================================== Steve Sullivan sullivan at mathcom.com http://www.mathcom.com 303-494-7115 ======================================== From rkern at ucsd.edu Wed Apr 13 17:24:27 2005 From: rkern at ucsd.edu (Robert Kern) Date: Wed, 13 Apr 2005 14:24:27 -0700 Subject: [SciPy-user] ufunc question In-Reply-To: <20050413142442.D64CB31B1D@aspen.mathcom.com> References: <20050413142442.D64CB31B1D@aspen.mathcom.com> Message-ID: <425D8E0B.6050903@ucsd.edu> Steve Sullivan Why does the scipy ufunc "greater" differ from Numeric ... > and what is the 'b' in scipy's result? > > >>>>import Numeric, scipy >>>>Numeric.greater( [1,2,3,4,5], 2) > > array([0, 0, 1, 1, 1]) > >>>>scipy.greater( [1,2,3,4,5], 2) > > array([0, 0, 1, 1, 1],'b') > > >>>>scipy.info(scipy.greater) > > greater(x,y) is array of 1's where x > y, 0 otherwise. > > I looked for more complete docs on scipy's version, but found none. > Many thanks, Most of the comparison functions have been changed to output bytes instead of ints to save space. -- Robert Kern rkern at ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter From debenedetti at frascati.enea.it Thu Apr 14 10:19:03 2005 From: debenedetti at frascati.enea.it (Massimo De Benedetti) Date: Thu, 14 Apr 2005 16:19:03 +0200 Subject: [SciPy-user] problems during the test procedure Message-ID: <425E7BD7.9040205@frascati.enea.it> Hi, I am just trying to use scipy for the first time. I have installed it following the procedure described at http://www.scipy.org/documentation/buildscipywin32.txt, The installation procedure did not turn out succesfully and so I copied wgnuplot.exe and gnuplot_helper.exe from the scipy site as someone suggested on this mailing list. Then the installation turned out just fine. I then tried to test scipy with the procedure scipy.test but this time an error window appeared after a while. I am using python 2.4.1, windows xp and all the latest builds of the packages that scipy needs (mingw, atlas, numeric, etc...). The output of the test routine can be found below if someone can understand its meaning. My impression is that the routine fails when running wgnuplot and/or gnuplot_helper because both the processes are still running on my machine after the error and after I have shut down python and idle. It also seems that some (many of the?) test packages are missing from the installation, is this ok? Thank you all for your cooperation, Massimo Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. **************************************************************** Personal firewall software may warn about the connection IDLE makes to its subprocess using this computer's internal loopback interface. This connection is not visible on any external interface and no data is sent to or received from the Internet. **************************************************************** IDLE 1.1.1 >>> import scipy >>> scipy.test(level=1,verbosity=2) !! No test file 'test_Mplot.py' found for !! No test file 'test_lena.py' found for !! No test file 'test_build_py.py' found for !! No test file 'test_gistC.py' found for !! No test file 'test_population.py' found for !! No test file 'test_ltisys.py' found for !! No test file 'test_data_store.py' found for !! No test file 'test_info_integrate.py' found for !! No test file 'test___init__.py' found for !! No test file 'test_vq.py' found for !! No test file 'test___init__.py' found for Found 128 tests for scipy.linalg.fblas !! No test file 'test_info_interpolate.py' found for !! No test file 'test___cvs_version__.py' found for !! No test file 'test_info_cow.py' found for !! No test file 'test_spam.py' found for !! No test file 'test_write_style.py' found for !! No test file 'test_quadpack.py' found for !! No test file 'test_tree.py' found for Found 92 tests for scipy.stats.stats Found 36 tests for scipy.linalg.decomp Found 4 tests for scipy.io.array_import !! No test file 'test_display_test.py' found for !! No test file 'test_config_compiler.py' found for !! No test file 'test_quadrature.py' found for !! No test file 'test___init__.py' found for Found 20 tests for scipy.fftpack.pseudo_diffs !! No test file 'test_optimize.py' found for !! No test file 'test_colorbar.py' found for !! No test file 'test__dsuperlu.py' found for !! No test file 'test_scipy_test_version.py' found for !! No test file 'test__iterative.py' found for !! No test file 'test_build_clib.py' found for !! No test file 'test_pexec.py' found for !! No test file 'test_specfun.py' found for !! No test file 'test__compiled_base.py' found for !! No test file 'test_dumb_shelve.py' found for !! No test file 'test_common_routines.py' found for !! No test file 'test___init__.py' found for !! No test file 'test_sparsetools.py' found for !! No test file 'test_info_special.py' found for !! No test file 'test_iterative.py' found for !! No test file 'test__fftpack.py' found for Found 5 tests for scipy.interpolate.fitpack !! No test file 'test_new_plot.py' found for !! No test file 'test_calc_lwork.py' found for !! No test file 'test_ode.py' found for !! No test file 'test___cvs_version__.py' found for !! No test file 'test__ssuperlu.py' found for !! No test file 'test_info_io.py' found for !! No test file 'test___init__.py' found for !! No test file 'test__zeros.py' found for !! No test file 'test_futil.py' found for !! No test file 'test___cvs_version__.py' found for Found 12 tests for scipy.io.mmio !! No test file 'test_plwf.py' found for !! No test file 'test__flinalg.py' found for Found 2 tests for scipy_base.fastumath !! No test file 'test_linesearch.py' found for !! No test file 'test___init__.py' found for !! No test file 'test_ga_util.py' found for !! No test file 'test___init__.py' found for Found 4 tests for scipy.linalg.lapack !! No test file 'test_ga_list.py' found for !! No test file 'test_special_version.py' found for Found 19 tests for scipy.fftpack.basic !! No test file 'test_anneal.py' found for !! No test file 'test_fitpack2.py' found for !! No test file 'test_gene.py' found for !! No test file 'test___init__.py' found for !! No test file 'test_info_plt.py' found for !! No test file 'test_numpyio.py' found for !! No test file 'test_extension.py' found for !! No test file 'test_ccompiler.py' found for !! No test file 'test_slice3.py' found for !! No test file 'test_scipy_base_version.py' found for !! No test file 'test_algorithm.py' found for Found 1 tests for scipy.optimize.zeros !! No test file 'test_info_xplt.py' found for !! No test file 'test___init__.py' found for !! No test file 'test_install.py' found for !! No test file 'test_cblas.py' found for !! No test file 'test_waveforms.py' found for !! No test file 'test_pyPlot.py' found for !! No test file 'test_info_cluster.py' found for !! No test file 'test_mio.py' found for !! No test file 'test_sigtools.py' found for !! No test file 'test_install_data.py' found for !! No test file 'test___init__.py' found for Found 4 tests for scipy_base.index_tricks !! No test file 'test_selection.py' found for !! No test file 'test_fftpack_version.py' found for !! No test file 'test_movie.py' found for !! No test file 'test___init__.py' found for !! No test file 'test_scaling.py' found for !! No test file 'test_core.py' found for !! No test file 'test_minpack2.py' found for !! No test file 'test___init__.py' found for !! No test file 'test_bdist_rpm.py' found for Found 41 tests for scipy.linalg.basic !! No test file 'test_odepack.py' found for !! No test file 'test_exec_command.py' found for !! No test file 'test_common_routines.py' found for !! No test file 'test_interpolate.py' found for !! No test file 'test___cvs_version__.py' found for !! No test file 'test_wxplt.py' found for !! No test file 'test_shapetest.py' found for !! No test file 'test_lbfgsb.py' found for !! No test file 'test_language.py' found for !! No test file 'test_info_xxx.py' found for Found 43 tests for scipy_base.shape_base !! No test file 'test_linalg_version.py' found for !! No test file 'test_interface.py' found for !! No test file 'test___init__.py' found for Found 9 tests for scipy_base.matrix_base !! No test file 'test_machar.py' found for !! No test file 'test_log.py' found for !! No test file 'test_info_scipy_base.py' found for Found 342 tests for scipy.special.basic !! No test file 'test_bsplines.py' found for !! No test file 'test_unixccompiler.py' found for !! No test file 'test__minpack.py' found for !! No test file 'test_info_optimize.py' found for !! No test file 'test_clapack.py' found for !! No test file 'test_interface.py' found for !! No test file 'test_info_gplt.py' found for !! No test file 'test_scimath.py' found for !! No test file 'test_moduleTNC.py' found for Found 6 tests for scipy.linalg.matfuncs !! No test file 'test_info_signal.py' found for !! No test file 'test___init__.py' found for !! No test file 'test___init__.py' found for !! No test file 'test_vode.py' found for !! No test file 'test___init__.py' found for !! No test file 'test_scipy_distutils_version.py' found for !! No test file 'test___init__.py' found for !! No test file 'test_sync_cluster.py' found for !! No test file 'test__quadpack.py' found for !! No test file 'test_yorick.py' found for !! No test file 'test_testing.py' found for !! No test file 'test_scipy_version.py' found for !! No test file 'test_info_fftpack.py' found for !! No test file 'test_info_linalg.py' found for !! No test file 'test_build_src.py' found for !! No test file 'test__odepack.py' found for !! No test file 'test_build.py' found for !! No test file 'test_plot_objects.py' found for !! No test file 'test_flapack.py' found for !! No test file 'test_tnc.py' found for Found 23 tests for scipy_base.function_base !! No test file 'test_cephes.py' found for !! No test file 'test_helpmod.py' found for !! No test file 'test__support.py' found for Found 39 tests for scipy_base.type_check Found 2 tests for scipy_base.limits !! No test file 'test_filter_design.py' found for Found 10 tests for scipy.stats.morestats !! No test file 'test_convolve.py' found for !! No test file 'test_genome.py' found for Found 26 tests for scipy.sparse.Sparse !! No test file 'test_common_routines.py' found for !! No test file 'test_dist.py' found for !! No test file 'test___init__.py' found for Found 1 tests for scipy.optimize.cobyla !! No test file 'test_pl3d.py' found for !! No test file 'test_flinalg.py' found for !! No test file 'test_gist.py' found for Found 14 tests for scipy.linalg.blas !! No test file 'test_from_template.py' found for !! No test file 'test_rv.py' found for !! No test file 'test_info_scipy_distutils.py' found for !! No test file 'test_tree_opt.py' found for !! No test file 'test_minpack.py' found for !! No test file 'test_spline.py' found for !! No test file 'test___init__.py' found for Found 2 tests for scipy.xxx.foo !! No test file 'test_pilutil.py' found for !! No test file 'test__fitpack.py' found for !! No test file 'test__zsuperlu.py' found for !! No test file 'test__csuperlu.py' found for !! No test file 'test__lbfgsb.py' found for !! No test file 'test_orthogonal.py' found for !! No test file 'test_dfitpack.py' found for !! No test file 'test__superlu.py' found for !! No test file 'test___init__.py' found for Found 70 tests for scipy.stats.distributions !! No test file 'test_rand.py' found for !! No test file 'test_info_stats.py' found for !! No test file 'test___init__.py' found for !! No test file 'test_sdist.py' found for !! No test file 'test_info_sparse.py' found for !! No test file 'test_statlib.py' found for !! No test file 'test___init__.py' found for !! No test file 'test_plot_utility.py' found for !! No test file 'test_colormap.py' found for Found 4 tests for scipy.fftpack.helper !! No test file 'test_pickler.py' found for !! No test file 'test_line_endings.py' found for !! No test file 'test_install_headers.py' found for !! No test file 'test_polynomial.py' found for !! No test file 'test___init__.py' found for !! No test file 'test_ppimport.py' found for !! No test file 'test_misc_util.py' found for !! No test file 'test_cow.py' found for !! No test file 'test_build_ext.py' found for Found 3 tests for scipy.signal.signaltools !! No test file 'test__cobyla.py' found for Found 0 tests for __main__ check_default_a (scipy.linalg.fblas.test_fblas.test_caxpy) ... ok check_simple (scipy.linalg.fblas.test_fblas.test_caxpy) ... ok check_x_and_y_stride (scipy.linalg.fblas.test_fblas.test_caxpy) ... ok check_x_bad_size (scipy.linalg.fblas.test_fblas.test_caxpy) ... ok check_x_stride (scipy.linalg.fblas.test_fblas.test_caxpy) ... ok check_y_bad_size (scipy.linalg.fblas.test_fblas.test_caxpy) ... ok check_y_stride (scipy.linalg.fblas.test_fblas.test_caxpy) ... ok check_simple (scipy.linalg.fblas.test_fblas.test_ccopy) ... ok check_x_and_y_stride (scipy.linalg.fblas.test_fblas.test_ccopy) ... ok check_x_bad_size (scipy.linalg.fblas.test_fblas.test_ccopy) ... ok check_x_stride (scipy.linalg.fblas.test_fblas.test_ccopy) ... ok check_y_bad_size (scipy.linalg.fblas.test_fblas.test_ccopy) ... ok check_y_stride (scipy.linalg.fblas.test_fblas.test_ccopy) ... ok check_default_beta_y (scipy.linalg.fblas.test_fblas.test_cgemv) ... ok check_simple (scipy.linalg.fblas.test_fblas.test_cgemv) ... ok check_simple_transpose (scipy.linalg.fblas.test_fblas.test_cgemv) ... ok check_simple_transpose_conj (scipy.linalg.fblas.test_fblas.test_cgemv) ... ok check_x_stride (scipy.linalg.fblas.test_fblas.test_cgemv) ... ok check_x_stride_assert (scipy.linalg.fblas.test_fblas.test_cgemv) ... ok check_x_stride_transpose (scipy.linalg.fblas.test_fblas.test_cgemv) ... ok check_y_stride (scipy.linalg.fblas.test_fblas.test_cgemv) ... ok check_y_stride_assert (scipy.linalg.fblas.test_fblas.test_cgemv) ... ok check_y_stride_transpose (scipy.linalg.fblas.test_fblas.test_cgemv) ... ok check_simple (scipy.linalg.fblas.test_fblas.test_cscal) ... ok check_x_bad_size (scipy.linalg.fblas.test_fblas.test_cscal) ... ok check_x_stride (scipy.linalg.fblas.test_fblas.test_cscal) ... ok check_simple (scipy.linalg.fblas.test_fblas.test_cswap) ... ok check_x_and_y_stride (scipy.linalg.fblas.test_fblas.test_cswap) ... ok check_x_bad_size (scipy.linalg.fblas.test_fblas.test_cswap) ... ok check_x_stride (scipy.linalg.fblas.test_fblas.test_cswap) ... ok check_y_bad_size (scipy.linalg.fblas.test_fblas.test_cswap) ... ok check_y_stride (scipy.linalg.fblas.test_fblas.test_cswap) ... ok check_default_a (scipy.linalg.fblas.test_fblas.test_daxpy) ... ok check_simple (scipy.linalg.fblas.test_fblas.test_daxpy) ... ok check_x_and_y_stride (scipy.linalg.fblas.test_fblas.test_daxpy) ... ok check_x_bad_size (scipy.linalg.fblas.test_fblas.test_daxpy) ... ok check_x_stride (scipy.linalg.fblas.test_fblas.test_daxpy) ... ok check_y_bad_size (scipy.linalg.fblas.test_fblas.test_daxpy) ... ok check_y_stride (scipy.linalg.fblas.test_fblas.test_daxpy) ... ok check_simple (scipy.linalg.fblas.test_fblas.test_dcopy) ... ok check_x_and_y_stride (scipy.linalg.fblas.test_fblas.test_dcopy) ... ok check_x_bad_size (scipy.linalg.fblas.test_fblas.test_dcopy) ... ok check_x_stride (scipy.linalg.fblas.test_fblas.test_dcopy) ... ok check_y_bad_size (scipy.linalg.fblas.test_fblas.test_dcopy) ... ok check_y_stride (scipy.linalg.fblas.test_fblas.test_dcopy) ... ok check_default_beta_y (scipy.linalg.fblas.test_fblas.test_dgemv) ... ok check_simple (scipy.linalg.fblas.test_fblas.test_dgemv) ... ok check_simple_transpose (scipy.linalg.fblas.test_fblas.test_dgemv) ... ok check_simple_transpose_conj (scipy.linalg.fblas.test_fblas.test_dgemv) ... ok check_x_stride (scipy.linalg.fblas.test_fblas.test_dgemv) ... ok check_x_stride_assert (scipy.linalg.fblas.test_fblas.test_dgemv) ... ok check_x_stride_transpose (scipy.linalg.fblas.test_fblas.test_dgemv) ... ok check_y_stride (scipy.linalg.fblas.test_fblas.test_dgemv) ... ok check_y_stride_assert (scipy.linalg.fblas.test_fblas.test_dgemv) ... ok check_y_stride_transpose (scipy.linalg.fblas.test_fblas.test_dgemv) ... ok check_simple (scipy.linalg.fblas.test_fblas.test_dscal) ... ok check_x_bad_size (scipy.linalg.fblas.test_fblas.test_dscal) ... ok check_x_stride (scipy.linalg.fblas.test_fblas.test_dscal) ... ok check_simple (scipy.linalg.fblas.test_fblas.test_dswap) ... ok check_x_and_y_stride (scipy.linalg.fblas.test_fblas.test_dswap) ... ok check_x_bad_size (scipy.linalg.fblas.test_fblas.test_dswap) ... ok check_x_stride (scipy.linalg.fblas.test_fblas.test_dswap) ... ok check_y_bad_size (scipy.linalg.fblas.test_fblas.test_dswap) ... ok check_y_stride (scipy.linalg.fblas.test_fblas.test_dswap) ... ok check_default_a (scipy.linalg.fblas.test_fblas.test_saxpy) ... ok check_simple (scipy.linalg.fblas.test_fblas.test_saxpy) ... ok check_x_and_y_stride (scipy.linalg.fblas.test_fblas.test_saxpy) ... ok check_x_bad_size (scipy.linalg.fblas.test_fblas.test_saxpy) ... ok check_x_stride (scipy.linalg.fblas.test_fblas.test_saxpy) ... ok check_y_bad_size (scipy.linalg.fblas.test_fblas.test_saxpy) ... ok check_y_stride (scipy.linalg.fblas.test_fblas.test_saxpy) ... ok check_simple (scipy.linalg.fblas.test_fblas.test_scopy) ... ok check_x_and_y_stride (scipy.linalg.fblas.test_fblas.test_scopy) ... ok check_x_bad_size (scipy.linalg.fblas.test_fblas.test_scopy) ... ok check_x_stride (scipy.linalg.fblas.test_fblas.test_scopy) ... ok check_y_bad_size (scipy.linalg.fblas.test_fblas.test_scopy) ... ok check_y_stride (scipy.linalg.fblas.test_fblas.test_scopy) ... ok check_default_beta_y (scipy.linalg.fblas.test_fblas.test_sgemv) ... ok check_simple (scipy.linalg.fblas.test_fblas.test_sgemv) ... ok check_simple_transpose (scipy.linalg.fblas.test_fblas.test_sgemv) ... ok check_simple_transpose_conj (scipy.linalg.fblas.test_fblas.test_sgemv) ... ok check_x_stride (scipy.linalg.fblas.test_fblas.test_sgemv) ... ok check_x_stride_assert (scipy.linalg.fblas.test_fblas.test_sgemv) ... ok check_x_stride_transpose (scipy.linalg.fblas.test_fblas.test_sgemv) ... ok check_y_stride (scipy.linalg.fblas.test_fblas.test_sgemv) ... ok check_y_stride_assert (scipy.linalg.fblas.test_fblas.test_sgemv) ... ok check_y_stride_transpose (scipy.linalg.fblas.test_fblas.test_sgemv) ... ok check_simple (scipy.linalg.fblas.test_fblas.test_sscal) ... ok check_x_bad_size (scipy.linalg.fblas.test_fblas.test_sscal) ... ok check_x_stride (scipy.linalg.fblas.test_fblas.test_sscal) ... ok check_simple (scipy.linalg.fblas.test_fblas.test_sswap) ... ok check_x_and_y_stride (scipy.linalg.fblas.test_fblas.test_sswap) ... ok check_x_bad_size (scipy.linalg.fblas.test_fblas.test_sswap) ... ok check_x_stride (scipy.linalg.fblas.test_fblas.test_sswap) ... ok check_y_bad_size (scipy.linalg.fblas.test_fblas.test_sswap) ... ok check_y_stride (scipy.linalg.fblas.test_fblas.test_sswap) ... ok check_default_a (scipy.linalg.fblas.test_fblas.test_zaxpy) ... ok check_simple (scipy.linalg.fblas.test_fblas.test_zaxpy) ... ok check_x_and_y_stride (scipy.linalg.fblas.test_fblas.test_zaxpy) ... ok check_x_bad_size (scipy.linalg.fblas.test_fblas.test_zaxpy) ... ok check_x_stride (scipy.linalg.fblas.test_fblas.test_zaxpy) ... ok check_y_bad_size (scipy.linalg.fblas.test_fblas.test_zaxpy) ... ok check_y_stride (scipy.linalg.fblas.test_fblas.test_zaxpy) ... ok check_simple (scipy.linalg.fblas.test_fblas.test_zcopy) ... ok check_x_and_y_stride (scipy.linalg.fblas.test_fblas.test_zcopy) ... ok check_x_bad_size (scipy.linalg.fblas.test_fblas.test_zcopy) ... ok check_x_stride (scipy.linalg.fblas.test_fblas.test_zcopy) ... ok check_y_bad_size (scipy.linalg.fblas.test_fblas.test_zcopy) ... ok check_y_stride (scipy.linalg.fblas.test_fblas.test_zcopy) ... ok check_default_beta_y (scipy.linalg.fblas.test_fblas.test_zgemv) ... ok check_simple (scipy.linalg.fblas.test_fblas.test_zgemv) ... ok check_simple_transpose (scipy.linalg.fblas.test_fblas.test_zgemv) ... ok check_simple_transpose_conj (scipy.linalg.fblas.test_fblas.test_zgemv) ... ok check_x_stride (scipy.linalg.fblas.test_fblas.test_zgemv) ... ok check_x_stride_assert (scipy.linalg.fblas.test_fblas.test_zgemv) ... ok check_x_stride_transpose (scipy.linalg.fblas.test_fblas.test_zgemv) ... ok check_y_stride (scipy.linalg.fblas.test_fblas.test_zgemv) ... ok check_y_stride_assert (scipy.linalg.fblas.test_fblas.test_zgemv) ... ok check_y_stride_transpose (scipy.linalg.fblas.test_fblas.test_zgemv) ... ok check_simple (scipy.linalg.fblas.test_fblas.test_zscal) ... ok check_x_bad_size (scipy.linalg.fblas.test_fblas.test_zscal) ... ok check_x_stride (scipy.linalg.fblas.test_fblas.test_zscal) ... ok check_simple (scipy.linalg.fblas.test_fblas.test_zswap) ... ok check_x_and_y_stride (scipy.linalg.fblas.test_fblas.test_zswap) ... ok check_x_bad_size (scipy.linalg.fblas.test_fblas.test_zswap) ... ok check_x_stride (scipy.linalg.fblas.test_fblas.test_zswap) ... ok check_y_bad_size (scipy.linalg.fblas.test_fblas.test_zswap) ... ok check_y_stride (scipy.linalg.fblas.test_fblas.test_zswap) ... ok check_meanBIG (scipy.stats.stats.test_stats.test_basicstats) ... ok check_meanHUGE (scipy.stats.stats.test_stats.test_basicstats) ... ok check_meanLITTLE (scipy.stats.stats.test_stats.test_basicstats) ... ok check_meanROUND (scipy.stats.stats.test_stats.test_basicstats) ... ok check_meanTINY (scipy.stats.stats.test_stats.test_basicstats) ... ok check_meanX (scipy.stats.stats.test_stats.test_basicstats) ... ok check_meanZERO (scipy.stats.stats.test_stats.test_basicstats) ... ok check_stdBIG (scipy.stats.stats.test_stats.test_basicstats) ... ok check_stdHUGE (scipy.stats.stats.test_stats.test_basicstats) ... ok check_stdLITTLE (scipy.stats.stats.test_stats.test_basicstats) ... ok check_stdROUND (scipy.stats.stats.test_stats.test_basicstats) ... ok check_stdTINY (scipy.stats.stats.test_stats.test_basicstats) ... ok check_stdX (scipy.stats.stats.test_stats.test_basicstats) ... ok check_stdZERO (scipy.stats.stats.test_stats.test_basicstats) ... ok check_basic (scipy.stats.stats.test_stats.test_cmedian) ... ok check_pBIGBIG (scipy.stats.stats.test_stats.test_corr) ... ok check_pBIGHUGE (scipy.stats.stats.test_stats.test_corr) ... ok check_pBIGLITTLE (scipy.stats.stats.test_stats.test_corr) ... ok check_pBIGROUND (scipy.stats.stats.test_stats.test_corr) ... ok check_pBIGTINY (scipy.stats.stats.test_stats.test_corr) ... ok check_pHUGEHUGE (scipy.stats.stats.test_stats.test_corr) ... ok check_pHUGEROUND (scipy.stats.stats.test_stats.test_corr) ... ok check_pHUGETINY (scipy.stats.stats.test_stats.test_corr) ... ok check_pLITTLEHUGE (scipy.stats.stats.test_stats.test_corr) ... ok check_pLITTLELITTLE (scipy.stats.stats.test_stats.test_corr) ... ok check_pLITTLEROUND (scipy.stats.stats.test_stats.test_corr) ... ok check_pLITTLETINY (scipy.stats.stats.test_stats.test_corr) ... ok check_pROUNDROUND (scipy.stats.stats.test_stats.test_corr) ... ok check_pTINYROUND (scipy.stats.stats.test_stats.test_corr) ... ok check_pTINYTINY (scipy.stats.stats.test_stats.test_corr) ... ok check_pXBIG (scipy.stats.stats.test_stats.test_corr) ... ok check_pXHUGE (scipy.stats.stats.test_stats.test_corr) ... ok check_pXLITTLE (scipy.stats.stats.test_stats.test_corr) ... ok check_pXROUND (scipy.stats.stats.test_stats.test_corr) ... ok check_pXTINY (scipy.stats.stats.test_stats.test_corr) ... ok check_pXX (scipy.stats.stats.test_stats.test_corr) ... ok check_sBIGBIG (scipy.stats.stats.test_stats.test_corr) ... ok check_sBIGHUGE (scipy.stats.stats.test_stats.test_corr) ... ok check_sBIGLITTLE (scipy.stats.stats.test_stats.test_corr) ... ok check_sBIGROUND (scipy.stats.stats.test_stats.test_corr) ... ok check_sBIGTINY (scipy.stats.stats.test_stats.test_corr) ... ok check_sHUGEHUGE (scipy.stats.stats.test_stats.test_corr) ... ok check_sHUGEROUND (scipy.stats.stats.test_stats.test_corr) ... ok check_sHUGETINY (scipy.stats.stats.test_stats.test_corr) ... ok check_sLITTLEHUGE (scipy.stats.stats.test_stats.test_corr) ... ok check_sLITTLELITTLE (scipy.stats.stats.test_stats.test_corr) ... ok check_sLITTLEROUND (scipy.stats.stats.test_stats.test_corr) ... ok check_sLITTLETINY (scipy.stats.stats.test_stats.test_corr) ... ok check_sROUNDROUND (scipy.stats.stats.test_stats.test_corr) ... ok check_sTINYROUND (scipy.stats.stats.test_stats.test_corr) ... ok check_sTINYTINY (scipy.stats.stats.test_stats.test_corr) ... ok check_sXBIG (scipy.stats.stats.test_stats.test_corr) ... ok check_sXHUGE (scipy.stats.stats.test_stats.test_corr) ... ok check_sXLITTLE (scipy.stats.stats.test_stats.test_corr) ... ok check_sXROUND (scipy.stats.stats.test_stats.test_corr) ... ok check_sXTINY (scipy.stats.stats.test_stats.test_corr) ... ok check_sXX (scipy.stats.stats.test_stats.test_corr) ... ok check_1D_array (scipy.stats.stats.test_stats.test_gmean) ... ok check_1D_list (scipy.stats.stats.test_stats.test_gmean) ... ok check_2D_array_default (scipy.stats.stats.test_stats.test_gmean) ... ok check_2D_array_dim0 (scipy.stats.stats.test_stats.test_gmean) ... ok check_1D_array (scipy.stats.stats.test_stats.test_hmean) ... ok check_1D_list (scipy.stats.stats.test_stats.test_hmean) ... ok check_2D_array_default (scipy.stats.stats.test_stats.test_hmean) ... ok check_2D_array_dim0 (scipy.stats.stats.test_stats.test_hmean) ... ok check_2d (scipy.stats.stats.test_stats.test_mean) ... ok check_basic (scipy.stats.stats.test_stats.test_mean) ... ok check_ravel (scipy.stats.stats.test_stats.test_mean) ... ok check_basic (scipy.stats.stats.test_stats.test_median) ... ok check_basic (scipy.stats.stats.test_stats.test_mode) ... ok check_kurtosis (scipy.stats.stats.test_stats.test_moments) ... ok check_moment (scipy.stats.stats.test_stats.test_moments) ... ok check_skewness (scipy.stats.stats.test_stats.test_moments) ... ok check_variation (scipy.stats.stats.test_stats.test_moments) ... ok W.II.F. Regress BIG on X. ... ok W.IV.B. Regress X on X. ... ok W.IV.D. Regress ZERO on X. ... ok W.II.A.0. Print ROUND with only one digit. ... ok W.II.A.1. Y = INT(2.6*7 -0.2) (Y should be 18) ... ok W.II.A.2. Y = 2-INT(EXP(LOG(SQR(2)*SQR(2)))) (Y should be 0) ... ok W.II.A.3. Y = INT(3-EXP(LOG(SQR(2)*SQR(2)))) (Y should be 1) ... ok check_2d (scipy.stats.stats.test_stats.test_std) ... ok check_basic (scipy.stats.stats.test_stats.test_std) ... ok check_samplestd (scipy.stats.stats.test_stats.test_variability) ... ok check_samplevar (scipy.stats.stats.test_stats.test_variability) ... ok check_sem (scipy.stats.stats.test_stats.test_variability) ... ok check_signaltonoise (scipy.stats.stats.test_stats.test_variability) ... ok check_std (scipy.stats.stats.test_stats.test_variability) ... ok check_stderr (scipy.stats.stats.test_stats.test_variability) ... ok check_var (scipy.stats.stats.test_stats.test_variability) ... ok check_z (scipy.stats.stats.test_stats.test_variability) ... ok check_zs (scipy.stats.stats.test_stats.test_variability) ... ok check_random (scipy.linalg.decomp.test_decomp.test_cholesky) ... ok check_random_complex (scipy.linalg.decomp.test_decomp.test_cholesky) ... ok check_simple (scipy.linalg.decomp.test_decomp.test_cholesky) ... ok check_simple_complex (scipy.linalg.decomp.test_decomp.test_cholesky) ... ok check_simple (scipy.linalg.decomp.test_decomp.test_diagsvd) ... ok check_simple (scipy.linalg.decomp.test_decomp.test_eig) ... ok check_simple_complex (scipy.linalg.decomp.test_decomp.test_eig) ... ok check_simple (scipy.linalg.decomp.test_decomp.test_eigvals) ... ok check_simple_complex (scipy.linalg.decomp.test_decomp.test_eigvals) ... ok check_simple_tr (scipy.linalg.decomp.test_decomp.test_eigvals) ... ok check_random (scipy.linalg.decomp.test_decomp.test_hessenberg) ... ok check_random_complex (scipy.linalg.decomp.test_decomp.test_hessenberg) ... ok check_simple (scipy.linalg.decomp.test_decomp.test_hessenberg) ... ok check_simple2 (scipy.linalg.decomp.test_decomp.test_hessenberg) ... ok check_simple_complex (scipy.linalg.decomp.test_decomp.test_hessenberg) ... ok check_simple (scipy.linalg.decomp.test_decomp.test_lu) ... ok check_simple_complex (scipy.linalg.decomp.test_decomp.test_lu) ... ok check_lu (scipy.linalg.decomp.test_decomp.test_lu_solve) ... ok check_random (scipy.linalg.decomp.test_decomp.test_qr) ... ok check_random_complex (scipy.linalg.decomp.test_decomp.test_qr) ... ok check_simple (scipy.linalg.decomp.test_decomp.test_qr) ... ok check_simple_complex (scipy.linalg.decomp.test_decomp.test_qr) ... ok check_simple (scipy.linalg.decomp.test_decomp.test_schur) ... ok check_random (scipy.linalg.decomp.test_decomp.test_svd) ... ok check_random_complex (scipy.linalg.decomp.test_decomp.test_svd) ... ok check_simple (scipy.linalg.decomp.test_decomp.test_svd) ... ok check_simple_complex (scipy.linalg.decomp.test_decomp.test_svd) ... ok check_simple_overdet (scipy.linalg.decomp.test_decomp.test_svd) ... ok check_simple_singular (scipy.linalg.decomp.test_decomp.test_svd) ... ok check_simple_underdet (scipy.linalg.decomp.test_decomp.test_svd) ... ok check_simple (scipy.linalg.decomp.test_decomp.test_svdvals) ... ok check_simple_complex (scipy.linalg.decomp.test_decomp.test_svdvals) ... ok check_simple_overdet (scipy.linalg.decomp.test_decomp.test_svdvals) ... ok check_simple_overdet_complex (scipy.linalg.decomp.test_decomp.test_svdvals) ... ok check_simple_underdet (scipy.linalg.decomp.test_decomp.test_svdvals) ... ok check_simple_underdet_complex (scipy.linalg.decomp.test_decomp.test_svdvals) ... ok check_basic (scipy.io.array_import.test_array_import.test_numpyio) ... -- Massimo De Benedetti C.R. ENEA Frascati C.P. 65 Via Enrico Fermi, 45 00044 Frascati (RM), Italy Tel: 0039-06-94005010 Fax: 0039-06-94005735 e-mail debenedetti at frascati.enea.it -------------- next part -------------- A non-text attachment was scrubbed... Name: debenedetti.vcf Type: text/x-vcard Size: 312 bytes Desc: not available URL: From elcorto at gmx.net Thu Apr 14 15:31:07 2005 From: elcorto at gmx.net (steve schmerler) Date: Thu, 14 Apr 2005 21:31:07 +0200 Subject: [SciPy-user] problems during the test procedure In-Reply-To: <425E7BD7.9040205@frascati.enea.it> References: <425E7BD7.9040205@frascati.enea.it> Message-ID: <425EC4FB.4020502@gmx.net> Hi I'm also using scipy (v0.3.0) under WinXP (Python 2.3.4) and my test looks quite the same but my scipy works fine so far. Massimo De Benedetti wrote: > Hi, > I am just trying to use scipy for the first time. I have installed it > following the procedure described at > http://www.scipy.org/documentation/buildscipywin32.txt, > The installation procedure did not turn out succesfully and so I copied > wgnuplot.exe and gnuplot_helper.exe from the scipy site as someone > suggested on this mailing list. Then the installation turned out just > fine. I then tried to test scipy with the procedure scipy.test but this > time an error window appeared after a while. What does it say? > I am using python 2.4.1, > windows xp and all the latest builds of the packages that scipy needs > (mingw, atlas, numeric, etc...). The output of the test routine can be > found below if someone can understand its meaning. My impression is that > the routine fails when running wgnuplot and/or gnuplot_helper because > both the processes are still running on my machine after the error and > after I have shut down python and idle. It also seems that some (many of > the?) test packages are missing from the installation, is this ok? > Thank you all for your cooperation, > Massimo > [...] -- Man is the best computer we can put aboard a spacecraft ... and the only one that can be mass produced with unskilled labor. - Wernher von Braun From jdhunter at ace.bsd.uchicago.edu Thu Apr 14 17:11:36 2005 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Thu, 14 Apr 2005 16:11:36 -0500 Subject: [SciPy-user] ANN: matplotlib-0.80 Message-ID: matplotlib is a 2D graphics package that produces plots from python scripts, the python shell, or embeds them in your favorite python GUI -- wx, gtk, tk, fltk and qt. Unlike many python plotting alternatives is written in python, so it is easy to extend. matplotlib is used in the finance industry, web application servers, and many scientific and enginneering disciplines. With a large community of users and developers, matplotlib is approaching the goal of having a full featured, high quality, 2D plotting library for python. A lot of development has gone into matplotlib since the last major release, which I'll summarize here. For details, see the notes for the incremental releases at http://matplotlib.sf.net/whats_new.html. Improvements since 0.70 -- contouring: Lots of new contour funcitonality with line and polygon contours provided by contour and contourf. Automatic inline contour labeling with clabel. See http://matplotlib.sourceforge.net/screenshots.html#pcolor_demo -- QT backend Sigve Tjoraand, Ted Drain and colleagues at the JPL collaborated on a QTAgg backend -- Unicode strings are rendered in the agg and postscript backends. Currently, all the symbols in the unicode string have to be in the active font file. In later releases we'll try and support symbols from multiple ttf files in one string. See examples/unicode_demo.py -- map and projections A new release of the basemap toolkit - See http://matplotlib.sourceforge.net/screenshots.html#plotmap -- Auto-legends The automatic placement of legends is now supported with loc='best'; see examples/legend_auto.py. We did this at the matplotlib sprint at pycon -- Thanks John Gill and Phil! Note that your legend will move if you interact with your data and you force data under the legend line. If this is not what you want, use a designated location code. -- Quiver (direction fields) Ludovic Aubry contributed a patch for the matlab compatible quiver method. This makes a direction field with arrows. See examples/quiver_demo.py -- Performance optimizations Substantial optimizations in line marker drawing in agg -- Robust log plots Lots of work making log plots "just work". You can toggle log y Axes with the 'l' command -- nonpositive data are simply ignored and no longer raise exceptions. log plots should be a lot faster and more robust -- Many more plotting functions, bugfixes, and features, detailed in the 0.71, 0.72, 0.73 and 0.74 point release notes at http://matplotlib.sourceforge.net/whats_new.html http://matplotlib.sourceforge.net JDH From aisaac at american.edu Thu Apr 14 16:57:41 2005 From: aisaac at american.edu (Alan G Isaac) Date: Thu, 14 Apr 2005 16:57:41 -0400 (Eastern Daylight Time) Subject: [SciPy-user] mgrid waste Message-ID: Mesh grids seem overused and inefficient. Am I overlooking an alternative? Suppose I have lists (or other iterables) X and Y and I want to produce the 2-D array of values Zij=f(Xi,Yj). Doing this with mgrid seems really wasteful (as the data seem to be copied---right?). Add dimensions -> more wasteful. Is there a function that handles this in the obvious way? E.g., Z=broadcast(f,X,Y) Thank you, Alan Isaac From oliphant at ee.byu.edu Sun Apr 17 00:04:16 2005 From: oliphant at ee.byu.edu (Travis Oliphant) Date: Sat, 16 Apr 2005 22:04:16 -0600 Subject: [SciPy-user] mgrid waste In-Reply-To: References: Message-ID: <4261E040.30901@ee.byu.edu> Alan G Isaac wrote: >Mesh grids seem overused and inefficient. > > Try scipy.ogrid (open grid) and then a "broadcasting function" (any ufunc or function which uses only ufuncs or a function that's been passed to scipy.vectorize). -Travis From aisaac at american.edu Sun Apr 17 00:45:00 2005 From: aisaac at american.edu (Alan G Isaac) Date: Sun, 17 Apr 2005 00:45:00 -0400 (Eastern Daylight Time) Subject: [SciPy-user] mgrid waste In-Reply-To: <4261E040.30901@ee.byu.edu> References: <4261E040.30901@ee.byu.edu> Message-ID: On Sat, 16 Apr 2005, Travis Oliphant apparently wrote: > scipy.ogrid (open grid) > and then a "broadcasting function" (any ufunc or function which uses > only ufuncs or a function that's been passed to scipy.vectorize). Aha! I had found ogrid in the tutorial (13 April 2004) but found no clue how to use it this way. Thanks! Alan From jeremy at jeremysanders.net Sun Apr 17 08:07:40 2005 From: jeremy at jeremysanders.net (Jeremy Sanders) Date: Sun, 17 Apr 2005 13:07:40 +0100 (BST) Subject: [SciPy-user] ANN: Veusz 0.5 - a scientific plotting package Message-ID: Veusz 0.5 --------- Velvet Ember Under Sky Zenith ----------------------------- http://home.gna.org/veusz/ Veusz is Copyright (C) 2003-2005 Jeremy Sanders Licenced under the GPL (version 2 or greater) Veusz is a scientific plotting package written in Python (currently 100% Python). It uses PyQt for display and user-interfaces, and numarray for handling the numeric data. Veusz is designed to produce publication-ready Postscript output. Veusz provides a GUI, command line and scripting interface (based on Python) to its plotting facilities. The plots are built using an object-based system to provide a consistent interface. Changes from 0.4: Installation: * distutils used to install the package. RPMS available. Plotting: * Different error bar styles (diamond, curve...) * "Matched" axes, with the same scale on each * Data can be linked from external files instead of embedded in document * Filled regions under/over functions or xy plots * Improved function clipping near edge of plot * Default values can be set for settings, which are remembered between sessions (e.g. blue points for xy3). * Rotated text labels * Improved fitting, giving results from chi2, etc.. UI: * Can move around widgets and delete them * Exception dump dialog to send bug reports * Improved import dialog help * Propagate settings between widgets * Window positions are saved between sessions Reading data: * Better error handling when reading data + Numerous bug fixes Features of package: * X-Y plots (with errorbars) * Stepped plots (for histograms) * Line plots * Function plots * Fitting functions to data * Stacked plots and arrays of plots * Plot keys * Plot labels * LaTeX-like formatting for text * EPS output * Simple data importing * Scripting interface * Save/Load plots To be done: * Contour plots * Images * UI improvements * Import filters (for qdp and other plotting packages, fits, csv) * Data manipulation * Python embedding interface (for embedding Veusz in other programs). [some of the external interface is complete] Requirements: Python (probably 2.3 or greater required) http://www.python.org/ Qt (free edition) http://www.trolltech.com/products/qt/ PyQt (SIP is required to be installed first) http://www.riverbankcomputing.co.uk/pyqt/ http://www.riverbankcomputing.co.uk/sip/ numarray http://www.stsci.edu/resources/software_hardware/numarray Microsoft Core Fonts (recommended) http://corefonts.sourceforge.net/ For documentation on using Veusz, see the "Documents" directory. The manual is in pdf, html and text format (generated from docbook). If you enjoy using Veusz, I would love to hear from you. Please join the mailing lists at https://gna.org/mail/?group=veusz to discuss new features or if you'd like to contribute code. The newest code can always be found in CVS. Cheers Jeremy From aisaac at american.edu Sun Apr 17 10:51:58 2005 From: aisaac at american.edu (Alan G Isaac) Date: Sun, 17 Apr 2005 10:51:58 -0400 (Eastern Daylight Time) Subject: [SciPy-user] ANN: Veusz 0.5 - a scientific plotting package In-Reply-To: References: Message-ID: On Sun, 17 Apr 2005, Jeremy Sanders apparently wrote: > http://home.gna.org/veusz/ > Veusz is a scientific plotting package written in Python > (currently 100% Python). It uses PyQt for display and > user-interfaces, and numarray for handling the numeric > data. Veusz is designed to produce publication-ready > Postscript output. > Veusz provides a GUI, command line and scripting interface (based on > Python) to its plotting facilities. The plots are built using an > object-based system to provide a consistent interface. Let me provide a sample "user's perspective". 1. Since this is posted to the SciPy list, I assume the author is aware that many people on this list are using Matplotlib, which is excellent. Others I take it are using Chaco. Others are using Gnuplot.py. 2. Yet there is no direct comparison with these other packages. I have to guess that the key point is the GUI interface, whose facilities are not described in detail. 3. I'm generally willing to try out new software if I understand well enough that it has cool new potential, but from this posting I do not. 4. Perhaps most importantly: there are two very serious projects being discussed regularly on this list (mostly Matplotlib but also Chaco). So naturally I wonder if the author might not more fruitfully be finding a way to collaborate with these. Not that it is really any of my business of course, but as I said I am just providing a sample "user's perspective". Cheers, Alan Isaac From elcorto at gmx.net Mon Apr 18 05:33:42 2005 From: elcorto at gmx.net (steve schmerler) Date: Mon, 18 Apr 2005 11:33:42 +0200 Subject: [SciPy-user] ANN: Veusz 0.5 - a scientific plotting package In-Reply-To: References: Message-ID: <42637EF6.1090002@gmx.net> Alan, sure it's not very healthy to invent the wheel over and over again but isn't it good to see that there are people willing to work on new free software? I totally understand your point of joining efforts and concentrate on promising projects but it's a fact that good software will survive and bad won't, yet the decision is made on the users side and by use or disuse. I think no one has the right to advice people to join the one or the other project. I really would like to have _the_ computing envoronment, _the_ language and _the_ plotting package but the point is that many people not working in the same direction is what keeps the whole thing dynamic and innovative. Cheers, Steve Alan G Isaac wrote: > On Sun, 17 Apr 2005, Jeremy Sanders apparently wrote: > >>http://home.gna.org/veusz/ > > >>Veusz is a scientific plotting package written in Python >>(currently 100% Python). It uses PyQt for display and >>user-interfaces, and numarray for handling the numeric >>data. Veusz is designed to produce publication-ready >>Postscript output. > > >>Veusz provides a GUI, command line and scripting interface (based on >>Python) to its plotting facilities. The plots are built using an >>object-based system to provide a consistent interface. > > > > Let me provide a sample "user's perspective". > > 1. Since this is posted to the SciPy list, I assume the > author is aware that many people on this list are using > Matplotlib, which is excellent. Others I take it are > using Chaco. Others are using Gnuplot.py. > 2. Yet there is no direct comparison with these other > packages. I have to guess that the key point is the GUI > interface, whose facilities are not described in detail. > 3. I'm generally willing to try out new software if > I understand well enough that it has cool new potential, > but from this posting I do not. > 4. Perhaps most importantly: there are two very serious > projects being discussed regularly on this list (mostly > Matplotlib but also Chaco). So naturally I wonder if the > author might not more fruitfully be finding a way to > collaborate with these. Not that it is really any of my > business of course, but as I said I am just providing > a sample "user's perspective". > > Cheers, > Alan Isaac > > > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > > -- Man is the best computer we can put aboard a spacecraft ... and the only one that can be mass produced with unskilled labor. - Wernher von Braun From jeremy at jeremysanders.net Mon Apr 18 05:51:37 2005 From: jeremy at jeremysanders.net (Jeremy Sanders) Date: Mon, 18 Apr 2005 10:51:37 +0100 (BST) Subject: [SciPy-user] ANN: Veusz 0.5 - a scientific plotting package In-Reply-To: References: Message-ID: On Sun, 17 Apr 2005, Alan G Isaac wrote: > Let me provide a sample "user's perspective". > > 1. Since this is posted to the SciPy list, I assume the > author is aware that many people on this list are using > Matplotlib, which is excellent. Others I take it are > using Chaco. Others are using Gnuplot.py. Firstly, I started this project at the end of 2003, when I wasn't aware of matplotlib. I got it to the stage of 80% there before finding matplotlib. I have to admit I've never heard of Chaco. After discovering matplotlib, I started a project (aka veusz2) which used matplotlib as its backend. After several months I abandoned this project due to several issues I had with matplotlib. Please be aware that these are subjective, and I realise that matplotlib is a pretty powerful plotting package 1. Every step of the way along, I hit several bugs in matplotlib which broke my program. I decided it simply wasn't a stable base to start my plotting application on, and resumed writing my own backend. I didn't feel like wading through matplotlib to fix bugs, before I could get started on my program. I also didn't see much in the way of documentation, and had to start reading the code to find out what it wanted. 2. The whole way matplotlib is designed is a little baroque. It seemed very strange to me why some things were objects and some were implemented as methods to other objects. Also, there were different methods which did the same things but which not overlap in functionality. Why were there two functions to plot points, for instance, and why couldn't I plot the points one function allowed with the other? 3. It was slow. Very slow. Making a program where parameters changed were immediately reflected on the screen was impossible. I believe this is better than it was then. 4. Matplotlib was an absolute pig to get installed in a location other than the one it wanted. I spent half a wasted day trying to get it installed on one of my computers. 5. When matplotlib broke, you never found out why. I tried putting some LaTeX in an equation, but I never found out why the LaTeX I put in never worked. 6. It was a nightmare to connect my object-oriented user interface to Matplotlib. The only reliable way I could get things to work was to construct the whole graph from scratch every time a parameter changed. The interfacing code was pretty gunky. 7. There was no Qt backend at the time, and Gtk was painful to use compared to PyQt. > 2. Yet there is no direct comparison with these other > packages. I have to guess that the key point is the GUI > interface, whose facilities are not described in detail. Okay the advantages over other plotting interfaces are these: 1. GUI and scripting interface which work in exactly the same way. Items on a graph are "widgets" which can exist as children of other widgets. Using the GUI, you build up a plot out of the widgets, read in data, and quickly adjust the settings of the plot to make it look just how you like. You can move round the widgets, even between containers. 2. Saved data files are scripts which can easily be modified by the user 3. It's pretty quick, and you get instant feedback when you modify things. 4. Container widgets to hold graphs and other widgets to make complex plots. 5. Multiple pages possible for storing sets of associated plots. 3. I'm generally willing to try out new software if > I understand well enough that it has cool new potential, > but from this posting I do not. Absolutely. I wrote this software as I was annoyed with every other bit of plotting code I've tried (maybe besides Biggles, but that appears dead and uses GNU Plotlib). I'm making it easy to use and the people I know who've tried it say it's good. Have a look if you want a nice interface to making good looking plots. > 4. Perhaps most importantly: there are two very serious > projects being discussed regularly on this list (mostly > Matplotlib but also Chaco). So naturally I wonder if the > author might not more fruitfully be finding a way to > collaborate with these. Not that it is really any of my > business of course, but as I said I am just providing > a sample "user's perspective". Sure. There may be licence issues here of course. I have a half-done version of my matplotlib based code if anyone wanted to resurrect that. I think multiple projects are quite often a good idea, as ideas can be shared from one to the other. Ideas are often more interesting than code. In my experience, the plotting code isn't that hard to do. The hardest part was making the axes look good. The biggest effort is now on the UI, and none of the other projects have that facility, so I'm not really overlapping there. It might not be that hard to write an interface layer between matplotlib and my UI now there's a Qt backend. You'd need to wrap matplotlib to expose sets of objects and properties. Thanks Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ Cambridge, UK Public Key Server PGP Key ID: E1AAE053 From nwagner at mecha.uni-stuttgart.de Mon Apr 18 15:49:03 2005 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Mon, 18 Apr 2005 21:49:03 +0200 Subject: [SciPy-user] scipy_base.polynomial Message-ID: Hi all, I was wondering if something similar with respect to scipy_base.polynomial could be added for matrix polynomials in scipy. Any comment or suggestion ? Nils From aisaac at american.edu Mon Apr 18 16:50:28 2005 From: aisaac at american.edu (Alan G Isaac) Date: Mon, 18 Apr 2005 16:50:28 -0400 (Eastern Daylight Time) Subject: [SciPy-user] Re[2]: ANN: Veusz 0.5 - a scientific plotting package In-Reply-To: References: Message-ID: On Mon, 18 Apr 2005, Jeremy Sanders apparently wrote: > Okay the advantages over other plotting interfaces are > these: > 1. GUI and scripting interface which work in exactly the same way. > Items on a graph are "widgets" which can exist as children of other > widgets. > Using the GUI, you build up a plot out of the widgets, read in > data, and quickly adjust the settings of the plot to make it look > just how you like. You can move round the widgets, even between > containers. > 2. Saved data files are scripts which can easily be modified by the user > 3. It's pretty quick, and you get instant feedback when you modify things. > 4. Container widgets to hold graphs and other widgets to make complex > plots. > 5. Multiple pages possible for storing sets of associated plots. Wow! That was kind and extensive feedback to my questions. I guess I am left with two pressing questions. i. is Biggles really dead? (there was a release just a year ago) ii. why Velvet Ember Under Sky Zenith? Thanks, Alan From aisaac at american.edu Mon Apr 18 16:59:21 2005 From: aisaac at american.edu (Alan G Isaac) Date: Mon, 18 Apr 2005 16:59:21 -0400 (Eastern Daylight Time) Subject: [SciPy-user] Re[2]: ANN: Veusz 0.5 - a scientific plotting package In-Reply-To: References: Message-ID: On Mon, 18 Apr 2005, Jeremy Sanders apparently wrote: > There may be licence issues here of course. Indeed. Have you considered the modified BSD license or the (recent) License of Python? http://www.fsf.org/licensing/licenses/license-list.html Or does the use of PyQT make this impossible? Cheers, Alan Isaac From rkern at ucsd.edu Mon Apr 18 21:57:06 2005 From: rkern at ucsd.edu (Robert Kern) Date: Mon, 18 Apr 2005 18:57:06 -0700 Subject: [SciPy-user] Re[2]: ANN: Veusz 0.5 - a scientific plotting package In-Reply-To: References: Message-ID: <42646572.40906@ucsd.edu> Alan G Isaac wrote: > On Mon, 18 Apr 2005, Jeremy Sanders apparently wrote: > >>There may be licence issues here of course. > > > Indeed. Have you considered the modified BSD license > or the (recent) License of Python? > http://www.fsf.org/licensing/licenses/license-list.html > Or does the use of PyQT make this impossible? No, it doesn't. The modified BSD license is compatible with the GPL. But please don't use the PSF License. It has proper names embedded in it. -- Robert Kern rkern at ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter From gerard.vermeulen at grenoble.cnrs.fr Tue Apr 19 00:15:04 2005 From: gerard.vermeulen at grenoble.cnrs.fr (Gerard Vermeulen) Date: Tue, 19 Apr 2005 06:15:04 +0200 Subject: [SciPy-user] Re[2]: ANN: Veusz 0.5 - a scientific plotting package In-Reply-To: <42646572.40906@ucsd.edu> References: <42646572.40906@ucsd.edu> Message-ID: <20050419061504.6ccf33ef.gerard.vermeulen@grenoble.cnrs.fr> On Mon, 18 Apr 2005 18:57:06 -0700 Robert Kern wrote: > Alan G Isaac wrote: > > On Mon, 18 Apr 2005, Jeremy Sanders apparently wrote: > > > >>There may be licence issues here of course. > > > > > > Indeed. Have you considered the modified BSD license > > or the (recent) License of Python? > > http://www.fsf.org/licensing/licenses/license-list.html > > Or does the use of PyQT make this impossible? > > No, it doesn't. The modified BSD license is compatible with the GPL. > > But please don't use the PSF License. It has proper names embedded in it. > If you do not use commercial licensed releases of PyQt and Qt, you are using the GPL versions. This implies that you have to release your software based on PyQt also under the GPL license. The modified BSD being compatible with the GPL does not mean that you can release GPL derived works under the BSD license. Gerard From rkern at ucsd.edu Tue Apr 19 00:39:39 2005 From: rkern at ucsd.edu (Robert Kern) Date: Mon, 18 Apr 2005 21:39:39 -0700 Subject: [SciPy-user] Re[2]: ANN: Veusz 0.5 - a scientific plotting package In-Reply-To: <20050419061504.6ccf33ef.gerard.vermeulen@grenoble.cnrs.fr> References: <42646572.40906@ucsd.edu> <20050419061504.6ccf33ef.gerard.vermeulen@grenoble.cnrs.fr> Message-ID: <42648B8B.4020708@ucsd.edu> Gerard Vermeulen wrote: > On Mon, 18 Apr 2005 18:57:06 -0700 > Robert Kern wrote: > > >>Alan G Isaac wrote: >> >>>On Mon, 18 Apr 2005, Jeremy Sanders apparently wrote: >>> >>> >>>>There may be licence issues here of course. >>> >>> >>>Indeed. Have you considered the modified BSD license >>>or the (recent) License of Python? >>>http://www.fsf.org/licensing/licenses/license-list.html >>>Or does the use of PyQT make this impossible? >> >>No, it doesn't. The modified BSD license is compatible with the GPL. >> >>But please don't use the PSF License. It has proper names embedded in it. >> > > If you do not use commercial licensed releases of PyQt and Qt, you > are using the GPL versions. This implies that you have to release > your software based on PyQt also under the GPL license. > > The modified BSD being compatible with the GPL does not mean that > you can release GPL derived works under the BSD license. The work as a whole must be distributed under the terms of the GPL. However, Jeremy's code can be under whatever license he wishes as long as it is compatible with the GPL. If he chose the modified BSD license, one could take pieces of that code, inasmuch as they are separable from PyQt, and incorporate them into matplotlib. Just because the BSD-licensed code is combined with GPL-licensed code doesn't mean that the BSD-licensed code is not BSD-licensed. Or if he feels like avoiding this silliness, Jeremy could, if he wanted to, just separately license the bits that other people want to use in BSDish-licensed, non-PyQt projects. -- Robert Kern rkern at ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter From rkern at ucsd.edu Tue Apr 19 00:53:45 2005 From: rkern at ucsd.edu (Robert Kern) Date: Mon, 18 Apr 2005 21:53:45 -0700 Subject: [SciPy-user] Re[2]: ANN: Veusz 0.5 - a scientific plotting package In-Reply-To: <42648B8B.4020708@ucsd.edu> References: <42646572.40906@ucsd.edu> <20050419061504.6ccf33ef.gerard.vermeulen@grenoble.cnrs.fr> <42648B8B.4020708@ucsd.edu> Message-ID: <42648ED9.2060300@ucsd.edu> Robert Kern wrote: > Gerard Vermeulen wrote: >> If you do not use commercial licensed releases of PyQt and Qt, you >> are using the GPL versions. This implies that you have to release >> your software based on PyQt also under the GPL license. >> >> The modified BSD being compatible with the GPL does not mean that >> you can release GPL derived works under the BSD license. > > > The work as a whole must be distributed under the terms of the GPL. > However, Jeremy's code can be under whatever license he wishes as long > as it is compatible with the GPL. If he chose the modified BSD license, > one could take pieces of that code, inasmuch as they are separable from > PyQt, and incorporate them into matplotlib. Just because the > BSD-licensed code is combined with GPL-licensed code doesn't mean that > the BSD-licensed code is not BSD-licensed. > > Or if he feels like avoiding this silliness, Jeremy could, if he > wanted to, just separately license the bits that other people want to > use in BSDish-licensed, non-PyQt projects. C.f. http://www.opensource.org/licenses/gpl-license.php Section 2 """These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. """ -- Robert Kern rkern at ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter From david.grant at telus.net Tue Apr 19 01:21:36 2005 From: david.grant at telus.net (David Grant) Date: Mon, 18 Apr 2005 22:21:36 -0700 Subject: [SciPy-user] Re[2]: ANN: Veusz 0.5 - a scientific plotting package In-Reply-To: References: Message-ID: <42649560.9060305@telus.net> Alan G Isaac wrote: >Wow! That was kind and extensive feedback to my questions. > >I guess I am left with two pressing questions. >i. is Biggles really dead? (there was a release just a year ago) > > > Although I love biggles it has always appeared to be dead to me. I believe they finally produced a windows build for python 2.3 if I remember correctly. But nothing has really changed in a long time. Either means that biggles is perfect, or that it is dead. I am excited to try this Velvet Ember Under Sky Zenith thing. >ii. why Velvet Ember Under Sky Zenith? > >Thanks, >Alan > > > -- David J. Grant http://www.davidandnasha.ca From gerard.vermeulen at grenoble.cnrs.fr Tue Apr 19 01:43:42 2005 From: gerard.vermeulen at grenoble.cnrs.fr (Gerard Vermeulen) Date: Tue, 19 Apr 2005 07:43:42 +0200 Subject: [SciPy-user] Re[2]: ANN: Veusz 0.5 - a scientific plotting package In-Reply-To: <42648ED9.2060300@ucsd.edu> References: <42646572.40906@ucsd.edu> <20050419061504.6ccf33ef.gerard.vermeulen@grenoble.cnrs.fr> <42648B8B.4020708@ucsd.edu> <42648ED9.2060300@ucsd.edu> Message-ID: <20050419074342.2170897c.gerard.vermeulen@grenoble.cnrs.fr> On Mon, 18 Apr 2005 21:53:45 -0700 Robert Kern wrote: > Robert Kern wrote: > > Gerard Vermeulen wrote: > > >> If you do not use commercial licensed releases of PyQt and Qt, you > >> are using the GPL versions. This implies that you have to release > >> your software based on PyQt also under the GPL license. > >> > >> The modified BSD being compatible with the GPL does not mean that > >> you can release GPL derived works under the BSD license. > > > > > > The work as a whole must be distributed under the terms of the GPL. > > However, Jeremy's code can be under whatever license he wishes as long > > as it is compatible with the GPL. If he chose the modified BSD license, > > one could take pieces of that code, inasmuch as they are separable from > > PyQt, and incorporate them into matplotlib. Just because the > > BSD-licensed code is combined with GPL-licensed code doesn't mean that > > the BSD-licensed code is not BSD-licensed. > > > > Or if he feels like avoiding this silliness, Jeremy could, if he > > wanted to, just separately license the bits that other people want to > > use in BSDish-licensed, non-PyQt projects. > > C.f. http://www.opensource.org/licenses/gpl-license.php > Section 2 > > """These requirements apply to the modified work as a whole. If > identifiable sections of that work are not derived from the Program, and > can be reasonably considered independent and separate works in > themselves, then this License, and its terms, do not apply to those > sections when you distribute them as separate works. But when you > distribute the same sections as part of a whole which is a work based on > the Program, the distribution of the whole must be on the terms of this > License, whose permissions for other licensees extend to the entire > whole, and thus to each and every part regardless of who wrote it. > """ > If you write a Python script for PyQt you do not modify PyQt or Qt, but you use it. The intent of the GPL is clarified in the GPL-FAQ. Here http://www.gnu.org/licenses/gpl-faq.html#IfLibraryIsGPL applies: """If a library is released under the GPL (not the LGPL), does that mean that any program which uses it has to be under the GPL? Yes, because the program as it is actually run includes the library. """ The business model of Trolltech which also sells commercial licenses for Qt is based on this answer. Gerard From rkern at ucsd.edu Tue Apr 19 02:10:26 2005 From: rkern at ucsd.edu (Robert Kern) Date: Mon, 18 Apr 2005 23:10:26 -0700 Subject: [SciPy-user] Re[2]: ANN: Veusz 0.5 - a scientific plotting package In-Reply-To: <20050419074342.2170897c.gerard.vermeulen@grenoble.cnrs.fr> References: <42646572.40906@ucsd.edu> <20050419061504.6ccf33ef.gerard.vermeulen@grenoble.cnrs.fr> <42648B8B.4020708@ucsd.edu> <42648ED9.2060300@ucsd.edu> <20050419074342.2170897c.gerard.vermeulen@grenoble.cnrs.fr> Message-ID: <4264A0D2.6080905@ucsd.edu> Gerard Vermeulen wrote: > On Mon, 18 Apr 2005 21:53:45 -0700 > Robert Kern wrote: > > >>Robert Kern wrote: >> >>>Gerard Vermeulen wrote: >> >>>>If you do not use commercial licensed releases of PyQt and Qt, you >>>>are using the GPL versions. This implies that you have to release >>>>your software based on PyQt also under the GPL license. >>>> >>>>The modified BSD being compatible with the GPL does not mean that >>>>you can release GPL derived works under the BSD license. >>> >>> >>>The work as a whole must be distributed under the terms of the GPL. >>>However, Jeremy's code can be under whatever license he wishes as long >>>as it is compatible with the GPL. If he chose the modified BSD license, >>>one could take pieces of that code, inasmuch as they are separable from >>>PyQt, and incorporate them into matplotlib. Just because the >>>BSD-licensed code is combined with GPL-licensed code doesn't mean that >>>the BSD-licensed code is not BSD-licensed. >> >> > >> > Or if he feels like avoiding this silliness, Jeremy could, if he >> > wanted to, just separately license the bits that other people want to >> > use in BSDish-licensed, non-PyQt projects. >> >>C.f. http://www.opensource.org/licenses/gpl-license.php >>Section 2 >> >>"""These requirements apply to the modified work as a whole. If >>identifiable sections of that work are not derived from the Program, and >>can be reasonably considered independent and separate works in >>themselves, then this License, and its terms, do not apply to those >>sections when you distribute them as separate works. But when you >>distribute the same sections as part of a whole which is a work based on >>the Program, the distribution of the whole must be on the terms of this >>License, whose permissions for other licensees extend to the entire >>whole, and thus to each and every part regardless of who wrote it. >>""" >> > > > If you write a Python script for PyQt you do not modify PyQt or Qt, > but you use it. The "modified work as a whole" would be Veusz+PyQt+Qt. There is no distinction here. > The intent of the GPL is clarified in the GPL-FAQ. Here > http://www.gnu.org/licenses/gpl-faq.html#IfLibraryIsGPL > applies: > > """If a library is released under the GPL (not the LGPL), does that > mean that any program which uses it has to be under the GPL? > > Yes, because the program as it is actually run includes the library. > """ Yes, it's a pat answer that glosses over the full details, and it is intended to further the FSF's goal of getting more software under the GPL and not non-copyleft licenses. A fuller answer would use the words "as a whole" to modify the word "program" just like the full license does. The "program as a whole" must be offered under the GPL because one of its components is GPLed. But if the work can be broken down into separable components, then such components that aren't derived from that already-GPLed code can also be offered under a different license. The license text itself is quite clear about this issue and is the really only thing that matters. > The business model of Trolltech which also sells commercial licenses > for Qt is based on this answer. No, the business model is to sell commercial licenses to people who want to incorporate Qt into proprietary products. It is not to sell commercial licenses to people who want to use Qt as a library with other Free, GPL-compatible code. Regardless, neither their business model nor a pat FAQ answer overrides the plain text of the license. Of course all of this discussion is moot if Jeremy does not wish to offer his code under a freer license even if he feels that he is allowed to. Now, I am not a lawyer, but I listen to them from time to time. Specifically, Chapter 6 of Larry Rosen's book is quite helpful here: http://www.rosenlaw.com/oslbook.htm -- Robert Kern rkern at ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter From jeremy at jeremysanders.net Tue Apr 19 04:16:39 2005 From: jeremy at jeremysanders.net (Jeremy Sanders) Date: Tue, 19 Apr 2005 09:16:39 +0100 (BST) Subject: [SciPy-user] Re[2]: ANN: Veusz 0.5 - a scientific plotting package In-Reply-To: <42648B8B.4020708@ucsd.edu> References: <42646572.40906@ucsd.edu><42648B8B.4020708@ucsd.edu> Message-ID: On Mon, 18 Apr 2005, Robert Kern wrote: > Or if he feels like avoiding this silliness, Jeremy could, if he wanted to, > just separately license the bits that other people want to use in > BSDish-licensed, non-PyQt projects. Of course, I'll happily relicence code if anyone would find it useful to add it to their BSDish project. Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ Cambridge, UK Public Key Server PGP Key ID: E1AAE053 From jeremy at jeremysanders.net Tue Apr 19 04:20:55 2005 From: jeremy at jeremysanders.net (Jeremy Sanders) Date: Tue, 19 Apr 2005 09:20:55 +0100 (BST) Subject: [SciPy-user] Re[2]: ANN: Veusz 0.5 - a scientific plotting package In-Reply-To: <4264A0D2.6080905@ucsd.edu> References: <42646572.40906@ucsd.edu><42648B8B.4020708@ucsd.edu> <20050419074342.2170897c.gerard.vermeulen@grenoble.cnrs.fr> <4264A0D2.6080905@ucsd.edu> Message-ID: On Mon, 18 Apr 2005, Robert Kern wrote: > Of course all of this discussion is moot if Jeremy does not wish to > offer his code under a freer license even if he feels that he is allowed > to. The reason I used the GPL was that PyQt was GPLd, and I interpreted the GPL as implying that my code had to be GPLd. I didn't want to open myself to any potential legal problems. Maybe it would be possible to dual-licence the code if anyone would like to use it?? Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ Cambridge, UK Public Key Server PGP Key ID: E1AAE053 From jeremy at jeremysanders.net Tue Apr 19 04:23:49 2005 From: jeremy at jeremysanders.net (Jeremy Sanders) Date: Tue, 19 Apr 2005 09:23:49 +0100 (BST) Subject: [SciPy-user] Re[2]: ANN: Veusz 0.5 - a scientific plotting package In-Reply-To: References: Message-ID: On Mon, 18 Apr 2005, Alan G Isaac wrote: > Wow! That was kind and extensive feedback to my questions. > > I guess I am left with two pressing questions. > i. is Biggles really dead? (there was a release just a year ago) I'm not sure, but I haven't noticed any new features. My other main problem with Biggles wsa the GNU plotlib produces massive postscript output which is a pain when trying to use your plots on places like astro-ph. > ii. why Velvet Ember Under Sky Zenith? Stupid acronym. I should delete it. It is semi-astronomical related, and as I do astronomy, so I thought I'd use it :-) It was veusz as there wasn't a veusz in google, and it sounds like "views" and "use"! Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ Cambridge, UK Public Key Server PGP Key ID: E1AAE053 From rkern at ucsd.edu Tue Apr 19 04:39:13 2005 From: rkern at ucsd.edu (Robert Kern) Date: Tue, 19 Apr 2005 01:39:13 -0700 Subject: [SciPy-user] Re[2]: ANN: Veusz 0.5 - a scientific plotting package In-Reply-To: References: <42646572.40906@ucsd.edu><42648B8B.4020708@ucsd.edu> <20050419074342.2170897c.gerard.vermeulen@grenoble.cnrs.fr> <4264A0D2.6080905@ucsd.edu> Message-ID: <4264C3B1.9010503@ucsd.edu> Jeremy Sanders wrote: > On Mon, 18 Apr 2005, Robert Kern wrote: > >> Of course all of this discussion is moot if Jeremy does not wish to >> offer his code under a freer license even if he feels that he is >> allowed to. > > > The reason I used the GPL was that PyQt was GPLd, and I interpreted the > GPL as implying that my code had to be GPLd. I didn't want to open > myself to any potential legal problems. > > Maybe it would be possible to dual-licence the code if anyone would like > to use it?? Depending on how you and Trolltech and Riverbank Computing interpret the situation, the Qt-specific parts can probably only be considered GPLed. For users of the GPLed versions of PyQt, this shouldn't pose a problem as their code would have deal with the GPL license of PyQt regardless. Users of the non-GPL versions would be in a bind. I believe that Trolltech discourages developing code using the GPL version, then buying a license and selling programs. I don't know how they like releasing open source, GPL-compatible, but non-GPL, Qt-specific code. I don't think they're likely to answer that question publically, either. Code that is not Qt-specific, however, can be licensed under whatever license you like when separate from Qt. It might be easiest just handle this on a case-by-case basis when people want to use non-Qt pieces of code. Hopefully, there will only be a handful of groups working on plotting packages. ;-) -- Robert Kern rkern at ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter From david.grant at telus.net Tue Apr 19 04:42:31 2005 From: david.grant at telus.net (David Grant) Date: Tue, 19 Apr 2005 01:42:31 -0700 Subject: [SciPy-user] Re[2]: ANN: Veusz 0.5 - a scientific plotting package In-Reply-To: References: Message-ID: <4264C477.3060900@telus.net> Jeremy Sanders wrote: > On Mon, 18 Apr 2005, Alan G Isaac wrote: > >> Wow! That was kind and extensive feedback to my questions. >> >> I guess I am left with two pressing questions. >> i. is Biggles really dead? (there was a release just a year ago) > > > I'm not sure, but I haven't noticed any new features. My other main > problem with Biggles wsa the GNU plotlib produces massive postscript > output which is a pain when trying to use your plots on places like > astro-ph. Try using eps2eps or ps2ps. -- David J. Grant http://www.davidandnasha.ca From prabhu_r at users.sf.net Tue Apr 19 05:56:12 2005 From: prabhu_r at users.sf.net (Prabhu Ramachandran) Date: Tue, 19 Apr 2005 15:26:12 +0530 Subject: [SciPy-user] Re[2]: ANN: Veusz 0.5 - a scientific plotting package In-Reply-To: <4264C3B1.9010503@ucsd.edu> References: <42646572.40906@ucsd.edu> <42648B8B.4020708@ucsd.edu> <20050419074342.2170897c.gerard.vermeulen@grenoble.cnrs.fr> <4264A0D2.6080905@ucsd.edu> <4264C3B1.9010503@ucsd.edu> Message-ID: <16996.54716.389543.603115@monster.linux.in> >>>>> "Robert" == Robert Kern writes: >> Maybe it would be possible to dual-licence the code if anyone >> would like to use it?? Robert> Depending on how you and Trolltech and Riverbank Computing Robert> interpret the situation, the Qt-specific parts can Robert> probably only be considered GPLed. For users of the GPLed Robert> versions of PyQt, this shouldn't pose a problem as their Robert> code would have deal with the GPL license of PyQt Robert> regardless. Users of the non-GPL versions would be in a [...] I don't completely understand this. Lets say I subclass a PyQt class called QWidget and call it SomeQtWidget, I also use a bunch of other PyQt widgets but don't extend them. Lets say I define this class in sqw.py. Can I legally distribute sqw.py separately under the BSD (or some GPL compatible license)? My impression is that any extension to a GPL'd library *must* be GPL and therefore sqw.py must be released under the GPL? Right or wrong? Now, given the segment of the GPL that you quoted, if I did have a 'model' class (in the MVC world-view) separate from the SomeQWidget then I could release the model code under any license I choose. Right? However, if you look at sqw.py it isn't clear that sqw.py is really modifying PyQt. The "linking" really happens at runtime. There are no header files, nothing in PyQt is really "modified" or copied, no binary program that links to PyQt. So why should sqw.py be distributed as GPL code in the first place? How then does the GPL differ from the LGPL in this context? cheers, prabhu From rkern at ucsd.edu Tue Apr 19 06:40:36 2005 From: rkern at ucsd.edu (Robert Kern) Date: Tue, 19 Apr 2005 03:40:36 -0700 Subject: [SciPy-user] Re[2]: ANN: Veusz 0.5 - a scientific plotting package In-Reply-To: <16996.54716.389543.603115@monster.linux.in> References: <42646572.40906@ucsd.edu> <42648B8B.4020708@ucsd.edu> <20050419074342.2170897c.gerard.vermeulen@grenoble.cnrs.fr> <4264A0D2.6080905@ucsd.edu> <4264C3B1.9010503@ucsd.edu> <16996.54716.389543.603115@monster.linux.in> Message-ID: <4264E024.7060406@ucsd.edu> Prabhu Ramachandran wrote: >>>>>>"Robert" == Robert Kern writes: > > > >> Maybe it would be possible to dual-licence the code if anyone > >> would like to use it?? > > Robert> Depending on how you and Trolltech and Riverbank Computing > Robert> interpret the situation, the Qt-specific parts can > Robert> probably only be considered GPLed. For users of the GPLed > Robert> versions of PyQt, this shouldn't pose a problem as their > Robert> code would have deal with the GPL license of PyQt > Robert> regardless. Users of the non-GPL versions would be in a > [...] > > I don't completely understand this. No one does. :-) > Lets say I subclass a PyQt class > called QWidget and call it SomeQtWidget, I also use a bunch of other > PyQt widgets but don't extend them. Lets say I define this class in > sqw.py. Can I legally distribute sqw.py separately under the BSD (or > some GPL compatible license)? It's less clear than the situation I defending because those classes really do need PyQt. I was referring to the case where bits can be separated from PyQt (tick spacing algorithms, the non-Qt outputs formats, and the like). The language in the GPL is rather explicit about this case. For sqw.py, I would say, yes, but IANAL. Like I said, for users of the GPLed versions of Qt and PyQt, it makes little difference if sqw.py is BSD or GPL. They still have to deal with the underlying GPL licenses of Qt and PyQt. It only makes a difference to the users of non-GPL versions of Qt and PyQt. Trolltech seems to want to keep the GPL developer population separate from the non-GPL population. They would rather that both you, author of sqw.py, and the person using sqw.py in his proprietary program to buy developer licenses for Qt. > My impression is that any extension to > a GPL'd library *must* be GPL and therefore sqw.py must be released > under the GPL? Right or wrong? The modified work *as a whole* must be released under GPL terms. Individual components can have their own GPL-compatible licenses. I'm not entirely sure that sqw.py is an individual component, per se. If there are generally applicable pieces of code inside sqw.py that can be used without Qt, then I think that those pieces, certainly, can be released under other licenses. > Now, given the segment of the GPL that you quoted, if I did have a > 'model' class (in the MVC world-view) separate from the SomeQWidget > then I could release the model code under any license I choose. > Right? More or less. You could only release it with the Qt-specific code under a GPL-compatible license. This is clearly a case where the quoted section applies. > However, if you look at sqw.py it isn't clear that sqw.py is really > modifying PyQt. The "linking" really happens at runtime. There are > no header files, nothing in PyQt is really "modified" or copied, no > binary program that links to PyQt. So why should sqw.py be > distributed as GPL code in the first place? Some interpretations of copyright law (e.g. Larry Rosen's) say that no, it doesn't have to. The FSF's, Trolltech's, and Riverbank's say otherwise. To my knowledge, there is no case law in this area to determine which is the right interpretation. Until such a case does come through in your jurisdiction, it's usually wise (and courteous!) to follow the wishes of the copyright holder (inasmuch as they aren't blatantly unrelated to the actual text of the license). > How then does the GPL > differ from the LGPL in this context? Under a Rosen-like interpretation, not much. See Rosen's book for more details. -- Robert Kern rkern at ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter From nwagner at mecha.uni-stuttgart.de Tue Apr 19 07:26:40 2005 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Tue, 19 Apr 2005 13:26:40 +0200 Subject: [SciPy-user] Possibly Conflicts between Numeric3 and Numeric24.0 Message-ID: <4264EAF0.20208@mecha.uni-stuttgart.de> Hi all, I have installed Numeric24.0 and Numeric3 via cvs. However, there seems to exist some conflicts between them. Am I missing something ? >>> import scipy >>> scipy.test() Traceback (most recent call last): File "", line 1, in ? AttributeError: 'module' object has no attribute 'test' >>> from scipy import * >>> import scipy >>> scipy.__version__ Traceback (most recent call last): File "", line 1, in ? AttributeError: 'module' object has no attribute '__version__' Any pointer would be appreciated. Nils From aisaac at american.edu Tue Apr 19 10:01:02 2005 From: aisaac at american.edu (Alan G Isaac) Date: Tue, 19 Apr 2005 10:01:02 -0400 (Eastern Daylight Time) Subject: [SciPy-user] Re[2]: ANN: Veusz 0.5 - a scientific plotting package In-Reply-To: References: Message-ID: On Tue, 19 Apr 2005, Jeremy Sanders apparently wrote: >> ii. why Velvet Ember Under Sky Zenith? > Stupid acronym. I should delete it. It is semi-astronomical related, and > as I do astronomy, so I thought I'd use it :-) Actually it's kind of cool, but you'll keep being asked if you don't add a FAQ. > It was veusz as there wasn't a veusz in google, and it > sounds like "views" and "use"! Got it. Thanks, Alan From H.FANGOHR at soton.ac.uk Tue Apr 19 11:56:31 2005 From: H.FANGOHR at soton.ac.uk (Hans Fangohr) Date: Tue, 19 Apr 2005 16:56:31 +0100 (BST) Subject: [SciPy-user] suggestions for improving scipy.integrate.odeint Message-ID: Dear all, dear Travis (author of odeint?), let me first say that scipy is a very useful extension to Python and that the combination of Python, scipy (and Numerix) and -- in our case -- pylab, rivals MATLAB for our purposes. Over the last few months, I have been using scipy and in particular scipy.integrate.odeint in a introductory lecture course on numeric computation for some engineering degrees. Thanks to the creativity of the students (they have the most fantastic ideas you could not dream of) I have come across two minor issues with odeint, which I'd like to point out here. If these could be resolved (in the long term), then this would make odeint much easier to use for beginners. I'll explain why as I go along. 1. The initial value (array) can change while odeint carries out the integration. This source code #---------------------------- import Numeric from scipy.integrate import odeint def rhs(y,t): return -y[0] y0 = Numeric.array([1.0]) print "Initial value:",y0 ts = Numeric.arange(0,10,1) ys = odeint( rhs, y0, ts ) print "Initial value:",y0 #---------------------------- produces the following output: #=========================== Initial value: [ 1.] Initial value: [ 0.00012341] #=========================== I can kind-of-see why this may happen (without digging in the source). However, this is highly confusing to the students because y0 is an input argument to the odeint function and should not change when odeint is called. (There is, of course, the issue of passing mutable objects such as lists to functions but I'd rather not start explaining that to non-computer science students in their very first lectures on Python. Also, if y0 is a list (rather than an array), this problems does not exist: if y0 is a list, then it is not modified by running odeint!) 2. The sequence of values t for which odeint returns the numerical solution y(t) cannot be a list. Here is an example: #---------------------------- import Numeric from scipy.integrate import odeint def rhs(y,t): return -y[0] y0 = Numeric.array([1.0]) print "this works" ts = Numeric.arange(0,10,1) ys = odeint( rhs, y0, ts ) print "this doesn't" ts = range(10) ys = odeint( rhs, y0, ts ) #---------------------------- The output of this code is: #=========================== this works this doesn't Traceback (most recent call last): File "", line 15, in ? File "/usr/lib/python2.3/site-packages/scipy/integrate/odepack.py", line 114, in odeint t = t.copy() AttributeError: 'list' object has no attribute 'copy' #=========================== Since y0 can be a list, it would be consistent to accept ts to be a list, too. (This is in fact very useful: by posing problems carefully, students can use odeint 'from lecture one' even if they haven't learned much about data types yet.) I hope this is useful information. Thanks again for providing such a nice wrapper around ODEPACK. Cheers, Hans From aisaac at american.edu Tue Apr 19 10:33:34 2005 From: aisaac at american.edu (Alan G Isaac) Date: Tue, 19 Apr 2005 10:33:34 -0400 (Eastern Daylight Time) Subject: [SciPy-user] Re: Veusz 0.5 - a scientific plotting package In-Reply-To: References: <42646572.40906@ucsd.edu><42648B8B.4020708@ucsd.edu> Message-ID: > On Mon, 18 Apr 2005, Robert Kern wrote: >> Jeremy could, if he wanted to, just separately license >> the bits that other people want to use in >> BSDish-licensed, non-PyQt projects. On Tue, 19 Apr 2005, Jeremy Sanders apparently wrote: > Of course, I'll happily relicence code if anyone would > find it useful to add it to their BSDish project. A final comment: For your willingness to be known to anyone not reading this list, you will need to add such a statement to your license. Alan Isaac From arnd.baecker at web.de Tue Apr 19 12:17:08 2005 From: arnd.baecker at web.de (Arnd Baecker) Date: Tue, 19 Apr 2005 18:17:08 +0200 (CEST) Subject: [SciPy-user] suggestions for improving scipy.integrate.odeint In-Reply-To: References: Message-ID: Dear Hans, On Tue, 19 Apr 2005, Hans Fangohr wrote: [...] > 1. The initial value (array) can change while odeint carries out the > integration. This source code > > #---------------------------- > import Numeric > from scipy.integrate import odeint > > def rhs(y,t): > return -y[0] > > y0 = Numeric.array([1.0]) > print "Initial value:",y0 > ts = Numeric.arange(0,10,1) > ys = odeint( rhs, y0, ts ) > print "Initial value:",y0 > #---------------------------- > > produces the following output: > #=========================== > Initial value: [ 1.] > Initial value: [ 0.00012341] > #=========================== > > I can kind-of-see why this may happen (without digging in the source). > However, this is highly confusing to the students because y0 is an input > argument to the odeint function and should not change when odeint is > called. I think this is actually done on purpose, as y0 contains the last entry of ys, print ys[-1] [ 0.00012341] This allows to restart odeint with this initial value to continue the integration. We stumbled across the same some time ago (I thought this was documented somewhere, but it seems it is not, at least not in the doc-string to odeint). Best, Arnd From H.FANGOHR at soton.ac.uk Tue Apr 19 13:16:52 2005 From: H.FANGOHR at soton.ac.uk (Hans Fangohr) Date: Tue, 19 Apr 2005 18:16:52 +0100 (BST) Subject: [SciPy-user] suggestions for improving scipy.integrate.odeint In-Reply-To: References: Message-ID: Hi Arnd, > On Tue, 19 Apr 2005, Hans Fangohr wrote: > > [...] > >> 1. The initial value (array) can change while odeint carries out the >> integration. This source code >> >> #---------------------------- >> import Numeric >> from scipy.integrate import odeint >> >> def rhs(y,t): >> return -y[0] >> >> y0 = Numeric.array([1.0]) >> print "Initial value:",y0 >> ts = Numeric.arange(0,10,1) >> ys = odeint( rhs, y0, ts ) >> print "Initial value:",y0 >> #---------------------------- >> >> produces the following output: >> #=========================== >> Initial value: [ 1.] >> Initial value: [ 0.00012341] >> #=========================== >> >> I can kind-of-see why this may happen (without digging in the source). >> However, this is highly confusing to the students because y0 is an input >> argument to the odeint function and should not change when odeint is >> called. > > I think this is actually done on purpose, > as y0 contains the last entry of ys, > print ys[-1] > [ 0.00012341] > This allows to restart odeint with this initial value > to continue the integration. I can see what you are saying. However, I would argue that this 'obscure' feature of returning the last value of ys (indirectly) in y0 is not 'pythonic' because it is not clear that this would happen. Note also, that y0 does not change if the type of y0 is a list (!) rather than an Numeric.array (as in my example). If the intention is that y0 is always the same as ys[-1] then this should be consistent independent of the type of y0 (although --- as I said before --- I can't see being a good idea yet). > We stumbled across the same some time ago > (I thought this was documented somewhere, but it seems > it is not, at least not in the doc-string to odeint). Correct :) Thanks for the feedback, Hans From oliphant at ee.byu.edu Tue Apr 19 14:18:04 2005 From: oliphant at ee.byu.edu (Travis Oliphant) Date: Tue, 19 Apr 2005 12:18:04 -0600 Subject: [SciPy-user] Possibly Conflicts between Numeric3 and Numeric24.0 In-Reply-To: <4264EAF0.20208@mecha.uni-stuttgart.de> References: <4264EAF0.20208@mecha.uni-stuttgart.de> Message-ID: <42654B5C.4080509@ee.byu.edu> Nils Wagner wrote: > Hi all, > > I have installed Numeric24.0 and Numeric3 via cvs. However, there > seems to exist some conflicts between them. > Am I missing something ? Note Numeric3 currently places code into scipy and makes your scipy installation unusable. Please don't install Numeric3 if you still want to use scipy. -Travis From nwagner at mecha.uni-stuttgart.de Tue Apr 19 14:28:13 2005 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Tue, 19 Apr 2005 20:28:13 +0200 Subject: [SciPy-user] Possibly Conflicts between Numeric3 and Numeric24.0 In-Reply-To: <42654B5C.4080509@ee.byu.edu> References: <4264EAF0.20208@mecha.uni-stuttgart.de> <42654B5C.4080509@ee.byu.edu> Message-ID: On Tue, 19 Apr 2005 12:18:04 -0600 Travis Oliphant wrote: > Nils Wagner wrote: > >> Hi all, >> >> I have installed Numeric24.0 and Numeric3 via cvs. >>However, there >> seems to exist some conflicts between them. >> Am I missing something ? > > > Note Numeric3 currently places code into scipy and makes >your scipy installation unusable. > > Please don't install Numeric3 if you still want to use >scipy. > How can I uninstall Numeric3 completely ? Nils > -Travis > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From jh at oobleck.astro.cornell.edu Tue Apr 19 15:28:44 2005 From: jh at oobleck.astro.cornell.edu (Joe Harrington) Date: Tue, 19 Apr 2005 15:28:44 -0400 Subject: [SciPy-user] Re[2]: ANN: Veusz 0.5 - a scientific plotting package References: <20050419161721.B29C93EBA9@www.scipy.com> Message-ID: <200504191928.j3JJSiJq021383@oobleck.astro.cornell.edu> > Can I legally distribute sqw.py separately under the BSD (or > some GPL compatible license)? > So why should sqw.py be > > distributed as GPL code in the first place? > Some interpretations of copyright law (e.g. Larry Rosen's) say that no, > it doesn't have to. The FSF's, Trolltech's, and Riverbank's say > otherwise. If FSF et al. really say this, they're dreaming. Who says that the "Qt" library that it is going to be run with will be the one they know about? There are numerous clone products that provide API-compatible functionality under different licenses, and in fact this is the main business of the FSF. GNU really is Not Unix, in an IP sense, even though many of their program can be and frequently are compiled, linked, and run on UnixTM systems using native compilers and libraries. There is a distinction to be drawn between two types of "modified code". In the first instance, you take some source code from someone else and modify those actual lines of text. In the second, your subclass *asks the compiler, linker, or interpreter* to modify or extend something that the compiler defined due to instructions from elsewhere. The first case is certainly a derived work, and falls under the terms of the parent document. You used someone else's IP to make something new. GPL demands that you use GPL to license the derived work. As I understand it, the second is not a derived work *in its source form*, because you didn't start with or include substantial sections of prose or code someone else wrote. Rather, you wrote instructions for a compiler, possibly run by someone else, to do a modification to a construct it knew about. You do not know the user's license status with respect to Qt, or which Qt the user will choose. At compile or runtime, those terms may require that the *combination* of the parent library and your modification be licensed under terms of the parent library, so if you want people to be able to run your code you had better make your terms compatible with the terms you expect the user to have. However, there's no law against my writing a Qt clone under my own license and using that library with your code. In that case, it would certainly not be subject to the original Qt license terms, since I wouldn't be using Qt at all. Your instructions to the compiler would be applied to a different set of code from what you had originally envisioned. Any runnable program would now fall under both your and my terms, as opposed to yours and Qt's. My point here is that you can write any text you like, and as long as it does not include text someone else wrote, it's yours and you can distribute it under any terms you like in its source form. In this case, it's only when your IP gets combined with someone else's stuff to make a third product that a derived work exists. So, you could offer the user a choice of licenses. Those who did in fact use the GPL'd Qt might have to choose GPL, but others could chose from the full range of options. The latter category might include those who would replace the Qt calls with calls to another library, or those who would take pieces of the code and include them in their own packages. Like Robert, I like Rosen's book, and IANAL. --jh-- From joe at enthought.com Tue Apr 19 15:49:31 2005 From: joe at enthought.com (Joe Cooper) Date: Tue, 19 Apr 2005 14:49:31 -0500 Subject: [SciPy-user] SciPy.org brief outages planned Message-ID: <426560CB.2040100@enthought.com> Hi all, I'm preparing to migrate SciPy.org to a new server, and so I will be taking the SciPy.org community website offline for a few minutes a couple of times over the next few days. Given the current state of the old system (Plone eats way more than her fair share of memory, leaving the box slow and easily confused at time), it's likely no one will notice these outages, but I thought I'd give everyone a heads up just in case it takes longer than I expect. Anyway, no other services should be adversely impacted at this time, though there will be an hour or two of downtime when the final switch occurs, as I'll need to shutdown everything to do the final rsync of mail, web, and CVS data. I do not have a firm schedule for when the big switch will occur, but it is likely to be this week. Thanks! From gerard.vermeulen at grenoble.cnrs.fr Tue Apr 19 20:54:13 2005 From: gerard.vermeulen at grenoble.cnrs.fr (Gerard Vermeulen) Date: Wed, 20 Apr 2005 02:54:13 +0200 Subject: [SciPy-user] Re[2]: ANN: Veusz 0.5 - a scientific plotting package In-Reply-To: <200504191928.j3JJSiJq021383@oobleck.astro.cornell.edu> References: <20050419161721.B29C93EBA9@www.scipy.com> <200504191928.j3JJSiJq021383@oobleck.astro.cornell.edu> Message-ID: <20050420025413.66add4bb.gerard.vermeulen@grenoble.cnrs.fr> On Tue, 19 Apr 2005 15:28:44 -0400 Joe Harrington wrote: > > Can I legally distribute sqw.py separately under the BSD (or > > some GPL compatible license)? > > So why should sqw.py be > > > distributed as GPL code in the first place? > > > Some interpretations of copyright law (e.g. Larry Rosen's) say that no, > > it doesn't have to. The FSF's, Trolltech's, and Riverbank's say > > otherwise. > > If FSF et al. really say this, they're dreaming. > > Who says that the "Qt" library that it is going to be run with will be > the one they know about? There are numerous clone products that > provide API-compatible functionality under different licenses, and in > fact this is the main business of the FSF. GNU really is Not Unix, in > an IP sense, even though many of their program can be and frequently > are compiled, linked, and run on UnixTM systems using native > compilers and libraries. > > There is a distinction to be drawn between two types of "modified > code". In the first instance, you take some source code from someone > else and modify those actual lines of text. In the second, your > subclass *asks the compiler, linker, or interpreter* to modify or > extend something that the compiler defined due to instructions from > elsewhere. The first case is certainly a derived work, and falls > under the terms of the parent document. You used someone else's IP to > make something new. GPL demands that you use GPL to license the > derived work. > > As I understand it, the second is not a derived work *in its source > form*, because you didn't start with or include substantial sections > of prose or code someone else wrote. Let me point out that if you write #include you are including 2 MByte of code (those headers are copyrighted, so they must be IP, isn't it?). To me that is equivalent to telling your book printer to include a chapter of a book written by somebody else in your book. Now, if your program falls in shatters by removing this single line, you cannot claim that your program is no derived work. PyQt hides this include statement for you and passes Qt's functionality on to Python. But does this really make a difference? Gerard From bob at redivi.com Tue Apr 19 21:48:07 2005 From: bob at redivi.com (Bob Ippolito) Date: Tue, 19 Apr 2005 21:48:07 -0400 Subject: [SciPy-user] Re[2]: ANN: Veusz 0.5 - a scientific plotting package In-Reply-To: <20050420025413.66add4bb.gerard.vermeulen@grenoble.cnrs.fr> References: <20050419161721.B29C93EBA9@www.scipy.com> <200504191928.j3JJSiJq021383@oobleck.astro.cornell.edu> <20050420025413.66add4bb.gerard.vermeulen@grenoble.cnrs.fr> Message-ID: <09ff469ea178f341c47211af63ce5d0e@redivi.com> On Apr 19, 2005, at 8:54 PM, Gerard Vermeulen wrote: > On Tue, 19 Apr 2005 15:28:44 -0400 > Joe Harrington wrote: > >>> Can I legally distribute sqw.py separately under the BSD (or >>> some GPL compatible license)? >>> So why should sqw.py be >>>> distributed as GPL code in the first place? >> >>> Some interpretations of copyright law (e.g. Larry Rosen's) say that >>> no, >>> it doesn't have to. The FSF's, Trolltech's, and Riverbank's say >>> otherwise. >> >> If FSF et al. really say this, they're dreaming. >> >> Who says that the "Qt" library that it is going to be run with will be >> the one they know about? There are numerous clone products that >> provide API-compatible functionality under different licenses, and in >> fact this is the main business of the FSF. GNU really is Not Unix, in >> an IP sense, even though many of their program can be and frequently >> are compiled, linked, and run on UnixTM systems using native >> compilers and libraries. >> >> There is a distinction to be drawn between two types of "modified >> code". In the first instance, you take some source code from someone >> else and modify those actual lines of text. In the second, your >> subclass *asks the compiler, linker, or interpreter* to modify or >> extend something that the compiler defined due to instructions from >> elsewhere. The first case is certainly a derived work, and falls >> under the terms of the parent document. You used someone else's IP to >> make something new. GPL demands that you use GPL to license the >> derived work. >> >> As I understand it, the second is not a derived work *in its source >> form*, because you didn't start with or include substantial sections >> of prose or code someone else wrote. > > Let me point out that if you write > #include > you are including 2 MByte of code (those headers are copyrighted, so > they must be IP, isn't it?). > To me that is equivalent to telling your book printer to include a > chapter of a book written by somebody else in your book. Now, if your > program falls in shatters by removing this single line, you cannot > claim > that your program is no derived work. > > PyQt hides this include statement for you and passes Qt's functionality > on to Python. But does this really make a difference? Yes, it makes a huge difference, if you're distributing *source code*. "#include " is merely a reference to something else, like an entry in a bibliography. It doesn't become a derived work until you compile it. The source code in this case is the discussion with your book printer plus the contents of the book as you sent it. -bob From eric at enthought.com Wed Apr 20 01:47:27 2005 From: eric at enthought.com (eric jones) Date: Wed, 20 Apr 2005 00:47:27 -0500 Subject: [SciPy-user] job openings at Enthought Message-ID: <4265ECEF.6050004@enthought.com> Hey group, We have a number of scientific/python related jobs open. If you have any interest, please see: http://www.enthought.com/careers.htm thanks, eric From prabhu_r at users.sf.net Wed Apr 20 02:04:43 2005 From: prabhu_r at users.sf.net (Prabhu Ramachandran) Date: Wed, 20 Apr 2005 11:34:43 +0530 Subject: [SciPy-user] Re[2]: ANN: Veusz 0.5 - a scientific plotting package In-Reply-To: <200504191928.j3JJSiJq021383@oobleck.astro.cornell.edu> References: <20050419161721.B29C93EBA9@www.scipy.com> <200504191928.j3JJSiJq021383@oobleck.astro.cornell.edu> Message-ID: <16997.61691.275430.762256@monster.linux.in> >>>>> "Joe" == Joe Harrington writes: >> Can I legally distribute sqw.py separately under the BSD (or >> some GPL compatible license)? So why should sqw.py be >> > distributed as GPL code in the first place? >> Some interpretations of copyright law (e.g. Larry Rosen's) say >> that no, it doesn't have to. The FSF's, Trolltech's, and >> Riverbank's say otherwise. Joe> If FSF et al. really say this, they're dreaming. [...] Thanks Joe and Robert for the clarifications, that makes a lot of sense. Joe> Like Robert, I like Rosen's book, and IANAL. Well, I have other things to read and little time for the ambiguities of the GPL. So your more informed thoughts are much appreciated. :) cheers, prabhu From jeremy at jeremysanders.net Wed Apr 20 04:42:56 2005 From: jeremy at jeremysanders.net (Jeremy Sanders) Date: Wed, 20 Apr 2005 09:42:56 +0100 (BST) Subject: [SciPy-user] Re: Veusz 0.5 - a scientific plotting package In-Reply-To: References: <42646572.40906@ucsd.edu><42648B8B.4020708@ucsd.edu> Message-ID: On Tue, 19 Apr 2005, Alan G Isaac wrote: >> On Mon, 18 Apr 2005, Robert Kern wrote: >>> Jeremy could, if he wanted to, just separately license >>> the bits that other people want to use in >>> BSDish-licensed, non-PyQt projects. > > > On Tue, 19 Apr 2005, Jeremy Sanders apparently wrote: >> Of course, I'll happily relicence code if anyone would >> find it useful to add it to their BSDish project. > > A final comment: > For your willingness to be known to anyone not reading this > list, you will need to add such a statement to your license. Fair enough. I'm not a lawyer, so I'll have to investigate what legalise is necessary. I could always stick a statement saying this somewhere in the source for now. Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ Cambridge, UK Public Key Server PGP Key ID: E1AAE053 From ckkart at hoc.net Wed Apr 20 06:38:44 2005 From: ckkart at hoc.net (Christian Kristukat) Date: Wed, 20 Apr 2005 12:38:44 +0200 Subject: [SciPy-user] unhandled exception ind leastsq Message-ID: <42663134.1070104@hoc.net> Hi, a couple of weeks ago there was some discussion about calculating the covariance from the result of lmdif/lmder and eventually some code was added to the leastsq() function. I propose that an exception handler for the following error should be added which occurs when the data has very little noise:: File "/usr/lib/python2.3/site-packages/scipy/optimize/minpack.py", line 255, in leastsq cov_x = sl.inv(dot(transpose(R),R)) File "/usr/lib/python2.3/site-packages/scipy/linalg/basic.py", line 216, in inv if info>0: raise LinAlgError, "singular matrix" scipy.linalg.basic.LinAlgError: singular matrix Anyway, as we finally have the covariance matrix, could explain to me how I get a e.g. 95% confidence interval? Regards, Christian From rkern at ucsd.edu Wed Apr 20 06:43:32 2005 From: rkern at ucsd.edu (Robert Kern) Date: Wed, 20 Apr 2005 03:43:32 -0700 Subject: [SciPy-user] unhandled exception ind leastsq In-Reply-To: <42663134.1070104@hoc.net> References: <42663134.1070104@hoc.net> Message-ID: <42663254.9040307@ucsd.edu> Christian Kristukat wrote: > Anyway, as we finally have the covariance matrix, could explain to me > how I get > a e.g. 95% confidence interval? I believe you can find the appropriate math here: Paul T. Boggs and Janet E. Rogers (1990), ``The Computation and Use of the Asymptotic Covariance Matrix for Measurement Error Models,'' NIST IR 89-4102, U.S. Government Printing Office. http://www.boulder.nist.gov/mcsd/Staff/JRogers/papers/odr_vcv.dvi -- Robert Kern rkern at ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter From jh at oobleck.astro.cornell.edu Wed Apr 20 10:19:34 2005 From: jh at oobleck.astro.cornell.edu (Joe Harrington) Date: Wed, 20 Apr 2005 10:19:34 -0400 Subject: [SciPy-user] Re[2]: ANN: Veusz 0.5 - a scientific plotting package In-Reply-To: <20050420054758.71E723EBB5@www.scipy.com> (scipy-user-request@scipy.net) References: <20050420054758.71E723EBB5@www.scipy.com> Message-ID: <200504201419.j3KEJYDo026503@oobleck.astro.cornell.edu> Nicely said, Bob. I'll add/reiterate this simple test: Say that the "other" package were available from two (or more) independent sources with different licenses but the same API. Internally, those packages could be entirely different. Your SOURCE code is not a derived work if you could have chosen to develop under either package without it changing your code. It is not even a derived work if this is hypothetically possible (e.g., there is currently only one Qt, but there could be another with the same API someday). Your source code *is* a derived work if this is not true, as for example if you had actually taken some Qt code and used it, even modified, in yours. In that case, the second implementation of Qt would not have had the same code in it, and your code would have looked different because the text you appropriated would have looked different in the other package. The complete running/runnable object code, of course, is a derived work, even if it is a binary in memory, produced at runtime by an interpreter. If you #include something in a C program, the .o and even post-preprocessor data would also be derived works. --jh-- From jarmila at uga.edu Thu Apr 21 15:07:37 2005 From: jarmila at uga.edu (Jarmila Bohmanova) Date: Thu, 21 Apr 2005 15:07:37 -0400 Subject: [SciPy-user] SUSe 64 bit Message-ID: <200504211907.BCC32576@puntd2.cc.uga.edu> Does anybody has an experience with SciPy on SUSe 9.1 64 bit? When I try to import scipy it gives me: File "", line 1, in ? File "/usr/lib64/python2.3/site-packages/PIL/__init__.py", line 11, in ? File "/usr/lib64/python2.3/site-packages/scipy_base/__init__.py", line 16, in ? import fastumath # no need to use scipy_base.fastumath ImportError: /usr/lib64/python2.3/site-packages/scipy_base/fastumath.so: cannot open shared object file: No such file or directory I also tried to recompile setup_scipy_base.py 'python setup_scipy_base.py install' But I got another error message: package init file '/usr/lib64/python2.3/site-packages/scipy_base/tests/__init__.py' not found (or not a regular file) package init file '/usr/lib64/python2.3/site-packages/scipy_base/tests/__init__.py' not found (or not a regular file) running build_ext customize UnixCCompiler customize UnixCCompiler using build_ext building 'scipy_base.display_test' extension compiling C sources gcc options: '-pthread -fno-strict-aliasing -DNDEBUG -DHAVE_LARGEFILE_SUPPORT -O2 -fmessage-length=0 -Wall -fPIC' compile options: '-DHAVE_X11 -I/usr/X11R6/include -I/usr/include/python2.3 -c' gcc: /usr/lib64/python2.3/site-packages/scipy_base/src/display_test.c /usr/lib64/python2.3/site-packages/scipy_base/src/display_test.c:65: warning: initialization from incompatible pointer type gcc -pthread -shared build/temp.linux-x86_64-2.3/usr/lib64/python2.3/site-packages/scipy_base/src /display_test.o -L/usr/X11R6/lib -lX11 -o build/lib.linux-x86_64-2.3/scipy_base/display_test.so /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../x86_64-suse-linux/bin /ld: skipping incompatible /usr/X11R6/lib/libX11.so when searching for -lX11 /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../x86_64-suse-linux/bin /ld: skipping incompatible /usr/X11R6/lib/libX11.a when searching for -lX11 /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../x86_64-suse-linux/bin /ld: cannot find -lX11 collect2: ld returned 1 exit status /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../x86_64-suse-linux/bin /ld: skipping incompatible /usr/X11R6/lib/libX11.so when searching for -lX11 /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../x86_64-suse-linux/bin /ld: skipping incompatible /usr/X11R6/lib/libX11.a when searching for -lX11 /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../x86_64-suse-linux/bin /ld: cannot find -lX11 collect2: ld returned 1 exit status error: Command "gcc -pthread -shared build/temp.linux-x86_64-2.3/usr/lib64/python2.3/site-packages/scipy_base/src /display_test.o -L/usr/X11R6/lib -lX11 -o build/lib.linux-x86_64-2.3/scipy_base/display_test.so" failed with exit status 1 Jarmila. -------------- next part -------------- An HTML attachment was scrubbed... URL: From joe at enthought.com Thu Apr 21 15:32:22 2005 From: joe at enthought.com (Joe Cooper) Date: Thu, 21 Apr 2005 14:32:22 -0500 Subject: [SciPy-user] SUSe 64 bit In-Reply-To: <200504211907.BCC32576@puntd2.cc.uga.edu> References: <200504211907.BCC32576@puntd2.cc.uga.edu> Message-ID: <4267FFC6.7040508@enthought.com> I spent a little time on Fedora Core 3 on x86_64, and also ran into quite a few problems of this sort. I don't think it is unique to any particular brand of Linux/x86_64...I haven't had time to deal with many of the problems though. Getting SciPy running on x86_64 is on my todo list, but it hasn't happened yet. Then again, the fastumath problem seems familiar even on i386 platforms. Try deleting your whole source tree and doing a fresh CVS checkout and build. I could be wrong, but this sounds very familiar. Jarmila Bohmanova wrote: > Does anybody has an experience with SciPy on SUSe 9.1 64 bit? > > When I try to import scipy it gives me: > > File "", line 1, in ? > > File "/usr/lib64/python2.3/site-packages/PIL/__init__.py", line 11, in ? > > > > File "/usr/lib64/python2.3/site-packages/scipy_base/__init__.py", line > 16, in ? > > import fastumath # no need to use scipy_base.fastumath > > ImportError: /usr/lib64/python2.3/site-packages/scipy_base/fastumath.so: > cannot open shared object file: No such file or directory > > > I also tried to recompile setup_scipy_base.py > > ?python setup_scipy_base.py install? > > But I got another error message: > > package init file > '/usr/lib64/python2.3/site-packages/scipy_base/tests/__init__.py' not > found (or not a regular file) > > package init file > '/usr/lib64/python2.3/site-packages/scipy_base/tests/__init__.py' not > found (or not a regular file) > > running build_ext > > customize UnixCCompiler > > customize UnixCCompiler using build_ext > > building 'scipy_base.display_test' extension > > compiling C sources > > gcc options: '-pthread -fno-strict-aliasing -DNDEBUG > -DHAVE_LARGEFILE_SUPPORT -O2 -fmessage-length=0 -Wall -fPIC' > > compile options: '-DHAVE_X11 -I/usr/X11R6/include > -I/usr/include/python2.3 -c' > > gcc: /usr/lib64/python2.3/site-packages/scipy_base/src/display_test.c > > /usr/lib64/python2.3/site-packages/scipy_base/src/display_test.c:65: > warning: initialization from incompatible pointer type > > gcc -pthread -shared > build/temp.linux-x86_64-2.3/usr/lib64/python2.3/site-packages/scipy_base/src/display_test.o > -L/usr/X11R6/lib -lX11 -o > build/lib.linux-x86_64-2.3/scipy_base/display_test.so > > /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../x86_64-suse-linux/bin/ld: > skipping incompatible /usr/X11R6/lib/libX11.so when searching for -lX11 > > /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../x86_64-suse-linux/bin/ld: > skipping incompatible /usr/X11R6/lib/libX11.a when searching for -lX11 > > /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../x86_64-suse-linux/bin/ld: > cannot find -lX11 > > collect2: ld returned 1 exit status > > /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../x86_64-suse-linux/bin/ld: > skipping incompatible /usr/X11R6/lib/libX11.so when searching for -lX11 > > /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../x86_64-suse-linux/bin/ld: > skipping incompatible /usr/X11R6/lib/libX11.a when searching for -lX11 > > /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../x86_64-suse-linux/bin/ld: > cannot find -lX11 > > collect2: ld returned 1 exit status > > error: Command "gcc -pthread -shared > build/temp.linux-x86_64-2.3/usr/lib64/python2.3/site-packages/scipy_base/src/display_test.o > -L/usr/X11R6/lib -lX11 -o > build/lib.linux-x86_64-2.3/scipy_base/display_test.so" failed with exit > status 1 > > Jarmila. > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From tgray at princeton.edu Thu Apr 21 20:14:56 2005 From: tgray at princeton.edu (Tim Gray) Date: Thu, 21 Apr 2005 20:14:56 -0400 Subject: [SciPy-user] Interpolation Message-ID: Hi, I've got a question for everyone. I'm trying to some code from IDL that uses the interpolate function. Basically I've got a big 2d array of data with time as one index and radius on the other index. Each value in the array is "data". I basically need to interpolate this data to other radii. Here's what IDL's interpolate does (to 2d arrays). It takes an array such as: x =[[ 0, 1, 2, 3,] [ 4, 5, 6, 7,] [ 8, 9,10,11,] [12,13,14,15,]] and given two vectors which define the desired indices to interpolate the data to, it spits out a new array. So for an input of: interpolate(x,[.5,1.5,2.5],[.5,1.5,2.5]), you get a 3x3 array of: [[ 2.5, 3, 4.5] [ 6.5, 7.5, 8.5] [10.5, 11.5, 12.5]] I'm sure something like this is in Scipy already, I'm just having problems finding it. Any suggestions? Tim From rkern at ucsd.edu Thu Apr 21 20:31:34 2005 From: rkern at ucsd.edu (Robert Kern) Date: Thu, 21 Apr 2005 17:31:34 -0700 Subject: [SciPy-user] Interpolation In-Reply-To: References: Message-ID: <426845E6.7040602@ucsd.edu> Tim Gray wrote: > Hi, I've got a question for everyone. I'm trying to some code from IDL that uses the interpolate function. Basically I've got a big 2d array of data with time as one index and radius on the other index. Each value in the array is "data". I basically need to interpolate this data to other radii. > > Here's what IDL's interpolate does (to 2d arrays). It takes an array such as: > x =[[ 0, 1, 2, 3,] > [ 4, 5, 6, 7,] > [ 8, 9,10,11,] > [12,13,14,15,]] > > and given two vectors which define the desired indices to interpolate the data to, it spits out a new array. So for an input of: > interpolate(x,[.5,1.5,2.5],[.5,1.5,2.5]), you get a 3x3 array of: > [[ 2.5, 3, 4.5] > [ 6.5, 7.5, 8.5] > [10.5, 11.5, 12.5]] > > I'm sure something like this is in Scipy already, I'm just having problems finding it. Any suggestions? Look at scipy.interpolate.interpolate.interp2d . Yes, there are 2 "interpolate"s in there. I don't know why interp2d isn't exposed like interp1d is. Pearu, is this an oversight? Or is interp2d not robust enough, yet? -- Robert Kern rkern at ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter From davidoff at haas.berkeley.edu Thu Apr 21 20:37:46 2005 From: davidoff at haas.berkeley.edu (Thomas Davidoff) Date: Thu, 21 Apr 2005 17:37:46 -0700 Subject: [SciPy-user] Vector mean calculation? Message-ID: <4268475A.6020803@haas.berkeley.edu> I have a vector with min equal to 412. Why am I getting a negative mean? -- Thomas Davidoff Assistant Professor Haas School of Business UC Berkeley Berkeley, CA 94618 Phone: (510) 643-1425 Fax: (510) 643-7357 email: davidoff at haas.berkeley.edu web: http://faculty.haas.berkeley.edu/davidoff/ From Fernando.Perez at colorado.edu Thu Apr 21 20:41:43 2005 From: Fernando.Perez at colorado.edu (Fernando.Perez at colorado.edu) Date: Thu, 21 Apr 2005 18:41:43 -0600 Subject: [SciPy-user] Vector mean calculation? In-Reply-To: <4268475A.6020803@haas.berkeley.edu> References: <4268475A.6020803@haas.berkeley.edu> Message-ID: <1114130503.426848471de1d@webmail.colorado.edu> Quoting Thomas Davidoff : > I have a vector with min equal to 412. Why am I getting a negative mean? Without more details, it's quite difficult to be sure. Most likely, because it's very long and of integer type (ints are 32 bit objects, so you are effectively doing mod 2^31 arithmetic with negative wraparound). Cheers, f From lanceboyle at cwazy.co.uk Fri Apr 22 00:35:27 2005 From: lanceboyle at cwazy.co.uk (Lance Boyle) Date: Thu, 21 Apr 2005 21:35:27 -0700 Subject: [SciPy-user] Vector mean calculation? In-Reply-To: <1114130503.426848471de1d@webmail.colorado.edu> References: <4268475A.6020803@haas.berkeley.edu> <1114130503.426848471de1d@webmail.colorado.edu> Message-ID: <89f3084c0a6f6705488057af7d9b987e@cwazy.co.uk> On Apr 21, 2005, at 5:41 PM, Fernando.Perez at colorado.edu wrote: > Quoting Thomas Davidoff : > >> I have a vector with min equal to 412. Why am I getting a negative >> mean? > > Without more details, it's quite difficult to be sure. Most likely, > because > it's very long and of integer type (ints are 32 bit objects, so you are > effectively doing mod 2^31 arithmetic with negative wraparound). > Why does Python allow modular arithmetic when the user doesn't request modular arithmetic? Lance From Fernando.Perez at colorado.edu Fri Apr 22 06:04:00 2005 From: Fernando.Perez at colorado.edu (Fernando.Perez at colorado.edu) Date: Fri, 22 Apr 2005 04:04:00 -0600 Subject: [SciPy-user] Vector mean calculation? In-Reply-To: <89f3084c0a6f6705488057af7d9b987e@cwazy.co.uk> References: <4268475A.6020803@haas.berkeley.edu> <1114130503.426848471de1d@webmail.colorado.edu> <89f3084c0a6f6705488057af7d9b987e@cwazy.co.uk> Message-ID: <1114164240.4268cc10dcfc2@webmail.colorado.edu> Lance Boyle wrote: > On Apr 21, 2005, at 5:41 PM, Fernando.Perez at colorado.edu wrote: > > >>Quoting Thomas Davidoff : >> >> >>>I have a vector with min equal to 412. Why am I getting a negative >>>mean? >> >>Without more details, it's quite difficult to be sure. Most likely, >>because >>it's very long and of integer type (ints are 32 bit objects, so you are >>effectively doing mod 2^31 arithmetic with negative wraparound). >> > > Why does Python allow modular arithmetic when the user doesn't request > modular arithmetic? Well, it's just what happens in C always: regular ints are 32 bit objects, hence with a range of [-2**31,2**31-1]. If you start adding and go beyond the right endpoint of the interval, it will wrap around the left. Pure python shields you from this with silent promotion to python longs, which are arbitrary-length integers. But in Numeric/numarray, you are using raw C objects (for speed reasons), so you can't escape some of their limitations (which are in many cases precisely what gives you speed). Life is full of compromises... Best, f From papagr-lists at freemail.gr Fri Apr 22 06:46:33 2005 From: papagr-lists at freemail.gr (Nikos Papagrigoriou) Date: Fri, 22 Apr 2005 13:46:33 +0300 Subject: [SciPy-user] SUSe 64 bit In-Reply-To: <200504211907.BCC32576@puntd2.cc.uga.edu> References: <200504211907.BCC32576@puntd2.cc.uga.edu> Message-ID: <4268D609.10004@freemail.gr> Hello, I have managed to successfully compile Scipy 0.3.2 for SuSE 9.1 64bit. I am using the statistical functions and it seems to work. Where should I upload the rpm file? Do you want an email with the file attached? It is 1MB in size. Jarmila Bohmanova wrote: > Does anybody has an experience with SciPy on SUSe 9.1 64 bit? > > When I try to import scipy it gives me: > > File "", line 1, in ? > > File "/usr/lib64/python2.3/site-packages/PIL/__init__.py", line 11, in ? > > > > File "/usr/lib64/python2.3/site-packages/scipy_base/__init__.py", line > 16, in ? > > import fastumath # no need to use scipy_base.fastumath > > ImportError: /usr/lib64/python2.3/site-packages/scipy_base/fastumath.so: > cannot open shared object file: No such file or directory > > > I also tried to recompile setup_scipy_base.py > > ?python setup_scipy_base.py install? > > But I got another error message: > > package init file > '/usr/lib64/python2.3/site-packages/scipy_base/tests/__init__.py' not > found (or not a regular file) > > package init file > '/usr/lib64/python2.3/site-packages/scipy_base/tests/__init__.py' not > found (or not a regular file) > > running build_ext > > customize UnixCCompiler > > customize UnixCCompiler using build_ext > > building 'scipy_base.display_test' extension > > compiling C sources > > gcc options: '-pthread -fno-strict-aliasing -DNDEBUG > -DHAVE_LARGEFILE_SUPPORT -O2 -fmessage-length=0 -Wall -fPIC' > > compile options: '-DHAVE_X11 -I/usr/X11R6/include > -I/usr/include/python2.3 -c' > > gcc: /usr/lib64/python2.3/site-packages/scipy_base/src/display_test.c > > /usr/lib64/python2.3/site-packages/scipy_base/src/display_test.c:65: > warning: initialization from incompatible pointer type > > gcc -pthread -shared > build/temp.linux-x86_64-2.3/usr/lib64/python2.3/site-packages/scipy_base/src/display_test.o > -L/usr/X11R6/lib -lX11 -o > build/lib.linux-x86_64-2.3/scipy_base/display_test.so > > /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../x86_64-suse-linux/bin/ld: > skipping incompatible /usr/X11R6/lib/libX11.so when searching for -lX11 > > /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../x86_64-suse-linux/bin/ld: > skipping incompatible /usr/X11R6/lib/libX11.a when searching for -lX11 > > /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../x86_64-suse-linux/bin/ld: > cannot find -lX11 > > collect2: ld returned 1 exit status > > /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../x86_64-suse-linux/bin/ld: > skipping incompatible /usr/X11R6/lib/libX11.so when searching for -lX11 > > /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../x86_64-suse-linux/bin/ld: > skipping incompatible /usr/X11R6/lib/libX11.a when searching for -lX11 > > /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../x86_64-suse-linux/bin/ld: > cannot find -lX11 > > collect2: ld returned 1 exit status > > error: Command "gcc -pthread -shared > build/temp.linux-x86_64-2.3/usr/lib64/python2.3/site-packages/scipy_base/src/display_test.o > -L/usr/X11R6/lib -lX11 -o > build/lib.linux-x86_64-2.3/scipy_base/display_test.so" failed with exit > status 1 > > Jarmila. > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From oliphant at ee.byu.edu Fri Apr 22 07:03:06 2005 From: oliphant at ee.byu.edu (Travis Oliphant) Date: Fri, 22 Apr 2005 05:03:06 -0600 Subject: [SciPy-user] Vector mean calculation? In-Reply-To: <89f3084c0a6f6705488057af7d9b987e@cwazy.co.uk> References: <4268475A.6020803@haas.berkeley.edu> <1114130503.426848471de1d@webmail.colorado.edu> <89f3084c0a6f6705488057af7d9b987e@cwazy.co.uk> Message-ID: <4268D9EA.60309@ee.byu.edu> Lance Boyle wrote: > > On Apr 21, 2005, at 5:41 PM, Fernando.Perez at colorado.edu wrote: > >> Quoting Thomas Davidoff : >> >>> I have a vector with min equal to 412. Why am I getting a negative >>> mean? >> >> >> Without more details, it's quite difficult to be sure. Most likely, >> because >> it's very long and of integer type (ints are 32 bit objects, so you are >> effectively doing mod 2^31 arithmetic with negative wraparound). >> > Why does Python allow modular arithmetic when the user doesn't request > modular arithmetic? To get speed, scipy must assume that if you are using an integer array then you actually are requesting modular arithmetic (to the size of the integers in question). The other option would be to silently and automatically upcast when you get too large. I don't think that is the right way to go. It would be a good idea, however, to allow the user to specify a larger type within which to accomplish a reduction. Look for this in scipy.base (the new Numeric). I'm thinking of something like add.reduce(a, Int32) or add.reduce(a, Float64) which gives a return type for the array. -Travis From r_hlp at yahoo.com Fri Apr 22 20:28:39 2005 From: r_hlp at yahoo.com (r help) Date: Fri, 22 Apr 2005 17:28:39 -0700 (PDT) Subject: [SciPy-user] modified bessel fn of second kind K(n,z) Message-ID: <20050423002839.65252.qmail@web42408.mail.yahoo.com> hi i am trying to use the modified bessel function of the second kind, K_n(z) K is called the mod. bes. fn of second kind on mathworld; K is called the mod. bes. fn of third kind in scipy. the integer order function special.kn(-20,3) gives the same result on both mathematica and scipy: In [3]: special.kn(-20,3) Out[3]: 16254643952204.371 however the real valued special.kv(-20,3) gives different answers each time i call it: In [2]: special.kv(-20,3) Out[2]: -1.9924087524414062 In [4]: special.kv(-20,3) Out[4]: 166558.53135225689 In [5]: special.kv(-20,3) Out[5]: 166541.5313522513 In [6]: special.kv(-20,3) Out[6]: 166541.53135221289 In [7]: special.kv(-20,3) Out[7]: 166592.53135221568 In [8]: special.kv(-20,3) Out[8]: 166541.5313522506 In [9]: special.kv(-20,3) Out[9]: 166592.53135226108 In [10]: special.kv(-20,3) Out[10]: 166541.53135219333 In [11]: special.kv(-20,3) Out[11]: 166592.53135221079 In [19]: print scipy.scipy_version.scipy_version 0.3.2 __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rkern at ucsd.edu Fri Apr 22 20:35:21 2005 From: rkern at ucsd.edu (Robert Kern) Date: Fri, 22 Apr 2005 17:35:21 -0700 Subject: [SciPy-user] modified bessel fn of second kind K(n,z) In-Reply-To: <20050423002839.65252.qmail@web42408.mail.yahoo.com> References: <20050423002839.65252.qmail@web42408.mail.yahoo.com> Message-ID: <42699849.3020606@ucsd.edu> r help wrote: > hi > > i am trying to use the modified bessel function of the > second kind, K_n(z) > > K is called the mod. bes. fn of second kind on > mathworld; > K is called the mod. bes. fn of third kind in scipy. > > the integer order function special.kn(-20,3) gives the > same result on both mathematica and scipy: > > In [3]: special.kn(-20,3) > Out[3]: 16254643952204.371 > > however the real valued special.kv(-20,3) gives > different answers each time i call it: > > In [2]: special.kv(-20,3) > Out[2]: -1.9924087524414062 > > In [4]: special.kv(-20,3) > Out[4]: 166558.53135225689 > > In [5]: special.kv(-20,3) > Out[5]: 166541.5313522513 [etc] On a Mac: In [1]:special.kv(-20,3) Out[1]:-1.990829468774475 In [2]:special.kv(-20,3) Out[2]:9.3170894640213688e-309 In [3]:special.kv(-20,3) Out[3]:9.3170894640213688e-309 Hmmm. Something fishy's going on here. -- Robert Kern rkern at ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter From lanceboyle at cwazy.co.uk Sat Apr 23 02:06:13 2005 From: lanceboyle at cwazy.co.uk (Lance Boyle) Date: Fri, 22 Apr 2005 23:06:13 -0700 Subject: [SciPy-user] Vector mean calculation? In-Reply-To: <1114164240.4268cc10dcfc2@webmail.colorado.edu> References: <4268475A.6020803@haas.berkeley.edu> <1114130503.426848471de1d@webmail.colorado.edu> <89f3084c0a6f6705488057af7d9b987e@cwazy.co.uk> <1114164240.4268cc10dcfc2@webmail.colorado.edu> Message-ID: <58c8ff40918fae69dfc998d68cef018e@cwazy.co.uk> On Apr 22, 2005, at 3:04 AM, Fernando.Perez at colorado.edu wrote: > Lance Boyle wrote: >> On Apr 21, 2005, at 5:41 PM, Fernando.Perez at colorado.edu wrote: >> >> >>> Quoting Thomas Davidoff : >>> >>> >>>> I have a vector with min equal to 412. Why am I getting a negative >>>> mean? >>> >>> Without more details, it's quite difficult to be sure. Most likely, >>> because >>> it's very long and of integer type (ints are 32 bit objects, so you >>> are >>> effectively doing mod 2^31 arithmetic with negative wraparound). >>> >> >> Why does Python allow modular arithmetic when the user doesn't request >> modular arithmetic? > > Well, it's just what happens in C always: regular ints are 32 bit > objects, hence > with a range of [-2**31,2**31-1]. If you start adding and go beyond > the right > endpoint of the interval, it will wrap around the left. Pure python > shields > you from this with silent promotion to python longs, which are > arbitrary-length integers. But in Numeric/numarray, you are using raw > C > objects (for speed reasons), so you can't escape some of their > limitations > (which are in many cases precisely what gives you speed). Life is > full of > compromises... > > Best, > > f Well, I apologize for a bit of baiting. I get upset when a language lets me do something which I didn't intend, and when it is preventable in the design of the language. Python is 30 years newer than C but yet we have to put up with some of the same deficiencies of C (OK, so it was in a library). If the original poster was really suffering wrap-around (getting a mean value of a vector that is less than the minimum value), then he/she could be the poster boy/girl for poor language design. We might inquire about how much time he saved by using unchecked modular arithmetic versus how much time he wasted debugging his program, posting to this list, and making repairs. We might also ask him what might have been the consequences of getting such an incorrect result that he did not catch. Flame away. 8^) Lance From bob at redivi.com Sat Apr 23 02:59:02 2005 From: bob at redivi.com (Bob Ippolito) Date: Sat, 23 Apr 2005 02:59:02 -0400 Subject: [SciPy-user] Vector mean calculation? In-Reply-To: <58c8ff40918fae69dfc998d68cef018e@cwazy.co.uk> References: <4268475A.6020803@haas.berkeley.edu> <1114130503.426848471de1d@webmail.colorado.edu> <89f3084c0a6f6705488057af7d9b987e@cwazy.co.uk> <1114164240.4268cc10dcfc2@webmail.colorado.edu> <58c8ff40918fae69dfc998d68cef018e@cwazy.co.uk> Message-ID: On Apr 23, 2005, at 2:06 AM, Lance Boyle wrote: > On Apr 22, 2005, at 3:04 AM, Fernando.Perez at colorado.edu wrote: > >> Lance Boyle wrote: >>> On Apr 21, 2005, at 5:41 PM, Fernando.Perez at colorado.edu wrote: >>> >>> >>>> Quoting Thomas Davidoff : >>>> >>>> >>>>> I have a vector with min equal to 412. Why am I getting a negative >>>>> mean? >>>> >>>> Without more details, it's quite difficult to be sure. Most likely, >>>> because >>>> it's very long and of integer type (ints are 32 bit objects, so you >>>> are >>>> effectively doing mod 2^31 arithmetic with negative wraparound). >>>> >>> >>> Why does Python allow modular arithmetic when the user doesn't >>> request >>> modular arithmetic? >> >> Well, it's just what happens in C always: regular ints are 32 bit >> objects, hence >> with a range of [-2**31,2**31-1]. If you start adding and go beyond >> the right >> endpoint of the interval, it will wrap around the left. Pure python >> shields >> you from this with silent promotion to python longs, which are >> arbitrary-length integers. But in Numeric/numarray, you are using >> raw C >> objects (for speed reasons), so you can't escape some of their >> limitations >> (which are in many cases precisely what gives you speed). Life is >> full of >> compromises... > > Well, I apologize for a bit of baiting. I get upset when a language > lets me do something which I didn't intend, and when it is preventable > in the design of the language. Python is 30 years newer than C but yet > we have to put up with some of the same deficiencies of C (OK, so it > was in a library). If the original poster was really suffering > wrap-around (getting a mean value of a vector that is less than the > minimum value), then he/she could be the poster boy/girl for poor > language design. We might inquire about how much time he saved by > using unchecked modular arithmetic versus how much time he wasted > debugging his program, posting to this list, and making repairs. We > might also ask him what might have been the consequences of getting > such an incorrect result that he did not catch. 30 years in what universe? C has been around for about 34 years (1971), and Python wasn't born yesterday (1990). Anyway, you could ask him if he would prefer a default implementation that ran 10x slower (probably worse) because it performed checked arithmetic. You get one or the other, and both is simply more work. If this function was 100% Python and didn't bother with Numeric/etc. it would've done the right thing out of the box, but it might still be calculating :) -bob From davidoff at haas.berkeley.edu Sat Apr 23 12:04:52 2005 From: davidoff at haas.berkeley.edu (Thomas Davidoff) Date: Sat, 23 Apr 2005 09:04:52 -0700 Subject: [SciPy-user] Vector mean calculation? In-Reply-To: References: <4268475A.6020803@haas.berkeley.edu> <1114130503.426848471de1d@webmail.colorado.edu> <89f3084c0a6f6705488057af7d9b987e@cwazy.co.uk> <1114164240.4268cc10dcfc2@webmail.colorado.edu> <58c8ff40918fae69dfc998d68cef018e@cwazy.co.uk> Message-ID: <426A7224.30209@haas.berkeley.edu> Bob Ippolito wrote: > On Apr 23, 2005, at 2:06 AM, Lance Boyle wrote: > >> On Apr 22, 2005, at 3:04 AM, Fernando.Perez at colorado.edu wrote: >> >>> Lance Boyle wrote: >>> >>>> On Apr 21, 2005, at 5:41 PM, Fernando.Perez at colorado.edu wrote: >>>> >>>> >>>>> Quoting Thomas Davidoff : >>>>> >>>>> >>>>>> I have a vector with min equal to 412. Why am I getting a negative >>>>>> mean? >>>>> >>>>> >>>>> Without more details, it's quite difficult to be sure. Most likely, >>>>> because >>>>> it's very long and of integer type (ints are 32 bit objects, so >>>>> you are >>>>> effectively doing mod 2^31 arithmetic with negative wraparound). >>>>> >>>> >>>> Why does Python allow modular arithmetic when the user doesn't request >>>> modular arithmetic? >>> >>> >>> Well, it's just what happens in C always: regular ints are 32 bit >>> objects, hence >>> with a range of [-2**31,2**31-1]. If you start adding and go beyond >>> the right >>> endpoint of the interval, it will wrap around the left. Pure python >>> shields >>> you from this with silent promotion to python longs, which are >>> arbitrary-length integers. But in Numeric/numarray, you are using >>> raw C >>> objects (for speed reasons), so you can't escape some of their >>> limitations >>> (which are in many cases precisely what gives you speed). Life is >>> full of >>> compromises... >> >> >> Well, I apologize for a bit of baiting. I get upset when a language >> lets me do something which I didn't intend, and when it is >> preventable in the design of the language. Python is 30 years newer >> than C but yet we have to put up with some of the same deficiencies >> of C (OK, so it was in a library). If the original poster was really >> suffering wrap-around (getting a mean value of a vector that is less >> than the minimum value), then he/she could be the poster boy/girl for >> poor language design. We might inquire about how much time he saved >> by using unchecked modular arithmetic versus how much time he wasted >> debugging his program, posting to this list, and making repairs. We >> might also ask him what might have been the consequences of getting >> such an incorrect result that he did not catch. > > > 30 years in what universe? C has been around for about 34 years > (1971), and Python wasn't born yesterday (1990). > > Anyway, you could ask him if he would prefer a default implementation > that ran 10x slower (probably worse) because it performed checked > arithmetic. You get one or the other, and both is simply more work. > If this function was 100% Python and didn't bother with Numeric/etc. > it would've done the right thing out of the box, but it might still be > calculating :) > > -bob > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From the original poster: the mean miscalculation was the least of my programming problems in this exercise (so far) - not a bad learning experience. From stas-fomin at yandex.ru Sat Apr 23 16:58:39 2005 From: stas-fomin at yandex.ru (Stas Fomin) Date: Sun, 24 Apr 2005 00:58:39 +0400 Subject: [SciPy-user] mmwrite and sparse matrices. It works? Message-ID: <002501c54847$39b29550$1a34090a@belonesox> Hello! I am newbie in SciPy. (Just installed Numeric-23.5.win32-py2.3.exe and SciPy_complete-0.3.2.win32-py2.3-num23.5.exe) http://oliphant.ee.byu.edu:81/scipy/io/mmwrite declares that "mmwrite Writes the sparse or dense matrix A to a Matrix Market formatted file". I try small piece of code: Python 2.3.2 (#49, Nov 13 2003, 10:34:54) [MSC v.1200 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> from scipy import *; >>> A = sparse.dok_matrix() >>> A[1,3] = 4 >>> print A (1, 3) 4 >>> fn=open('file.mtx','w') >>> io.mmio.mmwrite(fn,A) Traceback (most recent call last): File "", line 1, in ? File "C:\Python\Lib\site-packages\scipy\io\mmio.py", line 266, in mmwrite if typecode in 'fF': TypeError: 'in ' requires string as left operand Also, I failed to "mmwrite" csc_matrices... Does "mmio" package work with matrices from "sparse"? If so, please, provide small example. Sincerely, Stas Fomin. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bangura_alimamy at yahoo.co.uk Sat Apr 23 20:08:37 2005 From: bangura_alimamy at yahoo.co.uk (Alimamy Bangura) Date: Sun, 24 Apr 2005 01:08:37 +0100 (BST) Subject: [SciPy-user] problems with glplt and new scipy install Message-ID: <20050424000838.94617.qmail@web26709.mail.ukl.yahoo.com> Hi, I have just spent a long time getting a version of scipy installed on my powerbook G4 . I am a newbie to python and the whole unix thing so I have found the whole ordeal rather difficult, but interesting! All seemed lost until I found the package by Peter Maxwell at: http://cbis.anu.edu.au/misc/SciPy_complete-0.3.2.mpkg.zip I should really have looked at this list first before trying to build from the source... It all seems to work great except plotting with glplt. The program I have been testing with I know works on other machines, but doesn't work when I use it on mine. I can import scipy and the scipy.test() seems to work fine. I have reinstalled the newest version of xfree86 from fink, after deleting all previous incarnations, but it just doesn't open the window when it is supposed to, no error message is popped up either. Any clues? thanks, Ali Send instant messages to your online friends http://uk.messenger.yahoo.com From rkern at ucsd.edu Sat Apr 23 22:26:47 2005 From: rkern at ucsd.edu (Robert Kern) Date: Sat, 23 Apr 2005 19:26:47 -0700 Subject: [SciPy-user] problems with glplt and new scipy install In-Reply-To: <20050424000838.94617.qmail@web26709.mail.ukl.yahoo.com> References: <20050424000838.94617.qmail@web26709.mail.ukl.yahoo.com> Message-ID: <426B03E7.9050805@ucsd.edu> Alimamy Bangura wrote: > Hi, > > I have just spent a long time getting a version of > scipy installed on my powerbook G4 . I am a newbie to > python and the whole unix thing so I have found the > whole ordeal rather difficult, but interesting! > > All seemed lost until I found the package by Peter > Maxwell at: > > http://cbis.anu.edu.au/misc/SciPy_complete-0.3.2.mpkg.zip > > I should really have looked at this list first before > trying to build from the source... > > It all seems to work great except plotting with glplt. > The program I have been testing with I know works on > other machines, but doesn't work when I use it on > mine. > > I can import scipy and the scipy.test() seems to work > fine. I have reinstalled the newest version of xfree86 > from fink, after deleting all previous incarnations, > but it just doesn't open the window when it is > supposed to, no error message is popped up either. Whose gnuplot are you using? IIRC, Fink's gnuplot doesn't use X. Use Fink to install AquaTerm. I do recommend using matplotlib instead. -- Robert Kern rkern at ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter From bangura_alimamy at yahoo.co.uk Sun Apr 24 06:11:31 2005 From: bangura_alimamy at yahoo.co.uk (Alimamy Bangura) Date: Sun, 24 Apr 2005 11:11:31 +0100 (BST) Subject: [SciPy-user] Re: problems with glplt and new scipy install In-Reply-To: <20050424022825.D45953EB76@www.scipy.com> Message-ID: <20050424101131.1633.qmail@web26704.mail.ukl.yahoo.com> Hi, Thanks for your speedy response. I actually meant gplt rather than glplot in my previous message... The following for example doesn't work, but no error message pops up. >>> import scipy >>> from scipy import gplt >>> x=arange(0,10,0.1) >>> y=sin(x) >>> gplt.plot(x,y) thanks again, Ali > > Message: 7 > Date: Sat, 23 Apr 2005 19:26:47 -0700 > From: Robert Kern > Subject: Re: [SciPy-user] problems with glplt and > new scipy install > To: SciPy Users List > Message-ID: <426B03E7.9050805 at ucsd.edu> > Content-Type: text/plain; charset=ISO-8859-1; > format=flowed > > Alimamy Bangura wrote: > > Hi, > > > > I have just spent a long time getting a version of > > scipy installed on my powerbook G4 . I am a > newbie to > > python and the whole unix thing so I have found > the > > whole ordeal rather difficult, but interesting! > > > > All seemed lost until I found the package by Peter > > Maxwell at: > > > > > http://cbis.anu.edu.au/misc/SciPy_complete-0.3.2.mpkg.zip > > > > I should really have looked at this list first > before > > trying to build from the source... > > > > It all seems to work great except plotting with > glplt. > > The program I have been testing with I know works > on > > other machines, but doesn't work when I use it on > > mine. > > > > I can import scipy and the scipy.test() seems to > work > > fine. I have reinstalled the newest version of > xfree86 > > from fink, after deleting all previous > incarnations, > > but it just doesn't open the window when it is > > supposed to, no error message is popped up either. > > Whose gnuplot are you using? IIRC, Fink's gnuplot > doesn't use X. Use > Fink to install AquaTerm. > > I do recommend using matplotlib instead. > > -- > Robert Kern > rkern at ucsd.edu > > "In the fields of hell where the grass grows high > Are the graves of dreams allowed to die." > -- Richard Harter > > > > ------------------------------ > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > > > End of SciPy-user Digest, Vol 20, Issue 12 > ****************************************** > Send instant messages to your online friends http://uk.messenger.yahoo.com From rkern at ucsd.edu Sun Apr 24 06:25:36 2005 From: rkern at ucsd.edu (Robert Kern) Date: Sun, 24 Apr 2005 03:25:36 -0700 Subject: [SciPy-user] Re: problems with glplt and new scipy install In-Reply-To: <20050424101131.1633.qmail@web26704.mail.ukl.yahoo.com> References: <20050424101131.1633.qmail@web26704.mail.ukl.yahoo.com> Message-ID: <426B7420.6000400@ucsd.edu> Alimamy Bangura wrote: > Hi, > > Thanks for your speedy response. > > I actually meant gplt rather than glplot in my > previous message... > > The following for example doesn't work, but no error > message pops up. > > >>>>import scipy >>>>from scipy import gplt >>>>x=arange(0,10,0.1) >>>>y=sin(x) >>>>gplt.plot(x,y) Yes, I know what you meant. gplt uses gnuplot. What gnuplot are you using? -- Robert Kern rkern at ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter From rspringuel at smcvt.edu Sun Apr 24 16:12:42 2005 From: rspringuel at smcvt.edu (R. Padraic Springuel) Date: Sun, 24 Apr 2005 16:12:42 -0400 Subject: [SciPy-user] Python program failure caused by fastumath *FIXED* Message-ID: <426BFDBA.8010105@smcvt.edu> When attempting to evaluate certain functions for which the expected range of the function is complex, fastumath (what scipy uses to define these universal functions) causes a program fatal error in python (at least under Windows XP, which I run). After some experimenting with the problem, I have come up with a work around solution. By rewriting the wrapper functions in scimath (found in the scipy_base folder) so that these functions use Numeric's umath functions instead, the functions work as expected (including the automatic domain change that the wrapper functions in scimath were originally intended for). The only remaining bug is that the fix requires importing Numeric before importing scipy. Any help with this last bug would be appreciated, as I cannot determine why this makes a difference. My rewritten version of scimath can be downloaded from the following address: http://www.umit.maine.edu/~r.springuel/000CCFE8-80000018/ Note: In addition to the above described fix, my rewritten scimath also contains definitions for several trig functions and hyperbolic trig functions which were not previously defined by either numeric or scipy. These functions are also handled appropriately under the above fix where necessary with the following exceptions: arcsec(0), arccsc(0), & arccoth(0), which still return math domain errors (again, suggestions on how to handle these special cases is appreciated). -- R. Padraic Springuel From davidoff at haas.berkeley.edu Sun Apr 24 23:08:53 2005 From: davidoff at haas.berkeley.edu (Thomas Davidoff) Date: Sun, 24 Apr 2005 20:08:53 -0700 Subject: [SciPy-user] mid-size outerproduct too big for memory Message-ID: <426C5F45.2080002@haas.berkeley.edu> I tried to get the outerproduct(a,b) where a is a 23,297 by 15 matrix and b is a 15 element row vector. This led to a memory error. This is a pretty small dataset for empirical economics - is there a way around this? Will I ever be able to do something like 1 million by 100 or is it back to Stata for me? I don't think the issue is other stuff in the program because nothing should be eating a lot of memory. I noticed I get the same problem in command line python just trying a 100,000 by 100 matrix and a 1 by 100 row vector. I am on a new G5 PowerMac with lots of new memory installed. -- Thomas Davidoff Assistant Professor Haas School of Business UC Berkeley Berkeley, CA 94618 Phone: (510) 643-1425 Fax: (510) 643-7357 email: davidoff at haas.berkeley.edu web: http://faculty.haas.berkeley.edu/davidoff/ From rkern at ucsd.edu Sun Apr 24 23:38:56 2005 From: rkern at ucsd.edu (Robert Kern) Date: Sun, 24 Apr 2005 20:38:56 -0700 Subject: [SciPy-user] mid-size outerproduct too big for memory In-Reply-To: <426C5F45.2080002@haas.berkeley.edu> References: <426C5F45.2080002@haas.berkeley.edu> Message-ID: <426C6650.6030602@ucsd.edu> Thomas Davidoff wrote: > I tried to get the outerproduct(a,b) where a is a 23,297 by 15 matrix > and b is a 15 element row vector. This led to a memory error. This is > a pretty small dataset for empirical economics - is there a way around > this? 23297*15*15*8./1024/1024 = 40 40 MB. My G4-1GB memory handles this fine. I'm not sure why you are seeing a memory error. Could you post your code? > Will I ever be able to do something like 1 million by 100 or is > it back to Stata for me? 1000000*100*100*8/1024/1024/1024 == 74 74 GB. No, I don't think your machine will handle that outerproduct well. > I don't think the issue is other stuff in the program because nothing > should be eating a lot of memory. How about other stuff running on the system? > I noticed I get the same problem in > command line python just trying a 100,000 by 100 matrix and a 1 by 100 > row vector. > I am on a new G5 PowerMac with lots of new memory installed. -- Robert Kern rkern at ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter From davidoff at haas.berkeley.edu Sun Apr 24 23:51:17 2005 From: davidoff at haas.berkeley.edu (Thomas Davidoff) Date: Sun, 24 Apr 2005 20:51:17 -0700 Subject: [SciPy-user] mid-size outerproduct too big for memory In-Reply-To: <426C6650.6030602@ucsd.edu> References: <426C5F45.2080002@haas.berkeley.edu> <426C6650.6030602@ucsd.edu> Message-ID: <426C6935.8000506@haas.berkeley.edu> Thanks for the help. The code (attached) is going to reek of poor programming skills but I think the dimensions on line 158 (where the program stops) are conformable. I can't attach the datasets - too big. If you are truly curious, the .uf3 files are at census.gov under sf3 ftp page. As for the other processes, I don't have mucnh of anything else going on. Running top on my remote mac leads to Processes: 55 total, 2 running, 53 sleeping... 137 threads 20:48:38 Load Avg: 0.00, 0.00, 0.00 CPU usage: 1.3% user, 4.8% sys, 93.8% idle SharedLibs: num = 134, resident = 60.2M code, 4.59M data, 18.3M LinkEdit MemRegions: num = 12317, resident = 124M + 10.5M private, 89.8M shared PhysMem: 233M wired, 163M active, 207M inactive, 604M used, 1.91G free VM: 5.08G + 95.1M 259046(0) pageins, 11945(0) pageouts Robert Kern wrote: > Thomas Davidoff wrote: > >> I tried to get the outerproduct(a,b) where a is a 23,297 by 15 matrix >> and b is a 15 element row vector. This led to a memory error. This >> is a pretty small dataset for empirical economics - is there a way >> around this? > > > 23297*15*15*8./1024/1024 = 40 > > 40 MB. My G4-1GB memory handles this fine. I'm not sure why you are > seeing a memory error. Could you post your code? > >> Will I ever be able to do something like 1 million by 100 or is it >> back to Stata for me? > > > 1000000*100*100*8/1024/1024/1024 == 74 > > 74 GB. No, I don't think your machine will handle that outerproduct well. > >> I don't think the issue is other stuff in the program because nothing >> should be eating a lot of memory. > > > How about other stuff running on the system? > >> I noticed I get the same problem in command line python just trying a >> 100,000 by 100 matrix and a 1 by 100 row vector. >> I am on a new G5 PowerMac with lots of new memory installed. > > -- Thomas Davidoff Assistant Professor Haas School of Business UC Berkeley Berkeley, CA 94618 Phone: (510) 643-1425 Fax: (510) 643-7357 email: davidoff at haas.berkeley.edu web: http://faculty.haas.berkeley.edu/davidoff/ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: jueround2.py URL: From rkern at ucsd.edu Mon Apr 25 00:18:26 2005 From: rkern at ucsd.edu (Robert Kern) Date: Sun, 24 Apr 2005 21:18:26 -0700 Subject: [SciPy-user] mid-size outerproduct too big for memory In-Reply-To: <426C6935.8000506@haas.berkeley.edu> References: <426C5F45.2080002@haas.berkeley.edu> <426C6650.6030602@ucsd.edu> <426C6935.8000506@haas.berkeley.edu> Message-ID: <426C6F92.3070409@ucsd.edu> Thomas Davidoff wrote: > Thanks for the help. > The code (attached) is going to reek of poor programming skills but I > think the dimensions on line 158 (where the program stops) are > conformable. Line 158 is this: meanincomevec = outerproduct(diag(totalincomevec),householdvec) # Want L x 1 -> do LxL version of meanincome elements on diag, X L x 1) What is L here? 15? Or 23297? Now, are you sure that you want outerproduct here? You won't get a vector from outerproduct. You would get a matrix with shape (L*L, L). Is that what you want? However, since totalincomevec comes from a series of outerproducts itself, it may be much larger than what you thought. Print the shapes of these arrays before line 157 and between 157 and 158. Read the documentation on outerproduct to make sure that it's what you want. -- Robert Kern rkern at ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter From dimitri.dor at fssintl.com Mon Apr 25 05:19:44 2005 From: dimitri.dor at fssintl.com (Dimitri D'Or) Date: Mon, 25 Apr 2005 11:19:44 +0200 Subject: [SciPy-user] Replacing elements in matrix Message-ID: <200504250919.j3P9Jiaq027386@outmx026.isp.belgacom.be> Hello, I come from the Matlab world and I'm used to write operations such as: A[indexi,indexj]=A[indexi,indexj]+B where A is a n by n matrix, indexi is i by 1 vector, indexj is a j by 1 vector and B is a i by j matrix. With this operation, some of the elements of A are replaced by their original value augmented by some value coming from B. for example, take A=array([[1,5,7,8,2],[5,3,4,6,7],[9,4,6,7,2],[0,2,0,3,4]]) indexi=array([0,2]) indexj=array([1,2,4]) B=array([[10,20,30],[100,200,300]]) With this, Matlab results would be A[indexi,indexj]=array([[5, 7, 2],[4, 6, 2]]) and A[indexi,indexj]=A[indexi,indexj]+B yields A=array([[1,15,27,8,32],[5,3,4,6,7],[9,104,206,7,302],[0,2,0,3,4]]) I would like to make the same operation with Python. Would you please propose me a compact code for achieving that? Thank you, Dimitri -------------- next part -------------- An HTML attachment was scrubbed... URL: From nwagner at mecha.uni-stuttgart.de Mon Apr 25 09:24:29 2005 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Mon, 25 Apr 2005 15:24:29 +0200 Subject: [SciPy-user] scipy.test() failures on SuSE9.3 Message-ID: Hi all, I have installed SuSE9.3 and scipy, Numerical, f2py via cvs. scipy.test() results in 26 failures and 3 errors. LAPACK and BLAS are available via ( ~/src/blas ~/src/LAPACK ====================================================================== FAIL: check_syevr_vrange_mid (scipy.lib.lapack.test_lapack.test_flapack_float) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/scipy/lib/lapack/tests/esv_tests.py", line 98, in check_syevr_vrange_mid def check_syevr_vrange_mid(self): self.check_syevr_vrange(vrange=[0,1]) File "/usr/lib/python2.4/site-packages/scipy/lib/lapack/tests/esv_tests.py", line 91, in check_syevr_vrange assert_array_almost_equal(w,ew) File "/usr/lib/python2.4/site-packages/scipy_test/testing.py", line 740, in assert_array_almost_equal assert cond,\ AssertionError: Arrays are not almost equal (mismatch 100.0%): Array 1: [ 0.5] Array 2: [ 0.4876939] ---------------------------------------------------------------------- Ran 1173 tests in 2.122s FAILED (failures=26, errors=3) Python 2.4 (#1, Mar 22 2005, 21:42:42) [GCC 3.3.5 20050117 (prerelease) (SUSE Linux)] on linux2 f2py : 2.46.243_1966 Numeric : '24.0b2' Any pointer would be appreciated. Thanks in advance Nils From gpajer at rider.edu Mon Apr 25 11:53:58 2005 From: gpajer at rider.edu (Gary Pajer) Date: Mon, 25 Apr 2005 11:53:58 -0400 Subject: [SciPy-user] modified bessel fn of second kind K(n,z) In-Reply-To: <42699849.3020606@ucsd.edu> References: <20050423002839.65252.qmail@web42408.mail.yahoo.com> <42699849.3020606@ucsd.edu> Message-ID: <426D1296.8000407@rider.edu> Robert Kern wrote: > r help wrote: > >> hi >> >> i am trying to use the modified bessel function of the >> second kind, K_n(z) >> K is called the mod. bes. fn of second kind on >> mathworld; K is called the mod. bes. fn of third kind in scipy. >> >> the integer order function special.kn(-20,3) gives the >> same result on both mathematica and scipy: >> >> In [3]: special.kn(-20,3) >> Out[3]: 16254643952204.371 >> >> however the real valued special.kv(-20,3) gives >> different answers each time i call it: >> >> In [2]: special.kv(-20,3) >> Out[2]: -1.9924087524414062 >> >> In [4]: special.kv(-20,3) >> Out[4]: 166558.53135225689 >> >> In [5]: special.kv(-20,3) >> Out[5]: 166541.5313522513 > > > [etc] > > On a Mac: > > In [1]:special.kv(-20,3) > Out[1]:-1.990829468774475 > > In [2]:special.kv(-20,3) > Out[2]:9.3170894640213688e-309 > > In [3]:special.kv(-20,3) > Out[3]:9.3170894640213688e-309 > > Hmmm. Something fishy's going on here. > Yet In [29]: scipy.special.kv(-20,3.) Out[29]: 0.0 In [30]: scipy.special.kv(20,3.) Out[30]: 16254643952204.338 Notice that the 3. is a float . The behavior is stable when the second argument is a float. It doesn't seem to like negative orders and integer arguments in the second slot. From agn at soc.soton.ac.uk Tue Apr 26 09:19:43 2005 From: agn at soc.soton.ac.uk (George Nurser) Date: Tue, 26 Apr 2005 14:19:43 +0100 Subject: [SciPy-user] scipy, numeric, numarray, pytables/hdf5 & ?numeric3/scipy.base In-Reply-To: <4268D9EA.60309@ee.byu.edu> References: <4268475A.6020803@haas.berkeley.edu> <1114130503.426848471de1d@webmail.colorado.edu> <89f3084c0a6f6705488057af7d9b987e@cwazy.co.uk> <4268D9EA.60309@ee.byu.edu> Message-ID: <2dc917993aab8a3a89a9409434be3494@soc.soton.ac.uk> I'm interested in using scipy and probably matplotlib to analyse and plot data from a large-scale ocean model whose data are held in hdf5 format. The most obvious way to read (and write) data to hdf5 would seem to be through the pytables package. From my (admittedly cursory) reading it seems like pytables works with numarray rather than numeric. Again, I may have misunderstood, but I gather that scipy is incompatible with numarray but uses numeric. If this is indeed a problem, is it likely to be solved by the development of numeric3/scipy.base? George Nurser. From rkern at ucsd.edu Tue Apr 26 09:24:07 2005 From: rkern at ucsd.edu (Robert Kern) Date: Tue, 26 Apr 2005 06:24:07 -0700 Subject: [SciPy-user] scipy, numeric, numarray, pytables/hdf5 & ?numeric3/scipy.base In-Reply-To: <2dc917993aab8a3a89a9409434be3494@soc.soton.ac.uk> References: <4268475A.6020803@haas.berkeley.edu> <1114130503.426848471de1d@webmail.colorado.edu> <89f3084c0a6f6705488057af7d9b987e@cwazy.co.uk> <4268D9EA.60309@ee.byu.edu> <2dc917993aab8a3a89a9409434be3494@soc.soton.ac.uk> Message-ID: <426E40F7.1010108@ucsd.edu> George Nurser wrote: > > I'm interested in using scipy and probably matplotlib to analyse and > plot data from a large-scale ocean model whose data are held in hdf5 > format. > > The most obvious way to read (and write) data to hdf5 would seem to be > through the pytables package. From my (admittedly cursory) reading it > seems like pytables works with numarray rather than numeric. It needs numarray internally, but it can work with Numeric just fine. > Again, I may have misunderstood, but I gather that scipy is incompatible > with numarray but uses numeric. At the moment, yes. > If this is indeed a problem, is it likely to be solved by the > development of numeric3/scipy.base? Yes, that is the driving purpose behind this development effort. -- Robert Kern rkern at ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter From richter at hephy.oeaw.ac.at Tue Apr 26 09:36:20 2005 From: richter at hephy.oeaw.ac.at (Gerald Richter) Date: Tue, 26 Apr 2005 15:36:20 +0200 Subject: [SciPy-user] scipy, numeric, numarray, pytables/hdf5 & ?numeric3/scipy.base In-Reply-To: <2dc917993aab8a3a89a9409434be3494@soc.soton.ac.uk> References: <4268475A.6020803@haas.berkeley.edu> <1114130503.426848471de1d@webmail.colorado.edu> <89f3084c0a6f6705488057af7d9b987e@cwazy.co.uk> <4268D9EA.60309@ee.byu.edu> <2dc917993aab8a3a89a9409434be3494@soc.soton.ac.uk> Message-ID: <20050426133620.GA23837@uroboros.hephy.oeaw.ac.at> Hi George! The interface of pytables does, at least in the specs, define the possibility to read the data, yielding the format-flavour numeric, as well as numarray and the basic python lists. Out of no known reason, I up until now have failed to get numeric arrays, but a simple workarround-method can convert lists to numeric types on the fly, so this is nothing to worry about. IMHO this is no de facto compatibility problem, but just a matter of a simple conversion. For me, and the high-energy physics data that I'm storing in hdf-files for analysis this combination works perfectly. regards, Gerald Richter. On Tue, Apr 26, 2005 at 02:19:43PM +0100, George Nurser wrote: > > I'm interested in using scipy and probably matplotlib to analyse and > plot data from a large-scale ocean model whose data are held in hdf5 > format. > > The most obvious way to read (and write) data to hdf5 would seem to be > through the pytables package. From my (admittedly cursory) reading it > seems like pytables works with numarray rather than numeric. > > Again, I may have misunderstood, but I gather that scipy is > incompatible with numarray but uses numeric. > > If this is indeed a problem, is it likely to be solved by the > development of numeric3/scipy.base? > > George Nurser. > From falted at pytables.org Tue Apr 26 11:09:53 2005 From: falted at pytables.org (Francesc Altet) Date: Tue, 26 Apr 2005 17:09:53 +0200 Subject: [SciPy-user] scipy, numeric, numarray, pytables/hdf5 & ?numeric3/scipy.base In-Reply-To: <2dc917993aab8a3a89a9409434be3494@soc.soton.ac.uk> References: <4268475A.6020803@haas.berkeley.edu> <4268D9EA.60309@ee.byu.edu> <2dc917993aab8a3a89a9409434be3494@soc.soton.ac.uk> Message-ID: <200504261709.53624.falted@pytables.org> A Dimarts 26 Abril 2005 15:19, George Nurser va escriure: > I'm interested in using scipy and probably matplotlib to analyse and > plot data from a large-scale ocean model whose data are held in hdf5 > format. > > The most obvious way to read (and write) data to hdf5 would seem to be > through the pytables package. From my (admittedly cursory) reading it > seems like pytables works with numarray rather than numeric. As Robert said, PyTables works internally with numarray, but supports Numeric by doing conversions. However the numarray --> Numeric (i.e. for reading operations with Numeric flavor) conversions implies a memory copy right now. Hopefully, this will be fixed sometime in the future, with the advent of Numeric 24.0 or scipy.base. Nevertheless, with the latest releases (those available in http://www.carabos.com/downloads/pytables/snapshots/), I've included a patch (based on a suggestion of Todd Miller) to optimize this conversion, and with that, someone has reported the next input speeds: """ On the SGI Altix with a Raid 5 disk array, up to 350 mb/s (using Numeric). With numarrays, I can approach 900 mb/s. BTW, got a decent speed up on my Mac OS X machine as well, close to 50x. """ So, I think you can use PyTables with Numeric and still expect a decent performance. Cheers, -- Francesc Altet From falted at pytables.org Tue Apr 26 11:13:41 2005 From: falted at pytables.org (Francesc Altet) Date: Tue, 26 Apr 2005 17:13:41 +0200 Subject: [SciPy-user] scipy, numeric, numarray, pytables/hdf5 & ?numeric3/scipy.base In-Reply-To: <20050426133620.GA23837@uroboros.hephy.oeaw.ac.at> References: <4268475A.6020803@haas.berkeley.edu> <2dc917993aab8a3a89a9409434be3494@soc.soton.ac.uk> <20050426133620.GA23837@uroboros.hephy.oeaw.ac.at> Message-ID: <200504261713.41132.falted@pytables.org> A Dimarts 26 Abril 2005 15:36, Gerald Richter va escriure: > Out of no known reason, I up until now have failed to get numeric arrays, > but a simple workarround-method can convert lists to numeric types on the > fly, so this is nothing to worry about. That's weird... I've implemented a test suite for Numeric in PyTables that checks that and never gave problems. If you are willing to send me a small script exposing the problem I'll look into this. Cheers, -- Francesc Altet From elcorto at gmx.net Tue Apr 26 11:31:48 2005 From: elcorto at gmx.net (steve schmerler) Date: Tue, 26 Apr 2005 17:31:48 +0200 Subject: [SciPy-user] Replacing elements in matrix In-Reply-To: <200504250919.j3P9Jiaq027386@outmx026.isp.belgacom.be> References: <200504250919.j3P9Jiaq027386@outmx026.isp.belgacom.be> Message-ID: <426E5EE4.2020909@gmx.net> Dimitri D'Or wrote: > Hello, > > I come from the Matlab world and I'm used to write operations such as: > A[indexi,indexj]=A[indexi,indexj]+B > where A is a n by n matrix, indexi is i by 1 vector, indexj is a j by 1 > vector and B is a i by j matrix. > > With this operation, some of the elements of A are replaced by their > original value augmented by some value coming from B. > > for example, take > > A=array([[1,5,7,8,2],[5,3,4,6,7],[9,4,6,7,2],[0,2,0,3,4]]) > indexi=array([0,2]) > indexj=array([1,2,4]) > B=array([[10,20,30],[100,200,300]]) > > With this, Matlab results would be > A[indexi,indexj]=array([[5, 7, 2],[4, 6, 2]]) > and > A[indexi,indexj]=A[indexi,indexj]+B yields > A=array([[1,15,27,8,32],[5,3,4,6,7],[9,104,206,7,302],[0,2,0,3,4]]) > > I would like to make the same operation with Python. Would you please > propose me a compact code for achieving that? > Hmm, I'm affraid this isn't straightforward. To select arbitrary rows and cols from A you can use Numeric's take() In [10]: take(take(A,(0,2),axis=0),(1,2,4),axis=1) Out[10]: array([[5, 7, 2], [4, 6, 2]]) but any operation on the selected submatrix won't alter A. With slicing, e.g. select the upper 2x2 block In [14]: A[0:2,0:2] Out[14]: array([[1, 5], [5, 3]]) you also can't alter A by performing some operation on the subblock, e.g. A[0:2,0:2]*100 doesn't change A. Btw, I don't know how to select _arbitrary_ rows and cols with slicing (hints?). Try to play arround with Numeric's take(), put() (or putmask()) functions. Sry but I don't have any cool elegant idea at the moment. Cheers, Steve -- Man is the best computer we can put aboard a spacecraft ... and the only one that can be mass produced with unskilled labor. - Wernher von Braun From gpajer at rider.edu Tue Apr 26 12:47:13 2005 From: gpajer at rider.edu (Gary Pajer) Date: Tue, 26 Apr 2005 12:47:13 -0400 Subject: [SciPy-user] pyvtk ? Message-ID: <426E7091.6050607@rider.edu> Pearu, et al, I have been looking at MayaVi, and I want to explore further. pyvtk is suggested (and Pearu's name is attached to it) but ... http://cens.ioc.ee/projects/pyvtk/ has been unresponsive for a few days. Is this a server problem, or has it moved? Or has it been withdrawn? More generally, is MayaVi / pyvtk a recommended or practical way to interactively visualize 3d data sets? By 3d I mean functions of two variables... surface plots. Any other suggestions? Regards, Gary Pajer From stephen.walton at csun.edu Tue Apr 26 13:15:56 2005 From: stephen.walton at csun.edu (Stephen Walton) Date: Tue, 26 Apr 2005 10:15:56 -0700 Subject: [SciPy-user] Replacing elements in matrix In-Reply-To: <200504250919.j3P9Jiaq027386@outmx026.isp.belgacom.be> References: <200504250919.j3P9Jiaq027386@outmx026.isp.belgacom.be> Message-ID: <426E774C.50207@csun.edu> Dimitri D'Or wrote: > Hello, > > I come from the Matlab world and I'm used to write operations such as: > A[indexi,indexj]=A[indexi,indexj]+B > where A is a n by n matrix, indexi is i by 1 vector, indexj is a j by > 1 vector and B is a i by j matrix. > Novice alert here, but I think I can partially answer this one. The key idea is that Numeric and numarray indexing require indexi and indexj to have the same number of elements. A[indexi,indexj] then returns an array containing A[indexi[0],indexj[0]],A[indexi[1],indexj[1]],...]. This is if indexi and indexj are rank 1 arrays. The indexing takes a "hint" from the shape of indexi and indexj and returns the same shape output (that's the best way I've been able to put it). A=array([[1,5,7,8,2],[5,3,4,6,7],[9,4,6,7,2],[0,2,0,3,4]]) indexi=array([0,2]) indexj=array([1,2,4]) B=array([[10,20,30],[100,200,300]]) The definitions of indexi and indexj should actually be: indexi=array([[0,0,0],[2,2,2]]) indexj=array([[1,2,4],[1,2,4]]) With this change A[indexi,indexj]=A[indexi,indexj]+B does work. Notice that becase indexi.shape and indexj.shape are both (2,3), the output A[indexi,indexj] has shape (2,3). If they both had shape (6,), then A[indexi,indexj] would also have shape (6,). From elcorto at gmx.net Tue Apr 26 13:31:09 2005 From: elcorto at gmx.net (steve schmerler) Date: Tue, 26 Apr 2005 19:31:09 +0200 Subject: [SciPy-user] Replacing elements in matrix In-Reply-To: <426E774C.50207@csun.edu> References: <200504250919.j3P9Jiaq027386@outmx026.isp.belgacom.be> <426E774C.50207@csun.edu> Message-ID: <426E7ADD.8090802@gmx.net> Hi I tried your example A=array([[1,5,7,8,2],[5,3,4,6,7],[9,4,6,7,2],[0,2,0,3,4]]) indexi=array([[0,0,0],[2,2,2]]) indexj=array([[1,2,4],[1,2,4]]) but get In [8]: A[indexi,indexj] --------------------------------------------------------------------------- IndexError Traceback (most recent call last) C:\Dokumente und Einstellungen\user\Eigene Dateien\ IndexError: each subindex must be either a slice, an integer, Ellipsis, or NewAxis Am I missing something here?? Cheers, Steve Stephen Walton wrote: > Dimitri D'Or wrote: > >> Hello, >> I come from the Matlab world and I'm used to write operations such as: >> A[indexi,indexj]=A[indexi,indexj]+B where A is a n by n matrix, indexi >> is i by 1 vector, indexj is a j by 1 vector and B is a i by j matrix. > > > Novice alert here, but I think I can partially answer this one. The key > idea is that Numeric and numarray indexing require indexi and indexj to > have the same number of elements. A[indexi,indexj] then returns an > array containing A[indexi[0],indexj[0]],A[indexi[1],indexj[1]],...]. > This is if indexi and indexj are rank 1 arrays. The indexing takes a > "hint" from the shape of indexi and indexj and returns the same shape > output (that's the best way I've been able to put it). > > A=array([[1,5,7,8,2],[5,3,4,6,7],[9,4,6,7,2],[0,2,0,3,4]]) > indexi=array([0,2]) indexj=array([1,2,4]) > B=array([[10,20,30],[100,200,300]]) > > The definitions of indexi and indexj should actually be: > > indexi=array([[0,0,0],[2,2,2]]) > indexj=array([[1,2,4],[1,2,4]]) > > With this change > > A[indexi,indexj]=A[indexi,indexj]+B > > does work. Notice that becase indexi.shape and indexj.shape are both > (2,3), the output A[indexi,indexj] has shape (2,3). If they both had > shape (6,), then A[indexi,indexj] would also have shape (6,). > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > > -- Man is the best computer we can put aboard a spacecraft ... and the only one that can be mass produced with unskilled labor. - Wernher von Braun From cookedm at physics.mcmaster.ca Tue Apr 26 13:42:11 2005 From: cookedm at physics.mcmaster.ca (David M. Cooke) Date: Tue, 26 Apr 2005 13:42:11 -0400 Subject: [SciPy-user] Replacing elements in matrix In-Reply-To: <426E5EE4.2020909@gmx.net> (steve schmerler's message of "Tue, 26 Apr 2005 17:31:48 +0200") References: <200504250919.j3P9Jiaq027386@outmx026.isp.belgacom.be> <426E5EE4.2020909@gmx.net> Message-ID: steve schmerler writes: > Dimitri D'Or wrote: >> Hello, I come from the Matlab world and I'm used to write >> operations such as: A[indexi,indexj]=A[indexi,indexj]+B where A is a >> n by n matrix, indexi is i by 1 vector, indexj is a j by 1 vector >> and B is a i by j matrix. With this operation, some of the elements >> of A are replaced by their original value augmented by some value >> coming from B. for example, take >> A=array([[1,5,7,8,2],[5,3,4,6,7],[9,4,6,7,2],[0,2,0,3,4]]) >> indexi=array([0,2]) indexj=array([1,2,4]) >> B=array([[10,20,30],[100,200,300]]) With this, Matlab results would >> be A[indexi,indexj]=array([[5, 7, 2],[4, 6, 2]]) and >> A[indexi,indexj]=A[indexi,indexj]+B yields >> A=array([[1,15,27,8,32],[5,3,4,6,7],[9,104,206,7,302],[0,2,0,3,4]]) >> I would like to make the same operation with Python. Would you >> please propose me a compact code for achieving that? > > Hmm, I'm affraid this isn't straightforward. To select arbitrary rows and cols from A you can use > Numeric's take() > > In [10]: take(take(A,(0,2),axis=0),(1,2,4),axis=1) > Out[10]: > array([[5, 7, 2], > [4, 6, 2]]) > > but any operation on the selected submatrix won't alter A. > With slicing, e.g. select the upper 2x2 block > > In [14]: A[0:2,0:2] > Out[14]: > array([[1, 5], > [5, 3]]) > > you also can't alter A by performing some operation on the subblock, e.g. eh? No, a slice is a view of the matrix, so it also operates on the original matrix. > A[0:2,0:2]*100 > > doesn't change A. Of course, that doesn't change an array at all (you'll get a new 2x2 matrix). This will: A[0:2,0:2] *= 100 That'll change the submatrix A[0:2,0:2], and A. > Btw, I don't know how to select _arbitrary_ rows and cols with slicing (hints?). You mean, say, the i'th row? That's A[i]. If you need an arbitrary selection of rows, you're out of luck as far as making one matrix that's a view of A (but you can make a copy as you did above with take()). -- |>|\/|< /--------------------------------------------------------------------------\ |David M. Cooke http://arbutus.physics.mcmaster.ca/dmc/ |cookedm at physics.mcmaster.ca From zunzun at zunzun.com Tue Apr 26 13:42:09 2005 From: zunzun at zunzun.com (zunzun at zunzun.com) Date: Tue, 26 Apr 2005 13:42:09 -0400 Subject: [SciPy-user] pyvtk ? In-Reply-To: <426E7091.6050607@rider.edu> References: <426E7091.6050607@rider.edu> Message-ID: <20050426174209.GA318@localhost.members.linode.com> On Tue, Apr 26, 2005 at 12:47:13PM -0400, Gary Pajer wrote: > More generally, is MayaVi / pyvtk a recommended or practical way to > interactively visualize 3d data sets? By 3d I mean functions of two > variables... surface plots. Any other suggestions? I use both DISLIN and python VTK (for VRML output) on my curve and surface fitting web site, http://zunzun.com - they seem to complement each other for my needs. James Phillips http://zunzun.com From stephen.walton at csun.edu Tue Apr 26 13:44:59 2005 From: stephen.walton at csun.edu (Stephen Walton) Date: Tue, 26 Apr 2005 10:44:59 -0700 Subject: [SciPy-user] Replacing elements in matrix In-Reply-To: <426E7ADD.8090802@gmx.net> References: <200504250919.j3P9Jiaq027386@outmx026.isp.belgacom.be> <426E774C.50207@csun.edu> <426E7ADD.8090802@gmx.net> Message-ID: <426E7E1B.3020503@csun.edu> steve schmerler wrote: > I tried your example ...but get > > In [8]: A[indexi,indexj] > --------------------------------------------------------------------------- > > IndexError Traceback (most recent call > last) I guess I should have pointed out that what I did only works in numarray. Sorry about that. The original reply was correct: awkward games with get and put will be needed in Numeric. From elcorto at gmx.net Tue Apr 26 14:07:34 2005 From: elcorto at gmx.net (steve schmerler) Date: Tue, 26 Apr 2005 20:07:34 +0200 Subject: [SciPy-user] Replacing elements in matrix In-Reply-To: References: <200504250919.j3P9Jiaq027386@outmx026.isp.belgacom.be> <426E5EE4.2020909@gmx.net> Message-ID: <426E8366.2070607@gmx.net> David M. Cooke wrote: > steve schmerler writes: > > >>Dimitri D'Or wrote: >> >>>Hello, I come from the Matlab world and I'm used to write >>>operations such as: A[indexi,indexj]=A[indexi,indexj]+B where A is a >>>n by n matrix, indexi is i by 1 vector, indexj is a j by 1 vector >>>and B is a i by j matrix. With this operation, some of the elements >>>of A are replaced by their original value augmented by some value >>>coming from B. for example, take >>>A=array([[1,5,7,8,2],[5,3,4,6,7],[9,4,6,7,2],[0,2,0,3,4]]) >>>indexi=array([0,2]) indexj=array([1,2,4]) >>>B=array([[10,20,30],[100,200,300]]) With this, Matlab results would >>>be A[indexi,indexj]=array([[5, 7, 2],[4, 6, 2]]) and >>>A[indexi,indexj]=A[indexi,indexj]+B yields >>>A=array([[1,15,27,8,32],[5,3,4,6,7],[9,104,206,7,302],[0,2,0,3,4]]) >>>I would like to make the same operation with Python. Would you >>>please propose me a compact code for achieving that? >> >>Hmm, I'm affraid this isn't straightforward. To select arbitrary rows and cols from A you can use >>Numeric's take() >> >> In [10]: take(take(A,(0,2),axis=0),(1,2,4),axis=1) >> Out[10]: >> array([[5, 7, 2], >> [4, 6, 2]]) >> >>but any operation on the selected submatrix won't alter A. > > >>With slicing, e.g. select the upper 2x2 block >> >> In [14]: A[0:2,0:2] >> Out[14]: >> array([[1, 5], >> [5, 3]]) >> >>you also can't alter A by performing some operation on the subblock, e.g. > > > eh? No, a slice is a view of the matrix, so it also operates on the > original matrix. > > >> A[0:2,0:2]*100 >> >>doesn't change A. > > > Of course, that doesn't change an array at all (you'll get a new 2x2 > matrix). This will: > > A[0:2,0:2] *= 100 > > That'll change the submatrix A[0:2,0:2], and A. > Sorry, of course you're right :) > >>Btw, I don't know how to select _arbitrary_ rows and cols with slicing (hints?). > > > You mean, say, the i'th row? That's A[i]. Sure. > If you need an arbitrary > selection of rows, you're out of luck as far as making one matrix > that's a view of A (but you can make a copy as you did above with take()). > Playing arround with take and put would do it but I don't see a simple MATLAB-like solution with slicing, though. Cheers, Steve -- Man is the best computer we can put aboard a spacecraft ... and the only one that can be mass produced with unskilled labor. - Wernher von Braun From prabhu_r at users.sf.net Tue Apr 26 22:45:16 2005 From: prabhu_r at users.sf.net (Prabhu Ramachandran) Date: Wed, 27 Apr 2005 08:15:16 +0530 Subject: [SciPy-user] pyvtk ? In-Reply-To: <426E7091.6050607@rider.edu> References: <426E7091.6050607@rider.edu> Message-ID: <17006.64700.195101.964944@monster.linux.in> >>>>> "Gary" == Gary Pajer writes: Gary> More generally, is MayaVi / pyvtk a recommended or practical Gary> way to interactively visualize 3d data sets? By 3d I mean Gary> functions of two variables... surface plots. Any other Gary> suggestions? The following url might be useful if you just need surface plots. You won't need pyvtk. http://mayavi.sourceforge.net/docs/guide/x975.html#TOOLS For more complex stuff pyvtk will be handy. cheers, prabhu From gpajer at rider.edu Wed Apr 27 12:05:40 2005 From: gpajer at rider.edu (Gary Pajer) Date: Wed, 27 Apr 2005 12:05:40 -0400 Subject: [SciPy-user] pyvtk ? In-Reply-To: <17006.64700.195101.964944@monster.linux.in> References: <426E7091.6050607@rider.edu> <17006.64700.195101.964944@monster.linux.in> Message-ID: <426FB854.1040708@rider.edu> Prabhu Ramachandran wrote: >>>>>>"Gary" == Gary Pajer writes: >>>>>> >>>>>> > > Gary> More generally, is MayaVi / pyvtk a recommended or practical > Gary> way to interactively visualize 3d data sets? By 3d I mean > Gary> functions of two variables... surface plots. Any other > Gary> suggestions? > >The following url might be useful if you just need surface plots. You >won't need pyvtk. > > http://mayavi.sourceforge.net/docs/guide/x975.html#TOOLS > > Fabulous. Exactly what I was going to invent. I missed it in the docs, tucked there underneath ivtk. That's probably all I need, but I am curious about pyvtk. >For more complex stuff pyvtk will be handy. > >cheers, >prabhu > >_______________________________________________ >SciPy-user mailing list >SciPy-user at scipy.net >http://www.scipy.net/mailman/listinfo/scipy-user > > > From prabhu_r at users.sf.net Wed Apr 27 13:38:08 2005 From: prabhu_r at users.sf.net (Prabhu Ramachandran) Date: Wed, 27 Apr 2005 23:08:08 +0530 Subject: [SciPy-user] pyvtk ? In-Reply-To: <426FB854.1040708@rider.edu> References: <426E7091.6050607@rider.edu> <17006.64700.195101.964944@monster.linux.in> <426FB854.1040708@rider.edu> Message-ID: <17007.52736.726035.986626@monster.linux.in> >>>>> "Gary" == Gary Pajer writes: >> http://mayavi.sourceforge.net/docs/guide/x975.html#TOOLS Gary> Fabulous. Exactly what I was going to invent. I missed it Gary> in the docs, tucked there underneath ivtk. That's probably Gary> all I need, but I am curious about pyvtk. There are also some other goodies that are part of the latest Enthought test release of their Enhanced Python Distro (Enthon). http://download.enthought.com/enthought_python-2.3.5-1069.exe Its available as the enthought.tvtk.tools.mlab package. If you have it installed you can take a peek at some of the examples included in the end of the file. This code will hopefully be released in a more accessible fashion after the end of next month. cheers, prabhu From oliphant at ee.byu.edu Wed Apr 27 14:51:02 2005 From: oliphant at ee.byu.edu (Travis Oliphant) Date: Wed, 27 Apr 2005 12:51:02 -0600 Subject: [SciPy-user] Re: SciPy-- convincing my lab to switch to SciPy/Python In-Reply-To: <426EF78E.1010205@u.washington.edu> References: <426EF78E.1010205@u.washington.edu> Message-ID: <426FDF16.2030801@ee.byu.edu> Josh Tasman wrote: > Python seems like a good choice for our lab, as it's relatively easy > for novice programmers to work with (vs C++ or perl.) More > importantly, it has a large community behind it. > > Specifically, I need to convince my lab (and myself) that Python/SciPy > is a robust replacement for Matlab. Primarily, I need more info > regarding the reliability of numeric computation. Programs like > Matlab and Mathematica go through rigorous mathematical testing. > What's the state of > SciPy in this regard? Would you stand behind it for > publication-quality work? The reliability of SciPy is somewhat mixed. Most of the actual algorithms are based on FORTRAN code that has been around for literally decades and are quite reliable. On the other hand, you may still find bugs in some of the less well-tested and not-as-often-used routines. Most of the time, these bugs are small easy-to-fix Python-interface bugs. Many people use and rely on the numerical algorithms in scipy everyday. Enthought uses scipy to deliver numerical products to their clients. Several researchers use scipy in their publishable work. Many scientists at the national labs (Argonne, Livermore, Sandia, etc.) all use Python for numerical work. I would absolutely stand by SciPy for publication-quality work. I've published using SciPy. I think it's preferrable to proprietary solutions for publications, because it actually allows someone to reproduce your work and even inspect the code used to produce your work. So it is more in keeping with the academic philosophy. > > How would you compare SciPy's signal processing tools vs. Matlab's? > SciPy has quite a few of the tools that Matlab has (but not everything, yet), and adding your own is not difficult. I've found it much easier, for example, to add a tool to scipy then to go back to MATLAB for data processing. Wavelets are missing (but there is interest here and some people are working on it). Look at the docs at http://www.scipy.org/livedocs/ for an overview. If there is something you need that is missing, speak up, maybe somebody can contribute it. -Travis O. P.S. Scipy-Numeric is going through some changes that should be in place in a couple of months. My suggestion is to start using scipy and then make the push to your people in a few months. From nwagner at mecha.uni-stuttgart.de Wed Apr 27 15:05:17 2005 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Wed, 27 Apr 2005 21:05:17 +0200 Subject: [SciPy-user] Re: SciPy-- convincing my lab to switch to SciPy/Python In-Reply-To: <426FDF16.2030801@ee.byu.edu> References: <426EF78E.1010205@u.washington.edu> <426FDF16.2030801@ee.byu.edu> Message-ID: On Wed, 27 Apr 2005 12:51:02 -0600 Travis Oliphant wrote: > Josh Tasman wrote: > >> Python seems like a good choice for our lab, as it's >>relatively easy >> for novice programmers to work with (vs C++ or perl.) >> More >> importantly, it has a large community behind it. >> >> Specifically, I need to convince my lab (and myself) >>that Python/SciPy >> is a robust replacement for Matlab. Primarily, I need >>more info >> regarding the reliability of numeric computation. >> Programs like >> Matlab and Mathematica go through rigorous mathematical >>testing. >> What's the state of > >> SciPy in this regard? Would you stand behind it for >> publication-quality work? > > > The reliability of SciPy is somewhat mixed. Most of >the actual algorithms are based on FORTRAN code that has >been around for literally decades and are quite reliable. > On the other hand, you may still find bugs in some of >the less well-tested and not-as-often-used routines. > Most of the time, these bugs are small easy-to-fix >Python-interface bugs. > > Many people use and rely on the numerical algorithms in >scipy everyday. Enthought uses scipy to deliver >numerical products to their clients. Several researchers >use scipy in their publishable work. Many scientists at >the national labs (Argonne, Livermore, Sandia, etc.) all >use Python for numerical work. > > I would absolutely stand by SciPy for >publication-quality work. I've published using SciPy. > I think it's preferrable to proprietary solutions for >publications, because it actually allows someone to >reproduce your work and even inspect the code used to >produce your work. So it is more in keeping with the >academic philosophy. > >> >> How would you compare SciPy's signal processing tools >>vs. Matlab's? >> > SciPy has quite a few of the tools that Matlab has (but >not everything, yet), and adding your own is not >difficult. I've found it much easier, for example, to >add a tool to scipy then to go back to MATLAB for data >processing. > > Wavelets are missing (but there is interest here and >some people are working on it). > > Look at the docs at http://www.scipy.org/livedocs/ for >an overview. > > If there is something you need that is missing, speak >up, maybe somebody can contribute it. > Support for matrix equations (Sylvester, Riccati, Stein, Lyapunov etc) would be nice. Also sparse eigensolvers might be useful. Nils > -Travis O. > > > P.S. > > Scipy-Numeric is going through some changes that should >be in place in a couple of months. My suggestion is to >start using scipy and then make the push to your people >in a few months. > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From favilac at cosmos.astro.uson.mx Fri Apr 29 20:15:52 2005 From: favilac at cosmos.astro.uson.mx (Fernando Avila Castro) Date: Fri, 29 Apr 2005 17:15:52 -0700 (MST) Subject: [SciPy-user] problem with plt.plot Message-ID: Hi, i have installed the Scipy packages on Scientific Linux 4 (derived from RHEL 4) with the ATLAS libs, gnuplot.py and wxPython. It rans the test ok, and I can make plots using gplt. The problem is with plt. I can't even run the examples on the plotting tutorial: Python 2.3.4 (#1, Feb 18 2005, 12:15:38) [GCC 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from scipy import * >>> import gui_thread >>> gui_thread.start() Traceback (most recent call last): File "", line 1, in ? File "/usr/lib/python2.3/site-packages/gui_thread/__init__.py", line 73, in start wxPython_thread() File "/usr/lib/python2.3/site-packages/gui_thread/wxPython_thread.py", line 160, in wxPython_thread sys.modules[name] = wrap_extmodule(module,call_holder) File "/usr/lib/python2.3/site-packages/gui_thread/wxPython_thread.py", line 61, in wrap_extmodule raise NotImplementedError,`t` NotImplementedError: >>> gui_thread.wxPython_thread() Traceback (most recent call last): File "", line 1, in ? File "/usr/lib/python2.3/site-packages/gui_thread/wxPython_thread.py", line 156, in wxPython_thread for name in get_extmodules(pexec): File "/usr/lib/python2.3/site-packages/gui_thread/wxPython_thread.py", line 25, in get_extmodules _do_import(pexec) File "/usr/lib/python2.3/site-packages/gui_thread/wxPython_thread.py", line 104, in _do_import assert not sys.modules.has_key('wx'), \ AssertionError: wx is already imported, cannot proceed Any hints on how to solve this? From pearu at scipy.org Sat Apr 30 02:53:10 2005 From: pearu at scipy.org (Pearu Peterson) Date: Sat, 30 Apr 2005 01:53:10 -0500 (CDT) Subject: [SciPy-user] problem with plt.plot In-Reply-To: References: Message-ID: On Fri, 29 Apr 2005, Fernando Avila Castro wrote: > > Hi, i have installed the Scipy packages on Scientific Linux 4 > (derived from RHEL 4) with the ATLAS libs, gnuplot.py and wxPython. > It rans the test ok, and I can make plots using gplt. The problem is > with plt. I can't even run the examples on the plotting tutorial: > > > > Python 2.3.4 (#1, Feb 18 2005, 12:15:38) > [GCC 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. >>>> from scipy import * >>>> import gui_thread >>>> gui_thread.start() > Traceback (most recent call last): > File "", line 1, in ? > File "/usr/lib/python2.3/site-packages/gui_thread/__init__.py", line 73, in > start > wxPython_thread() > File "/usr/lib/python2.3/site-packages/gui_thread/wxPython_thread.py", line > 160, in wxPython_thread > sys.modules[name] = wrap_extmodule(module,call_holder) > File "/usr/lib/python2.3/site-packages/gui_thread/wxPython_thread.py", line > 61, in wrap_extmodule > raise NotImplementedError,`t` > NotImplementedError: >>>> gui_thread.wxPython_thread() > Traceback (most recent call last): > File "", line 1, in ? > File "/usr/lib/python2.3/site-packages/gui_thread/wxPython_thread.py", line > 156, in wxPython_thread > for name in get_extmodules(pexec): > File "/usr/lib/python2.3/site-packages/gui_thread/wxPython_thread.py", line > 25, in get_extmodules > _do_import(pexec) > File "/usr/lib/python2.3/site-packages/gui_thread/wxPython_thread.py", line > 104, in _do_import > assert not sys.modules.has_key('wx'), \ > AssertionError: wx is already imported, cannot proceed > > > Any hints on how to solve this? First import and start gui_thread and then import scipy: >>>> import gui_thread >>>> gui_thread.start() >>>> from scipy import * HTH, Pearu