From oliphant at ee.byu.edu Thu Jul 1 01:30:53 2004 From: oliphant at ee.byu.edu (Travis Oliphant) Date: Wed, 30 Jun 2004 23:30:53 -0600 Subject: [SciPy-user] Help with FFT code In-Reply-To: <20040701034741.39160.qmail@web13807.mail.yahoo.com> References: <20040701034741.39160.qmail@web13807.mail.yahoo.com> Message-ID: <40E3A18D.9000100@ee.byu.edu> Aaron Williams wrote: > Hi > > I am a new user of python and scipy. I am trying to write a code that > Fast Fourier Transforms 2-D arrays saved as binary FORTRAN files. > I would like for my code to also create an output file containing the > certain statistics about the imported data set. What format would you like this output file to be in? Raw binary, text file, importable Python module, matlab .mat file? There are lots of options here. The answer usually depends on what you are going to do with the saved data. If you will be sticking with using the data in Python later I would recommend io.save(name, dict) > > First I am having a problem calling my program from the command line. > When I run the code with Python shell IDLE nothing happens. Probably due to the raw_input command. This usually reads from standard input. Just run your program from the prompt, for example: python myprogram.py > Second I was wondering how to create an output file in my code. > > Here is an example of my code. > ################################# > # FFT converter > #!/usr/bin/python > /from scipy import * > / > /io.array_import > / (not sure what you are trying to do here?) > #open Fortran Binary array > x = raw_input("enter in file path, i.e. 'path' else enter 'No'") > if x == No: should have quotes around No if x=="No": > print "no data file enter end of program" > else: > /fid=io.fopen(x,'r','n') > / default is 'n' so fid=io.fopen(x,'r') should do > /z1=fid.fort_read(256,dtype='f') > /#data array is brought in as 1D array needs to be 2D > /zcl=reshape(z1,(256,256)) > zcl2=fftpack.fft2(zcl) > zcl3=fftpack.fftshift(zcl2) > zcl4=zcl3*conjugate(zlc3) > /#power spectrum > /zcl5=zcl4.real/ fft2 and fftshift can be accessed from scipy name space zcl3 = fftshift(fft2(zcl)) zcl5 = real(zcl3*conj(zcl3)) > #xplt.imagesc(zcl5) > #xplt.imagesc(zcl) should work > #Ask for the name of plot > q=raw_input("Enter name of transformed File") > /xplt.imagesc(log(zcl5))/ > xplt.eps(q) > s=raw_input("Enter Name of Original") > /xplt.imagesc(zcl)/ > xplt.eps(s) > > ##################################### > > I have been able to enter the italicized parts into the command > individually, but this not efficient for as many transforms I need to do. Again, it looks like the trouble might be the way raw_input is interacting with IDLE. To save data for later use in Python use io.save("mydata", {'varname1':vardata1, 'vardata2':vardata2}) Later import mydata will give you mydata.varname1 and mydata.varname2 Or you can use io.write_arrray to write a text file or fid.fwrite for low-level binary data writing (not usually recommended). -Travis O. From karthik at james.hut.fi Thu Jul 1 01:54:42 2004 From: karthik at james.hut.fi (Karthikesh Raju) Date: Thu, 1 Jul 2004 08:54:42 +0300 Subject: [SciPy-user] Help with FFT code In-Reply-To: <40E3A18D.9000100@ee.byu.edu> References: <20040701034741.39160.qmail@web13807.mail.yahoo.com> <40E3A18D.9000100@ee.byu.edu> Message-ID: Hi All, Regarding the saving and loading data part of this question, i was faced with the dilema of shifting data between python and matlab. i have written a small module dataloader.py (the latest version of which is at http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/286171 ) dumpData takes a dictionary of variables and makes separate dat files in ascii format and saves them in these files. When all the keys are traversed, it compresses all the files into an archive. loadData does the reverse, it loads the data from a file to a dictionary. i also have the equivalent matlab routines loadData.m - when paseed a tar.gz file, it extracts the variable name and loads it in the workspace dumpData.m - when passed with variables in the workspace, it writes them in ascii files and compresess them. The both work quite well. Side note: please let me know of methods to improve the python module. Warm regards karthik ----------------------------------------------------------------------- Karthikesh Raju, email: karthik at james.hut.fi Researcher, http://www.cis.hut.fi/karthik Helsinki University of Technology, Tel: +358-9-451 5389 Laboratory of Comp. & Info. Sc., Fax: +358-9-451 3277 Department of Computer Sc., P.O Box 5400, FIN 02015 HUT, Espoo, FINLAND ----------------------------------------------------------------------- On Wed, 30 Jun 2004, Travis Oliphant wrote: > Aaron Williams wrote: > > > Hi > > > > I am a new user of python and scipy. I am trying to write a code that > > Fast Fourier Transforms 2-D arrays saved as binary FORTRAN files. > > I would like for my code to also create an output file containing the > > certain statistics about the imported data set. > > What format would you like this output file to be in? Raw binary, text > file, importable Python module, matlab .mat file? There are lots of > options here. The answer usually depends on what you are going to do > with the saved data. > > If you will be sticking with using the data in Python later I would > recommend io.save(name, dict) > > > > > > First I am having a problem calling my program from the command line. > > When I run the code with Python shell IDLE nothing happens. > > Probably due to the raw_input command. This usually reads from standard > input. > > Just run your program from the prompt, for example: > > python myprogram.py > > > > Second I was wondering how to create an output file in my code. > > > > Here is an example of my code. > > ################################# > > # FFT converter > > #!/usr/bin/python > > /from scipy import * > > / > > > /io.array_import > > / > > (not sure what you are trying to do here?) > > > #open Fortran Binary array > > x = raw_input("enter in file path, i.e. 'path' else enter 'No'") > > if x == No: > > should have quotes around No > if x=="No": > > > print "no data file enter end of program" > > else: > > /fid=io.fopen(x,'r','n') > > / > > default is 'n' so fid=io.fopen(x,'r') should do > > > > /z1=fid.fort_read(256,dtype='f') > > /#data array is brought in as 1D array needs to be 2D > > /zcl=reshape(z1,(256,256)) > > zcl2=fftpack.fft2(zcl) > > zcl3=fftpack.fftshift(zcl2) > > zcl4=zcl3*conjugate(zlc3) > > /#power spectrum > > /zcl5=zcl4.real/ > > fft2 and fftshift can be accessed from scipy name space > > zcl3 = fftshift(fft2(zcl)) > zcl5 = real(zcl3*conj(zcl3)) > > > #xplt.imagesc(zcl5) > > #xplt.imagesc(zcl) > > should work > > > #Ask for the name of plot > > q=raw_input("Enter name of transformed File") > > /xplt.imagesc(log(zcl5))/ > > xplt.eps(q) > > s=raw_input("Enter Name of Original") > > /xplt.imagesc(zcl)/ > > xplt.eps(s) > > > > ##################################### > > > > I have been able to enter the italicized parts into the command > > individually, but this not efficient for as many transforms I need to do. > > > Again, it looks like the trouble might be the way raw_input is > interacting with IDLE. > > To save data for later use in Python use > > io.save("mydata", {'varname1':vardata1, 'vardata2':vardata2}) > > Later > > import mydata > > will give you mydata.varname1 and mydata.varname2 > > Or you can use > > io.write_arrray to write a text file > > or > > fid.fwrite for low-level binary data writing (not usually recommended). > > -Travis O. > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > > From nwagner at mecha.uni-stuttgart.de Mon Jul 5 04:47:05 2004 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Mon, 05 Jul 2004 10:47:05 +0200 Subject: [SciPy-user] function for sqrt of matrix In-Reply-To: <40E1A0F6.3040606@ee.byu.edu> References: <40E1A0F6.3040606@ee.byu.edu> Message-ID: <40E91589.10102@mecha.uni-stuttgart.de> Travis E. Oliphant wrote: > Sudheer Phani wrote: > >> Hello >> >> I am looking for a function to calculate the square root (sqrt) of >> matrix M. For e.g. x = sqrtm(M) such that M is square matrix and dot(x,x) >> = M. >> > In SciPy: > > It would be good to have a specific sqrtm function. > > But for now you can do: > > x = linalg.funm(M, sqrt) > > > or > > def sqrtm(M): > return linalg.funm(M,sqrt) > > x = sqrtm(M) > > > -Travis O. > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > Very useful algorithms for sqrtm are available via http://www.ma.man.ac.uk/~higham/pap-mf.html Nils From nwagner at mecha.uni-stuttgart.de Thu Jul 8 08:07:59 2004 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Thu, 08 Jul 2004 14:07:59 +0200 Subject: [SciPy-user] Severe problems with linalg.eigvals Message-ID: <40ED391F.90201@mecha.uni-stuttgart.de> Dear experts, I am going to solve nonlinear eigenvalue problems by a brute force approach (see the attachement). However I get into difficulties using linalg.eigvals Traceback (most recent call last): File "brute.py", line 39, in ? w = linalg.eigvals(A,B) File "/usr/lib/python2.3/site-packages/scipy/linalg/decomp.py", line 161, in eigvals return eig(a,b=b,left=0,right=0,overwrite_a=overwrite_a) File "/usr/lib/python2.3/site-packages/scipy/linalg/decomp.py", line 109, in eig return _geneig(a1,b,left,right,overwrite_a,overwrite_b) File "/usr/lib/python2.3/site-packages/scipy/linalg/decomp.py", line 60, in _geneig if info>0: raise LinAlgError,"generalized eig algorithm did not converge" scipy.linalg.basic.LinAlgError: generalized eig algorithm did not converge How can I get rid of this problem ? Any pointer would be appreciated. Thanks in advance Nils -------------- next part -------------- A non-text attachment was scrubbed... Name: brute.py Type: text/x-python Size: 804 bytes Desc: not available URL: From Bob.Cowdery at CGI-Europe.com Fri Jul 9 08:44:50 2004 From: Bob.Cowdery at CGI-Europe.com (Bob.Cowdery at CGI-Europe.com) Date: Fri, 9 Jul 2004 13:44:50 +0100 Subject: [SciPy-user] Problem with Weave Message-ID: <9B40DB5FBF7D2048AD79C2A91F862A51773089@STEVAPPS05.Stevenage.CGI-Europe.com> I am about to convert some python code to 'C' so am going through the Weave documentation. I can get most things to work except returning values from the 'C' code. I would guess the correct libraries are not getting into the compile but I don't know how to fix it. I can compile and run any 'C' code fine until I use any of the Py:: classes. As an example if I type: >>> import weave >>> a=1 >>> a=weave.inline("return_val = Py::new_reference_to(Py::Int(a+1));",['a'], verbose=2) this gives me: file changed running build_ext building 'sc_5b09eaf68ff529a1fbaedc892ca5a4531' extension C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox /MD /W3 /GX -IC:\Python22\lib\site-packages\weave -IC:\Python22\lib\site-packages\weave\scxx -IC:\Python22\include /TpC:\DOCUME~1\cowderyb\LOCALS~1\Temp\CowderyB\python22_compiled\sc_5b09eaf6 8ff529a1fbaedc892ca5a4531.cpp /FoC:\DOCUME~1\cowderyb\LOCALS~1\Temp\CowderyB\python22_intermediate\compile r_ba943cc959c75c0df25fd4c114ec382f\Release\sc_5b09eaf68ff529a1fbaedc892ca5a4 531.obj Traceback (most recent call last): File "", line 1, in ? File "C:\Python22\lib\site-packages\weave\inline_tools.py", line 335, in inline auto_downcast = auto_downcast, File "C:\Python22\lib\site-packages\weave\inline_tools.py", line 439, in compile_function verbose=verbose, **kw) File "C:\Python22\lib\site-packages\weave\ext_tools.py", line 340, in compile verbose = verbose, **kw) File "C:\Python22\lib\site-packages\weave\build_tools.py", line 272, in build_extension setup(name = module_name, ext_modules = [ext],verbose=verb) File "C:\Python22\lib\site-packages\scipy_distutils\core.py", line 42, in setup return old_setup(**new_attr) File "C:\Python22\lib\distutils\core.py", line 157, in setup raise SystemExit, "error: " + str(msg) CompileError: error: command '"C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe"' failed with exit status 2 Any help appreciated. Thanks Bob Bob Cowdery CGI Senior Technical Architect +44(0)1438 791517 Mobile: +44(0)7771 532138 bob.cowdery at cgi-europe.com *** Confidentiality Notice *** Proprietary/Confidential Information belonging to CGI Group Inc. and its affiliates may be contained in this message. If you are not a recipient indicated or intended in this message (or responsible for delivery of this message to such person), or you think for any reason that this message may have been addressed to you in error, you may not use or copy or deliver this message to anyone else. In such case, you should destroy this message and are asked to notify the sender by reply email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From heiland at indiana.edu Fri Jul 9 10:19:03 2004 From: heiland at indiana.edu (Randy Heiland) Date: Fri, 9 Jul 2004 09:19:03 -0500 Subject: [SciPy-user] SciPy 2004 program Message-ID: <001c01c465bf$b05e5e70$c686fea9@escher> Hello, When might the program/talks for this conference be updated so that a person can determine whether or not to register by next week's deadline? Thanks, Randy Heiland From mhellman at mitre.org Tue Jul 6 14:16:26 2004 From: mhellman at mitre.org (Matthew Hellman) Date: Tue, 06 Jul 2004 14:16:26 -0400 Subject: [SciPy-user] floating characters Message-ID: <1089137786.13691.2.camel@cytochrome> Hi, I was wondering if anyone had a method for converting a stringType to an assignableType using characters. For instance, if I read in characters and then wanted to assign mathematical equations to them, 'r' would be converted to r. Essentially, I'd want to create an array of equations as: array(r, l, t, rl) not array('r', 'l', 't', 'rl') after reading in 'r','l','t','rl' where r,l,t,rl have all been assigned different equations that can be evaluted for different values at different times. Thanks, Matt From jonas at cortical.mit.edu Fri Jul 9 15:54:50 2004 From: jonas at cortical.mit.edu (Eric Jonas) Date: Fri, 09 Jul 2004 15:54:50 -0400 Subject: [SciPy-user] Reading in data as arrays, quickly and easily? Message-ID: <1089402890.2608.5.camel@shannon.mwl.ai.mit.edu> Hello! I'm trying to read in large chunks of binary data as arrays, but the file formats are complex enough that there is lots of junk that needs to be skipped over. I have a functioning datafile object in python with a read(N) method that returns the next N data points in the file, doing the various raw manipulations, endian conversions, and the like internally. The problem is that it's really really slow. I've spent most of today playing with boost.python, weave, raw numeric and numarray integration, and the like. And yet I still can't figure out what I should -really- be using. Does anyone have any suggestions for approaches that have worked for them? Ideally I'd love to read in my data and perform really basic preprocessing in c++ and then return the resulting arrays to manipulate using python. I'd rather not spend the weekend reinventing the wheel... Thanks! ...Eric From haase at msg.ucsf.edu Fri Jul 9 16:17:02 2004 From: haase at msg.ucsf.edu (Sebastian Haase) Date: Fri, 9 Jul 2004 13:17:02 -0700 Subject: [SciPy-user] Reading in data as arrays, quickly and easily? In-Reply-To: <1089402890.2608.5.camel@shannon.mwl.ai.mit.edu> References: <1089402890.2608.5.camel@shannon.mwl.ai.mit.edu> Message-ID: <200407091317.02878.haase@msg.ucsf.edu> Hi Eric, I assume you talk about Numeric, but in case you are open for numarray I use numarray's memmap quite successfully on files even larger than 1 GB (Linux; I think the effective limit for Windows might be lower ). It works for all datatypes and for byteswapped data too. You can skip any amount of bytes by having your mem-"slice" start at any offset you want. I actually map the first part into a record-array so that I can read the parts of the "header"-information I'm interested in. Regards, Sebastian Haase On Friday 09 July 2004 12:54 pm, Eric Jonas wrote: > Hello! I'm trying to read in large chunks of binary data as arrays, but > the file formats are complex enough that there is lots of junk that > needs to be skipped over. I have a functioning datafile object in python > with a read(N) method that returns the next N data points in the file, > doing the various raw manipulations, endian conversions, and the like > internally. > > The problem is that it's really really slow. I've spent most of today > playing with boost.python, weave, raw numeric and numarray integration, > and the like. And yet I still can't figure out what I should -really- be > using. > > Does anyone have any suggestions for approaches that have worked for > them? Ideally I'd love to read in my data and perform really basic > preprocessing in c++ and then return the resulting arrays to manipulate > using python. I'd rather not spend the weekend reinventing the wheel... > > Thanks! > ...Eric > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From oliphant at ee.byu.edu Fri Jul 9 16:38:05 2004 From: oliphant at ee.byu.edu (Travis Oliphant) Date: Fri, 09 Jul 2004 14:38:05 -0600 Subject: [SciPy-user] Reading in data as arrays, quickly and easily? In-Reply-To: <1089402890.2608.5.camel@shannon.mwl.ai.mit.edu> References: <1089402890.2608.5.camel@shannon.mwl.ai.mit.edu> Message-ID: <40EF022D.60802@ee.byu.edu> Eric Jonas wrote: >Hello! I'm trying to read in large chunks of binary data as arrays, but >the file formats are complex enough that there is lots of junk that >needs to be skipped over. I have a functioning datafile object in python >with a read(N) method that returns the next N data points in the file, >doing the various raw manipulations, endian conversions, and the like >internally. > > The scipy.io facility has some tools for this. It will handle byte-swapping and reads directly into a Numeric array. Look at scipy.io.fopen and then the fid.read method. >>> info(io.fopen) fopen(file_name, permission='rb', format='n') Class for reading and writing binary files into Numeric arrays. Inputs: file_name -- The complete path name to the file to open. permission -- Open the file with given permissions: ('r', 'w', 'a') for reading, writing, or appending. This is the same as the mode argument in the builtin open command. format -- The byte-ordering of the file: (['native', 'n'], ['ieee-le', 'l'], ['ieee-be', 'b']) for native, little-endian, or big-endian respectively. Methods: read -- read data from file and return Numeric array write -- write to file from Numeric array fort_read -- read Fortran-formatted binary data from the file. fort_write -- write Fortran-formatted binary data to the file. rewind -- rewind to beginning of file size -- get size of file seek -- seek to some position in the file tell -- return current position in file close -- close the file Attributes (Read only): bs -- non-zero if byte-swapping is performed on read and write. format -- 'native', 'ieee-le', or 'ieee-be' fid -- the file object closed -- non-zero if the file is closed. mode -- permissions with which this file was opened name -- name of the file If you want to use a lower-level tool you can just open a file with Python and then pass it to scipy.io.numpyio.fread >>> info(io.numpyio.fread) g = numpyio.fread( fid, Num, read_type { mem_type, byteswap}) fid = open file pointer object (i.e. from fid = open('filename') ) Num = number of elements to read of type read_type read_type = a character in 'cb1silfdFD' (PyArray types) describing how to interpret bytes on disk. OPTIONAL mem_type = a character (PyArray type) describing what kind of PyArray to return in g. Default = read_type byteswap = 0 for no byteswapping or a 1 to byteswap (to handle different endianness). Default = 0. Alternatively you can use weave or f2py (yes it can wrap C code too) if your pre-processing needs are more extensive then byteswapping and you can't do it in Numeric after the fact. -Travis O. From jonas at cortical.mit.edu Sat Jul 10 13:29:49 2004 From: jonas at cortical.mit.edu (Eric Jonas) Date: Sat, 10 Jul 2004 13:29:49 -0400 Subject: [SciPy-user] Reading in data as arrays, quickly and easily? In-Reply-To: <200407091317.02878.haase@msg.ucsf.edu> References: <1089402890.2608.5.camel@shannon.mwl.ai.mit.edu> <200407091317.02878.haase@msg.ucsf.edu> Message-ID: <1089480589.14126.3.camel@modulation> > I assume you talk about Numeric, but in case you are open for numarray I use > numarray's memmap quite successfully on files even larger than 1 GB (Linux; I > think the effective limit for Windows might be lower ). It works for all > datatypes and for byteswapped data too. You can skip any amount of bytes by > having your mem-"slice" start at any offset you want. I actually map the > first part into a record-array so that I can read the parts of the > "header"-information I'm interested in. Well, I had been focusing on numarray, because everything I read seems to suggest that it's the wave of the future, although at the same time no one really seems to be using it much yet. May I ask how much larger than 1 GB? I'm dealing with between 1-20 GB EEG files, and for some reason I don't thinK I'll be able to afford 64-bit hardware in the near future : ) What I really want is to read in some fairly complex records, do endian swapping, alignment, etc. all in C. I'm mostly interested in spectral analysis, so the hope was that I'd be able to read in 32kB chunks at a time for my periodograms. Also, I looked through the numarray docs again, and still couldn't find anything about memory mapping -- any pointers? What command(s) have you been using to pull this off? Thanks, ...Eric From eric at enthought.com Mon Jul 12 02:49:11 2004 From: eric at enthought.com (eric jones) Date: Mon, 12 Jul 2004 01:49:11 -0500 Subject: [SciPy-user] Problem with Weave In-Reply-To: <9B40DB5FBF7D2048AD79C2A91F862A51773089@STEVAPPS05.Stevenage.CGI-Europe.com> References: <9B40DB5FBF7D2048AD79C2A91F862A51773089@STEVAPPS05.Stevenage.CGI-Europe.com> Message-ID: <40F23467.1020801@enthought.com> Hey Bob, The docs are seriously out of date. Sorry about that. Much of the crud that you used to need for handling C++->Python type conversions is now gone. Here is how I wrote your example: C:\Documents and Settings\eric>python Enthought Edition build 1057 Python 2.3.3 (#51, Feb 16 2004, 04:07:52) [MSC v.1200 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import weave >>> a=1 >>> a=weave.inline("return_val=a+1;",['a']) file changed msvc No module named msvccompiler in scipy_distutils, trying from distutils.. No module named msvccompiler in scipy_distutils, trying from distutils.. Missing compiler_cxx fix for MSVCCompiler >>> a 2 The output is quite verbose now (too verbose), but the amount of code you need to write is less. The weave/examples files (weave will be installed in your site-packages directory) generally have been updated to the new syntax and will provide some help. Also, if you are a C++ person, then looking at the weave/scxx/object.h file will give some hints as to what is going on. see ya, eric Bob.Cowdery at CGI-Europe.com wrote: > I am about to convert some python code to 'C' so am going through the > Weave documentation. I can get most things to work except returning > values from the 'C' code. I would guess the correct libraries are not > getting into the compile but I don't know how to fix it. I can compile > and run any 'C' code fine until I use any of the Py:: classes. > > As an example if I type: > >>>> import weave >>>> a=1 >>>> a=weave.inline("return_val = > Py::new_reference_to(Py::Int(a+1));",['a'], verbose=2) > > this gives me: > > file changed > running build_ext > building 'sc_5b09eaf68ff529a1fbaedc892ca5a4531' extension > C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c > /nologo /Ox /MD /W3 /GX -IC:\Python22\lib\site-packages\weave > -IC:\Python22\lib\site-packages\weave\scxx -IC:\Python22\include > /TpC:\DOCUME~1\cowderyb\LOCALS~1\Temp\CowderyB\python22_compiled\sc_5b09eaf68ff529a1fbaedc892ca5a4531.cpp > /FoC:\DOCUME~1\cowderyb\LOCALS~1\Temp\CowderyB\python22_intermediate\compiler_ba943cc959c75c0df25fd4c114ec382f\Release\sc_5b09eaf68ff529a1fbaedc892ca5a4531.obj > Traceback (most recent call last): > File "", line 1, in ? > File "C:\Python22\lib\site-packages\weave\inline_tools.py", line > 335, in inline > auto_downcast = auto_downcast, > File "C:\Python22\lib\site-packages\weave\inline_tools.py", line > 439, in compile_function > verbose=verbose, **kw) > File "C:\Python22\lib\site-packages\weave\ext_tools.py", line 340, > in compile > verbose = verbose, **kw) > File "C:\Python22\lib\site-packages\weave\build_tools.py", line 272, > in build_extension > setup(name = module_name, ext_modules = [ext],verbose=verb) > File "C:\Python22\lib\site-packages\scipy_distutils\core.py", line > 42, in setup > return old_setup(**new_attr) > File "C:\Python22\lib\distutils\core.py", line 157, in setup > raise SystemExit, "error: " + str(msg) > CompileError: error: command '"C:\Program Files\Microsoft Visual > Studio .NET 2003\Vc7\bin\cl.exe"' failed with exit status 2 > > Any help appreciated. > > Thanks > Bob > > > Bob Cowdery > CGI Senior Technical Architect > +44(0)1438 791517 > Mobile: +44(0)7771 532138 > bob.cowdery at cgi-europe.com > > > > > **** Confidentiality Notice **** Proprietary/Confidential > Information belonging to CGI Group Inc. and its affiliates > may be contained in this message. If you are not a recipient > indicated or intended in this message (or responsible for > delivery of this message to such person), or you think for > any reason that this message may have been addressed to you > in error, you may not use or copy or deliver this message > to anyone else. In such case, you should destroy this > message and are asked to notify the sender by reply email. > >------------------------------------------------------------------------ > >_______________________________________________ >SciPy-user mailing list >SciPy-user at scipy.net >http://www.scipy.net/mailman/listinfo/scipy-user > > From Bob.Cowdery at CGI-Europe.com Mon Jul 12 07:55:29 2004 From: Bob.Cowdery at CGI-Europe.com (Bob.Cowdery at CGI-Europe.com) Date: Mon, 12 Jul 2004 12:55:29 +0100 Subject: [SciPy-user] Problem with Weave Message-ID: <9B40DB5FBF7D2048AD79C2A91F862A5177308B@STEVAPPS05.Stevenage.CGI-Europe.com> Hi Eric Thanks for the pointers. Yes that bit works fine now. ---- Unfortunately I have run into a much more obtuse problem. I converted a piece of code that had a nested loop as I could only get rid of the inner loop with array functions and it was still too slow by a large factor. However I don't think the actual code is causing this problem as almost any code blows up on me. The code is at the end just to complete the story. This code compiles and tests out ok if I run it directly from a main within the same module. When I try to run it within the application, it compiles ok and I get 'file changed' then every time it is invoked I get an exception: Exception exceptions.RuntimeError: 'maximum recursion depth exceeded' in > ignored The function is not called recursively, however it is called on a separate thread every 46ms or so. I thought at first it might be getting called mutiple time while it was compiling but it's synchronous so the thread is forced to wait first time while it compiles. After this failure it locks up the application. Once the application exits I am left with gnuplot_helper.exe and wgnuplot_helper.exe (neither of which I use) taking all my processer and I have to kill them off. Before that I just notice dumpreg is there and then it exits. It's very unpredictable, for example first thing this morning I ran it and it appeared to be running through although it wasn't actually doing what it should. As I wasn't sure if it had really compiled the current text I replaced the code with a printf() and it failed. Since then I can't get it to run through at all EVEN WITH no code in the 'code' variable. I even removed the array assignments and all the parameters incase they were the problem. I couldn't figure out how to pass in class variables directly, that's why they are all copied to local variables. I am completely bemused by what's going on here. Any ideas? Bob. ------------ code = """ double ISum = 0.0; double QSum = 0.0; double lsb = 0.0; double usb = 0.0; for(int smpl = 0 ; smpl < IN_SZ ; smpl++) { I_delay[delay_ptr] = I_in[smpl]; Q_delay[delay_ptr] = Q_in[smpl]; if(++delay_ptr == DELAY_LEN) delay_ptr = 0; ISum = 0.0; QSum = 0.0; for(int tap = -40 ; tap <= 40 ; tap++) { ISum = ISum + filter_phasing[tap+(DELAY_LEN-1)/2] * I_delay[delay_ptr]; QSum = QSum + filter_phasing[(tap-(DELAY_LEN-1)/2)-1] * Q_delay[delay_ptr]; if(++delay_ptr == DELAY_LEN) delay_ptr = 0; } if(peak>1) peak = peak * agcdecay; if(sideband == 0) { lsb = ISum + QSum; if(abs(lsb) > peak) peak = abs(lsb); real_out[smpl] = int(lsb*16384.0/peak); } else { usb = ISum - QSum; if(abs(usb) > peak) peak = abs(usb); real_out[smpl] = int(usb*16384.0/peak); } } """ IN_SZ = len(self.m_I_in) I_in = self.m_I_in Q_in = self.m_Q_in I_delay = self.m_I_Delay Q_delay = self.m_Q_Delay delay_ptr = self.m_delay_ptr DELAY_LEN = self.DELAY_LEN filter_phasing = self.m_filter_phasing real_out = self.m_real_out #weave.inline(code, ['sideband', 'agcdecay', 'peak', 'I_in', 'IN_SZ', 'Q_in', 'I_delay', 'Q_delay', 'delay_ptr', 'DELAY_LEN', 'filter_phasing', 'real_out']) -----Original Message----- From: eric jones [mailto:eric at enthought.com] Sent: 12 July 2004 07:49 To: SciPy Users List Subject: Re: [SciPy-user] Problem with Weave Hey Bob, The docs are seriously out of date. Sorry about that. Much of the crud that you used to need for handling C++->Python type conversions is now gone. Here is how I wrote your example: C:\Documents and Settings\eric>python Enthought Edition build 1057 Python 2.3.3 (#51, Feb 16 2004, 04:07:52) [MSC v.1200 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import weave >>> a=1 >>> a=weave.inline("return_val=a+1;",['a']) file changed msvc No module named msvccompiler in scipy_distutils, trying from distutils.. No module named msvccompiler in scipy_distutils, trying from distutils.. Missing compiler_cxx fix for MSVCCompiler >>> a 2 The output is quite verbose now (too verbose), but the amount of code you need to write is less. The weave/examples files (weave will be installed in your site-packages directory) generally have been updated to the new syntax and will provide some help. Also, if you are a C++ person, then looking at the weave/scxx/object.h file will give some hints as to what is going on. see ya, eric Bob.Cowdery at CGI-Europe.com wrote: > I am about to convert some python code to 'C' so am going through the > Weave documentation. I can get most things to work except returning > values from the 'C' code. I would guess the correct libraries are not > getting into the compile but I don't know how to fix it. I can compile > and run any 'C' code fine until I use any of the Py:: classes. > > As an example if I type: > >>>> import weave >>>> a=1 >>>> a=weave.inline("return_val = > Py::new_reference_to(Py::Int(a+1));",['a'], verbose=2) > > this gives me: > > file changed > running build_ext > building 'sc_5b09eaf68ff529a1fbaedc892ca5a4531' extension C:\Program > Files\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox > /MD /W3 /GX -IC:\Python22\lib\site-packages\weave > -IC:\Python22\lib\site-packages\weave\scxx -IC:\Python22\include > /TpC:\DOCUME~1\cowderyb\LOCALS~1\Temp\CowderyB\python22_compiled\sc_5b09eaf6 8ff529a1fbaedc892ca5a4531.cpp > /FoC:\DOCUME~1\cowderyb\LOCALS~1\Temp\CowderyB\python22_intermediate\compile r_ba943cc959c75c0df25fd4c114ec382f\Release\sc_5b09eaf68ff529a1fbaedc892ca5a4 531.obj > Traceback (most recent call last): > File "", line 1, in ? > File "C:\Python22\lib\site-packages\weave\inline_tools.py", line > 335, in inline > auto_downcast = auto_downcast, > File "C:\Python22\lib\site-packages\weave\inline_tools.py", line > 439, in compile_function > verbose=verbose, **kw) > File "C:\Python22\lib\site-packages\weave\ext_tools.py", line 340, > in compile > verbose = verbose, **kw) > File "C:\Python22\lib\site-packages\weave\build_tools.py", line 272, > in build_extension > setup(name = module_name, ext_modules = [ext],verbose=verb) > File "C:\Python22\lib\site-packages\scipy_distutils\core.py", line > 42, in setup > return old_setup(**new_attr) > File "C:\Python22\lib\distutils\core.py", line 157, in setup > raise SystemExit, "error: " + str(msg) > CompileError: error: command '"C:\Program Files\Microsoft Visual > Studio .NET 2003\Vc7\bin\cl.exe"' failed with exit status 2 > > Any help appreciated. > > Thanks > Bob > > > Bob Cowdery > CGI Senior Technical Architect > +44(0)1438 791517 > Mobile: +44(0)7771 532138 > bob.cowdery at cgi-europe.com > > > > > **** Confidentiality Notice **** Proprietary/Confidential Information > belonging to CGI Group Inc. and its affiliates may be contained in > this message. If you are not a recipient indicated or intended in this > message (or responsible for delivery of this message to such person), > or you think for any reason that this message may have been addressed > to you in error, you may not use or copy or deliver this message > to anyone else. In such case, you should destroy this > message and are asked to notify the sender by reply email. > >----------------------------------------------------------------------- >- > >_______________________________________________ >SciPy-user mailing list >SciPy-user at scipy.net http://www.scipy.net/mailman/listinfo/scipy-user > > _______________________________________________ SciPy-user mailing list SciPy-user at scipy.net http://www.scipy.net/mailman/listinfo/scipy-user *** Confidentiality Notice *** Proprietary/Confidential Information belonging to CGI Group Inc. and its affiliates may be contained in this message. If you are not a recipient indicated or intended in this message (or responsible for delivery of this message to such person), or you think for any reason that this message may have been addressed to you in error, you may not use or copy or deliver this message to anyone else. In such case, you should destroy this message and are asked to notify the sender by reply email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nwagner at mecha.uni-stuttgart.de Mon Jul 12 08:40:09 2004 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Mon, 12 Jul 2004 14:40:09 +0200 Subject: [SciPy-user] QR Factorization with Column Pivoting Message-ID: <40F286A9.70702@mecha.uni-stuttgart.de> Dear all, Has someone written a module for QR Factorization with Column Pivoting ? Any pointer would be appreciated. Nils From falted at pytables.org Mon Jul 12 08:57:35 2004 From: falted at pytables.org (Francesc Alted) Date: Mon, 12 Jul 2004 14:57:35 +0200 Subject: [SciPy-user] Reading in data as arrays, quickly and easily? Message-ID: <200407121457.35269.falted@pytables.org> A Dissabte 10 Juliol 2004 19:29, Eric Jonas va escriure: > Well, I had been focusing on numarray, because everything I read seems > to suggest that it's the wave of the future, although at the same time > no one really seems to be using it much yet. May I ask how much larger > than 1 GB? I'm dealing with between 1-20 GB EEG files, and for some > reason I don't thinK I'll be able to afford 64-bit hardware in the near > future : ) If you need to deal with full 64-bit file address space (even on 32-bit processors), maybe you want to check PyTables [1]. It deals with both homogeneous and heterogenerous datasets. In addition, it supports byteordering automatically, so that you can write data in big-endian machines and read them in low-endian ones without problems, as you seems to need. > What I really want is to read in some fairly complex records, do endian > swapping, alignment, etc. all in C. I'm mostly interested in spectral > analysis, so the hope was that I'd be able to read in 32kB chunks at a > time for my periodograms. If the data is generated by programs made in C, you can still save it in HDF5 format [2] (the format that is used by PyTables) using its C [3] API and read it afterwards with PyTables. There is even a high level API [4] to create HDF5 files in C in an easier way (but still compatible with PyTables). > Also, I looked through the numarray docs again, and still couldn't find > anything about memory mapping -- any pointers? What command(s) have you > been using to pull this off? Memory mapping features in numarray are mainly documented as doc strings in sources (see numarray/memmap.py). Also, you may find this thread [5] interesting. [1] http://www.pytables.org [2] http://hdf.ncsa.uiuc.edu/HDF5/ [3] http://hdf.ncsa.uiuc.edu/HDF5/doc/UG/ [4] http://hdf.ncsa.uiuc.edu/HDF5/hdf5_hl/ [5] http://aspn.activestate.com/ASPN/Mail/Message/numpy-discussion/1895405 Cheers, -- Francesc Alted From haase at msg.ucsf.edu Mon Jul 12 13:19:50 2004 From: haase at msg.ucsf.edu (Sebastian Haase) Date: Mon, 12 Jul 2004 10:19:50 -0700 Subject: [SciPy-user] Reading in data as arrays, quickly and easily? In-Reply-To: <1089480589.14126.3.camel@modulation> References: <1089402890.2608.5.camel@shannon.mwl.ai.mit.edu> <200407091317.02878.haase@msg.ucsf.edu> <1089480589.14126.3.camel@modulation> Message-ID: <200407121019.50244.haase@msg.ucsf.edu> On Saturday 10 July 2004 10:29 am, Eric Jonas wrote: > > I assume you talk about Numeric, but in case you are open for numarray I > > use numarray's memmap quite successfully on files even larger than 1 GB > > (Linux; I think the effective limit for Windows might be lower ). It > > works for all datatypes and for byteswapped data too. You can skip any > > amount of bytes by having your mem-"slice" start at any offset you want. > > I actually map the first part into a record-array so that I can read the > > parts of the "header"-information I'm interested in. > > Well, I had been focusing on numarray, because everything I read seems > to suggest that it's the wave of the future, although at the same time > no one really seems to be using it much yet. May I ask how much larger > than 1 GB? I'm dealing with between 1-20 GB EEG files, and for some > reason I don't thinK I'll be able to afford 64-bit hardware in the near > future : ) I'm also interested in maybe 20 GB (3D,time) image data. But that will require us to buy 64 hardware, I think. E.g. on (32bit) Linux the maximum address space for a user application is 2 GB - and I have been told to now expect much more than half of that being available for memmap. In other words, the largest file I was able to read was maybe about 1.3 GB. > > What I really want is to read in some fairly complex records, do endian > swapping, alignment, etc. all in C. I'm mostly interested in spectral > analysis, so the hope was that I'd be able to read in 32kB chunks at a > time for my periodograms. > > Also, I looked through the numarray docs again, and still couldn't find > anything about memory mapping -- any pointers? What command(s) have you > been using to pull this off? The the source code file '/numarray/Lib/memmap.py' contains 200 lines of comments/documentation just at the beginning of that file - I don't know why that didn't make it into the official documention. Regards, Sebastian Haase From jmiller at stsci.edu Mon Jul 12 14:51:57 2004 From: jmiller at stsci.edu (Todd Miller) Date: 12 Jul 2004 14:51:57 -0400 Subject: [SciPy-user] Reading in data as arrays, quickly and easily? In-Reply-To: <200407121019.50244.haase@msg.ucsf.edu> References: <1089402890.2608.5.camel@shannon.mwl.ai.mit.edu> <200407091317.02878.haase@msg.ucsf.edu> <1089480589.14126.3.camel@modulation> <200407121019.50244.haase@msg.ucsf.edu> Message-ID: <1089658317.19446.139.camel@halloween.stsci.edu> On Mon, 2004-07-12 at 13:19, Sebastian Haase wrote: > On Saturday 10 July 2004 10:29 am, Eric Jonas wrote: > > > I assume you talk about Numeric, but in case you are open for numarray I > > > use numarray's memmap quite successfully on files even larger than 1 GB > > > (Linux; I think the effective limit for Windows might be lower ). It > > > works for all datatypes and for byteswapped data too. You can skip any > > > amount of bytes by having your mem-"slice" start at any offset you want. > > > I actually map the first part into a record-array so that I can read the > > > parts of the "header"-information I'm interested in. > > > > Well, I had been focusing on numarray, because everything I read seems > > to suggest that it's the wave of the future, although at the same time > > no one really seems to be using it much yet. May I ask how much larger > > than 1 GB? I'm dealing with between 1-20 GB EEG files, and for some > > reason I don't thinK I'll be able to afford 64-bit hardware in the near > > future : ) > > I'm also interested in maybe 20 GB (3D,time) image data. But that will require > us to buy 64 hardware, I think. > E.g. on (32bit) Linux the maximum address space for a user application is 2 GB > - and I have been told to now expect much more than half of that being > available for memmap. In other words, the largest file I was able to read was > maybe about 1.3 GB. > > > > > What I really want is to read in some fairly complex records, do endian > > swapping, alignment, etc. all in C. I'm mostly interested in spectral > > analysis, so the hope was that I'd be able to read in 32kB chunks at a > > time for my periodograms. > > > > Also, I looked through the numarray docs again, and still couldn't find > > anything about memory mapping -- any pointers? What command(s) have you > > been using to pull this off? > > The the source code file '/numarray/Lib/memmap.py' contains 200 lines of > comments/documentation just at the beginning of that file - I don't know why > that didn't make it into the official documention. For me, memory mapping is a little esoteric so I wanted to observe some successful applications of memmap in house at STScI before documenting it and casting it in stone. We've learned a lot trying to apply memmap, and I believe that memmap basically works so now is a reasonable time to document what we've got. One should be mindful, however, that even with a working memmap design, there are perhaps easy to overlook limitations: total virtual address space, swap space, and platform specific limits on mappable space. 32-bits just ain't what it used to be. Seeing this thread, Perry asked that I add a section on memmap to the manual so I'll do it as soon as I can. Regards, Todd Miller From perry at stsci.edu Mon Jul 12 16:36:31 2004 From: perry at stsci.edu (Perry Greenfield) Date: Mon, 12 Jul 2004 16:36:31 -0400 Subject: [SciPy-user] Reading in data as arrays, quickly and easily? In-Reply-To: <1089480589.14126.3.camel@modulation> Message-ID: > Eric Jonas wrote: > Well, I had been focusing on numarray, because everything I read seems > to suggest that it's the wave of the future, although at the same time > no one really seems to be using it much yet. May I ask how much larger > than 1 GB? I'm dealing with between 1-20 GB EEG files, and for some > reason I don't thinK I'll be able to afford 64-bit hardware in the near > future : ) > Even with a 64-bit system, currently Numeric and numarray are limited in the size of the array to 32-bit sizes because of the size Python uses for indexing sequences (fortunately work appears to be underway, or soon underway, to change that). So you won't be able to map a whole 20 GB array though it is possible to map sections of a file. > What I really want is to read in some fairly complex records, do endian > swapping, alignment, etc. all in C. I'm mostly interested in spectral > analysis, so the hope was that I'd be able to read in 32kB chunks at a > time for my periodograms. > Depending on how complex the records are, recarray may be useful as well as PyTables. It depends on the details of the data so I can't really say what the best approach is unless I knew those. I'd say that so long as your data are regularly spaced in the file in some manner, there is a reasonably efficient way to read the data into numarray. If the array data is contiguous, then the options that Travis mentioned for Numeric should work well also (and I'm sure there are some tricks that can be played with more complex representations if you are willing to use extra memory and rearrange byte arrays with non-contiguous data). Perry From novak at ucolick.org Tue Jul 13 15:04:25 2004 From: novak at ucolick.org (Greg Novak) Date: Tue, 13 Jul 2004 12:04:25 -0700 (PDT) Subject: [SciPy-user] Numeric Object Array Pickling Message-ID: I would like a "ragged" array that I can pickle. I need a list of lists of numbers, and the "inner" arrays will all be different lengths that I don't know in advance, which is why I want it to be ragged. But I also need to use the array slicing facilities of Numeric, which is why I want it to be an array rather than a list. It looks like the "PyObject" type of Numeric array is what I want, but I can't pickle it. The following code gives a seg fault (on Red Hat Linux 9, Python 2.2, Scipy 0.3) arrays = [arange(i+1) for i in range(5)] aoa = array([None for i in range(5)], 'O') for i in range(5): aoa[i] = arrays[i] file=open("aoa.txt", "w") pickle.dump(aoa, file) file.close() ... Exit and restart python ... file=open("aoa.txt", "r") aoa = pickle.load(file) file.close() I can imagine why this is happening... it seems that the array pickling function is just saving the memory addresses of the objects in the array, because if you don't exit Python this code works. However... is there a way to do what I want? It looks like I can make a list of arrays and pickle that. Then, when I unpickle it I can convert it to a PyObject array and use Numeric's slicing. But... that's a little kludgey. Is there a better way? Or does this qualify as a bug? Thanks, Greg From eric at enthought.com Wed Jul 14 01:07:42 2004 From: eric at enthought.com (eric jones) Date: Wed, 14 Jul 2004 00:07:42 -0500 Subject: [SciPy-user] ANN: Reminder -- SciPy 04 is coming up Message-ID: <40F4BF9E.8060103@enthought.com> Hey folks, Just a reminder that SciPy 04 is coming up. More information is here: http://www.scipy.org/wikis/scipy04 About the Conference and Keynote Speaker --------------------------------------------- The 1st annual *SciPy Conference* will be held this year at Caltech, September 2-3, 2004. As some of you may know, we've experienced great participation in two SciPy "Workshops" (with ~70 attendees in both 2002 and 2003) and this year we're graduating to a "conference." With the prestige of a conference comes the responsibility of a keynote address. This year, Jim Hugunin has answered the call and will be speaking to kickoff the meeting on Thursday September 2nd. Jim is the creator of Numeric Python, Jython, and co-designer of AspectJ. Jim is currently working on IronPython--a fast implementation of Python for .NET and Mono. Presenters ----------- We still have room for a few more standard talks, and there is plenty of room for lightning talks. Because of this, we are extending the abstract deadline until July 23rd. Please send your abstract to abstracts at scipy.org. Travis Oliphant is organizing the presentations this year. (Thanks!) Once accepted, papers and/or presentation slides are acceptable and are due by August 20, 2004. Registration ------------- Early registration ($100.00) has been extended to July 23rd. Follow the links off of the main conference site: http://www.scipy.org/wikis/scipy04 After July 23rd, registration will be $150.00. Registration includes breakfast and lunch Thursday & Friday and a very nice dinner Thursday night. Please register as soon as possible as it will help us in planning for food, room sizes, etc. Sprints -------- As of now, we really haven't had much of a call for coding sprints for the 3 days prior to SciPy 04. Below is the original announcement about sprints. If you would like to suggest a topic and see if others are interested, please send a message to the list. Otherwise, we'll forgo the sprints session this year. We're also planning three days of informal "Coding Sprints" prior to the conference -- August 30 to September 1, 2004. Conference registration is not required to participate in the sprints. Please email the list, however, if you plan to attend. Topics for these sprints will be determined via the mailing lists as well, so please submit any suggestions for topics to the scipy-user list: list signup: http://www.scipy.org/mailinglists/ list address: scipy-user at scipy.org thanks, eric From eric at enthought.com Wed Jul 14 01:13:57 2004 From: eric at enthought.com (eric jones) Date: Wed, 14 Jul 2004 00:13:57 -0500 Subject: [SciPy-user] SciPy 2004 program In-Reply-To: <001c01c465bf$b05e5e70$c686fea9@escher> References: <001c01c465bf$b05e5e70$c686fea9@escher> Message-ID: <40F4C115.9060708@enthought.com> Hey Randy, The early registration deadline has been extended to July 23rd to give people a little more time to make their decision. Also, Travis Oliphant has graciously offered to review the abstracts we currently have and start putting together an official schedule. Hopefully we'll have enough info up for you to make a decision by July 23rd. thanks, eric Randy Heiland wrote: >Hello, > >When might the program/talks for this conference be updated so that a >person can determine whether or not to register by next week's deadline? > >Thanks, Randy Heiland > > >_______________________________________________ >SciPy-user mailing list >SciPy-user at scipy.net >http://www.scipy.net/mailman/listinfo/scipy-user > > From papagr-lists at freemail.gr Wed Jul 14 11:27:35 2004 From: papagr-lists at freemail.gr (Nikos Papagrigoriou) Date: Wed, 14 Jul 2004 18:27:35 +0300 Subject: [SciPy-user] Problem in Wilcoxon test Message-ID: <200407141827.35419.papagr-lists@freemail.gr> Hi, I have used scipy to perform a Wilcoxon test (scipy.stats.wilcoxon). Calculations are correct on a two sample test. I tried to calculate an one sample wilcoxon test, but the results were incorrect. Can I use this function to perform an one sample test (comparison with a mean value)? Any ideas? How do I find who wrote wilcoxon test? Thanks in advance. Nikos Papagrigoriou. ____________________________________________________________________ http://www.freemail.gr - ?????? ???????? ???????????? ????????????. http://www.freemail.gr - free email service for the Greek-speaking. From jdhunter at ace.bsd.uchicago.edu Wed Jul 14 12:32:39 2004 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Wed, 14 Jul 2004 11:32:39 -0500 Subject: [SciPy-user] ANN matplotlib-0.60.2: python graphs and charts Message-ID: matplotlib is a 2D plotting library for python. You can use matplotlib interactively from a python shell or IDE, or embed it in GUI applications (WX, GTK, and Tkinter). matplotlib supports many plot types: line plots, bar charts, log plots, images, pseudocolor plots, legends, date plots, finance charts and more. What's new since matplotlib 0.50 This is the first wide release in 5 months and there has been a tremendous amount of development since then, with new backends, many optimizations, new plotting types, new backends and enhanced text support. See http://matplotlib.sourceforge.net/whats_new.html for details. * Todd Miller's tkinter backend (tkagg) with good support for interactive plotting using the standard python shell, ipython or others. matplotlib now runs on windows out of the box with python + numeric/numarry * Full Numeric / numarray integration with Todd Miller's numerix module. Prebuilt installers for numeric and numarray on win32. Others, please set your numerix settings before building matplotlib, as described on http://matplotlib.sourceforge.net/faq.html#NUMARRAY * Mathtext: you can write TeX style math expressions anywhere in your figure. http://matplotlib.sourceforge.net/screenshots.html#mathtext_demo. * Images - figure and axes images with optional interpolated resampling, alpha blending of multiple images, and more with the imshow and figimage commands. Interactive control of colormaps, intensity scaling and colorbars - http://matplotlib.sourceforge.net/screenshots.html#layer_images * Text: freetype2 support, newline separated strings with arbitrary rotations, Paul Barrett's cross platform font manager. http://matplotlib.sourceforge.net/screenshots.html#align_text * Jared Wahlstrand's SVG backend (alpha) * Support for popular financial plot types - http://matplotlib.sourceforge.net/screenshots.html#finance_work2 * Many optimizations and extension code to remove performance bottlenecks. pcolors and scatters are an order of magnitude faster. * GTKAgg, WXAgg, TkAgg backends for http://antigrain.com (agg) rendering in the GUI canvas. Now all the major GUIs (WX, GTK, Tk) can be used with a common (agg) renderer. * Many new examples and demos - see http://matplotlib.sf.net/examples or download the src distribution and look in the examples dir. Documentation and downloads available at http://matplotlib.sourceforge.net. John Hunter From matt at hotdispatch.com Wed Jul 14 17:26:20 2004 From: matt at hotdispatch.com (matt) Date: Wed, 14 Jul 2004 17:26:20 -0400 Subject: [SciPy-user] fastumath installation problem Message-ID: <72A41D2A-D5DC-11D8-8CFC-003065BA9C84@hotdispatch.com> So my SciPy install was going great. I installed Atlas and all of the other prerequisites without a hitch. I'm using FreeBSD 4.9 and installed most of the pre-req's from the ports package. The actual SciPy install get's really far, but it barfs when trying to compile fastumath_unsigned. This seems strange and not easily traceable to a missing pre-req or anything. Below is the output from 'python setup.py install'. Any help here at all would be very useful. I can provide details like version nums of all the pre requisites and the like upon request. Thanks in advance. -Matt Bachmann cc: scipy_core/scipy_base/fastumathmodule.c In file included from scipy_core/scipy_base/fastumathmodule.c:27: scipy_core/scipy_base/fastumath_unsigned.inc:2784: `acosh' undeclared here (not in a function) scipy_core/scipy_base/fastumath_unsigned.inc:2784: initializer element is not constant scipy_core/scipy_base/fastumath_unsigned.inc:2784: (near initialization for `arccosh_data[0]') scipy_core/scipy_base/fastumath_unsigned.inc:2784: `acosh' undeclared here (not in a function) scipy_core/scipy_base/fastumath_unsigned.inc:2784: initializer element is not constant scipy_core/scipy_base/fastumath_unsigned.inc:2784: (near initialization for `arccosh_data[1]') scipy_core/scipy_base/fastumath_unsigned.inc:2785: `asinh' undeclared here (not in a function) scipy_core/scipy_base/fastumath_unsigned.inc:2785: initializer element is not constant scipy_core/scipy_base/fastumath_unsigned.inc:2785: (near initialization for `arcsinh_data[0]') scipy_core/scipy_base/fastumath_unsigned.inc:2785: `asinh' undeclared here (not in a function) scipy_core/scipy_base/fastumath_unsigned.inc:2785: initializer element is not constant scipy_core/scipy_base/fastumath_unsigned.inc:2785: (near initialization for `arcsinh_data[1]') scipy_core/scipy_base/fastumath_unsigned.inc:2786: `atanh' undeclared here (not in a function) scipy_core/scipy_base/fastumath_unsigned.inc:2786: initializer element is not constant scipy_core/scipy_base/fastumath_unsigned.inc:2786: (near initialization for `arctanh_data[0]') scipy_core/scipy_base/fastumath_unsigned.inc:2786: `atanh' undeclared here (not in a function) scipy_core/scipy_base/fastumath_unsigned.inc:2786: initializer element is not constant scipy_core/scipy_base/fastumath_unsigned.inc:2786: (near initialization for `arctanh_data[1]') In file included from scipy_core/scipy_base/fastumathmodule.c:27: scipy_core/scipy_base/fastumath_unsigned.inc:2784: `acosh' undeclared here (not in a function) scipy_core/scipy_base/fastumath_unsigned.inc:2784: initializer element is not constant scipy_core/scipy_base/fastumath_unsigned.inc:2784: (near initialization for `arccosh_data[0]') scipy_core/scipy_base/fastumath_unsigned.inc:2784: `acosh' undeclared here (not in a function) scipy_core/scipy_base/fastumath_unsigned.inc:2784: initializer element is not constant scipy_core/scipy_base/fastumath_unsigned.inc:2784: (near initialization for `arccosh_data[1]') scipy_core/scipy_base/fastumath_unsigned.inc:2785: `asinh' undeclared here (not in a function) scipy_core/scipy_base/fastumath_unsigned.inc:2785: initializer element is not constant scipy_core/scipy_base/fastumath_unsigned.inc:2785: (near initialization for `arcsinh_data[0]') scipy_core/scipy_base/fastumath_unsigned.inc:2785: `asinh' undeclared here (not in a function) scipy_core/scipy_base/fastumath_unsigned.inc:2785: initializer element is not constant scipy_core/scipy_base/fastumath_unsigned.inc:2785: (near initialization for `arcsinh_data[1]') scipy_core/scipy_base/fastumath_unsigned.inc:2786: `atanh' undeclared here (not in a function) scipy_core/scipy_base/fastumath_unsigned.inc:2786: initializer element is not constant scipy_core/scipy_base/fastumath_unsigned.inc:2786: (near initialization for `arctanh_data[0]') scipy_core/scipy_base/fastumath_unsigned.inc:2786: `atanh' undeclared here (not in a function) scipy_core/scipy_base/fastumath_unsigned.inc:2786: initializer element is not constant scipy_core/scipy_base/fastumath_unsigned.inc:2786: (near initialization for `arctanh_data[1]') error: Command "cc -fno-strict-aliasing -DNDEBUG -O -pipe -march=pentiumpro -D_THREAD_SAFE -DTHREAD_STACK_SIZE=0x20000 -fPIC -DUSE_MCONF_LITE_LE -I/usr/local/include/python2.3 -c scipy_core/scipy_base/fastumathmodule.c -o build/temp.freebsd-4.9-STABLE-i386-2.3/scipy_core/scipy_base/ fastumathmodule.o" failed with exit status 1 -bash-2.05b# -bash-2.05b# uname -a FreeBSD archer.uchicago.edu 4.9-STABLE FreeBSD 4.9-STABLE #1: Tue Mar 9 00:39:57 CST 2004 toor at archer.uchicago.edu:/usr/obj/usr/src/sys/ARCHER1 i386 From oliphant at ee.byu.edu Wed Jul 14 18:23:47 2004 From: oliphant at ee.byu.edu (Travis E. Oliphant) Date: Wed, 14 Jul 2004 16:23:47 -0600 Subject: [SciPy-user] fastumath installation problem In-Reply-To: <72A41D2A-D5DC-11D8-8CFC-003065BA9C84@hotdispatch.com> References: <72A41D2A-D5DC-11D8-8CFC-003065BA9C84@hotdispatch.com> Message-ID: <40F5B273.3080309@ee.byu.edu> matt wrote: > So my SciPy install was going great. I installed Atlas and all of the > other prerequisites without a hitch. I'm using FreeBSD 4.9 and > installed most of the pre-req's from the ports package. The actual > SciPy install get's really far, but it barfs when trying to compile > fastumath_unsigned. This seems strange and not easily traceable to a > missing pre-req or anything. Below is the output from 'python setup.py > install'. Any help here at all would be very useful. I can provide > details like version nums of all the pre requisites and the like upon > request. Thanks in advance. This looks like a library problem. Are the hyperbolic inverse trigonometric functions not available with your platform. Or is their some header file that has to be included to get them? These are defined in the file as long as HAVE_INVERSE_HYPERBOLIC is not defined for your platform. In fastumathmodule.c there is a statement there that checks for a few platforms and it looks like BSD is included and so HAVE_INVERSE_HYPERBOLIC gets defined for the rest of the compilation. Doesn't FreeBSD define these? Are you just missing a proper math library? Anybody else seen this? -Travis O. From Bob.Cowdery at CGI-Europe.com Thu Jul 15 04:19:06 2004 From: Bob.Cowdery at CGI-Europe.com (Bob.Cowdery at CGI-Europe.com) Date: Thu, 15 Jul 2004 09:19:06 +0100 Subject: FW: [SciPy-user] Problem with Weave Message-ID: <9B40DB5FBF7D2048AD79C2A91F862A51773092@STEVAPPS05.Stevenage.CGI-Europe.com> Eric Update on problem plus another question: As I didn't get a response yet I thought I would add what else I have found out. This is fairly bizarre. When I do a code update if I then do a fair number of iterations running from the main in that module before I try to run the application, most times the app then works. If I just do one iteration to compile the code generally the app will still fail. If I do a code update and run the app straight away it always fails. I also notice that I sometimes see a message saying the catalogue is corrupt and being removed but I haven't tied down exactly when this occurs. When it fails the symptoms are as the posting below. The good news is the code flies. I have gone from 100% processor and a time that well overshot my 46ms timebox to a few % utilisation <1ms execution time. The way variables are just punted in and out of the 'C' code automatically is also great. Question: I pass in a lot of arrays which need to persist across calls and that works great. I also pass in two scalars that also need to persist but return_val presumable can only return one value as per normal with 'C'. What I have done to get round this is pass in a pre-dimensioned array and I copy my two values into this at the end of the 'C' code then pull them back out into class variables in the python code. Is this the best way to do this? Thanks Bob -----Original Message----- From: Cowdery, Bob [UK] Sent: 12 July 2004 12:55 To: 'SciPy Users List' Subject: RE: [SciPy-user] Problem with Weave Hi Eric Thanks for the pointers. Yes that bit works fine now. ---- Unfortunately I have run into a much more obtuse problem. I converted a piece of code that had a nested loop as I could only get rid of the inner loop with array functions and it was still too slow by a large factor. However I don't think the actual code is causing this problem as almost any code blows up on me. The code is at the end just to complete the story. This code compiles and tests out ok if I run it directly from a main within the same module. When I try to run it within the application, it compiles ok and I get 'file changed' then every time it is invoked I get an exception: Exception exceptions.RuntimeError: 'maximum recursion depth exceeded' in > ignored The function is not called recursively, however it is called on a separate thread every 46ms or so. I thought at first it might be getting called mutiple time while it was compiling but it's synchronous so the thread is forced to wait first time while it compiles. After this failure it locks up the application. Once the application exits I am left with gnuplot_helper.exe and wgnuplot_helper.exe (neither of which I use) taking all my processer and I have to kill them off. Before that I just notice dumpreg is there and then it exits. It's very unpredictable, for example first thing this morning I ran it and it appeared to be running through although it wasn't actually doing what it should. As I wasn't sure if it had really compiled the current text I replaced the code with a printf() and it failed. Since then I can't get it to run through at all EVEN WITH no code in the 'code' variable. I even removed the array assignments and all the parameters incase they were the problem. I couldn't figure out how to pass in class variables directly, that's why they are all copied to local variables. I am completely bemused by what's going on here. Any ideas? Bob. ------------ code = """ double ISum = 0.0; double QSum = 0.0; double lsb = 0.0; double usb = 0.0; for(int smpl = 0 ; smpl < IN_SZ ; smpl++) { I_delay[delay_ptr] = I_in[smpl]; Q_delay[delay_ptr] = Q_in[smpl]; if(++delay_ptr == DELAY_LEN) delay_ptr = 0; ISum = 0.0; QSum = 0.0; for(int tap = -40 ; tap <= 40 ; tap++) { ISum = ISum + filter_phasing[tap+(DELAY_LEN-1)/2] * I_delay[delay_ptr]; QSum = QSum + filter_phasing[(tap-(DELAY_LEN-1)/2)-1] * Q_delay[delay_ptr]; if(++delay_ptr == DELAY_LEN) delay_ptr = 0; } if(peak>1) peak = peak * agcdecay; if(sideband == 0) { lsb = ISum + QSum; if(abs(lsb) > peak) peak = abs(lsb); real_out[smpl] = int(lsb*16384.0/peak); } else { usb = ISum - QSum; if(abs(usb) > peak) peak = abs(usb); real_out[smpl] = int(usb*16384.0/peak); } } """ IN_SZ = len(self.m_I_in) I_in = self.m_I_in Q_in = self.m_Q_in I_delay = self.m_I_Delay Q_delay = self.m_Q_Delay delay_ptr = self.m_delay_ptr DELAY_LEN = self.DELAY_LEN filter_phasing = self.m_filter_phasing real_out = self.m_real_out #weave.inline(code, ['sideband', 'agcdecay', 'peak', 'I_in', 'IN_SZ', 'Q_in', 'I_delay', 'Q_delay', 'delay_ptr', 'DELAY_LEN', 'filter_phasing', 'real_out']) -----Original Message----- From: eric jones [mailto:eric at enthought.com] Sent: 12 July 2004 07:49 To: SciPy Users List Subject: Re: [SciPy-user] Problem with Weave Hey Bob, The docs are seriously out of date. Sorry about that. Much of the crud that you used to need for handling C++->Python type conversions is now gone. Here is how I wrote your example: C:\Documents and Settings\eric>python Enthought Edition build 1057 Python 2.3.3 (#51, Feb 16 2004, 04:07:52) [MSC v.1200 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import weave >>> a=1 >>> a=weave.inline("return_val=a+1;",['a']) file changed msvc No module named msvccompiler in scipy_distutils, trying from distutils.. No module named msvccompiler in scipy_distutils, trying from distutils.. Missing compiler_cxx fix for MSVCCompiler >>> a 2 The output is quite verbose now (too verbose), but the amount of code you need to write is less. The weave/examples files (weave will be installed in your site-packages directory) generally have been updated to the new syntax and will provide some help. Also, if you are a C++ person, then looking at the weave/scxx/object.h file will give some hints as to what is going on. see ya, eric Bob.Cowdery at CGI-Europe.com wrote: > I am about to convert some python code to 'C' so am going through the > Weave documentation. I can get most things to work except returning > values from the 'C' code. I would guess the correct libraries are not > getting into the compile but I don't know how to fix it. I can compile > and run any 'C' code fine until I use any of the Py:: classes. > > As an example if I type: > >>>> import weave >>>> a=1 >>>> a=weave.inline("return_val = > Py::new_reference_to(Py::Int(a+1));",['a'], verbose=2) > > this gives me: > > file changed > running build_ext > building 'sc_5b09eaf68ff529a1fbaedc892ca5a4531' extension C:\Program > Files\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox > /MD /W3 /GX -IC:\Python22\lib\site-packages\weave > -IC:\Python22\lib\site-packages\weave\scxx -IC:\Python22\include > /TpC:\DOCUME~1\cowderyb\LOCALS~1\Temp\CowderyB\python22_compiled\sc_5b > 09eaf68ff529a1fbaedc892ca5a4531.cpp > /FoC:\DOCUME~1\cowderyb\LOCALS~1\Temp\CowderyB\python22_intermediate\compile r_ba943cc959c75c0df25fd4c114ec382f\Release\sc_5b09eaf68ff529a1fbaedc892ca5a4 531.obj > Traceback (most recent call last): > File "", line 1, in ? > File "C:\Python22\lib\site-packages\weave\inline_tools.py", line > 335, in inline > auto_downcast = auto_downcast, > File "C:\Python22\lib\site-packages\weave\inline_tools.py", line > 439, in compile_function > verbose=verbose, **kw) > File "C:\Python22\lib\site-packages\weave\ext_tools.py", line 340, > in compile > verbose = verbose, **kw) > File "C:\Python22\lib\site-packages\weave\build_tools.py", line 272, > in build_extension > setup(name = module_name, ext_modules = [ext],verbose=verb) > File "C:\Python22\lib\site-packages\scipy_distutils\core.py", line > 42, in setup > return old_setup(**new_attr) > File "C:\Python22\lib\distutils\core.py", line 157, in setup > raise SystemExit, "error: " + str(msg) > CompileError: error: command '"C:\Program Files\Microsoft Visual > Studio .NET 2003\Vc7\bin\cl.exe"' failed with exit status 2 > > Any help appreciated. > > Thanks > Bob > > > Bob Cowdery > CGI Senior Technical Architect > +44(0)1438 791517 > Mobile: +44(0)7771 532138 > bob.cowdery at cgi-europe.com > > > > > **** Confidentiality Notice **** Proprietary/Confidential Information > belonging to CGI Group Inc. and its affiliates may be contained in > this message. If you are not a recipient indicated or intended in this > message (or responsible for delivery of this message to such person), > or you think for any reason that this message may have been addressed > to you in error, you may not use or copy or deliver this message to > anyone else. In such case, you should destroy this message and are > asked to notify the sender by reply email. > >----------------------------------------------------------------------- >- > >_______________________________________________ >SciPy-user mailing list >SciPy-user at scipy.net http://www.scipy.net/mailman/listinfo/scipy-user > > _______________________________________________ SciPy-user mailing list SciPy-user at scipy.net http://www.scipy.net/mailman/listinfo/scipy-user *** Confidentiality Notice *** Proprietary/Confidential Information belonging to CGI Group Inc. and its affiliates may be contained in this message. If you are not a recipient indicated or intended in this message (or responsible for delivery of this message to such person), or you think for any reason that this message may have been addressed to you in error, you may not use or copy or deliver this message to anyone else. In such case, you should destroy this message and are asked to notify the sender by reply email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt at hotdispatch.com Thu Jul 15 11:23:18 2004 From: matt at hotdispatch.com (matt) Date: Thu, 15 Jul 2004 11:23:18 -0400 Subject: [SciPy-user] fastumath installation problem In-Reply-To: <40F5B273.3080309@ee.byu.edu> References: <72A41D2A-D5DC-11D8-8CFC-003065BA9C84@hotdispatch.com> <40F5B273.3080309@ee.byu.edu> Message-ID: I guess that's what I'm looking for. What header file do these function definitions usually live in, or what compilation switch do I use to tell the installer I don't have those functions and don't care? -Matt B On Jul 14, 2004, at 6:23 PM, Travis E. Oliphant wrote: > matt wrote: >> So my SciPy install was going great. I installed Atlas and all of >> the other prerequisites without a hitch. I'm using FreeBSD 4.9 and >> installed most of the pre-req's from the ports package. The actual >> SciPy install get's really far, but it barfs when trying to compile >> fastumath_unsigned. This seems strange and not easily traceable to a >> missing pre-req or anything. Below is the output from 'python >> setup.py install'. Any help here at all would be very useful. I >> can provide details like version nums of all the pre requisites and >> the like upon request. Thanks in advance. > > This looks like a library problem. Are the hyperbolic inverse > trigonometric functions not available with your platform. Or is their > some header file that has to be included to get them? > > These are defined in the file as long as > > HAVE_INVERSE_HYPERBOLIC > > is not defined for your platform. > > In fastumathmodule.c there is a statement there that checks for a few > platforms and it looks like BSD is included and so > HAVE_INVERSE_HYPERBOLIC gets defined for the rest of the compilation. > Doesn't FreeBSD define these? Are you just missing a proper math > library? > > Anybody else seen this? > > -Travis O. > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From matt at hotdispatch.com Thu Jul 15 11:44:19 2004 From: matt at hotdispatch.com (matt) Date: Thu, 15 Jul 2004 11:44:19 -0400 Subject: [SciPy-user] fastumath installation problem In-Reply-To: <40F5B273.3080309@ee.byu.edu> References: <72A41D2A-D5DC-11D8-8CFC-003065BA9C84@hotdispatch.com> <40F5B273.3080309@ee.byu.edu> Message-ID: I did some checking, and asinh and the other atrigh functions are all available in the standard math library math.h/libm.a on my system. I guess the question now is how to modify the installer to see them. -Matt B On Jul 14, 2004, at 6:23 PM, Travis E. Oliphant wrote: > matt wrote: >> So my SciPy install was going great. I installed Atlas and all of >> the other prerequisites without a hitch. I'm using FreeBSD 4.9 and >> installed most of the pre-req's from the ports package. The actual >> SciPy install get's really far, but it barfs when trying to compile >> fastumath_unsigned. This seems strange and not easily traceable to a >> missing pre-req or anything. Below is the output from 'python >> setup.py install'. Any help here at all would be very useful. I >> can provide details like version nums of all the pre requisites and >> the like upon request. Thanks in advance. > > This looks like a library problem. Are the hyperbolic inverse > trigonometric functions not available with your platform. Or is their > some header file that has to be included to get them? > > These are defined in the file as long as > > HAVE_INVERSE_HYPERBOLIC > > is not defined for your platform. > > In fastumathmodule.c there is a statement there that checks for a few > platforms and it looks like BSD is included and so > HAVE_INVERSE_HYPERBOLIC gets defined for the rest of the compilation. > Doesn't FreeBSD define these? Are you just missing a proper math > library? > > Anybody else seen this? > > -Travis O. > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From matt at hotdispatch.com Thu Jul 15 12:23:43 2004 From: matt at hotdispatch.com (matt) Date: Thu, 15 Jul 2004 12:23:43 -0400 Subject: [SciPy-user] fastumath installation problem In-Reply-To: <40F5B273.3080309@ee.byu.edu> References: <72A41D2A-D5DC-11D8-8CFC-003065BA9C84@hotdispatch.com> <40F5B273.3080309@ee.byu.edu> Message-ID: <570F58FC-D67B-11D8-8CFC-003065BA9C84@hotdispatch.com> So I worked around this, if people have the problem in the future. I edited fastumathmodule.c to comment out the line that defines HAVE_INVERSE_HYPERBOLIC and the install works fine. This seems sub optimal, since those functions do really exist on my machine, but whatever, I'm happy if it works. -Matt B On Jul 14, 2004, at 6:23 PM, Travis E. Oliphant wrote: > matt wrote: >> So my SciPy install was going great. I installed Atlas and all of >> the other prerequisites without a hitch. I'm using FreeBSD 4.9 and >> installed most of the pre-req's from the ports package. The actual >> SciPy install get's really far, but it barfs when trying to compile >> fastumath_unsigned. This seems strange and not easily traceable to a >> missing pre-req or anything. Below is the output from 'python >> setup.py install'. Any help here at all would be very useful. I >> can provide details like version nums of all the pre requisites and >> the like upon request. Thanks in advance. > > This looks like a library problem. Are the hyperbolic inverse > trigonometric functions not available with your platform. Or is their > some header file that has to be included to get them? > > These are defined in the file as long as > > HAVE_INVERSE_HYPERBOLIC > > is not defined for your platform. > > In fastumathmodule.c there is a statement there that checks for a few > platforms and it looks like BSD is included and so > HAVE_INVERSE_HYPERBOLIC gets defined for the rest of the compilation. > Doesn't FreeBSD define these? Are you just missing a proper math > library? > > Anybody else seen this? > > -Travis O. > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From Tikva at israsrv.net.il Thu Jul 15 13:07:38 2004 From: Tikva at israsrv.net.il (Tikva Bonneh) Date: Thu, 15 Jul 2004 20:07:38 +0300 Subject: [SciPy-user] bug in errorbars in gplt Message-ID: <001201c46a8e$3d6424d0$210110ac@bonneh> I am using errorbars in gplt and there is a line width = fac*(x[2]-x[1]) and if x has only two components I get index out of range. Is there going to be a downloadable version that includes a fix? My problem in fixing it that I want to install my program in all the sites that we are doing our experiments in, and it complicates the installation if I have to include a fix. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tikva at israsrv.net.il Thu Jul 15 14:36:14 2004 From: Tikva at israsrv.net.il (Tikva Bonneh) Date: Thu, 15 Jul 2004 21:36:14 +0300 Subject: [SciPy-user] bug in errorbars in gplt References: <001201c46a8e$3d6424d0$210110ac@bonneh> Message-ID: <005f01c46a9a$9d9b3940$210110ac@bonneh> Sorry. I meant xplt. ----- Original Message ----- From: Tikva Bonneh To: SciPy Users List Sent: Thursday, July 15, 2004 8:07 PM Subject: [SciPy-user] bug in errorbars in gplt I am using errorbars in gplt and there is a line width = fac*(x[2]-x[1]) and if x has only two components I get index out of range. Is there going to be a downloadable version that includes a fix? My problem in fixing it that I want to install my program in all the sites that we are doing our experiments in, and it complicates the installation if I have to include a fix. ------------------------------------------------------------------------------ _______________________________________________ SciPy-user mailing list SciPy-user at scipy.net http://www.scipy.net/mailman/listinfo/scipy-user -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt at hotdispatch.com Fri Jul 16 14:59:43 2004 From: matt at hotdispatch.com (matt) Date: Fri, 16 Jul 2004 14:59:43 -0400 Subject: [SciPy-user] wierd problem Message-ID: <4C682339-D75A-11D8-8A82-003065BA9C84@hotdispatch.com> So yesterday I installed scipy and I successfully used fsolve per the example in the docs. Today when I logged back into my machine, fsolve had stopped working though. >>> scipy.optimize.fsolve(func,1) Traceback (most recent call last): File "", line 1, in ? File "/usr/local/lib/python2.3/site-packages/scipy_base/ppimport.py", line 270, in __getattr__ module = self._ppimport_importer() File "/usr/local/lib/python2.3/site-packages/scipy_base/ppimport.py", line 243, in _ppimport_importer module = __import__(name,None,None,['*']) File "/usr/local/lib/python2.3/site-packages/scipy/optimize/__init__.py", line 11, in ? from lbfgsb import fmin_l_bfgs_b File "/usr/local/lib/python2.3/site-packages/scipy/optimize/lbfgsb.py", line 28, in ? import _lbfgsb ImportError: /usr/local/lib/libptf77blas.so.1: Undefined symbol "ATL_sptgemm" I'm wondering if the environment variables used in the build still need to be set to continue using this package. Anyone know for sure? -Matt B From matt at hotdispatch.com Fri Jul 16 15:37:14 2004 From: matt at hotdispatch.com (matt) Date: Fri, 16 Jul 2004 15:37:14 -0400 Subject: [SciPy-user] wierd problem In-Reply-To: <4C682339-D75A-11D8-8A82-003065BA9C84@hotdispatch.com> References: <4C682339-D75A-11D8-8A82-003065BA9C84@hotdispatch.com> Message-ID: <8A20FE88-D75F-11D8-8A82-003065BA9C84@hotdispatch.com> So I have more details on this: If I try: import scipy from optimize import fsolve I get an error that optimize doesn't exist. However, if I try: import scipy scipy.test() from optimize import fsolve then the import works fine and fsolve is available This seems super weird to me. Any ideas? -Matt B On Jul 16, 2004, at 2:59 PM, matt wrote: > So yesterday I installed scipy and I successfully used fsolve per the > example in the docs. Today when I logged back into my machine, fsolve > had stopped working though. > > >>> scipy.optimize.fsolve(func,1) > Traceback (most recent call last): > File "", line 1, in ? > File > "/usr/local/lib/python2.3/site-packages/scipy_base/ppimport.py", line > 270, in __getattr__ > module = self._ppimport_importer() > File > "/usr/local/lib/python2.3/site-packages/scipy_base/ppimport.py", line > 243, in _ppimport_importer > module = __import__(name,None,None,['*']) > File > "/usr/local/lib/python2.3/site-packages/scipy/optimize/__init__.py", > line 11, in ? > from lbfgsb import fmin_l_bfgs_b > File > "/usr/local/lib/python2.3/site-packages/scipy/optimize/lbfgsb.py", > line 28, in ? > import _lbfgsb > ImportError: /usr/local/lib/libptf77blas.so.1: Undefined symbol > "ATL_sptgemm" > > I'm wondering if the environment variables used in the build still > need to be set to continue using this package. Anyone know for sure? > > -Matt B > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From matt at hotdispatch.com Fri Jul 16 15:46:54 2004 From: matt at hotdispatch.com (matt) Date: Fri, 16 Jul 2004 15:46:54 -0400 Subject: [SciPy-user] output of failed test Message-ID: I get a failure when I run scipy.test() but I don't really know what the output means or how to fix it. Any help would be appreciated. -Matt B gnuplot: not found !! No test file 'test_Mplot.py' found for !! No test file 'test_build_py.py' found for !! No test file 'test_gistC.py' found for Found 4 tests for scipy.io.array_import Found 23 tests for scipy_base.function_base !! No test file 'test_ltisys.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 !! No test file 'test_ccompiler.py' found for !! No test file 'test_info_interpolate.py' found for !! No test file 'test_gist.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_info_gplt.py' found for !! No test file 'test_tree.py' found for Found 92 tests for scipy.stats.stats !! 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_sigtools.py' found for !! No test file 'test_optimize.py' found for !! No test file 'test_colorbar.py' found for !! No test file 'test_scipy_test_version.py' found for !! No test file 'test_plwf.py' found for !! No test file 'test_build_clib.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___init__.py' found for !! No test file 'test_shapetest.py' found for !! No test file 'test__fftpack.py' found for Found 5 tests for scipy.interpolate.fitpack !! No test file 'test___cvs_version__.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 2 tests for scipy_base.fastumath !! No test file 'test_waveforms.py' found for !! No test file 'test___init__.py' found for !! No test file 'test_convolve.py' found for !! FAILURE importing tests for /usr/local/lib/python2.3/site-packages/scipy/linalg/lapack.py:15: ImportError: /usr/local/lib/libptf77blas.so.1: Undefined symbol "ATL_sptgemm" (in ?) !! 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_data_store.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 !! FAILURE importing tests for /usr/local/lib/python2.3/site-packages/scipy/optimize/lbfgsb.py:28: ImportError: /usr/local/lib/libptf77blas.so.1: Undefined symbol "ATL_sptgemm" (in ?) !! No test file 'test_info_xplt.py' found for !! No test file 'test___init__.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_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___cvs_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 !! FAILURE importing tests for /usr/local/lib/python2.3/site-packages/scipy/linalg/tests/ test_basic.py:28: ImportError: cannot import name solve (in ?) !! 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_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___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_unixccompiler.py' found for !! No test file 'test__minpack.py' found for !! No test file 'test_interface.py' found for !! No test file 'test_scimath.py' found for !! No test file 'test_new_plot.py' found for !! No test file 'test___init__.py' found for !! No test file 'test___init__.py' found for !! No test file 'test_build.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_info_signal.py' found for !! No test file 'test_sync_cluster.py' found for !! No test file 'test_bsplines.py' found for !! No test file 'test___init__.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_pexec.py' found for !! No test file 'test_population.py' found for !! 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_ga_util.py' found for !! No test file 'test_genome.py' found for !! No test file 'test_Sparse.py' found for !! No test file 'test_install.py' found for !! 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 !! No test file 'test_pl3d.py' found for !! No test file 'test_info_special.py' found for !! No test file 'test___init__.py' found for !! No test file 'test___cvs_version__.py' found for !! No test file 'test_rv.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_orthogonal.py' found for !! No test file 'test_dfitpack.py' found for !! No test file 'test_core.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___cvs_version__.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 Found 4 tests for scipy.fftpack.helper !! No test file 'test_info_optimize.py' found for !! 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 Found 0 tests for __main__ Don't worry about a warning regarding the number of bytes read. Warning: 1000000 bytes requested, 20 bytes read. ........................................................................ .................................................................../ usr/local/lib/python2.3/site-packages/scipy/interpolate/fitpack2.py: 412: UserWarning: The coefficients of the spline returned have been computed as the minimal norm least-squares solution of a (numerically) rank deficient system (deficiency=7). If deficiency is large, the results may be inaccurate. Deficiency may strongly depend on the value of eps. warnings.warn(message) ........................................................................ ...............E........................................................ ........................................................................ ........................................................EEEE............ .....................Gegenbauer, a = 2.35311427589 E......EE....................E..........................EEE............. ..............Eshifted jacobi p,q = 4.0980264312 3.69358970804 EE.....................................................................T ies preclude use of exact statistic. ..Ties preclude use of exact statistic. ..................Testing alpha .Testing anglit .Testing arcsine ..Testing beta .Testing betaprime ..Testing bradford .Testing burr .Testing cauchy .Testing chi .Testing chi2 .Testing dgamma ..Testing dweibull .Testing erlang .Testing expon .Testing exponpow .Testing exponweib .Testing f .Testing fatiguelife .Testing fisk .Testing foldcauchy .Testing foldnorm .Testing frechet_l .Testing frechet_r .Testing gamma .Testing genextreme .Testing gengamma .Testing genhalflogistic .Testing genlogistic .Testing genpareto ..Testing gilbrat .Testing gompertz .Testing gumbel_l .Testing gumbel_r .Testing halfcauchy .Testing halflogistic .Testing halfnorm ..Testing hypsecant .Testing laplace .Testing loggamma .Testing logistic .Testing lognorm ..Testing lomax .Testing maxwell .Testing nakagami ..Testing ncf .Testing nct .Testing ncx2 .Testing norm .Testing pareto ..Testing powerlaw ....Testing rayleigh .Testing reciprocal .Testing t .Testing triang .Testing tukeylambda .Testing uniform .Testing weibull_max .Testing weibull_min ......... ====================================================================== ERROR: check_assoc_laguerre (scipy.special.basic.test_basic.test_assoc_laguerre) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.3/site-packages/scipy/special/tests/ test_basic.py", line 532, in check_assoc_laguerre a1 = genlaguerre(11,1) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 267, in genlaguerre x,w,mu0 = la_roots(n1,alpha,mu=1) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 251, in la_roots val = gen_roots_and_weights(n,an_La,sbn_La,mu0) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 121, in gen_roots_and_weights eig = get_eig_func() File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 91, in get_eig_func eig = scipy.linalg.eig AttributeError: 'module' object has no attribute 'eig' ====================================================================== ERROR: check_chebyc (scipy.special.basic.test_basic.test_chebyc) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.3/site-packages/scipy/special/tests/ test_basic.py", line 675, in check_chebyc C0 = chebyc(0) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 470, in chebyc x,w,mu0 = c_roots(n1,mu=1) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 457, in c_roots [x,w,mu0] = j_roots(n,-0.5,-0.5,mu=1) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 155, in j_roots val = gen_roots_and_weights(n,an_J,sbn_J,mu0) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 121, in gen_roots_and_weights eig = get_eig_func() File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 91, in get_eig_func eig = scipy.linalg.eig AttributeError: 'module' object has no attribute 'eig' ====================================================================== ERROR: check_chebys (scipy.special.basic.test_basic.test_chebys) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.3/site-packages/scipy/special/tests/ test_basic.py", line 692, in check_chebys S0 = chebys(0) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 501, in chebys x,w,mu0 = s_roots(n1,mu=1) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 488, in s_roots [x,w,mu0] = j_roots(n,0.5,0.5,mu=1) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 155, in j_roots val = gen_roots_and_weights(n,an_J,sbn_J,mu0) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 121, in gen_roots_and_weights eig = get_eig_func() File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 91, in get_eig_func eig = scipy.linalg.eig AttributeError: 'module' object has no attribute 'eig' ====================================================================== ERROR: check_chebyt (scipy.special.basic.test_basic.test_chebyt) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.3/site-packages/scipy/special/tests/ test_basic.py", line 709, in check_chebyt T1 = chebyt(1) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 419, in chebyt x,w,mu = t_roots(n1,mu=1) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 405, in t_roots val = gen_roots_and_weights(n,an_J,sbn_J,mu0) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 121, in gen_roots_and_weights eig = get_eig_func() File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 91, in get_eig_func eig = scipy.linalg.eig AttributeError: 'module' object has no attribute 'eig' ====================================================================== ERROR: check_chebyu (scipy.special.basic.test_basic.test_chebyu) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.3/site-packages/scipy/special/tests/ test_basic.py", line 725, in check_chebyu U1 = chebyu(1) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 442, in chebyu base = jacobi(n,0.5,0.5,monic=monic) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 169, in jacobi x,w,mu = j_roots(n,alpha,beta,mu=1) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 155, in j_roots val = gen_roots_and_weights(n,an_J,sbn_J,mu0) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 121, in gen_roots_and_weights eig = get_eig_func() File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 91, in get_eig_func eig = scipy.linalg.eig AttributeError: 'module' object has no attribute 'eig' ====================================================================== ERROR: check_gegenbauer (scipy.special.basic.test_basic.test_gegenbauer) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.3/site-packages/scipy/special/tests/ test_basic.py", line 1089, in check_gegenbauer Ca1 = gegenbauer(1,a) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 383, in gegenbauer base = jacobi(n,alpha-0.5,alpha-0.5,monic=monic) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 169, in jacobi x,w,mu = j_roots(n,alpha,beta,mu=1) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 155, in j_roots val = gen_roots_and_weights(n,an_J,sbn_J,mu0) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 121, in gen_roots_and_weights eig = get_eig_func() File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 91, in get_eig_func eig = scipy.linalg.eig AttributeError: 'module' object has no attribute 'eig' ====================================================================== ERROR: check_hermite (scipy.special.basic.test_basic.test_hermite) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.3/site-packages/scipy/special/tests/ test_basic.py", line 1044, in check_hermite H0 = hermite(0) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 325, in hermite x,w,mu0 = h_roots(n1,mu=1) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 312, in h_roots val = gen_roots_and_weights(n,an_H,sbn_H,mu0) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 121, in gen_roots_and_weights eig = get_eig_func() File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 91, in get_eig_func eig = scipy.linalg.eig AttributeError: 'module' object has no attribute 'eig' ====================================================================== ERROR: check_hermitenorm (scipy.special.basic.test_basic.test_hermite) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.3/site-packages/scipy/special/tests/ test_basic.py", line 1060, in check_hermitenorm H0 = hermitenorm(0) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 358, in hermitenorm x,w,mu0 = he_roots(n1,mu=1) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 345, in he_roots val = gen_roots_and_weights(n,an_He,sbn_He,mu0) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 121, in gen_roots_and_weights eig = get_eig_func() File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 91, in get_eig_func eig = scipy.linalg.eig AttributeError: 'module' object has no attribute 'eig' ====================================================================== ERROR: check_jacobi (scipy.special.basic.test_basic.test_jacobi) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.3/site-packages/scipy/special/tests/ test_basic.py", line 1263, in check_jacobi P1 = jacobi(1,a,b) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 169, in jacobi x,w,mu = j_roots(n,alpha,beta,mu=1) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 155, in j_roots val = gen_roots_and_weights(n,an_J,sbn_J,mu0) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 121, in gen_roots_and_weights eig = get_eig_func() File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 91, in get_eig_func eig = scipy.linalg.eig AttributeError: 'module' object has no attribute 'eig' ====================================================================== ERROR: check_genlaguerre (scipy.special.basic.test_basic.test_laguerre) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.3/site-packages/scipy/special/tests/ test_basic.py", line 1567, in check_genlaguerre lag0 = genlaguerre(0,k) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 267, in genlaguerre x,w,mu0 = la_roots(n1,alpha,mu=1) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 251, in la_roots val = gen_roots_and_weights(n,an_La,sbn_La,mu0) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 121, in gen_roots_and_weights eig = get_eig_func() File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 91, in get_eig_func eig = scipy.linalg.eig AttributeError: 'module' object has no attribute 'eig' ====================================================================== ERROR: check_laguerre (scipy.special.basic.test_basic.test_laguerre) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.3/site-packages/scipy/special/tests/ test_basic.py", line 1552, in check_laguerre lag0 = laguerre(0) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 292, in laguerre x,w,mu0 = l_roots(n1,mu=1) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 283, in l_roots return la_roots(n,0.0,mu=mu) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 251, in la_roots val = gen_roots_and_weights(n,an_La,sbn_La,mu0) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 121, in gen_roots_and_weights eig = get_eig_func() File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 91, in get_eig_func eig = scipy.linalg.eig AttributeError: 'module' object has no attribute 'eig' ====================================================================== ERROR: check_legendre (scipy.special.basic.test_basic.test_legendre) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.3/site-packages/scipy/special/tests/ test_basic.py", line 1581, in check_legendre leg0 = legendre(0) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 569, in legendre x,w,mu0 = p_roots(n1,mu=1) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 560, in p_roots return j_roots(n,0.0,0.0,mu=mu) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 155, in j_roots val = gen_roots_and_weights(n,an_J,sbn_J,mu0) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 121, in gen_roots_and_weights eig = get_eig_func() File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 91, in get_eig_func eig = scipy.linalg.eig AttributeError: 'module' object has no attribute 'eig' ====================================================================== ERROR: check_sh_chebyu (scipy.special.basic.test_basic.test_sh_chebyu) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.3/site-packages/scipy/special/tests/ test_basic.py", line 1855, in check_sh_chebyu Us1 = sh_chebyu(1) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 547, in sh_chebyu base = sh_jacobi(n,2.0,1.5,monic=monic) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 228, in sh_jacobi x,w,mu0 = js_roots(n1,p,q,mu=1) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 205, in js_roots val = gen_roots_and_weights(n,an_Js,sbn_Js,mu0) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 121, in gen_roots_and_weights eig = get_eig_func() File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 91, in get_eig_func eig = scipy.linalg.eig AttributeError: 'module' object has no attribute 'eig' ====================================================================== ERROR: check_sh_jacobi (scipy.special.basic.test_basic.test_sh_jacobi) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.3/site-packages/scipy/special/tests/ test_basic.py", line 1883, in check_sh_jacobi G1 = sh_jacobi(1,p,q) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 228, in sh_jacobi x,w,mu0 = js_roots(n1,p,q,mu=1) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 205, in js_roots val = gen_roots_and_weights(n,an_Js,sbn_Js,mu0) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 121, in gen_roots_and_weights eig = get_eig_func() File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 91, in get_eig_func eig = scipy.linalg.eig AttributeError: 'module' object has no attribute 'eig' ====================================================================== ERROR: check_sh_legendre (scipy.special.basic.test_basic.test_sh_legendre) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.3/site-packages/scipy/special/tests/ test_basic.py", line 1806, in check_sh_legendre Ps1 = sh_legendre(1) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 593, in sh_legendre x,w,mu0 = ps_roots(n,mu=1) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 584, in ps_roots return js_roots(n,1.0,1.0,mu=mu) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 205, in js_roots val = gen_roots_and_weights(n,an_Js,sbn_Js,mu0) File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 121, in gen_roots_and_weights eig = get_eig_func() File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 91, in get_eig_func eig = scipy.linalg.eig AttributeError: 'module' object has no attribute 'eig' ---------------------------------------------------------------------- Ran 703 tests in 6.979s FAILED (errors=15) From rkern at ucsd.edu Fri Jul 16 17:16:49 2004 From: rkern at ucsd.edu (Robert Kern) Date: Fri, 16 Jul 2004 16:16:49 -0500 Subject: [SciPy-user] wierd problem In-Reply-To: <4C682339-D75A-11D8-8A82-003065BA9C84@hotdispatch.com> References: <4C682339-D75A-11D8-8A82-003065BA9C84@hotdispatch.com> Message-ID: <40F845C1.1000001@ucsd.edu> matt wrote: > So yesterday I installed scipy and I successfully used fsolve per the > example in the docs. Today when I logged back into my machine, fsolve > had stopped working though. ATLAS seems to be unavailable when you are loading scipy. Where are your ATLAS libraries? Is that path in your LD_LIBRARY_PATH environment variable? -- Robert Kern rkern at ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter From matt at hotdispatch.com Fri Jul 16 18:07:18 2004 From: matt at hotdispatch.com (matt) Date: Fri, 16 Jul 2004 18:07:18 -0400 Subject: [SciPy-user] wierd problem In-Reply-To: <40F845C1.1000001@ucsd.edu> References: <4C682339-D75A-11D8-8A82-003065BA9C84@hotdispatch.com> <40F845C1.1000001@ucsd.edu> Message-ID: <81059784-D774-11D8-8A82-003065BA9C84@hotdispatch.com> I take it that means scipy doesn't save that info when it is built. Is there a companion to LD_LIBRARY_PATH for includes? I just did the standard ports collection install of atlas under FreeBSD, which dumps in /usr/local. I'll check that environ and see what happens. Thanks. -Matt On Jul 16, 2004, at 5:16 PM, Robert Kern wrote: > matt wrote: > >> So yesterday I installed scipy and I successfully used fsolve per the >> example in the docs. Today when I logged back into my machine, >> fsolve had stopped working though. > > ATLAS seems to be unavailable when you are loading scipy. Where are > your ATLAS libraries? Is that path in your LD_LIBRARY_PATH environment > variable? > > -- > Robert Kern > rkern at ucsd.edu > > "In the fields of hell where the grass grows high > Are the graves of dreams allowed to die." > -- Richard Harter > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From rkern at ucsd.edu Fri Jul 16 18:45:36 2004 From: rkern at ucsd.edu (Robert Kern) Date: Fri, 16 Jul 2004 17:45:36 -0500 Subject: [SciPy-user] wierd problem In-Reply-To: <81059784-D774-11D8-8A82-003065BA9C84@hotdispatch.com> References: <4C682339-D75A-11D8-8A82-003065BA9C84@hotdispatch.com> <40F845C1.1000001@ucsd.edu> <81059784-D774-11D8-8A82-003065BA9C84@hotdispatch.com> Message-ID: <40F85A90.1090802@ucsd.edu> matt wrote: > I take it that means scipy doesn't save that info when it is built. Is > there a companion to LD_LIBRARY_PATH for includes? I just did the > standard ports collection install of atlas under FreeBSD, which dumps in > /usr/local. I'll check that environ and see what happens. Thanks. LD_LIBRARY_PATH is checked at runtime for dynamic libraries. It has nothing to do with compilation per se. Are libatlas and ATLAS' libblas and liblapack all in /usr/local/lib ? Are they dynamically link at all? or are they statically linked (i.e. are they .so libraries or .a)? You can also check the link line from the compilation of optimize/_lbfgsb and make sure that it links to all of the ATLAS libraries. > -Matt -- 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 matt at hotdispatch.com Sat Jul 17 14:10:31 2004 From: matt at hotdispatch.com (matt) Date: Sat, 17 Jul 2004 14:10:31 -0400 Subject: [SciPy-user] wierd problem In-Reply-To: <40F85A90.1090802@ucsd.edu> References: <4C682339-D75A-11D8-8A82-003065BA9C84@hotdispatch.com> <40F845C1.1000001@ucsd.edu> <81059784-D774-11D8-8A82-003065BA9C84@hotdispatch.com> <40F85A90.1090802@ucsd.edu> Message-ID: <96EF1010-D81C-11D8-933F-003065BA9C84@hotdispatch.com> Here is a partial listing of what I have installed in /usr/local/lib. I put that path in LD_LIBRARY_PATH and had no change in test output or usage in general. I seem to have libalapack not liblapack. Is that an issue? -Matt libalapack.a libdf.so.1 libgthread12.so libpq.so.3 libwwwapp.so libwwwstream.so libalapack.so libecpg.a libgthread12.so.3 libptcblas.a libwwwapp.so.1 libwwwstream.so.1 libalapack.so.1 libecpg.so libiconv.a libptcblas.so libwwwcache.a libwwwtelnet.a libalapack_r.a libecpg.so.3 libiconv.so libptcblas.so.1 libwwwcache.so libwwwtelnet.so libalapack_r.so libexpat.a libiconv.so.3 libptf77blas.a libwwwcache.so.1 libwwwtelnet.so.1 libalapack_r.so.1 libatlas.a libf77blas.so.1 libjpeg.so librfftw.so.2 libwwwdir.so libwwwutils.so libatlas.so libf77blas_r.a libjpeg.so.9 libruby.so libwwwdir.so.1 libwwwutils.so.1 libatlas.so.1 libf77blas_r.so libkpathsea.a libruby.so.16 libwwwfile.a libwwwxml.a libatlas_r.a libf77blas_r.so.1 liblapack.a libt1.a libwwwfile.so libwwwxml.so libatlas_r.so libfftw.a liblapack.so libt1.so libwwwfile.so.1 libwwwxml.so.1 libatlas_r.so.1 libfftw.so liblapack.so.3 libt1.so.5 libwwwftp.a libwwwzip.a libblas.a libfftw.so.2 libmd5.a libt1x.a libwwwftp.so libwwwzip.so libblas.so libfreetype.a libmd5.so libt1x.so libwwwftp.so.1 libwwwzip.so.1 libblas.so.2 libfreetype.so libmd5.so.1 libt1x.so.5 libwwwgopher.a libxml2.a libcblas.a libfreetype.so.9 libmfhdf.a libtcl84.a libwwwgopher.so libxml2.so libcblas.so libgdbm.a libmfhdf.so libtcl84.so libwwwgopher.so.1 libxml2.so.5 libcblas.so.1 libgdbm.so libmfhdf.so.2 libtcl84.so.1 libwwwhtml.a libxmlparse.a libcblas_r.a libgdbm.so.3 libmm.a libtclstub84.a libwwwhtml.so libxmlparse.so libcblas_r.so libgettextlib-0.12.1.so libmm.la libtiff.a libwwwhtml.so.1 libxmlparse.so.1 libcblas_r.so.1 libgettextlib.so libmm.so libtiff.so libwwwhttp.a libxmltok.a On Jul 16, 2004, at 6:45 PM, Robert Kern wrote: > matt wrote: > >> I take it that means scipy doesn't save that info when it is built. >> Is there a companion to LD_LIBRARY_PATH for includes? I just did the >> standard ports collection install of atlas under FreeBSD, which dumps >> in /usr/local. I'll check that environ and see what happens. >> Thanks. > > LD_LIBRARY_PATH is checked at runtime for dynamic libraries. It has > nothing to do with compilation per se. Are libatlas and ATLAS' libblas > and liblapack all in /usr/local/lib ? Are they dynamically link at > all? or are they statically linked (i.e. are they .so libraries or > .a)? > > You can also check the link line from the compilation of > optimize/_lbfgsb and make sure that it links to all of the ATLAS > libraries. > >> -Matt > > -- > Robert Kern > rkern at ucsd.edu > > "In the fields of hell where the grass grows high > Are the graves of dreams allowed to die." > -- Richard Harter > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From matt at hotdispatch.com Sat Jul 17 15:26:37 2004 From: matt at hotdispatch.com (matt) Date: Sat, 17 Jul 2004 15:26:37 -0400 Subject: [SciPy-user] Accumulated current problems Message-ID: <388A9B84-D827-11D8-933F-003065BA9C84@hotdispatch.com> 1) scipy.test() still returns errors about: File "/usr/local/lib/python2.3/site-packages/scipy/special/orthogonal.py", line 91, in get_eig_func eig = scipy.linalg.eig AttributeError: 'module' object has no attribute 'eig' 2) I tried using the fsolve example, but I can't import optimize until I run the tests. After running the tests, I can load stuff from optimize, but I get an error that cos isn't defined I can get cos to work if I manually import Numeric. I would think that the init of scipy would do this for me (certainly implied by the example) 3) I've tried setting LD_LIBRARY_PATH and all of the FFTW,DJBFFTW,ATLAS type environ variables, and scipy still seems to have problems finding libraries even though I have both the static and dynamic ones present and pointed to. From rkern at ucsd.edu Sat Jul 17 18:03:30 2004 From: rkern at ucsd.edu (Robert Kern) Date: Sat, 17 Jul 2004 17:03:30 -0500 Subject: [SciPy-user] Accumulated current problems In-Reply-To: <388A9B84-D827-11D8-933F-003065BA9C84@hotdispatch.com> References: <388A9B84-D827-11D8-933F-003065BA9C84@hotdispatch.com> Message-ID: <40F9A232.5020301@ucsd.edu> matt wrote: [snip] > 3) > > I've tried setting LD_LIBRARY_PATH and all of the FFTW,DJBFFTW,ATLAS > type environ variables, and scipy still seems to have problems finding > libraries even though I have both the static and dynamic ones present > and pointed to. I think all of your problems are stemming from the inability to correctly link to the ATLAS libraries. The weird import behaviors that you see follow directly from a failed import of the linear algebra stuff. If you can try doing a clean build again, check the link command arguments that are used when compiling the linear algebra modules (fblas, flapack, cblas, clapack, etc.). You *do* have a liblapack in /usr/local/lib, but it may not be the liblapack that has ATLAS routines in it (see the NOTES section, item 2 of SciPy's INSTALL.txt). (Free)BSD is going to be hard because I don't think there are many SciPy users on those platforms. -- 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 matt at hotdispatch.com Mon Jul 19 18:10:13 2004 From: matt at hotdispatch.com (matt) Date: Mon, 19 Jul 2004 18:10:13 -0400 Subject: [SciPy-user] fsolve and additional parameters Message-ID: <6884E550-D9D0-11D8-B337-003065BA9C84@hotdispatch.com> fsolve's first argument is a function of a single variable. it tries to modify the input until the output is 0. What if I want the function to take an extra parameter as an input to be ignored by fsolve? My specific problem is that I want to set up an OO system that uses fsolve. I have a superclass with a method that uses fsolve. I have subclasses that define different systems of equations in their methods. I want the superclass to call fsolve on the subclasses method and collect results. The problem is that envoking the subclass method inherently passes the object as the first argument and fsolve expects a single input single output function. Doing it in the form: class superclassname def mysolve fsolve(self.equations,guesses) class subclassname(superclassname): def equations(x) return x fails because envoking self.equations passes self as the first arg automatically, and python complains that method equations got 1 arg and needs 2 Alternately in the form: class superclassname def mysolve fsolve(self.equations,guesses) class subclassname(superclassname): def equations(self,x) return self,x fails because fsolve says that the input and output shapes of equations are not the same. Any ideas on how to use fsolve on a class method?? -Matt From Fernando.Perez at colorado.edu Mon Jul 19 18:46:43 2004 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Mon, 19 Jul 2004 16:46:43 -0600 Subject: [SciPy-user] fsolve and additional parameters In-Reply-To: <6884E550-D9D0-11D8-B337-003065BA9C84@hotdispatch.com> References: <6884E550-D9D0-11D8-B337-003065BA9C84@hotdispatch.com> Message-ID: <40FC4F53.1000607@colorado.edu> matt wrote: > class subclassname(superclassname): > def equations(self,x) > return self,x You probably want to use something like def equations(self,x): return x Note that your pseudocode was lacking ':' at the end of the def. You might want to read up a bit on python's object model to understand better how 'self' is passed around, since your questions are more related to handling of methods in python than to fsolve itself. Note that you rarely return 'self', and when you do, it's typically returned alone (not with additional things) for purposes of method chaining: foo.meth1().meth2().meth3() can only be done if each of methN returns self (or some suitable copy thereof). HTH. Best, f From matt at hotdispatch.com Mon Jul 19 18:52:33 2004 From: matt at hotdispatch.com (matt) Date: Mon, 19 Jul 2004 18:52:33 -0400 Subject: [SciPy-user] fsolve and additional parameters In-Reply-To: <40FC4F53.1000607@colorado.edu> References: <6884E550-D9D0-11D8-B337-003065BA9C84@hotdispatch.com> <40FC4F53.1000607@colorado.edu> Message-ID: <521B4116-D9D6-11D8-B337-003065BA9C84@hotdispatch.com> I already tried this. Fsolve checks "equations" and complains that the input and output shapes aren't the same. -Matt On Jul 19, 2004, at 6:46 PM, Fernando Perez wrote: > matt wrote: >> class subclassname(superclassname): >> def equations(self,x) >> return self,x > > You probably want to use something like > > def equations(self,x): > return x > > Note that your pseudocode was lacking ':' at the end of the def. > > You might want to read up a bit on python's object model to understand > better how 'self' is passed around, since your questions are more > related to handling of methods in python than to fsolve itself. > > Note that you rarely return 'self', and when you do, it's typically > returned alone (not with additional things) for purposes of method > chaining: > > foo.meth1().meth2().meth3() > > can only be done if each of methN returns self (or some suitable copy > thereof). > > HTH. > > Best, > > f > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From matt at hotdispatch.com Mon Jul 19 18:56:08 2004 From: matt at hotdispatch.com (matt) Date: Mon, 19 Jul 2004 18:56:08 -0400 Subject: [SciPy-user] fsolve and additional parameters In-Reply-To: <40FC4F53.1000607@colorado.edu> References: <6884E550-D9D0-11D8-B337-003065BA9C84@hotdispatch.com> <40FC4F53.1000607@colorado.edu> Message-ID: My mistake. This seems to work now. Thanks for the help. -Matt On Jul 19, 2004, at 6:46 PM, Fernando Perez wrote: > matt wrote: >> class subclassname(superclassname): >> def equations(self,x) >> return self,x > > You probably want to use something like > > def equations(self,x): > return x > > Note that your pseudocode was lacking ':' at the end of the def. > > You might want to read up a bit on python's object model to understand > better how 'self' is passed around, since your questions are more > related to handling of methods in python than to fsolve itself. > > Note that you rarely return 'self', and when you do, it's typically > returned alone (not with additional things) for purposes of method > chaining: > > foo.meth1().meth2().meth3() > > can only be done if each of methN returns self (or some suitable copy > thereof). > > HTH. > > Best, > > f > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From Fernando.Perez at colorado.edu Mon Jul 19 18:59:33 2004 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Mon, 19 Jul 2004 16:59:33 -0600 Subject: [SciPy-user] fsolve and additional parameters In-Reply-To: <521B4116-D9D6-11D8-B337-003065BA9C84@hotdispatch.com> References: <6884E550-D9D0-11D8-B337-003065BA9C84@hotdispatch.com> <40FC4F53.1000607@colorado.edu> <521B4116-D9D6-11D8-B337-003065BA9C84@hotdispatch.com> Message-ID: <40FC5255.70404@colorado.edu> matt wrote: > I already tried this. Fsolve checks "equations" and complains that the > input and output shapes aren't the same. I've never used fsolve myself, so I'm not sure what the issue is. But in general when asking python questions, I suggest you copy/paste an explicit traceback from your program, or even better, from a small test case at the interactive interpreter. A traceback will in general provide people with much more information to be able to give you more precise help. If you want, ipython (also hosted by scipy at http://ipython.scipy.org) has an exception mode which is extremely verbose, printing additional context and variable information. This may help when trying to get someone who doesn't have access to your code to be able to understand the issue better. But for starters, a regular python traceback will help. Best, f From matt at hotdispatch.com Mon Jul 19 19:04:27 2004 From: matt at hotdispatch.com (matt) Date: Mon, 19 Jul 2004 19:04:27 -0400 Subject: [SciPy-user] fsolve and additional parameters In-Reply-To: <40FC5255.70404@colorado.edu> References: <6884E550-D9D0-11D8-B337-003065BA9C84@hotdispatch.com> <40FC4F53.1000607@colorado.edu> <521B4116-D9D6-11D8-B337-003065BA9C84@hotdispatch.com> <40FC5255.70404@colorado.edu> Message-ID: Thanks. It's working now. Despite input and output of the function being different, fsolve stopped complaining and appears to be giving good results. Thanks everyone for the help/suggestions. -Matt On Jul 19, 2004, at 6:59 PM, Fernando Perez wrote: > matt wrote: >> I already tried this. Fsolve checks "equations" and complains that >> the input and output shapes aren't the same. > > I've never used fsolve myself, so I'm not sure what the issue is. But > in general when asking python questions, I suggest you copy/paste an > explicit traceback from your program, or even better, from a small > test case at the interactive interpreter. A traceback will in general > provide people with much more information to be able to give you more > precise help. > > If you want, ipython (also hosted by scipy at > http://ipython.scipy.org) has an exception mode which is extremely > verbose, printing additional context and variable information. This > may help when trying to get someone who doesn't have access to your > code to be able to understand the issue better. But for starters, a > regular python traceback will help. > > Best, > > f > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From matt at hotdispatch.com Tue Jul 20 13:53:04 2004 From: matt at hotdispatch.com (matt) Date: Tue, 20 Jul 2004 13:53:04 -0400 Subject: [SciPy-user] plotting question Message-ID: I read the wikki plotting tutorial and was left with a few questions. I want my code to automatically generate plots and dump them to files instead of displaying them. Any old image format or pdf would be fine. Is there a way to do this? I assume there must be since that functionality is integral to gnuplot. An example or pointer to one would be very useful. I'd be happy to add whatever I get to the plotting tutorial on the wikki. -Matt From Fernando.Perez at colorado.edu Tue Jul 20 14:19:34 2004 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Tue, 20 Jul 2004 12:19:34 -0600 Subject: [SciPy-user] plotting question In-Reply-To: References: Message-ID: <40FD6236.5010603@colorado.edu> matt wrote: > I read the wikki plotting tutorial and was left with a few questions. > I want my code to automatically generate plots and dump them to files > instead of displaying them. Any old image format or pdf would be fine. > Is there a way to do this? I assume there must be since that > functionality is integral to gnuplot. An example or pointer to one > would be very useful. I'd be happy to add whatever I get to the > plotting tutorial on the wikki. ipython, which I referred to before, comes with gnuplot integration, and it includes enhancements to the default plot() command to ease up automatic eps generation. If you say plot(x,y,filename='foo.eps'), you automatically get eps output instead of on-screen display. There are examples in the manual, and I can mail you more if you need. You can just browse the html manual on the ipython.scipy.org site for a feel of how it works. Regards, f From matt at hotdispatch.com Tue Jul 20 14:52:45 2004 From: matt at hotdispatch.com (matt) Date: Tue, 20 Jul 2004 14:52:45 -0400 Subject: [SciPy-user] plotting question In-Reply-To: <40FD6236.5010603@colorado.edu> References: <40FD6236.5010603@colorado.edu> Message-ID: I'm trying to keep my install minimal, and I don't really want to install ipython. Are there better docs anywhere for using plt or gplt to dump images? -Matt On Jul 20, 2004, at 2:19 PM, Fernando Perez wrote: > matt wrote: >> I read the wikki plotting tutorial and was left with a few questions. >> I want my code to automatically generate plots and dump them to >> files instead of displaying them. Any old image format or pdf would >> be fine. Is there a way to do this? I assume there must be since >> that functionality is integral to gnuplot. An example or pointer to >> one would be very useful. I'd be happy to add whatever I get to the >> plotting tutorial on the wikki. > > > > ipython, which I referred to before, comes with gnuplot integration, > and it includes enhancements to the default plot() command to ease up > automatic eps generation. If you say plot(x,y,filename='foo.eps'), > you automatically get eps output instead of on-screen display. There > are examples in the manual, and I can mail you more if you need. You > can just browse the html manual on the ipython.scipy.org site for a > feel of how it works. > > Regards, > > f > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From matt at hotdispatch.com Tue Jul 20 15:18:39 2004 From: matt at hotdispatch.com (matt) Date: Tue, 20 Jul 2004 15:18:39 -0400 Subject: [SciPy-user] plotting error Message-ID: <9B4DF68A-DA81-11D8-88EC-003065BA9C84@hotdispatch.com> I tried using the plot comand: plt.plot(x_stable,y_stable) and got the following output: (I'm guessing this may have to do with the fact that I ssh'd to the machine where I ran the code and don't have an x session going) GLib-CRITICAL **: file ghash.c: line 138 (g_hash_table_lookup): assertion `hash_table != NULL' failed. Gtk-WARNING **: gtk_type_create(): unknown parent type `21'. GLib-CRITICAL **: file ghash.c: line 138 (g_hash_table_lookup): assertion `hash_table != NULL' failed. GLib-CRITICAL **: file ghash.c: line 152 (g_hash_table_insert): assertion `hash_table != NULL' failed. GLib-CRITICAL **: file ghash.c: line 138 (g_hash_table_lookup): assertion `hash_table != NULL' failed. GLib-CRITICAL **: file ghash.c: line 152 (g_hash_table_insert): assertion `hash_table != NULL' failed. GLib-CRITICAL **: file ghash.c: line 138 (g_hash_table_lookup): assertion `hash_table != NULL' failed. GLib-CRITICAL **: file ghash.c: line 152 (g_hash_table_insert): assertion `hash_table != NULL' failed. GLib-CRITICAL **: file ghash.c: line 138 (g_hash_table_lookup): assertion `hash_table != NULL' failed. Gtk-WARNING **: gtk_type_create(): unknown parent type `21'. Gtk-CRITICAL **: file gtktypeutils.c: line 337 (gtk_type_class): assertion `node != NULL' failed. Gtk-WARNING **: gtk_arg_type_new(): argument class in "GtkContainer::border_width" is not in the `(null)' ancestry Gtk-CRITICAL **: file gtkobject.c: line 939 (gtk_object_add_arg_type): assertion `arg_type > GTK_TYPE_NONE' failed. GLib-CRITICAL **: file ghash.c: line 138 (g_hash_table_lookup): assertion `hash_table != NULL' failed. Gtk-WARNING **: gtk_type_create(): unknown parent type `21'. Gtk-CRITICAL **: file gtkobject.c: line 939 (gtk_object_add_arg_type): assertion `arg_type > GTK_TYPE_NONE' failed. Gtk-WARNING **: gtk_arg_type_new(): argument class in "GtkContainer::reallocate_redraws" is not in the `(null)' ancestry GLib-CRITICAL **: file ghash.c: line 138 (g_hash_table_lookup): assertion `hash_table != NULL' failed. Gtk-WARNING **: gtk_type_create(): unknown parent type `21'. Gtk-CRITICAL **: file gtksignal.c: line 433 (gtk_signal_lookup): assertion `gtk_type_is_a (object_type, GTK_TYPE_OBJECT)' failed. GLib-CRITICAL **: file ghash.c: line 138 (g_hash_table_lookup): assertion `hash_table != NULL' failed. Gtk-WARNING **: gtk_type_create(): unknown parent type `21'. Gtk-CRITICAL **: file gtksignal.c: line 433 (gtk_signal_lookup): assertion `gtk_type_is_a (object_type, GTK_TYPE_OBJECT)' failed. Gtk-CRITICAL **: file gtksignal.c: line 433 (gtk_signal_lookup): assertion `gtk_type_is_a (object_type, GTK_TYPE_OBJECT)' failed. Gtk-CRITICAL **: file gtksignal.c: line 433 (gtk_signal_lookup): assertion `gtk_type_is_a (object_type, GTK_TYPE_OBJECT)' failed. GLib-CRITICAL **: file ghash.c: line 138 (g_hash_table_lookup): assertion `hash_table != NULL' failed. Gtk-WARNING **: gtk_type_create(): unknown parent type `21'. Gtk-CRITICAL **: file gtksignal.c: line 433 (gtk_signal_lookup): assertion `gtk_type_is_a (object_type, GTK_TYPE_OBJECT)' failed. Gtk-CRITICAL **: file gtkobject.c: line 357 (gtk_object_class_add_signals): assertion `GTK_IS_OBJECT_CLASS (class)' failed. Gtk-WARNING **: gtk_arg_type_new(): argument class in "GtkButton::label" is not in the `(null)' ancestry Gtk-CRITICAL **: file gtkobject.c: line 939 (gtk_object_add_arg_type): assertion `arg_type > GTK_TYPE_NONE' failed. Gtk-CRITICAL **: file gtksignal.c: line 433 (gtk_signal_lookup): assertion `gtk_type_is_a (object_type, GTK_TYPE_OBJECT)' failed. Gtk-CRITICAL **: file gtksignal.c: line 433 (gtk_signal_lookup): assertion `gtk_type_is_a (object_type, GTK_TYPE_OBJECT)' failed. Gtk-CRITICAL **: file gtksignal.c: line 433 (gtk_signal_lookup): assertion `gtk_type_is_a (object_type, GTK_TYPE_OBJECT)' failed. Gtk-CRITICAL **: file gtksignal.c: line 433 (gtk_signal_lookup): assertion `gtk_type_is_a (object_type, GTK_TYPE_OBJECT)' failed. Gtk-CRITICAL **: file gtksignal.c: line 433 (gtk_signal_lookup): assertion `gtk_type_is_a (object_type, GTK_TYPE_OBJECT)' failed. Gtk-CRITICAL **: file gtkobject.c: line 357 (gtk_object_class_add_signals): assertion `GTK_IS_OBJECT_CLASS (class)' failed. Gtk-WARNING **: invalid cast from `GtkBin' to `(unknown)' Gtk-WARNING **: invalid cast from `GtkButton' to `(unknown)' Gtk-WARNING **: invalid cast from `GtkButton' to `(unknown)' Gtk-WARNING **: invalid cast from `GtkButton' to `(unknown)' Gtk-CRITICAL **: file gtkobject.c: line 1070 (gtk_object_get_data_by_id): assertion `GTK_IS_OBJECT (object)' failed. Segmentation fault From tfogal at apollo.sr.unh.edu Tue Jul 20 16:27:06 2004 From: tfogal at apollo.sr.unh.edu (tom fogal) Date: Tue, 20 Jul 2004 16:27:06 -0400 Subject: [SciPy-user] "undefined reference to `MAIN__'" while building Message-ID: <200407202027.i6KKR6hg003994@apollo.sr.unh.edu> Hi all, I'm having some trouble building scipy. I'm using lapack and blas (no atlas), and so I've set BLAS_SRC and LAPACK_SRC. It seems to build those fine. Eventually it tries to link, and I get a couple errors. The first is that it doesn't include the '-lpython2.3' flag on the link command line, so I get a bunch of errors about Py_* functions being undefined. This is easily fixable by changing python setup.py build build_ext to python setup.py build build_ext -lpython2.3 but it seems odd that distutils didn't detect this automagically. Anyway... The main problem now is that I'm getting undefined references to a 'MAIN__' function. Above that, I get some other non-fatal errors to the effect of: SciPy_complete-0.3/Lib/cluster/tests/__init__.py' not found (or not a regular file) I've posted a complete script(1) at: http://apollo.sr.unh.edu/~tfogal/scipy/scipy-build-with-lpython2.3 It is shortened because I've already built most of scipy, I just ran through building it again to capture the output. If the actual compilation is important, I could post another log building from nothing... Anyone have any ideas on what I need to do to get this built? Thanks, -tom From nwagner at mecha.uni-stuttgart.de Wed Jul 21 03:24:20 2004 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Wed, 21 Jul 2004 09:24:20 +0200 Subject: [SciPy-user] numerical minimization of the spectral abscissa Message-ID: <40FE1A24.3040809@mecha.uni-stuttgart.de> Dear experts, Let us consider a dynamical system described by \dot{x} = A(D) x where A is a linear operator that depends on the distribution of dissipative material encoded by D. We imagine that when D=0 that the system is conservative, i.e. the eigenvalues of A(0) are purely imaginary. The obejctive is to choose D in order that the spectrum of A(D) is moved as far as possible into the left half-plane. If \sigma(D) denotes the spectrum of A(D) and \Re returns the real part of a complex number, then our objective is to minimize the spectral abscissa \omega(D) \equiv max{\Re \lambda : \lambda \in \sigma(D)} Can I solve such problems with the current version of scipy ? A(D) is given by [ zeros(n,n) , identity(n); -M^{-1} K , -M^{-1} D] the damping matrix is given by D = G^T diag(d) G where the geometry matrix is given by G = -identity(n)+diag(ones(n-1),-1) The stiffness matrix is given by K = G^T diag(k) G The damping parameters d = array(([d1,d2,\dots,dn])) should be optimized Any pointer to this problem would be appreciated. Nils From nwagner at mecha.uni-stuttgart.de Wed Jul 21 05:10:05 2004 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Wed, 21 Jul 2004 11:10:05 +0200 Subject: [SciPy-user] Numerical minimization Message-ID: <40FE32ED.4020100@mecha.uni-stuttgart.de> Dear experts, Meanwhile I have made some progress with respect to my latest inquiry. Please find attached a short example, which is taken from a journal paper. Different optimization procedures yield different results. Some of them are impossible from a phydical point of view: The damping parameters should be positive d_i>0 for all i. How can I enforce this constraint ? How do I find a global minimum ? Any pointer would be appreciated. Nils -------------- next part -------------- A non-text attachment was scrubbed... Name: abscissa.py Type: text/x-python Size: 997 bytes Desc: not available URL: From scipy at zunzun.com Wed Jul 21 05:57:50 2004 From: scipy at zunzun.com (James R. Phillips) Date: Wed, 21 Jul 2004 05:57:50 -400 Subject: [SciPy-user] Numerical minimization References: <40FE32ED.4020100@mecha.uni-stuttgart.de> Message-ID: <40fe3e1e3310d4.19689868@mercury.sabren.com> > > The damping parameters should be positive > d_i>0 for all i. How can I enforce this constraint ? The function to be minimized could return a very large value if any parameter is outside some set of constraints, these can be anything you wish including minimum or maximum parameter values. > How do I find a global minimum ? You will need to start the minimizers with an initial set of function parameters that are, from the minimizer's point of view, relatively close to the actual global minimum. This would normally be done in one of two ways: 1) Supply good guesses as to the initial values 2) Have the software find good guesses to same I myself use a genetic algorithm, specifically Differential Evolution, to search for initial parameter estimates if they are not user-supplied. James Phillips http://zunzun.com From tfogal at apollo.sr.unh.edu Wed Jul 21 11:11:27 2004 From: tfogal at apollo.sr.unh.edu (tom fogal) Date: Wed, 21 Jul 2004 11:11:27 -0400 Subject: [SciPy-user] hammer64 atlas binary Message-ID: <200407211511.i6LFBRWX006813@apollo.sr.unh.edu> Hi all, I've created a binary for an amd64 version of atlas on linux. I noticed a binary for this processor did not already exist, so I made one available at: http://apollo.sr.unh.edu/~tfogal/scipy/atlas3.7.7_Linux_HAMMER64SSE2.tgz They were compiled with gcc/g77 3.4.1. Perhaps someone on this list has access to add the binary to the website? Even after installing atlas, I'm still having problems building scipy. I'm getting undefined references to 'MAIN__'. From what I can tell this is a C<->Fortran linking issue of sorts, but maybe I'm just misinterpreting things. Any ideas? -tom From joe at enthought.com Wed Jul 21 11:28:25 2004 From: joe at enthought.com (Joe Cooper) Date: Wed, 21 Jul 2004 10:28:25 -0500 Subject: [SciPy-user] hammer64 atlas binary In-Reply-To: <200407211511.i6LFBRWX006813@apollo.sr.unh.edu> References: <200407211511.i6LFBRWX006813@apollo.sr.unh.edu> Message-ID: <40FE8B99.5040706@enthought.com> Hi Tom, I'm not sure if anyone has tested SciPy with this version of Atlas (though I have no idea if it makes a difference). If someone doesn't have answers sooner, I'll see if I can get around to doing x86_64 builds of SciPy sometime later this week, and let you know what I figure out. tom fogal wrote: > Hi all, I've created a binary for an amd64 version of atlas on linux. > I noticed a binary for this processor did not already exist, so I made > one available at: > > http://apollo.sr.unh.edu/~tfogal/scipy/atlas3.7.7_Linux_HAMMER64SSE2.tgz > > They were compiled with gcc/g77 3.4.1. > > Perhaps someone on this list has access to add the binary to the > website? > > Even after installing atlas, I'm still having problems building scipy. > I'm getting undefined references to 'MAIN__'. From what I can tell this > is a C<->Fortran linking issue of sorts, but maybe I'm just > misinterpreting things. Any ideas? From tfogal at apollo.sr.unh.edu Wed Jul 21 15:08:26 2004 From: tfogal at apollo.sr.unh.edu (tom fogal) Date: Wed, 21 Jul 2004 15:08:26 -0400 Subject: [SciPy-user] hammer64 atlas binary In-Reply-To: Your message of "Wed, 21 Jul 2004 10:28:25 CDT." <40FE8B99.5040706@enthought.com> References: <200407211511.i6LFBRWX006813@apollo.sr.unh.edu> <40FE8B99.5040706@enthought.com> Message-ID: <200407211908.i6LJ8QRw007700@apollo.sr.unh.edu> Hi. Thanks for the interest, but I seem to have found the problem. After much searching and hair-pulling, I've discovered that GNU fortran links in something called 'frtbegin' when creating executables. This includes the MAIN__ function, which is similar to a the C 'main' function -- it is invoked after some initial things are setup by _start. When building a shared library however, it is incorrect to link with 'frtbegin'. The failure was occuring while SciPy was building _fftpack.so, so I attempted to force it to build a shared library by adding -shared to my g77 command line. Worked great. For reference, my full commandline ended up being: /usr/local/bin/g77 -shared -L/usr/X11R6/lib64 build/temp.linux-x86_64-2.3/build/src/Lib/fftpack/_fftpackmodule.o build/temp.linux-x86_64-2.3/Lib/fftpack/src/zfft.o build/temp.linux-x86_64-2.3/Lib/fftpack/src/drfft.o build/temp.linux-x86_64-2.3/Lib/fftpack/src/zrfft.o build/temp.linux-x86_64-2.3/Lib/fftpack/src/zfftnd.o build/temp.linux-x86_64-2.3/build/src/fortranobject.o -Lbuild/temp.linux-x86_64-2.3 -ldfftpack -lg2c -lpython2.3 -o build/lib.linux-x86_64-2.3/scipy/fftpack/_fftpack.so I also had to add the '-lpython2.3' manually. See my earlier post entitled "undefined reference to `MAIN__'" while building I'm not quite sure but this seems like more of a gcc/g77 3.4.1 issue than a 64bit issue. Has anyone else tried with this compiler? Thanks again, -tom <40FE8B99.5040706 at enthought.com>Joe Cooper writes: >Hi Tom, > >I'm not sure if anyone has tested SciPy with this version of Atlas >(though I have no idea if it makes a difference). If someone doesn't >have answers sooner, I'll see if I can get around to doing x86_64 builds >of SciPy sometime later this week, and let you know what I figure out. > >tom fogal wrote: >> Hi all, I've created a binary for an amd64 version of atlas on linux. >> I noticed a binary for this processor did not already exist, so I made >> one available at: >> >> http://apollo.sr.unh.edu/~tfogal/scipy/atlas3.7.7_Linux_HAMMER64SSE2.tgz >> >> They were compiled with gcc/g77 3.4.1. >> >> Perhaps someone on this list has access to add the binary to the >> website? >> >> Even after installing atlas, I'm still having problems building scipy. >> I'm getting undefined references to 'MAIN__'. From what I can tell this >> is a C<->Fortran linking issue of sorts, but maybe I'm just >> misinterpreting things. Any ideas? From Bob.Cowdery at CGI-Europe.com Thu Jul 22 09:53:10 2004 From: Bob.Cowdery at CGI-Europe.com (Bob.Cowdery at CGI-Europe.com) Date: Thu, 22 Jul 2004 14:53:10 +0100 Subject: [SciPy-user] Weave Message-ID: <9B40DB5FBF7D2048AD79C2A91F862A517730A5@STEVAPPS05.Stevenage.CGI-Europe.com> I fell over a feature or bug (depending on your view point). If you pass in an array which is a slice then the 'C' code will see the underlying array and not the slice. I guess it stands to reason when you realise a slice is a view and not a separate array but it had me going in circles for a while. Regards Bob Bob Cowdery CGI Senior Technical Architect +44(0)1438 791517 Mobile: +44(0)7771 532138 bob.cowdery at cgi-europe.com *** Confidentiality Notice *** Proprietary/Confidential Information belonging to CGI Group Inc. and its affiliates may be contained in this message. If you are not a recipient indicated or intended in this message (or responsible for delivery of this message to such person), or you think for any reason that this message may have been addressed to you in error, you may not use or copy or deliver this message to anyone else. In such case, you should destroy this message and are asked to notify the sender by reply email. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/ms-tnef Size: 3678 bytes Desc: not available URL: From tfogal at apollo.sr.unh.edu Thu Jul 22 10:53:59 2004 From: tfogal at apollo.sr.unh.edu (tom fogal) Date: Thu, 22 Jul 2004 10:53:59 -0400 Subject: [SciPy-user] x86_64 build notes. Message-ID: <200407221453.i6MErxVj010231@apollo.sr.unh.edu> Sorry for more of this, you're probably all sick of it but I wanted to make sure it got into the archives for others running into the same issue. Building BLAS/LAPACK/ATLAS This is almost exactly the same as the 'building atlas for scipy' guide says. The only modification is that you need to add -fPIC to all of your build flags. This is simple enough for BLAS and LAPACK (edit make.inc for LAPACK -- note even NOOPT needs to have the -fPIC flag!), but for ATLAS you must use xconfig. The guide already has you set fortran flags; make sure to add -fPIC to them. You also need to define the flags for the C compiler with '-F c "-fPIC -fwhatever_you_want"' and I also set the flags for 'MCC', whatever that is: '-F m "-fPIC -fwhatever"'. Otherwise build as normal. Building SciPy SciPy 0.3 does not build with just a simple 'python setup.py build'. The magic command line you are looking for is: python setup.py build build_ext "-lpython2.3 -shared" You might be able to replace python2.3 with 2.2 or similar, I haven't tried and don't intend to. I imagine when 2.4 comes out, that you would want to change it to -lpython2.4, etc... You will see many warnings, but it appears to build alright. 'python setup.py install' works fine. Testing Here is where I've run into issues. I'm getting some test failures and errors. 'import scipy' works without problems, but scipy.test() has some issues. I get a lot of: AttributeError: 'module' object has no attribute 'eig' I've yet to do any development with SciPy but the tests seem to at least finish, if not work, so hopefully it will work well enough for my needs... Hope this helps someone else trying to build SciPy in this environment. -tom From eb47360 at appstate.edu Thu Jul 22 15:17:54 2004 From: eb47360 at appstate.edu (Eric Joseph Bubar) Date: Thu, 22 Jul 2004 15:17:54 -0400 (EDT) Subject: [SciPy-user] box extracting Message-ID: <4415313.1090523874455.JavaMail.eb47360@iplm3.appstate.edu> Hello, I am new to computer programming and python. I have been using it for around 4 weeks, so my knowledge is VERY limited. I have a 512x512 image. I want to take a boxed chunk of this image to analyze with the 2D FFT. Basically I need to make a box of this image of dimensions (100x100) centered on the middle of the image. Everything out of this box, i want to get rid of. Any advice on how to do this would be greatly appreciated. Thanks Eric Bubar From Fernando.Perez at colorado.edu Thu Jul 22 15:24:57 2004 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Thu, 22 Jul 2004 13:24:57 -0600 Subject: [SciPy-user] box extracting In-Reply-To: <4415313.1090523874455.JavaMail.eb47360@iplm3.appstate.edu> References: <4415313.1090523874455.JavaMail.eb47360@iplm3.appstate.edu> Message-ID: <41001489.30108@colorado.edu> Eric Joseph Bubar wrote: > Hello, > I am new to computer programming and python. I have been using it for > around 4 weeks, so my knowledge is VERY limited. I have a 512x512 > image. I want to take a boxed chunk of this image to analyze with the > 2D FFT. Basically I need to make a box of this image of dimensions > (100x100) centered on the middle of the image. Everything out of this > box, i want to get rid of. Any advice on how to do this would be > greatly appreciated. Thanks This should get you off the ground. I'm being unnecessarily explicit in the bound calculations for the sake of clarity: In [1]: img=RA.random((512,512)) In [2]: img.shape Out[2]: (512, 512) In [3]: bound_low,bound_hi = 512/2-100/2, 512/2+100/2 In [4]: sub_image = img[bound_low:bound_hi,bound_low:bound_hi] In [5]: sub_image.shape Out[5]: (100, 100) Cheers, f From oliphant at ee.byu.edu Thu Jul 22 16:04:13 2004 From: oliphant at ee.byu.edu (Travis E. Oliphant) Date: Thu, 22 Jul 2004 14:04:13 -0600 Subject: [SciPy-user] plotting question In-Reply-To: References: Message-ID: <41001DBD.6070807@ee.byu.edu> matt wrote: > I read the wikki plotting tutorial and was left with a few questions. I > want my code to automatically generate plots and dump them to files > instead of displaying them. Any old image format or pdf would be fine. > Is there a way to do this? I assume there must be since that > functionality is integral to gnuplot. An example or pointer to one > would be very useful. I'd be happy to add whatever I get to the > plotting tutorial on the wikki. xplt.window(0,display='', hcp='output.ps') xplt.plg(rand(1000)) xplt.hcp() shows that this is possible with xplt but it may take a few fixes to get it to play nice with xplt.plot -Travis From eb47360 at appstate.edu Thu Jul 22 16:11:33 2004 From: eb47360 at appstate.edu (Eric Joseph Bubar) Date: Thu, 22 Jul 2004 16:11:33 -0400 (EDT) Subject: [SciPy-user] update Message-ID: <7716213.1090527093830.JavaMail.eb47360@iplm3.appstate.edu> Thanks for the help, it works great. I wasnt very clear in my message. I need to keep the same 512x512 dimension, just set everything outside of the 100x100 box to zero. Thanks again. From matt at hotdispatch.com Thu Jul 22 21:29:12 2004 From: matt at hotdispatch.com (matt) Date: Thu, 22 Jul 2004 21:29:12 -0400 Subject: [SciPy-user] plotting question In-Reply-To: <41001DBD.6070807@ee.byu.edu> References: <41001DBD.6070807@ee.byu.edu> Message-ID: Cool, using gplt I got it to work with: gplt.plot(x_stable,y_stable,'with points title "stable"',x_unstable,y_un stable,'with points title "unstable"') gplt.logx() gplt.xtitle(parameter_name) gplt.ytitle(state_var_name) gplt.title(system_name) gplt.output("../web/" + state_var_name + ".png",'png color') There aren't really good docs, and it took me way to long to figure out the details of this particular example. When I finally finish I think I'll write a tutorial and include it on the scipy wiki. -Matt On Jul 22, 2004, at 4:04 PM, Travis E. Oliphant wrote: > matt wrote: >> I read the wikki plotting tutorial and was left with a few questions. >> I want my code to automatically generate plots and dump them to >> files instead of displaying them. Any old image format or pdf would >> be fine. Is there a way to do this? I assume there must be since >> that functionality is integral to gnuplot. An example or pointer to >> one would be very useful. I'd be happy to add whatever I get to the >> plotting tutorial on the wikki. > > xplt.window(0,display='', hcp='output.ps') > xplt.plg(rand(1000)) > xplt.hcp() > > shows that this is possible with xplt but it may take a few fixes to > get it to play nice with xplt.plot > > -Travis > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From olivier.ravard at novagrid.com Fri Jul 23 06:18:07 2004 From: olivier.ravard at novagrid.com (Olivier Ravard) Date: Fri, 23 Jul 2004 12:18:07 +0200 Subject: [SciPy-user] crash with a simple operation Message-ID: <00d201c4709e$59665980$3d521481@ravard> Hi everybody, I work on windows XP, python 2.3, scipy 0.3 and Numeric 23.1. The folowing code crash python (without returned error message) : import scipy a=scipy.arange(258168,typecode='F') c=a*a but the two folowing code does not make a crash : import scipy a=scipy.arange(258167,typecode='F') c=a*a import Numeric a=scipy.arange(258168,typecode='F') c=a*a I think this is a bug from scipy but how to solve it ? I thaught that scipy use Numeric.array, does not ? Thanks. O.R. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bpsu at james.hut.fi Fri Jul 23 13:43:22 2004 From: bpsu at james.hut.fi (Sudheer Phani) Date: Fri, 23 Jul 2004 20:43:22 +0300 Subject: [SciPy-user] Help required regding Eigenvectors Message-ID: Hello All, I have been encountering some strange problems with the calculation of eigen vectors using python. The problem is with the sign of the eigen vectors calculated. On Very few occasions the eigen vectors calculated using python have an opposite sign than the actual eigenvectors, though the magnitude is correct. Can any one of you plz help me in this regard and suggest me some solution if you have encoutered similar problems . Any help in this regd is appreciated Thanks in Advace regds Sudheer From eric at enthought.com Fri Jul 23 13:55:23 2004 From: eric at enthought.com (eric jones) Date: Fri, 23 Jul 2004 12:55:23 -0500 Subject: [SciPy-user] ANN: SciPy04 -- Last day for abstracts and early registration! Message-ID: <4101510B.9050005@enthought.com> Hey Group, Just a reminder that this is the last day to submit abstracts for SciPy04. It is also the last day for early registration. More information is here: http://www.scipy.org/wikis/scipy04 About the Conference and Keynote Speaker --------------------------------------------- The 1st annual *SciPy Conference* will be held this year at Caltech, September 2-3, 2004. As some of you may know, we've experienced great participation in two SciPy "Workshops" (with ~70 attendees in both 2002 and 2003) and this year we're graduating to a "conference." With the prestige of a conference comes the responsibility of a keynote address. This year, Jim Hugunin has answered the call and will be speaking to kickoff the meeting on Thursday September 2nd. Jim is the creator of Numeric Python, Jython, and co-designer of AspectJ. Jim is currently working on IronPython--a fast implementation of Python for .NET and Mono. Presenters ----------- We still have room for a few more standard talks, and there is plenty of room for lightning talks. Because of this, we are extending the abstract deadline until July 23rd. Please send your abstract to abstracts at scipy.org. Travis Oliphant is organizing the presentations this year. (Thanks!) Once accepted, papers and/or presentation slides are acceptable and are due by August 20, 2004. Registration ------------- Early registration ($100.00) has been extended to July 23rd. Follow the links off of the main conference site: http://www.scipy.org/wikis/scipy04 After July 23rd, registration will be $150.00. Registration includes breakfast and lunch Thursday & Friday and a very nice dinner Thursday night. Please register as soon as possible as it will help us in planning for food, room sizes, etc. Sprints -------- As of now, we really haven't had much of a call for coding sprints for the 3 days prior to SciPy 04. Below is the original announcement about sprints. If you would like to suggest a topic and see if others are interested, please send a message to the list. Otherwise, we'll forgo the sprints session this year. We're also planning three days of informal "Coding Sprints" prior to the conference -- August 30 to September 1, 2004. Conference registration is not required to participate in the sprints. Please email the list, however, if you plan to attend. Topics for these sprints will be determined via the mailing lists as well, so please submit any suggestions for topics to the scipy-user list: list signup: http://www.scipy.org/mailinglists/ list address: scipy-user at scipy.org thanks, eric From Fernando.Perez at colorado.edu Fri Jul 23 14:29:44 2004 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Fri, 23 Jul 2004 12:29:44 -0600 Subject: [SciPy-user] Help required regding Eigenvectors In-Reply-To: References: Message-ID: <41015918.2030806@colorado.edu> Sudheer Phani wrote: > Hello All, > > I have been encountering some strange problems with the calculation of > eigen vectors using python. The problem is with the sign of the eigen > vectors calculated. On Very few occasions the eigen vectors calculated > using python have an opposite sign than the actual eigenvectors, though > the magnitude is correct. Eigenvectors are defined only up to a scalar normalization constant. What do you mean exactly by opposite sign? If x is an eigenvector for A*x = s*x (s being the eigenvalue) then obviously A*(-x) = s*(-x) so -x is also an eigenvector with the same eigenvalue (or a.x for a being any scalar). Best, f From olivier.ravard at novagrid.com Mon Jul 26 06:35:14 2004 From: olivier.ravard at novagrid.com (Olivier Ravard) Date: Mon, 26 Jul 2004 12:35:14 +0200 Subject: [SciPy-user] scipy compilation Message-ID: <037a01c472fc$3cd7b0b0$3d521481@ravard> Hi, Is someone knows how to compile scipy without using ATLAS ? Thanks. O.R. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hoel at gl-group.com Mon Jul 26 09:48:35 2004 From: hoel at gl-group.com (=?iso-8859-15?Q?Berthold_H=F6llmann?=) Date: Mon, 26 Jul 2004 15:48:35 +0200 Subject: [SciPy-user] Building Debug extrensions with scipy_distutils on WinXP Message-ID: Hello, I'm trying to build a Windows Debug version of an inhouse extension module whose setup.py requires scipy_distutils. I call python_d.exe setup.py config_fc --fcompiler=compaqv build --debug but get ... creating build\temp.win32-2.3\lib\PyBrushMod\flib compile options: '-g -c' DF:f77: lib\PyBrushMod\flib\area3.f DF: error: Switch '-g' is ambiguous error: Command "DF /f77rtl /fixed /nologo /MD /WX /iface=(cref,nomixed_str_len_arg) /names:lowercase /assume:underscore /debug /Ox /fast /optimize:5 /unroll:0 /math_library:fast /threads -g -c /compil e_only lib\PyBrushMod\flib\area3.f /object:build\temp.win32-2.3\lib\PyBrushMod\flib\area3.o" failed with exit status 1 [31863 refs] The strange thing for me is, when I look into 'compaqfcompiler.py' I find the class 'CompaqVisualFCompiler' which defines def get_flags_debug(self): return ['/debug'] but for some strange reason '-g' is inserted. Kind regards Berthold H?llmann -- Germanischer Lloyd AG CAE Development Vorsetzen 35 20459 Hamburg Phone: +49(0)40 36149-7374 Fax: +49(0)40 36149-7320 e-mail: hoel at gl-group.com Internet: http://www.gl-group.com This e-mail contains confidential information for the exclusive attention of the intended addressee. Any access of third parties to this e-mail is unauthorised. Any use of this e-mail by unintended recipients such as copying, distribution, disclosure etc. is prohibited and may be unlawful. When addressed to our clients the content of this e-mail is subject to the General Terms and Conditions of GL's Group of Companies applicable at the date of this e-mail. GL's Group of Companies does not warrant and/or guarantee that this message at the moment of receipt is authentic, correct and its communication free of errors, interruption etc. From matt at hotdispatch.com Mon Jul 26 16:55:38 2004 From: matt at hotdispatch.com (matt) Date: Mon, 26 Jul 2004 16:55:38 -0400 Subject: [SciPy-user] fsolve side affecting output Message-ID: <25AE9D61-DF46-11D8-A55C-003065BA9C84@hotdispatch.com> optimize.fsolve returns the inputs that result in a zero for the function it is passed. It doesn't, however, throw an exception or give a special return value when it dumps one of these warnings to standard out. Is there a way to supress the dumps to std out? I still want my print commands to be visible, so I can't just redirect everything that goes to std out. Does anyone know if there are plans to add an exception or success code to the output of this function? -Matt From Fernando.Perez at colorado.edu Mon Jul 26 21:18:30 2004 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Mon, 26 Jul 2004 19:18:30 -0600 Subject: [SciPy-user] ANN: IPython 0.6.1 is officially out Message-ID: <4105AD66.6030002@colorado.edu> [Please forgive the cross-post, but since I know many scipy/numpy users are also ipython users, and this is a fairly significant update, I decided it was worth doing it.] Hi all, I've just uplodaded officially IPython 0.6.1. Many thanks to all who contributed comments, bug reports, ideas and patches. I'd like in particular to thank Ville Vainio, who helped a lot with many of the features for pysh, and was willing to put code in front of his ideas. As always, a big Thank You goes to Enthought and the Scipy crowd for hosting ipython and all its attending support services (bug tracker, mailing lists, website and downloads, etc). The download location, as usual, is: http://ipython.scipy.org/dist A detailed NEWS file can be found here: http://ipython.scipy.org/NEWS, so I won't repeat it. I will only mention the highlights of this released compared to 0.6.0: * BACKWARDS-INCOMPATIBLE CHANGE: Users will need to update their ipythonrc files and replace '%n' with '\D' in their prompt_in2 settings everywhere. Sorry, but there's otherwise no clean way to get all prompts to properly align. The ipythonrc shipped with IPython has been updated. * 'pysh' profile, which allows you to use ipython as a system shell. This includes mechanisms for easily capturing shell output into python strings and lists, and for expanding python variables back to the shell. It is started, like all profiles, with 'ipython -p pysh'. The following is a brief example of the possibilities: planck[~/test]|3> $$a=ls *.py planck[~/test]|4> type(a) <4> planck[~/test]|5> for f in a: |.> if f.startswith('e'): |.> wc -l $f |.> 113 error.py 9 err.py 2 exit2.py 10 exit.py You can get the necessary profile into your ~/.ipython directory by running 'ipython -upgrade', or by copying it from the IPython/UserConfig directory (ipythonrc-pysh). Note that running -upgrade will rename your existing config files to prevent clobbering them with new ones. This feature had been long requested by many users, and it's at last officially part of ipython. * Improved the @alias mechanism. It is now based on a fast, lightweight dictionary implementation, which was a requirement for making the pysh functionality possible. A new pair of magics, @rehash and @rehashx, allow you to load ALL of your $PATH into ipython as aliases at runtime. * New plot2 function added to the Gnuplot support module, to plot dictionaries and lists/tuples of arrays. Also added automatic EPS generation to hardcopy(). * History is now profile-specific. * New @bookmark magic to keep a list of directory bookmarks for quick navigation. * New mechanism for profile-specific persistent data storage. Currently only the new @bookmark system uses it, but it can be extended to hold arbitrary picklable data in the future. * New @system_verbose magic to view all system calls made by ipython. * For Windows users: all this functionality now works under Windows, but some external libraries are required. Details here: http://ipython.scipy.org/doc/manual/node2.html#sub:Under-Windows * Fix bugs with '_' conflicting with the gettext library. * Many, many other bugfixes and minor enhancements. See the NEWS file linked above for the full details. Enjoy, and please report any problems. Best, Fernando Perez. From gerard.vermeulen at grenoble.cnrs.fr Tue Jul 27 03:48:04 2004 From: gerard.vermeulen at grenoble.cnrs.fr (Gerard Vermeulen) Date: Tue, 27 Jul 2004 09:48:04 +0200 Subject: [SciPy-user] fsolve side affecting output In-Reply-To: <25AE9D61-DF46-11D8-A55C-003065BA9C84@hotdispatch.com> References: <25AE9D61-DF46-11D8-A55C-003065BA9C84@hotdispatch.com> Message-ID: <20040727094804.119bd5c8.gerard.vermeulen@grenoble.cnrs.fr> On Mon, 26 Jul 2004 16:55:38 -0400 matt wrote: > optimize.fsolve returns the inputs that result in a zero for the > function it is passed. It doesn't, however, throw an exception or > give a special return value when it dumps one of these warnings to > standard out. > > Is there a way to supress the dumps to std out? I still want my print > commands to be visible, so I can't just redirect everything that goes > to std out. > > Does anyone know if there are plans to add an exception or success code > to the output of this function? > > -Matt If you do: >>> from scipy import * >>> help(optimize.fsolve) you'll see that you can set full_output = 1 to get all information about success or failure of the algorithm, which I use in Python programs. As a side effect it suppresses the dumps to standard out: >>> def g(x): return x*x+1 ... >>> optimize.fsolve(g, 10.0, full_output=1) (-7.5682952661081625e-05, {'qtf': array([-1.00000001]), 'nfev': 34, 'fjac': array([ [-1.]]), 'r': array([-0.00108154]), 'fvec': array([ 1.00000001])}, 5, 'The iteration is not making good progress, as measured by the \n improvement from the last ten iterations.') >>> The dumps to standard out are perfectly fine to me when I am using the interpreter. Gerard From hoel at gl-group.com Tue Jul 27 11:23:30 2004 From: hoel at gl-group.com (=?iso-8859-15?Q?Berthold_H=F6llmann?=) Date: Tue, 27 Jul 2004 17:23:30 +0200 Subject: [SciPy-user] Re: Building Debug extrensions with scipy_distutils on WinXP In-Reply-To: (Berthold =?iso-8859-15?q?H=F6llmann's?= message of "Mon, 26 Jul 2004 15:48:35 +0200") References: Message-ID: Berthold H?llmann writes: > Hello, ... I finaly found the patch hoel at donau:scipy cvs -q diff scipy_core/scipy_distutils/compaqfcompiler.py Index: scipy_core/scipy_distutils/compaqfcompiler.py =================================================================== RCS file: /home/cvsroot/world/scipy_core/scipy_distutils/compaqfcompiler.py,v retrieving revision 1.5 diff -r1.5 compaqfcompiler.py 86a87,95 > def _get_cc_args(self, pp_opts, debug, before): > cc_args = pp_opts > if debug: > cc_args[:0] = self.get_flags_debug() > if before: > cc_args[:0] = before > return cc_args > > which allows me to build debug extension modules under WinXP using Visual Studio 6.0 and Compaq Visual Fortran 6.1 A. Kind regards Berthold H?llmann -- Germanischer Lloyd AG CAE Development Vorsetzen 35 20459 Hamburg Phone: +49(0)40 36149-7374 Fax: +49(0)40 36149-7320 e-mail: hoel at gl-group.com Internet: http://www.gl-group.com This e-mail contains confidential information for the exclusive attention of the intended addressee. Any access of third parties to this e-mail is unauthorised. Any use of this e-mail by unintended recipients such as copying, distribution, disclosure etc. is prohibited and may be unlawful. When addressed to our clients the content of this e-mail is subject to the General Terms and Conditions of GL's Group of Companies applicable at the date of this e-mail. GL's Group of Companies does not warrant and/or guarantee that this message at the moment of receipt is authentic, correct and its communication free of errors, interruption etc. From matt at hotdispatch.com Tue Jul 27 12:48:57 2004 From: matt at hotdispatch.com (matt) Date: Tue, 27 Jul 2004 12:48:57 -0400 Subject: [SciPy-user] fsolve side affecting output In-Reply-To: <20040727094804.119bd5c8.gerard.vermeulen@grenoble.cnrs.fr> References: <25AE9D61-DF46-11D8-A55C-003065BA9C84@hotdispatch.com> <20040727094804.119bd5c8.gerard.vermeulen@grenoble.cnrs.fr> Message-ID: Super, thanks. -Matt On Jul 27, 2004, at 3:48 AM, Gerard Vermeulen wrote: > On Mon, 26 Jul 2004 16:55:38 -0400 > matt wrote: > >> optimize.fsolve returns the inputs that result in a zero for the >> function it is passed. It doesn't, however, throw an exception or >> give a special return value when it dumps one of these warnings to >> standard out. >> >> Is there a way to supress the dumps to std out? I still want my print >> commands to be visible, so I can't just redirect everything that goes >> to std out. >> >> Does anyone know if there are plans to add an exception or success >> code >> to the output of this function? >> >> -Matt > > If you do: > >>>> from scipy import * >>>> help(optimize.fsolve) > > you'll see that you can set full_output = 1 to get all information > about > success or failure of the algorithm, which I use in Python programs. As > a side effect it suppresses the dumps to standard out: > >>>> def g(x): return x*x+1 > ... >>>> optimize.fsolve(g, 10.0, full_output=1) > (-7.5682952661081625e-05, {'qtf': array([-1.00000001]), 'nfev': 34, > 'fjac': array([ [-1.]]), 'r': array([-0.00108154]), 'fvec': > array([ 1.00000001])}, 5, 'The iteration is not making good progress, > as measured by the \n improvement from the last ten iterations.') >>>> > > The dumps to standard out are perfectly fine to me when I am using the > interpreter. > > Gerard > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From stephen.walton at csun.edu Tue Jul 27 16:10:34 2004 From: stephen.walton at csun.edu (Stephen Walton) Date: Tue, 27 Jul 2004 13:10:34 -0700 Subject: [SciPy-user] ANN: IPython 0.6.1 is officially out In-Reply-To: <4105AD66.6030002@colorado.edu> References: <4105AD66.6030002@colorado.edu> Message-ID: <1090959034.3020.8.camel@freyer.sfo.csun.edu> > * 'pysh' profile, Wow! This is really cool. Thanks, Fernando! See you at SciPy '04. -- Stephen Walton Dept. of Physics & Astronomy, Cal State Northridge From stephen.walton at csun.edu Thu Jul 29 18:02:41 2004 From: stephen.walton at csun.edu (Stephen Walton) Date: Thu, 29 Jul 2004 15:02:41 -0700 Subject: [SciPy-user] ATLAS building Message-ID: <1091138561.9805.313.camel@freyer.sfo.csun.edu> I recently found that the instructions for building LAPACK and ATLAS for use with SciPy are quite different in the INSTALL.txt which is part of the SciPy distribution and the Web page at http://www.scipy.org/documentation/buildatlas4scipy.txt. In particular, the Web seems to want one to download and compile the Fortran BLAS from NETLIB, whereas the instructions in INSTALL.txt will use the C BLAS and the Fortran interface to same which is part of ATLAS. Which gives better results? Which is 'correct?' -- Stephen Walton Dept. of Physics & Astronomy, Cal State Northridge From oliphant at ee.byu.edu Fri Jul 30 15:13:23 2004 From: oliphant at ee.byu.edu (Travis Oliphant) Date: Fri, 30 Jul 2004 13:13:23 -0600 Subject: [SciPy-user] Conference Schedule Online Message-ID: <410A9DD3.8040705@ee.byu.edu> The preliminary conference schedule for SciPy2004 is now online. You can view it at: http://www.scipy.org/wikis/scipy04/ConferenceSchedule See you in Pasadena, -Travis Oliphant From bulatov at cs.orst.edu Fri Jul 30 18:06:47 2004 From: bulatov at cs.orst.edu (bulatov at cs.orst.edu) Date: Fri, 30 Jul 2004 15:06:47 -0700 Subject: [SciPy-user] RandomArray behaving nondeterministically Message-ID: <1091225207.410ac6772df58@webmail.oregonstate.edu> For some reason RandomArray gives different results when initialized with the same seed. IE >>> import RandomArray as r >>> r.seed(0,0) >>> r.uniform(0,1,(3,3)) array([[ 0.9445683 , 0.81778226, 0.27272533], [ 0.53688906, 0.27386963, 0.39699606], [ 0.83909219, 0.66436204, 0.23828671]]) >>> r.seed(0,0) >>> r.uniform(0,1,(3,3)) array([[ 0.94409458, 0.54127862, 0.78580418], [ 0.74310646, 0.67297207, 0.6716389 ], [ 0.60675857, 0.54727364, 0.67690952]]) Is that a feature, or a bug? Yaroslav From Fernando.Perez at colorado.edu Fri Jul 30 18:12:15 2004 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Fri, 30 Jul 2004 16:12:15 -0600 Subject: [SciPy-user] RandomArray behaving nondeterministically In-Reply-To: <1091225207.410ac6772df58@webmail.oregonstate.edu> References: <1091225207.410ac6772df58@webmail.oregonstate.edu> Message-ID: <410AC7BF.9010702@colorado.edu> bulatov at cs.orst.edu wrote: > For some reason RandomArray gives different results when initialized with the > same seed. IE > > >>>>import RandomArray as r >>>>r.seed(0,0) >>>>r.uniform(0,1,(3,3)) > > array([[ 0.9445683 , 0.81778226, 0.27272533], > [ 0.53688906, 0.27386963, 0.39699606], > [ 0.83909219, 0.66436204, 0.23828671]]) > >>>>r.seed(0,0) >>>>r.uniform(0,1,(3,3)) > > array([[ 0.94409458, 0.54127862, 0.78580418], > [ 0.74310646, 0.67297207, 0.6716389 ], > [ 0.60675857, 0.54727364, 0.67690952]]) > > Is that a feature, or a bug? A feature, according to the docs: In [8]: r.seed? Type: function Base Class: String Form: Namespace: Interactive File: /usr/lib/python2.3/site-packages/Numeric/RandomArray.py Definition: r.seed(x=0, y=0) Docstring: seed(x, y), set the seed using the integers x, y; Set a random one from clock if y == 0 You are seeding with the clock :) Best, f From aisaac at american.edu Sat Jul 31 18:49:20 2004 From: aisaac at american.edu (Alan G Isaac) Date: Sat, 31 Jul 2004 18:49:20 -0400 (Eastern Daylight Time) Subject: [SciPy-user] plotting question: standardized 2D plot access Message-ID: I am a complete Python and SciPy newbie. (A few days.) So far, I am loving both. Is there access to gnuplots 'pause' command via gplt? (I see related questions have been asked: http://www.scipy.org/mailinglists/mailman?fn=scipy-user/2003-May/001631.html ) What is the best way to get a gplt plot produced by a script to display for awhile before running the rest of the script? In the meantime, I've been using gplt happily. I would say only that the default of using the temporary file names in the key (legend) appears undesirable. Thank you, Alan Isaac PS Is there a module, call it plot2D for example, that provides a standardized way to create plot descriptions, which can then be plotted by whatever packages SciPy happens to support? (So that after creating a plot2D object 'myplot' I could myplot.gplt() or myplot.plt() or whatever.) As plotting packages continue to proliferate, I think such a standardized interface would be very helpful. It addition, the current approach requires a redraw each time a feature is changed. This is very nice for interactive use, of course, but not in scripts.