From cimrman3 at ntc.zcu.cz Wed Nov 1 04:45:29 2006 From: cimrman3 at ntc.zcu.cz (Robert Cimrman) Date: Wed, 01 Nov 2006 10:45:29 +0100 Subject: [SciPy-user] csr_matrix In-Reply-To: <1d2f6e8c0610311137r58329fb6x4e8967e6ffe8783d@mail.gmail.com> References: <1d2f6e8c0610311137r58329fb6x4e8967e6ffe8783d@mail.gmail.com> Message-ID: <45486CB9.8030500@ntc.zcu.cz> Sam frizou wrote: > Hi, > > Is it possible to get the set of indices of non null elements of a > sparse matrix M ? > I means I can see them by doing "print M", but I want to use them, so > I would like something like a list of (i,j). A general way (should work for any kind of sparse matrix) is: [M.rowcol(ii) for ii in xrange(M.size)]. for csr_matrix, you can use directly M.colind (array of all column indices), M.indptr (array pointing to first index of a row in colind) attributes, but I would not recommend it, unless the first approach is too slow. cheers, r. From prabhu at aero.iitb.ac.in Wed Nov 1 04:53:21 2006 From: prabhu at aero.iitb.ac.in (Prabhu Ramachandran) Date: Wed, 1 Nov 2006 15:23:21 +0530 Subject: [SciPy-user] [Numpy-discussion] Need more comments from scientific community on python-dev In-Reply-To: <45478230.2050709@ee.byu.edu> References: <45474841.9030802@ieee.org> <45478230.2050709@ee.byu.edu> Message-ID: <17736.28305.154947.629130@prpc.aero.iitb.ac.in> >>>>> "Travis" == Travis Oliphant writes: Travis> 2) Examples of sharing memory between two objects. PIL is Travis> the classic example and has some merit, but because the Travis> internal memory layout of the PIL is 'pointer-to-pointers' Travis> instead of 'big-chunk-of-memory' it's not a 1-1 match to Travis> NumPy and the array interface only can comunicate Travis> information about the "mode." But, I can see other Travis> examples. PyMedia, PyGame, PyVideo? CVXOPT, PyVoxel. VTK-Python and TVTK use this. Right now these use the buffer protocol to allow users to pass numpy data into a vtkDataArray. It works reasonably well. The VTK data arrays have type information so it is not absolutely essential for an extended buffer protocol here. TVTK uses this underlying functionality in VTK to present a cleaner interface. The idea is to have VTK use the data setup and manipulated by numpy without an expensive copy. The only caveat is that you need to hang on to a reference of the numpy array if not you will end up with a segfault. I just thought this might be a useful data point. FWIW, I am all for ndarrays/extended buffers in Python core. It would encourage a standard way to pass data in and out of wrapped code. cheers, prabhu From prabhu at aero.iitb.ac.in Wed Nov 1 05:04:39 2006 From: prabhu at aero.iitb.ac.in (Prabhu Ramachandran) Date: Wed, 1 Nov 2006 15:34:39 +0530 Subject: [SciPy-user] [Numpy-discussion] Need more comments from scientific community on python-dev In-Reply-To: <454785E3.1020505@ee.byu.edu> References: <45474841.9030802@ieee.org> <45478230.2050709@ee.byu.edu> <87r6wo5ryj.fsf@peds-pc311.bsd.uchicago.edu> <454785E3.1020505@ee.byu.edu> Message-ID: <17736.28983.258418.392099@prpc.aero.iitb.ac.in> >>>>> "Travis" == Travis Oliphant writes: Travis> So, an example of how you "calculate with NumPy" and then Travis> "blit to the screen" the result would be very helpful. I have no idea if this would help or not but as a data point enthought.tvtk.tools.mlab shows why the ability to use numpy with VTK is so convenient. https://svn.enthought.com/enthought/browser/trunk/src/lib/enthought/tvtk/tools/mlab.py enthought.tvtk.examples also has the following cases array_animation.py, animated_texture.py and tiny_mesh.py that provide some simpler examples of this functionality: https://svn.enthought.com/enthought/browser/trunk/src/lib/enthought/tvtk/examples The point is, this functionality is both useful and highly desired by users. Getting the extended buffer/array into the core would encourage the use of such functionality. HTH. cheers, prabhu From excellent.frizou at gmail.com Wed Nov 1 06:13:36 2006 From: excellent.frizou at gmail.com (Sam frizou) Date: Wed, 1 Nov 2006 12:13:36 +0100 Subject: [SciPy-user] csr_matrix In-Reply-To: <45486CB9.8030500@ntc.zcu.cz> References: <1d2f6e8c0610311137r58329fb6x4e8967e6ffe8783d@mail.gmail.com> <45486CB9.8030500@ntc.zcu.cz> Message-ID: <1d2f6e8c0611010313w2f4166a4h7b2c1009e0455d52@mail.gmail.com> Thanks a lot. I have another problem with sparse matrices please. I do not find how to apply an operation directly to an entire row. For example, m[1,:]=dot(m[1,:],4) does not work and I didnt found a "setrow" method in the documentation. Thanks On 11/1/06, Robert Cimrman wrote: > Sam frizou wrote: > > Hi, > > > > Is it possible to get the set of indices of non null elements of a > > sparse matrix M ? > > I means I can see them by doing "print M", but I want to use them, so > > I would like something like a list of (i,j). > > A general way (should work for any kind of sparse matrix) is: > [M.rowcol(ii) for ii in xrange(M.size)]. > > for csr_matrix, you can use directly M.colind (array of all column > indices), M.indptr (array pointing to first index of a row in colind) > attributes, but I would not recommend it, unless the first approach is > too slow. > > cheers, > r. > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > -- On obtient beaucoup plus avec un mot gentil et une arme qu'avec seulement un mot gentil - "Al Capone". From cimrman3 at ntc.zcu.cz Wed Nov 1 07:36:34 2006 From: cimrman3 at ntc.zcu.cz (Robert Cimrman) Date: Wed, 01 Nov 2006 13:36:34 +0100 Subject: [SciPy-user] csr_matrix In-Reply-To: <1d2f6e8c0611010313w2f4166a4h7b2c1009e0455d52@mail.gmail.com> References: <1d2f6e8c0610311137r58329fb6x4e8967e6ffe8783d@mail.gmail.com> <45486CB9.8030500@ntc.zcu.cz> <1d2f6e8c0611010313w2f4166a4h7b2c1009e0455d52@mail.gmail.com> Message-ID: <454894D2.9040102@ntc.zcu.cz> Sam frizou wrote: > Thanks a lot. > > I have another problem with sparse matrices please. I do not find how > to apply an operation directly to an entire row. For example, > m[1,:]=dot(m[1,:],4) does not work and I didnt found a "setrow" method > in the documentation. What do you mean by dot(m[1,:],4)? m[1,:] * 4? Anyway, you should use lil_matrix for this kind of computation (e.g. b[1,:] = b[1,:] * 2). In general, setting/getting whole rows/columns is not supported for sparse matrices (with exceptions) yet. It is partly due to fact that each sparse matrix format has its own limitations - e.g. getting a column of a matrix stored in CSR is utterly inefficient when compared to getting a row - that is why you can use m[1,:] to get a row, but not m[:,1] to get a column. Analogously, CSC matrix (just exchange the roles of rows/columns). To set a row, one generally needs to add new elements - this would involve large memory reallocations in the CSR case, so it is not implemented yet - use LIL matrix instead. To set a column, even LIL cannot be used (it is row oriented..., just as CSR), so use the DOK matrix (the most general, but also the slowest for certain operations)... To conclude - construct your matrix in LIL format (reasonably fast for adding new elements), then convert the matrix into CSR/CSC which are good for sparse linear solvers (if that is what you want). It would be possible to allow getting/setting items just like with fancy indexing of the dense arrays, but one would loose the purpose of the sparse matrices - the efficiency. > On 11/1/06, Robert Cimrman wrote: >> Sam frizou wrote: >>> Hi, >>> >>> Is it possible to get the set of indices of non null elements of a >>> sparse matrix M ? >>> I means I can see them by doing "print M", but I want to use them, so >>> I would like something like a list of (i,j). >> A general way (should work for any kind of sparse matrix) is: >> [M.rowcol(ii) for ii in xrange(M.size)]. >> >> for csr_matrix, you can use directly M.colind (array of all column >> indices), M.indptr (array pointing to first index of a row in colind) >> attributes, but I would not recommend it, unless the first approach is >> too slow. >> >> cheers, >> r. >> >> _______________________________________________ >> SciPy-user mailing list >> SciPy-user at scipy.org >> http://projects.scipy.org/mailman/listinfo/scipy-user >> > > From excellent.frizou at gmail.com Wed Nov 1 07:52:42 2006 From: excellent.frizou at gmail.com (Sam frizou) Date: Wed, 1 Nov 2006 13:52:42 +0100 Subject: [SciPy-user] csr_matrix In-Reply-To: <454894D2.9040102@ntc.zcu.cz> References: <1d2f6e8c0610311137r58329fb6x4e8967e6ffe8783d@mail.gmail.com> <45486CB9.8030500@ntc.zcu.cz> <1d2f6e8c0611010313w2f4166a4h7b2c1009e0455d52@mail.gmail.com> <454894D2.9040102@ntc.zcu.cz> Message-ID: <1d2f6e8c0611010452q1311826aw37ba7bbc05d93944@mail.gmail.com> Thank you Robert. In fact, I need to do row and columns basic operations on my matrices (switch 2 rows, switch 2 cols, add a row with another into the matrix (eg. m[1,:]=m[1,:]+m[3,:]), and same things for columns. Moreover I do not need that my program is extremly fast. In fact my matrices are vrey sparse and classical matrix simply do not fit into the memory. So, if I well understand what you told me. I would better use DOK matrices ? Thank you very much. On 11/1/06, Robert Cimrman wrote: > Sam frizou wrote: > > Thanks a lot. > > > > I have another problem with sparse matrices please. I do not find how > > to apply an operation directly to an entire row. For example, > > m[1,:]=dot(m[1,:],4) does not work and I didnt found a "setrow" method > > in the documentation. > > What do you mean by dot(m[1,:],4)? m[1,:] * 4? > Anyway, you should use lil_matrix for this kind of computation > (e.g. b[1,:] = b[1,:] * 2). > > In general, setting/getting whole rows/columns is not supported for > sparse matrices (with exceptions) yet. It is partly due to fact that > each sparse matrix format has its own limitations - e.g. getting a > column of a matrix stored in CSR is utterly inefficient when compared to > getting a row - that is why you can use m[1,:] to get a row, but not > m[:,1] to get a column. Analogously, CSC matrix (just exchange the roles > of rows/columns). > > To set a row, one generally needs to add new elements - this would > involve large memory reallocations in the CSR case, so it is not > implemented yet - use LIL matrix instead. > > To set a column, even LIL cannot be used (it is row oriented..., just as > CSR), so use the DOK matrix (the most general, but also the slowest for > certain operations)... > > To conclude - construct your matrix in LIL format (reasonably fast for > adding new elements), then convert the matrix into CSR/CSC which are > good for sparse linear solvers (if that is what you want). > > It would be possible to allow getting/setting items just like with fancy > indexing of the dense arrays, but one would loose the purpose of the > sparse matrices - the efficiency. > > > On 11/1/06, Robert Cimrman wrote: > >> Sam frizou wrote: > >>> Hi, > >>> > >>> Is it possible to get the set of indices of non null elements of a > >>> sparse matrix M ? > >>> I means I can see them by doing "print M", but I want to use them, so > >>> I would like something like a list of (i,j). > >> A general way (should work for any kind of sparse matrix) is: > >> [M.rowcol(ii) for ii in xrange(M.size)]. > >> > >> for csr_matrix, you can use directly M.colind (array of all column > >> indices), M.indptr (array pointing to first index of a row in colind) > >> attributes, but I would not recommend it, unless the first approach is > >> too slow. > >> > >> cheers, > >> r. > >> > >> _______________________________________________ > >> SciPy-user mailing list > >> SciPy-user at scipy.org > >> http://projects.scipy.org/mailman/listinfo/scipy-user > >> > > > > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > -- On obtient beaucoup plus avec un mot gentil et une arme qu'avec seulement un mot gentil - "Al Capone". From cimrman3 at ntc.zcu.cz Wed Nov 1 08:01:27 2006 From: cimrman3 at ntc.zcu.cz (Robert Cimrman) Date: Wed, 01 Nov 2006 14:01:27 +0100 Subject: [SciPy-user] csr_matrix In-Reply-To: <1d2f6e8c0611010452q1311826aw37ba7bbc05d93944@mail.gmail.com> References: <1d2f6e8c0610311137r58329fb6x4e8967e6ffe8783d@mail.gmail.com> <45486CB9.8030500@ntc.zcu.cz> <1d2f6e8c0611010313w2f4166a4h7b2c1009e0455d52@mail.gmail.com> <454894D2.9040102@ntc.zcu.cz> <1d2f6e8c0611010452q1311826aw37ba7bbc05d93944@mail.gmail.com> Message-ID: <45489AA7.9040309@ntc.zcu.cz> Sam frizou wrote: > Thank you Robert. > > In fact, I need to do row and columns basic operations on my matrices > (switch 2 rows, switch 2 cols, add a row with another into the matrix > (eg. m[1,:]=m[1,:]+m[3,:]), and same things for columns. > > Moreover I do not need that my program is extremly fast. In fact my > matrices are vrey sparse and classical matrix simply do not fit into > the memory. > > So, if I well understand what you told me. I would better use DOK matrices ? For those kinds of operations, yes. cheers, r. From david.huard at gmail.com Wed Nov 1 11:13:18 2006 From: david.huard at gmail.com (David Huard) Date: Wed, 1 Nov 2006 11:13:18 -0500 Subject: [SciPy-user] ARMA processes Message-ID: <91cf711d0611010813m430129e5o96a53dd8bb6dc4ee@mail.gmail.com> Hi, Is anyone aware of a package to generate a autoregressive random processes (AR, ARMA) ? I tried to install span, but it didn't compile properly. Thanks, David -------------- next part -------------- An HTML attachment was scrubbed... URL: From excellent.frizou at gmail.com Wed Nov 1 11:27:30 2006 From: excellent.frizou at gmail.com (Sam frizou) Date: Wed, 1 Nov 2006 17:27:30 +0100 Subject: [SciPy-user] csr_matrix In-Reply-To: <45489AA7.9040309@ntc.zcu.cz> References: <1d2f6e8c0610311137r58329fb6x4e8967e6ffe8783d@mail.gmail.com> <45486CB9.8030500@ntc.zcu.cz> <1d2f6e8c0611010313w2f4166a4h7b2c1009e0455d52@mail.gmail.com> <454894D2.9040102@ntc.zcu.cz> <1d2f6e8c0611010452q1311826aw37ba7bbc05d93944@mail.gmail.com> <45489AA7.9040309@ntc.zcu.cz> Message-ID: <1d2f6e8c0611010827j281ae590jcbf25659c7280303@mail.gmail.com> I tryed using these dok_matrix, which seems ok for me. but, it appears that m*n returns a crc_matrix which I cannot convert into a dok_matrix. Am I right ? On 11/1/06, Robert Cimrman wrote: > Sam frizou wrote: > > Thank you Robert. > > > > In fact, I need to do row and columns basic operations on my matrices > > (switch 2 rows, switch 2 cols, add a row with another into the matrix > > (eg. m[1,:]=m[1,:]+m[3,:]), and same things for columns. > > > > Moreover I do not need that my program is extremly fast. In fact my > > matrices are vrey sparse and classical matrix simply do not fit into > > the memory. > > > > So, if I well understand what you told me. I would better use DOK matrices ? > > For those kinds of operations, yes. > > cheers, > r. > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > -- On obtient beaucoup plus avec un mot gentil et une arme qu'avec seulement un mot gentil - "Al Capone". From martin.hoefling at gmx.de Wed Nov 1 11:41:42 2006 From: martin.hoefling at gmx.de (Martin =?iso-8859-1?q?H=F6fling?=) Date: Wed, 1 Nov 2006 17:41:42 +0100 Subject: [SciPy-user] 2d spline fit with unaligned support points Message-ID: <200611011741.42608.martin.hoefling@gmx.de> Hi there, i am trying to do a 2d spline fit. I have several "support points" where i have the z value, althoug they're not aligned on a grid. Is this possible some way? Cheers Martin -- Everything that is really great and inspiring is created by the individual who can labor in freedom. (Albert Einstein) From hetland at tamu.edu Wed Nov 1 18:14:57 2006 From: hetland at tamu.edu (Rob Hetland) Date: Wed, 1 Nov 2006 17:14:57 -0600 Subject: [SciPy-user] pyaudio 0.3, with docs ! In-Reply-To: <4547519B.4040201@ar.media.kyoto-u.ac.jp> References: <4547519B.4040201@ar.media.kyoto-u.ac.jp> Message-ID: <92DCBC0B-10B3-469D-A45D-172C02B3F9D2@tamu.edu> One small change -- on my intel mac, I need to link to /usr/local/lib/libsndfile.1.dylib instead of the .so file. Then everything works!!! This is truely a great thing -- my two loves, numpy and audio files, together forever... -r On Oct 31, 2006, at 7:37 AM, David Cournapeau wrote: > Hi, > > I improved pyaudio last WE using indications given by various > people > on the list or privately, and as I finally got the motivation to > set-up > something which looks like a webpage, there is a doc with examples > which > show how to use it. The API to open files for writing is much > saner, and > the setup.py should be smart enough to grab all informations necessary > to the wrapper, including the location of the shared libsndfile: > > download: > http://www.ar.media.kyoto-u.ac.jp/members/david/softwares/pyaudio/ > #installation > doc + examples: > http://www.ar.media.kyoto-u.ac.jp/members/david/softwares/pyaudio/ > > I would appreciate to hear reports on platforms which are not > linux > (windows, mac os X) to see if my the setup.py works there, > > Cheers, > > David > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user ---- Rob Hetland, Associate Professor Dept. of Oceanography, Texas A&M University http://pong.tamu.edu/~rob phone: 979-458-0096, fax: 979-845-6331 From aanskis at yahoo.com Wed Nov 1 18:36:03 2006 From: aanskis at yahoo.com (Aurimas Anskaitis) Date: Wed, 1 Nov 2006 15:36:03 -0800 (PST) Subject: [SciPy-user] ARMA processes In-Reply-To: <91cf711d0611010813m430129e5o96a53dd8bb6dc4ee@mail.gmail.com> Message-ID: <20061101233603.73044.qmail@web53708.mail.yahoo.com> There are linear filtering functions in scipy. Also there are functions for generating random noise. These two are sufficient for ARMA processes I guess. Just take a look at scipy.signal.lfilter David Huard wrote: Hi, Is anyone aware of a package to generate a autoregressive random processes (AR, ARMA) ? I tried to install span, but it didn't compile properly. Thanks, David _______________________________________________ SciPy-user mailing list SciPy-user at scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user --------------------------------- Cheap Talk? Check out Yahoo! Messenger's low PC-to-Phone call rates. -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.a.swan at gmail.com Wed Nov 1 20:08:11 2006 From: andrew.a.swan at gmail.com (Andrew Swan) Date: Thu, 2 Nov 2006 12:08:11 +1100 Subject: [SciPy-user] efficiency of sparse matrix multiplication Message-ID: <8fa817d00611011708y2d1454c6g7057cb0072d08b7d@mail.gmail.com> Hi - I have two matrices x and z I want to multiply together in various ways. They look like: x.shape() = (9318,14) x.nnz() = 30343 z.shape() = (9318,11419) z.nnz() = 9271 I have found that the multiplications are taking longer than I had hoped for. The speeds when they are in linked list and csc format are as follows: sparse.lil_matrix: x.T * x 0.85s x.T * z 1.38s z.T * x 4.75s z.T * z 2.98s sparse.csc_matrix (not including the conversion from lil to csc): x.T * x 0.63s x.T * z 1.49s z.T * x 3.99s z.T * z 2.58s Using csr format didn't work at all (had to kill it after more than an hour!) I imagined csc should be significantly faster than lil? Could the fact that it's not be related to the compilation of scipy/blas etc on my computer? It's a fairly new amd64 running fedora5. I compiled scipy myself, after installing standard rpms for blas and lapack libraries. Thanks in advance Andrew Swan -------------- next part -------------- An HTML attachment was scrubbed... URL: From david at ar.media.kyoto-u.ac.jp Wed Nov 1 21:12:12 2006 From: david at ar.media.kyoto-u.ac.jp (David Cournapeau) Date: Thu, 02 Nov 2006 11:12:12 +0900 Subject: [SciPy-user] pyaudio 0.3, with docs ! In-Reply-To: <92DCBC0B-10B3-469D-A45D-172C02B3F9D2@tamu.edu> References: <4547519B.4040201@ar.media.kyoto-u.ac.jp> <92DCBC0B-10B3-469D-A45D-172C02B3F9D2@tamu.edu> Message-ID: <454953FC.8020601@ar.media.kyoto-u.ac.jp> Rob Hetland wrote: > One small change -- on my intel mac, I need to link to > > /usr/local/lib/libsndfile.1.dylib > > instead of the .so file. > > That's strange, it should have done it by itself. Could you launch a python session and run the following: from numpy.distutils.system_info import so_ext print so_ext Otherwise, you confirm that setup.py could find the header ? cheers, David From david at ar.media.kyoto-u.ac.jp Wed Nov 1 21:55:17 2006 From: david at ar.media.kyoto-u.ac.jp (David Cournapeau) Date: Thu, 02 Nov 2006 11:55:17 +0900 Subject: [SciPy-user] pyaudio 0.3, with docs ! In-Reply-To: <454953FC.8020601@ar.media.kyoto-u.ac.jp> References: <4547519B.4040201@ar.media.kyoto-u.ac.jp> <92DCBC0B-10B3-469D-A45D-172C02B3F9D2@tamu.edu> <454953FC.8020601@ar.media.kyoto-u.ac.jp> Message-ID: <45495E15.8080402@ar.media.kyoto-u.ac.jp> David Cournapeau wrote: > Rob Hetland wrote: > >> One small change -- on my intel mac, I need to link to >> >> /usr/local/lib/libsndfile.1.dylib >> >> instead of the .so file. >> >> >> > That's strange, it should have done it by itself. Could you launch a > python session and run the following: > > from numpy.distutils.system_info import so_ext > print so_ext > Actually, I think I understand the problem: I assumed mac os X naming convention were the same than linux, except for the extension, but that's not true: it is called libsndfile.1.dylib, not libsndfile-1.0.17.dylib. I must confess I never really understood the library naming +version convention under any OS: it looks like they are all different in a subtle way. Do you know by any chance the rules for mac OS X ? I actually have a minimac at home, I will try to see how numpy.core.distutils work on that platform tonight, cheers, David From david at ar.media.kyoto-u.ac.jp Thu Nov 2 02:12:00 2006 From: david at ar.media.kyoto-u.ac.jp (David Cournapeau) Date: Thu, 02 Nov 2006 16:12:00 +0900 Subject: [SciPy-user] [ANN[ pysamplerate, a library to do high quality samplerate convertion Message-ID: <45499A40.8070204@ar.media.kyoto-u.ac.jp> (if those announcements are not welcome on the lists, please tell me) Hi there, I've just developed a small package to wrap Source Rabbit Code from Erik de Castro de Lopo, which is a library to do high quality samplerate conversion (http://www.mega-nerd.com/SRC/). You can download it here: http://www.ar.media.kyoto-u.ac.jp/members/david/softwares/pysamplerate/pysamplerate-0.1.tar.gz http://www.ar.media.kyoto-u.ac.jp/members/david/softwares/pysamplerate/pysamplerate-0.1.zip Example of error conversions: http://www.ar.media.kyoto-u.ac.jp/members/david/softwares/pysamplerate/example1.png Basically, you just import resample from pysamplerate, and resample(sins, fr/fs) gives you a converted signal at sampling rate fr, with fs the original sampling rate. You can also select the conversion method (eg 'sinc_best', etc...). The pydocs + examples should be enough This package can be useful for people who deal with music signal processing and co, when scipy.resample is not enough. Only float32 and float64 input are supported for now, I will polish the package when I will have some more time, cheers, David From fperez.net at gmail.com Thu Nov 2 02:23:49 2006 From: fperez.net at gmail.com (Fernando Perez) Date: Thu, 2 Nov 2006 00:23:49 -0700 Subject: [SciPy-user] [ANN[ pysamplerate, a library to do high quality samplerate convertion In-Reply-To: <45499A40.8070204@ar.media.kyoto-u.ac.jp> References: <45499A40.8070204@ar.media.kyoto-u.ac.jp> Message-ID: On 11/2/06, David Cournapeau wrote: > (if those announcements are not welcome on the lists, please tell me) Frankly, if an announcement for a free Python signal processing library is not welcome on the scipy lists, I don't know where it would be ;) As a minor note though: please remember to make a note of this in the Topical Software wiki; it's good for that page to remain up to date with newly released packages and libraries. Thanks! f From david at ar.media.kyoto-u.ac.jp Thu Nov 2 03:32:45 2006 From: david at ar.media.kyoto-u.ac.jp (David Cournapeau) Date: Thu, 02 Nov 2006 17:32:45 +0900 Subject: [SciPy-user] scikits: requirements for a launch ? Message-ID: <4549AD2D.8080207@ar.media.kyoto-u.ac.jp> Hi, A few days ago, the idea of scikits popped for codes which depends on LICENSE different than BSD-like. My understanding is that the idea popped up sometime before, but nothing was done for various reasons. There is code *now* which I can give for scikits, which may be interesting for signal processing people, pyaudio and pysamplerate: http://www.ar.media.kyoto-u.ac.jp/members/david/softwares/pysamplerate/ http://www.ar.media.kyoto-u.ac.jp/members/david/softwares/pyaudio I developed those packages because I need them right now, but if they are to become of some use for other people as well, it would make it easier for me to have a public place with a source control system and the likes to put those packages. So: - Is launching scikits now possible ? - If not, what needs to be done (besides finding a name ?) - R. Kern suggested a layout of the packages, which I am copying below. Do people have suggestions about the layout ? trunk/ pkg1/ README setup.py sciwhatever/ __init__.py pkg1/ __init__.py audiostuff.py pkg2/ README setup.py sciwhatever/ __init__.py pkg2/ __init__.py eigenstuff.py Cheers, David From cimrman3 at ntc.zcu.cz Thu Nov 2 06:06:28 2006 From: cimrman3 at ntc.zcu.cz (Robert Cimrman) Date: Thu, 02 Nov 2006 12:06:28 +0100 Subject: [SciPy-user] csr_matrix In-Reply-To: <1d2f6e8c0611010827j281ae590jcbf25659c7280303@mail.gmail.com> References: <1d2f6e8c0610311137r58329fb6x4e8967e6ffe8783d@mail.gmail.com> <45486CB9.8030500@ntc.zcu.cz> <1d2f6e8c0611010313w2f4166a4h7b2c1009e0455d52@mail.gmail.com> <454894D2.9040102@ntc.zcu.cz> <1d2f6e8c0611010452q1311826aw37ba7bbc05d93944@mail.gmail.com> <45489AA7.9040309@ntc.zcu.cz> <1d2f6e8c0611010827j281ae590jcbf25659c7280303@mail.gmail.com> Message-ID: <4549D134.8020701@ntc.zcu.cz> Sam frizou wrote: > I tryed using these dok_matrix, which seems ok for me. > but, it appears that m*n returns a crc_matrix which I cannot convert > into a dok_matrix. Am I right ? Yes, you are right. Well, you could do it by hand (use dok.iteritems() to iterate over nonzeros). The sparse module requires some more work to unify the interface of the various formats and implement missing features (like making a dok_matrix out of a csr_matrix). I will try to look at it. r. From gruben at bigpond.net.au Thu Nov 2 08:22:22 2006 From: gruben at bigpond.net.au (Gary Ruben) Date: Fri, 03 Nov 2006 00:22:22 +1100 Subject: [SciPy-user] Bug in find_objects? (Was: Re: image processing) In-Reply-To: <200610302159.17749.vmas@carabos.com> References: <200610231057.37151.vmas@carabos.com> <453DFBD9.6060304@bigpond.net.au> <200610302159.17749.vmas@carabos.com> Message-ID: <4549F10E.2080204@bigpond.net.au> Hi Vincent, I noticed noone replied to your email so I just tried your script and here's the output I get with scipy 0.5.0.2033: [[0 1 1 0 0 0] [0 1 1 0 1 0] [0 0 0 1 1 1] [0 0 0 0 1 0]] [[0 1 1 0 0 0] [0 1 1 0 2 0] [0 0 0 2 2 2] [0 0 0 0 2 0]] 2 Furthermore, if I add these lines to your script: print f print [objects[i] for i in f] I get: [(slice(0, 2, None), slice(1, 3, None)), (slice(1, 4, None), slice(3, 6, None))] [array([[1, 1], [1, 1]]), array([[0, 1, 0], [1, 1, 1], [0, 1, 0]])] Vicent Mas (V+) wrote: > El Tuesday, 24 de October de 2006 13:41, Gary Ruben escribi?: >> I haven't actually tried this, but I think you should take a look at >> scipy.ndimage.measurements.label >> followed by >> scipy.ndimage.measurements.find_objects >> and >> scipy.ndimage.measurements.maximum >> >> These sound like they will do what you want. >> >> Gary R. >> >> Carlos Medrano wrote: >>> Vicent Mas (V+ carabos.com> writes: >>>> Hello, >>>> >>>> I'm a newcomer to process image and scipy. I'm trying to process a >>>> binary image in order to get the biggest connected component. In >>>> matlab one can use the bwareaopen to achieve this goal but I don't >>>> know how to do it with scipy. I've been looking at scipy.ndimage >>>> module with no luck. Could you help me, please? >>>> >>>> Thanks in advance. >>> [...] > > Hello, > > > I'm trying to use Gary's receipt (thanks Gary, and sorry for answering > so slowly :-( but I get the following error (as can be seen running the > attached script): > > Traceback (most recent call last): > File "finder.py", line 13, in ? > measurements.find_objects(label_matrix) > > File "/usr/local/lib/python2.4/site-packages/scipy/ndimage/measurements.py", > line 89, in find_objects > return _nd_image.find_objects(input, max_label) > RuntimeError: data type not supported > > > It seems to be a bug. Am I right? Or am I doing something stupid? > > Thanks in advance for your help. From martin.hoefling at gmx.de Thu Nov 2 09:36:31 2006 From: martin.hoefling at gmx.de (Martin =?iso-8859-1?q?H=F6fling?=) Date: Thu, 2 Nov 2006 15:36:31 +0100 Subject: [SciPy-user] spline interpolation crashes Message-ID: <200611021536.32070.martin.hoefling@gmx.de> Hi there, spline interpolation crashes, any ideas why? Code: print "X-Data:",xdata[i] print "Z-Data:",zdata[i] print "X-len:",len(xdata[i]),"Y-len:",len(zdata[i]) spl= interpolate.splrep(xdata[i],zdata[i],s=0) Output: X-Data: [0.0, 0.0, 0.029562700000000001, 0.22792699999999999, 0.34910819999999998, 0.42786099999999999, 0.48451450000000001, 0.55856099999999997, 0.60315879999999999, 0.65115970000000001, 0.68437389999999998, 0.72162850000000001, 0.75135989999999997, 0.77506770000000003, 0.80289730000000004, 0.83150520000000006, 0.85739379999999998, 0.88429639999999998, 0.91221640000000004, 0.93957599999999997, 0.96496970000000004, 0.98706870000000002, 1.014197, 1.032613, 1.058252, 1.0792649999999999, 1.1032379999999999, 1.121642, 1.1511579999999999, 1.1686479999999999, 1.2012400000000001, 1.2218340000000001, 1.256894, 1.28694, 1.325361, 1.3753089999999999, 1.442094, 1.55348, 1.7424329999999999, 1.9051370000000001, 2.0341550000000002, 2.1731690000000001, 2.2767909999999998, 2.3629389999999999, 2.5198740000000002, 2.66404, 3.1028980000000002] Z-Data: [3.3134420000000002, 3.3134420000000002, 3.4199139999999999, 3.4459559999999998, 3.386771, 3.3602590000000001, 3.4568409999999998, 3.4953630000000002, 3.430307, 3.5164420000000001, 3.4472040000000002, 3.5181369999999998, 3.5190459999999999, 3.497598, 3.5216970000000001, 3.4239459999999999, 3.5243159999999998, 3.4359109999999999, 3.4631639999999999, 3.4446159999999999, 3.442116, 3.4700959999999998, 3.4670070000000002, 3.4508700000000001, 3.4703179999999998, 3.4704109999999999, 3.4184060000000001, 3.5128870000000001, 3.4097680000000001, 3.472267, 3.4288910000000001, 3.413878, 3.4225919999999999, 3.4839169999999999, 3.4663330000000001, 3.4979710000000002, 3.5154299999999998, 3.5695960000000002, 3.5953759999999999, 3.4405770000000002, 3.5612689999999998, 3.5883020000000001, 3.2553610000000002, 3.5906060000000002, 3.6263239999999999, 3.5186410000000001, 3.5186410000000001] X-len: 47 Y-len: 47 Traceback (most recent call last): File "plot3d.py", line 77, in ? spl= interpolate.splrep(xdata[i],zdata[i],s=0) File "/usr/lib64/python2.4/site-packages/scipy/interpolate/fitpack.py", line 377, in splrep raise _iermess[ier][1],_iermess[ier][0] ValueError: Error on input data I use scipy 0.5.1 Cheers Martin From mwojc at p.lodz.pl Thu Nov 2 08:24:29 2006 From: mwojc at p.lodz.pl (mwojc at p.lodz.pl) Date: Thu, 2 Nov 2006 14:24:29 +0100 (CET) Subject: [SciPy-user] fmin_bfgs optimizer hangs? Message-ID: <1265.212.160.252.213.1162473869.squirrel@poczta.p.lodz.pl> Hi, I found that fmin_bfgs optimizer may "hang" in some circumstances (starting points). I mean it seems to never reach an iteration criterion maxiter. I'd like to ask if anybody met such a problem or this is only my optimisation problem issue. Thanks Marek From nwagner at iam.uni-stuttgart.de Thu Nov 2 08:55:33 2006 From: nwagner at iam.uni-stuttgart.de (Nils Wagner) Date: Thu, 02 Nov 2006 14:55:33 +0100 Subject: [SciPy-user] fmin_bfgs optimizer hangs? In-Reply-To: <1265.212.160.252.213.1162473869.squirrel@poczta.p.lodz.pl> References: <1265.212.160.252.213.1162473869.squirrel@poczta.p.lodz.pl> Message-ID: <4549F8D5.1040908@iam.uni-stuttgart.de> mwojc at p.lodz.pl wrote: > Hi, > I found that fmin_bfgs optimizer may "hang" in some circumstances > (starting points). I mean it seems to never reach an iteration criterion > maxiter. I'd like to ask if anybody met such a problem or this is only my > optimisation problem issue. > > Thanks > Marek > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > AFAIK, the success of an optimizer clearly depends on the initial guess. Try to start with fmin_powell and switch to fmin_bfgs. Please let me know if that works for your problem. I have observed several scenarios e.g. convergence towards local extrema, oscillating behaviour (fmin_ncg) , ... Sometimes I get a message Warning: Desired error not necessarily achieved due to precision loss Nils From david.huard at gmail.com Thu Nov 2 09:00:25 2006 From: david.huard at gmail.com (David Huard) Date: Thu, 2 Nov 2006 09:00:25 -0500 Subject: [SciPy-user] ARMA processes In-Reply-To: <20061101233603.73044.qmail@web53708.mail.yahoo.com> References: <91cf711d0611010813m430129e5o96a53dd8bb6dc4ee@mail.gmail.com> <20061101233603.73044.qmail@web53708.mail.yahoo.com> Message-ID: <91cf711d0611020600j6fc91038sf137134a991f3071@mail.gmail.com> Thanks, I ended up writting the ar generator. It turns out that its quicker to write one than to find one. David 2006/11/1, Aurimas Anskaitis : > > There are linear filtering functions in scipy. Also there are functions > for generating random noise. These two are sufficient for ARMA processes I > guess. Just take a look at scipy.signal.lfilter > > > > *David Huard * wrote: > > Hi, > > Is anyone aware of a package to generate a autoregressive random processes > (AR, ARMA) ? > I tried to install span, but it didn't compile properly. > Thanks, > David > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > > > ------------------------------ > Cheap Talk? Check out Yahoo! Messenger's low PC-to-Phone call rates. > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aisaac at american.edu Thu Nov 2 09:34:44 2006 From: aisaac at american.edu (Alan G Isaac) Date: Thu, 2 Nov 2006 09:34:44 -0500 Subject: [SciPy-user] ARMA processes In-Reply-To: <91cf711d0611020600j6fc91038sf137134a991f3071@mail.gmail.com> References: <91cf711d0611010813m430129e5o96a53dd8bb6dc4ee@mail.gmail.com><20061101233603.73044.qmail@web53708.mail.yahoo.com><91cf711d0611020600j6fc91038sf137134a991f3071@mail.gmail.com> Message-ID: On Thu, 2 Nov 2006, David Huard apparently wrote: > I ended up writting the ar generator. It turns out that > its quicker to write one than to find one. If it has any generality, please post it (mentioning code license). Thanks, Alan Isaac From alainna at pha.jhu.edu Thu Nov 2 10:02:55 2006 From: alainna at pha.jhu.edu (Alainna C. Wonders) Date: Thu, 2 Nov 2006 10:02:55 -0500 (EST) Subject: [SciPy-user] undefined symbol srotmg_ Message-ID: Hi, I am having a problem doing an 'import scipy.signal'. I get the below error message: ImportError: /usr/site/python/lib/python2.4/site-packages/scipy/linalg/fblas.so: undefined symbol: srotmg_ I have since installed ATLAS and BLAS, and put symlinks from the source lib/include files into /usr/local/lib/atlas as recommended. To build the fortran stuff, I used g77. I have also set the BLAS and ATLAS environment variables: echo $ATLAS /usr/local/lib/atlas echo $BLAS /usr/site/python/src-blas/libfblas.a I have also rebuilt scipy twice since then and I still get the error. The output requested in the INSTALL file for submitting to this list is below my name. Anyone have any recommendations for how to fix this? Thanks, Alainna python -c 'from numpy.f2py.diagnose import run; run()' ------ os.name='posix' ------ sys.platform='linux2' ------ sys.version: 2.4.2 (#1, Feb 23 2006, 15:15:06) [GCC 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)] ------ sys.prefix: /usr/site/python ------ sys.path=':/usr/site/python/lib/python24.zip:/usr/site/python/lib/python2.4:/usr/site/python/lib/python2.4/plat-linux2:/usr/site/pyt hon/lib/python2.4/lib-tk:/usr/site/python/lib/python2.4/lib-dynload:/usr/site/python/lib/python2.4/site-packages:/usr/site/python/li b/python2.4/site-packages/Numeric:/usr/site/python/lib/python2.4/site-packages/PIL' ------ Found Numeric version '23.8' in /usr/site/python/lib/python2.4/site-packages/Numeric/Numeric.pyc Found numarray version '1.4.1' in PINE 4.44 MESSAGE TEXT Folder: sent-mail-oct-2006 Message 174 of 193 END NEW /usr/site/python/lib/python2.4/site-packages/numarray/__init__.pyc Found new numpy version '1.0' in /usr/site/python/lib/python2.4/site-packages/numpy/__init__.pyc Found f2py2e version '2_3396' in /usr/site/python/lib/python2.4/site-packages/numpy/f2py/f2py2e.pyc Found numpy.distutils version '0.4.0' in '/usr/site/python/lib/python2.4/site-packages/numpy/distutils/__init__.pyc' ------ Importing numpy.distutils.fcompiler ... ok ------ Checking availability of supported Fortran compilers: customize CompaqFCompiler customize NoneFCompiler customize AbsoftFCompiler Could not locate executable efort Could not locate executable efc Could not locate executable efort Could not locate executable efc customize IntelFCompiler Could not locate executable f95 customize GnuFCompiler customize SunFCompiler customize NAGFCompiler customize VastFCompiler customize GnuFCompiler customize IbmFCompiler customize Gnu95FCompiler customize IntelVisualFCompiler customize G95FCompiler customize IntelItaniumFCompiler Couldn't match compiler version for 'Intel(R) Fortran Compiler for 32-bit applications, Version 8.0 Build 20031016Z Package ID: l_fc_p_8.0.034\nCopyright (C) 1985-2003 Intel Corporation. All rights reserved.\nFOR NON-COMMERCIAL USE ONLY\n' customize PGroupFCompiler customize LaheyFCompiler customize CompaqVisualFCompiler customize MipsFCompiler customize HPUXFCompiler customize IntelItaniumVisualFCompiler customize IntelEM64TFCompiler Couldn't match compiler version for 'Intel(R) Fortran Compiler for 32-bit applications, Version 8.0 Build 20031016Z Package ID: l_fc_p_8.0.034\nCopyright (C) 1985-2003 Intel Corporation. All rights reserved.\nFOR NON-COMMERCIAL USE ONLY\n' List of available Fortran compilers: --fcompiler=gnu GNU Fortran Compiler (3.4.4) --fcompiler=gnu95 GNU 95 Fortran Compiler (4.0.1) --fcompiler=intel Intel Fortran Compiler for 32-bit apps (8.0) List of unavailable Fortran compilers: --fcompiler=absoft Absoft Corp Fortran Compiler --fcompiler=compaq Compaq Fortran Compiler --fcompiler=compaqv DIGITAL|Compaq Visual Fortran Compiler --fcompiler=g95 G95 Fortran Compiler --fcompiler=hpux HP Fortran 90 Compiler --fcompiler=ibm IBM XL Fortran Compiler --fcompiler=intele Intel Fortran Compiler for Itanium apps --fcompiler=intelem Intel Fortran Compiler for EM64T-based apps --fcompiler=intelev Intel Visual Fortran Compiler for Itanium apps --fcompiler=intelv Intel Visual Fortran Compiler for 32-bit apps --fcompiler=lahey Lahey/Fujitsu Fortran 95 Compiler --fcompiler=mips MIPSpro Fortran Compiler --fcompiler=nag NAGWare Fortran 95 Compiler --fcompiler=none Fake Fortran compiler --fcompiler=pg Portland Group Fortran Compiler --fcompiler=sun Sun|Forte Fortran 95 Compiler --fcompiler=vast Pacific-Sierra Research Fortran 90 Compiler List of unimplemented Fortran compilers: --fcompiler=f Fortran Company/NAG F Compiler For compiler details, run 'config_fc --verbose' setup command. ------ Importing numpy.distutils.cpuinfo ... ok ------ CPU information: getNCPUs has_mmx has_sse has_sse2 is_32bit is_Intel is_Pentium ------ From vmas at carabos.com Thu Nov 2 10:58:00 2006 From: vmas at carabos.com (Vicent Mas (V+)) Date: Thu, 2 Nov 2006 16:58:00 +0100 Subject: [SciPy-user] Bug in find_objects? (Was: Re: image processing) In-Reply-To: <4549F10E.2080204@bigpond.net.au> References: <200610231057.37151.vmas@carabos.com> <200610302159.17749.vmas@carabos.com> <4549F10E.2080204@bigpond.net.au> Message-ID: <200611021658.00887.vmas@carabos.com> El Thursday, 2 de November de 2006 14:22, Gary Ruben escribi?: > Hi Vincent, > I noticed noone replied to your email so I just tried your script and > here's the output I get with scipy 0.5.0.2033: > > [[0 1 1 0 0 0] > [0 1 1 0 1 0] > [0 0 0 1 1 1] > [0 0 0 0 1 0]] > > [[0 1 1 0 0 0] > [0 1 1 0 2 0] > [0 0 0 2 2 2] > [0 0 0 0 2 0]] > 2 > Hi Gary, first of all, I didn't mention which versions of scipy and numpy I'm using. Sorry. They are 0.5.1 and 1.0rc1. The problem is that scipy.ndimage.measurements.label returns an integer array with In [18]: label_matrix.dtype.num Out[18]: 5 Notice that if you build an integer array as usual then In [19]: A = numpy.oldnumeric.array(range(0,5)) In [20]: A.dtype.num Out[20]: 7 In [21]: B = scipy.array(range(0,5)) In [22]: B.dtype.num Out[22]: 7 Passing an array like label_matrix to find_objects raises a runtime error as explained in my last mail. Passing an array like A to find_objects works fine. The problem is not detected in the scipy.ndimage tests module because all arrays passed to find_objects are like A. This being said I can reproduce exactly your results after doing a dirty trick in the module numpy/oldnumeric/precision.py. Just replace the line typecodes = {'Character':'c', 'Integer':'bhil', 'UnsignedInteger':'BHI', 'Float':'fd', 'Complex':'FD'} by typecodes = {'Character':'c', 'Integer':'bhli', 'UnsignedInteger':'BHI', 'Float':'fd', 'Complex':'FD'} Although it works for me it is far from being perfect (I think it will not work on 64-bits platforms). One of my colleagues has reported the bug to numpy this morning, see http://projects.scipy.org/scipy/numpy/ticket/370 I hope that my explanations are clear enough (I'm not an expert on data types). Thanks a lot for your answer. -- :: \ / Vicent Mas http://www.carabos.com 0;0 / \ C?rabos Coop. Enjoy Data V V " " From jtravs at gmail.com Thu Nov 2 11:19:00 2006 From: jtravs at gmail.com (John Travers) Date: Thu, 2 Nov 2006 16:19:00 +0000 Subject: [SciPy-user] spline interpolation crashes In-Reply-To: <200611021536.32070.martin.hoefling@gmx.de> References: <200611021536.32070.martin.hoefling@gmx.de> Message-ID: <3a1077e70611020818x35d62b97pa82043d2d68f4571@mail.gmail.com> Hi Martin, On 02/11/06, Martin H?fling wrote: > Hi there, spline interpolation crashes, any ideas why? > > Code: > > print "X-Data:",xdata[i] > print "Z-Data:",zdata[i] > print "X-len:",len(xdata[i]),"Y-len:",len(zdata[i]) > spl= interpolate.splrep(xdata[i],zdata[i],s=0) > > Output: > X-Data: [0.0, 0.0, 0.029562700000000001, 0.22792699999999999, You have a repeated x value here. The input x array to splrep must be strictly increasing. i.e. x[n-1] < x[n] < x[n+1] (This should be clearer in the documentation, I'll fix that). Cheers, John From fiepye at atlas.cz Thu Nov 2 13:26:41 2006 From: fiepye at atlas.cz (fiepye at atlas.cz) Date: Thu, 02 Nov 2006 19:26:41 +0100 Subject: [SciPy-user] mpi4py instalation. Message-ID: Hello. Thank you all, who responded to my posted question http://projects.scipy.org/pipermail/scipy-user/2006-October/009705.html I have got python2.4.3. I downloaded ipython, open mpi and mpi4py. Before instalation I configured Open MPI by the following line ./configure --prefix=/usr/local/mpi/open-mpi --with-threads=posix --enable-mpi-threads --enable-progress-threads later by ./configure --prefix=/usr/local/mpi/open-mpi --with-threads=posix --enable-mpi-threads mpi4py was cofigured by python2.4 setup.py config --mpicc=/usr/local/mpi/open-mpi/bin/mpicc After instalation, whern running python2.4 or ipython and loading mpi4py modul from mpi4py import * I got the following message: [juniper:04298] *** An error occurred in MPI_Errhandler_free [juniper:04298] *** on communicator MPI_COMM_WORLD [juniper:04298] *** MPI_ERR_ARG: invalid argument of some other kind [juniper:04298] *** MPI_ERRORS_ARE_FATAL (goodbye) [juniper:04298] [0,0,0] ORTE_ERROR_LOG: Not found in file base/pls_base_proxy.c at line 189 and python crashed. Could anybody help me? Fie Pye From myeates at jpl.nasa.gov Thu Nov 2 13:53:31 2006 From: myeates at jpl.nasa.gov (Mathew Yeates) Date: Thu, 02 Nov 2006 10:53:31 -0800 Subject: [SciPy-user] 0.5.2 Windows binary? Message-ID: <454A3EAB.4070408@jpl.nasa.gov> Anybody got a 0.5.2 (or 0.5.1 recompiled with numpy 1.0) windows binary? Mathew From david.huard at gmail.com Thu Nov 2 14:39:14 2006 From: david.huard at gmail.com (David Huard) Date: Thu, 2 Nov 2006 14:39:14 -0500 Subject: [SciPy-user] ARMA processes In-Reply-To: References: <91cf711d0611010813m430129e5o96a53dd8bb6dc4ee@mail.gmail.com> <20061101233603.73044.qmail@web53708.mail.yahoo.com> <91cf711d0611020600j6fc91038sf137134a991f3071@mail.gmail.com> Message-ID: <91cf711d0611021139q2e662bdds8d8e1a2c785ab601@mail.gmail.com> I intend to do so, but I wanted to do a little bit of research and testing before submitting anything officially (I'm trying to follow my new motto: don't code it if you won't test it !) David 2006/11/2, Alan G Isaac : > > On Thu, 2 Nov 2006, David Huard apparently wrote: > > I ended up writting the ar generator. It turns out that > > its quicker to write one than to find one. > > If it has any generality, please post it > (mentioning code license). > > Thanks, > Alan Isaac > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ellisonbg.net at gmail.com Thu Nov 2 15:54:31 2006 From: ellisonbg.net at gmail.com (Brian Granger) Date: Thu, 2 Nov 2006 13:54:31 -0700 Subject: [SciPy-user] mpi4py instalation. In-Reply-To: References: Message-ID: <6ce0ac130611021254y3829a9ebi19b39964e119a254@mail.gmail.com> Hmm, I have not seen this type of failure before. Some questions though? 1. Can you retry but only give openmpi the --prefix flag on configure./ 2. Have you put the openmpi directories in your LD_LIBRARY_PATH or DYLD_LIBRARY_PATH? Check on the openmpi FAQ for info about how to do this. 3. What version of mpi4py are you using? 4. Have you tried to compile and run a simple C mpi program? Brian On 11/2/06, fiepye at atlas.cz wrote: > Hello. > > Thank you all, who responded to my posted question > > http://projects.scipy.org/pipermail/scipy-user/2006-October/009705.html > > I have got python2.4.3. I downloaded ipython, open mpi and mpi4py. > > Before instalation I configured Open MPI by the following line > > ./configure --prefix=/usr/local/mpi/open-mpi --with-threads=posix --enable-mpi-threads --enable-progress-threads > > later by > > ./configure --prefix=/usr/local/mpi/open-mpi --with-threads=posix --enable-mpi-threads > > mpi4py was cofigured by > > python2.4 setup.py config --mpicc=/usr/local/mpi/open-mpi/bin/mpicc > > After instalation, whern running python2.4 or ipython and loading mpi4py modul > > from mpi4py import * > > I got the following message: > > [juniper:04298] *** An error occurred in MPI_Errhandler_free > [juniper:04298] *** on communicator MPI_COMM_WORLD > [juniper:04298] *** MPI_ERR_ARG: invalid argument of some other kind > [juniper:04298] *** MPI_ERRORS_ARE_FATAL (goodbye) > [juniper:04298] [0,0,0] ORTE_ERROR_LOG: Not found in file base/pls_base_proxy.c at line 189 > > and python crashed. > > Could anybody help me? > > Fie Pye > > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > From fiepye at atlas.cz Thu Nov 2 18:22:19 2006 From: fiepye at atlas.cz (fiepye at atlas.cz) Date: Fri, 03 Nov 2006 00:22:19 +0100 Subject: [SciPy-user] mpi4py instalation. Message-ID: <8f85b81dcaf24370996797a9f96d1726@atlas.cz> Hello Brian. 1. Now, I have installed open-mpi only with --prefix option. Things does not change. I got the same error message. 2. PATH points to /usr/local/mpi/open-mpi/bin:/usr/local/mpi/open-mpi LD_LIBRARY_PATH contains /usr/local/mpi/open-mpi/lib 3. I installd openmpi-1.1.2.tar.gz mpi4py-0.2.0.tar.gz 4. I successfully run /usr/local/mpi/open-mpi/bin/mpirun -np 2 xclock My PC: Opteron 275 OS: CentOS 4.3 Fie Pye >-----Puvodni zprava----- >Od: Brian Granger [mailto:ellisonbg.net at gmail.com] >Odesl?no: 2. listopadu 2006 20:54 >Komu: SciPy Users List >P?edm?t: Re: [SciPy-user] mpi4py instalation. > > >Hmm, > >I have not seen this type of failure before. Some questions though? > >1. Can you retry but only give openmpi the --prefix flag on configure./ > >2. Have you put the openmpi directories in your LD_LIBRARY_PATH or >DYLD_LIBRARY_PATH? >Check on the openmpi FAQ for info about how to do this. > >3. What version of mpi4py are you using? > >4. Have you tried to compile and run a simple C mpi program? > >Brian > > >On 11/2/06, fiepye at atlas.cz wrote: >> Hello. >> >> Thank you all, who responded to my posted question >> >> http://projects.scipy.org/pipermail/scipy-user/2006-October/009705.html >> >> I have got python2.4.3. I downloaded ipython, open mpi and mpi4py. >> >> Before instalation I configured Open MPI by the following line >> >> ./configure --prefix=/usr/local/mpi/open-mpi --with-threads=posix --enable-mpi-threads --enable-progress-threads >> >> later by >> >> ./configure --prefix=/usr/local/mpi/open-mpi --with-threads=posix --enable-mpi-threads >> >> mpi4py was cofigured by >> >> python2.4 setup.py config --mpicc=/usr/local/mpi/open-mpi/bin/mpicc >> >> After instalation, whern running python2.4 or ipython and loading mpi4py modul >> >> from mpi4py import * >> >> I got the following message: >> >> [juniper:04298] *** An error occurred in MPI_Errhandler_free >> [juniper:04298] *** on communicator MPI_COMM_WORLD >> [juniper:04298] *** MPI_ERR_ARG: invalid argument of some other kind >> [juniper:04298] *** MPI_ERRORS_ARE_FATAL (goodbye) >> [juniper:04298] [0,0,0] ORTE_ERROR_LOG: Not found in file base/pls_base_proxy.c at line 189 >> >> and python crashed. >> >> Could anybody help me? >> >> Fie Pye >> >> >> >> _______________________________________________ >> SciPy-user mailing list >> SciPy-user at scipy.org >> http://projects.scipy.org/mailman/listinfo/scipy-user >> >_______________________________________________ >SciPy-user mailing list >SciPy-user at scipy.org >http://projects.scipy.org/mailman/listinfo/scipy-user From ellisonbg.net at gmail.com Thu Nov 2 19:14:35 2006 From: ellisonbg.net at gmail.com (Brian Granger) Date: Thu, 2 Nov 2006 17:14:35 -0700 Subject: [SciPy-user] mpi4py instalation. In-Reply-To: <8f85b81dcaf24370996797a9f96d1726@atlas.cz> References: <8f85b81dcaf24370996797a9f96d1726@atlas.cz> Message-ID: <6ce0ac130611021614o5e491907h38456e101ee528f4@mail.gmail.com> See inline comments: On 11/2/06, fiepye at atlas.cz wrote: > Hello Brian. > > 1. Now, I have installed open-mpi only with --prefix option. > Things does not change. I got the same error message. > > 2. PATH points to /usr/local/mpi/open-mpi/bin:/usr/local/mpi/open-mpi > LD_LIBRARY_PATH contains /usr/local/mpi/open-mpi/lib According to the open-mpi FAQ you also need /usr/local/mpi/open-mpi/lib/openmpi on your LD_LIBRARY_PATH > 3. I installd > openmpi-1.1.2.tar.gz > mpi4py-0.2.0.tar.gz I think your version of mpi4py might be the problem. Try this one: http://www.python.org/pypi/mpi4py > 4. I successfully run > /usr/local/mpi/open-mpi/bin/mpirun -np 2 xclock > Try the newer version of mpi4py. > My PC: Opteron 275 > OS: CentOS 4.3 > > Fie Pye > > > >-----Puvodni zprava----- > >Od: Brian Granger [mailto:ellisonbg.net at gmail.com] > >Odesl?no: 2. listopadu 2006 20:54 > >Komu: SciPy Users List > >P?edm?t: Re: [SciPy-user] mpi4py instalation. > > > > > >Hmm, > > > >I have not seen this type of failure before. Some questions though? > > > >1. Can you retry but only give openmpi the --prefix flag on configure./ > > > >2. Have you put the openmpi directories in your LD_LIBRARY_PATH or > >DYLD_LIBRARY_PATH? > >Check on the openmpi FAQ for info about how to do this. > > > >3. What version of mpi4py are you using? > > > >4. Have you tried to compile and run a simple C mpi program? > > > >Brian > > > > > >On 11/2/06, fiepye at atlas.cz wrote: > >> Hello. > >> > >> Thank you all, who responded to my posted question > >> > >> http://projects.scipy.org/pipermail/scipy-user/2006-October/009705.html > >> > >> I have got python2.4.3. I downloaded ipython, open mpi and mpi4py. > >> > >> Before instalation I configured Open MPI by the following line > >> > >> ./configure --prefix=/usr/local/mpi/open-mpi --with-threads=posix --enable-mpi-threads --enable-progress-threads > >> > >> later by > >> > >> ./configure --prefix=/usr/local/mpi/open-mpi --with-threads=posix --enable-mpi-threads > >> > >> mpi4py was cofigured by > >> > >> python2.4 setup.py config --mpicc=/usr/local/mpi/open-mpi/bin/mpicc > >> > >> After instalation, whern running python2.4 or ipython and loading mpi4py modul > >> > >> from mpi4py import * > >> > >> I got the following message: > >> > >> [juniper:04298] *** An error occurred in MPI_Errhandler_free > >> [juniper:04298] *** on communicator MPI_COMM_WORLD > >> [juniper:04298] *** MPI_ERR_ARG: invalid argument of some other kind > >> [juniper:04298] *** MPI_ERRORS_ARE_FATAL (goodbye) > >> [juniper:04298] [0,0,0] ORTE_ERROR_LOG: Not found in file base/pls_base_proxy.c at line 189 > >> > >> and python crashed. > >> > >> Could anybody help me? > >> > >> Fie Pye > >> > >> > >> > >> _______________________________________________ > >> SciPy-user mailing list > >> SciPy-user at scipy.org > >> http://projects.scipy.org/mailman/listinfo/scipy-user > >> > >_______________________________________________ > >SciPy-user mailing list > >SciPy-user at scipy.org > >http://projects.scipy.org/mailman/listinfo/scipy-user > > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > From chris at edc.com.au Fri Nov 3 00:52:25 2006 From: chris at edc.com.au (Chris Bartley) Date: Fri, 3 Nov 2006 13:52:25 +0800 Subject: [SciPy-user] Is it possible to put a combo box on a matplotlib figure? Message-ID: <004001c6ff0c$3cf0eaf0$3811a8c0@Guru> I have a matplotlib figure (by the way - matplot lib is brilliant) with lots of widgets (buttons, check boxes) on it, and am wondering if it is possible to put a combo box on it? Cheers, Chris Bartley ******************************************************** Mechanical Engineer Engineering Dynamics Consultants 21 Riseley St Applecross WA 6153 +61 8 9316 3577 ******************************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From robert.kern at gmail.com Fri Nov 3 02:13:14 2006 From: robert.kern at gmail.com (Robert Kern) Date: Thu, 02 Nov 2006 23:13:14 -0800 Subject: [SciPy-user] Is it possible to put a combo box on a matplotlib figure? In-Reply-To: <004001c6ff0c$3cf0eaf0$3811a8c0@Guru> References: <004001c6ff0c$3cf0eaf0$3811a8c0@Guru> Message-ID: <454AEC0A.4050201@gmail.com> Chris Bartley wrote: > I have a matplotlib figure (by the way - matplot lib is brilliant) with > lots of widgets (buttons, check boxes) on it, and am wondering if it is > possible to put a combo box on it? You will want to ask on matplotlib-users list. https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From fredmfp at gmail.com Fri Nov 3 03:55:07 2006 From: fredmfp at gmail.com (fred) Date: Fri, 03 Nov 2006 09:55:07 +0100 Subject: [SciPy-user] wiki In-Reply-To: <4540FD78.4000303@tiscali.de> References: <453E5A1C.6040902@gmail.com> <20061025203626.GG5588@clipper.ens.fr> <453FD6AE.2050801@gmail.com> <4540FD78.4000303@tiscali.de> Message-ID: <454B03EB.2020503@gmail.com> David Linke a ?crit: >Ask someone listed on http://scipy.org/EditorsGroup to add your name to >that page. Hi, I sent an email to A. Becker a week ago, to be added on the EditorsGroup, but I have still no answer :-( Can someone of the EditorsGroup add my name to the list, please ? Cheers, -- http://scipy.org/FredericPetit From gaedol at gmail.com Fri Nov 3 09:00:45 2006 From: gaedol at gmail.com (Marco) Date: Fri, 3 Nov 2006 15:00:45 +0100 Subject: [SciPy-user] Scipy on MacOS X, troubles Message-ID: Hi all, new to the ML, here. :) I have some troubles with SciPy on Tiger. I have complied scipy (and numpy) on my laptop (ibook g4) using all the hints on the "Installing SciPy on MacOSX" page, but i still have some problems. If i do something list "import scipy", on python 2.4.3 (ActiveState), it all runs well, and i have scipy to use. If, instead, i use "from scipy import *" then i obtain, as an answer from python: >>> from scipy import * Traceback (most recent call last): File "", line 1, in ? File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/linsolve/__init__.py", line 5, in ? import umfpack File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/linsolve/umfpack/__init__.py", line 3, in ? from umfpack import * File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/linsolve/umfpack/umfpack.py", line 11, in ? import scipy.sparse as sp File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/sparse/__init__.py", line 5, in ? from sparse import * File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/sparse/sparse.py", line 12, in ? import sparsetools ImportError: Failure linking new module: /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/sparse/sparsetools.so: Symbol not found: _sprintf$LDBLStub Referenced from: /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/sparse/sparsetools.so Expected in: dynamic lookup Now, i could modify the codebase to use the "import scipy" and not "from scipy import *" (that's code i've been writing on linux and then moved to mac), but it would take time, maybe too much. I have been lookin on list archives, and found something but i've not really understood what to do... So, any good soul? :) TIA, marco PS RTFM welcomed only if with links on what to read :) From gruben at bigpond.net.au Fri Nov 3 09:42:40 2006 From: gruben at bigpond.net.au (Gary Ruben) Date: Sat, 04 Nov 2006 01:42:40 +1100 Subject: [SciPy-user] Bug in find_objects? (Was: Re: image processing) In-Reply-To: <200611021658.00887.vmas@carabos.com> References: <200610231057.37151.vmas@carabos.com> <200610302159.17749.vmas@carabos.com> <4549F10E.2080204@bigpond.net.au> <200611021658.00887.vmas@carabos.com> Message-ID: <454B5560.30705@bigpond.net.au> Vicent Mas (V+) wrote: > Hi Gary, > > first of all, I didn't mention which versions of scipy and numpy I'm > using. Sorry. They are 0.5.1 and 1.0rc1. > > The problem is that scipy.ndimage.measurements.label returns an integer > array with > > In [18]: label_matrix.dtype.num > Out[18]: 5 I get 7 with this, which indicates an int32. I don't know why you get a 5, which looks like a native Python int or a dtype=int0. It's easier to tell if you just look at label_matrix.dtype which is ' Notice that if you build an integer array as usual then > > In [19]: A = numpy.oldnumeric.array(range(0,5)) > > In [20]: A.dtype.num > Out[20]: 7 > > In [21]: B = scipy.array(range(0,5)) > > In [22]: B.dtype.num > Out[22]: 7 This is the same in my version, so it seems OK. > Passing an array like label_matrix to find_objects raises a runtime > error as explained in my last mail. Passing an array like A to > find_objects works fine. The problem is not detected in the > scipy.ndimage tests module because all arrays passed to find_objects > are like A. > > This being said I can reproduce exactly your results after doing a dirty > trick in the module numpy/oldnumeric/precision.py. Just replace the > line > > typecodes = > {'Character':'c', 'Integer':'bhil', 'UnsignedInteger':'BHI', 'Float':'fd', 'Complex':'FD'} > > by > > typecodes = > {'Character':'c', 'Integer':'bhli', 'UnsignedInteger':'BHI', 'Float':'fd', 'Complex':'FD'} > > > Although it works for me it is far from being perfect (I think it will > not work on 64-bits platforms). One of my colleagues has reported the > bug to numpy this morning, see > http://projects.scipy.org/scipy/numpy/ticket/370 Hopefully someone will be able to reproduce your error. > I hope that my explanations are clear enough (I'm not an expert on data > types). > > Thanks a lot for your answer. From excellent.frizou at gmail.com Fri Nov 3 10:46:07 2006 From: excellent.frizou at gmail.com (Sam frizou) Date: Fri, 3 Nov 2006 16:46:07 +0100 Subject: [SciPy-user] Scipy on MacOS X, troubles In-Reply-To: References: Message-ID: <1d2f6e8c0611030746u6b44805bt6af398132ea35087@mail.gmail.com> Hi, I installed numpy and scipy on tiger with darminports (py-numpy and py-scipy) everything works well. On 11/3/06, Marco wrote: > Hi all, > new to the ML, here. :) > > I have some troubles with SciPy on Tiger. > > I have complied scipy (and numpy) on my laptop (ibook g4) using all > the hints on the "Installing SciPy on MacOSX" page, but i still have > some problems. > If i do something list "import scipy", on python 2.4.3 (ActiveState), > it all runs well, and i have scipy to use. > If, instead, i use "from scipy import *" then i obtain, as an answer > from python: > > >>> from scipy import * > Traceback (most recent call last): > File "", line 1, in ? > File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/linsolve/__init__.py", > line 5, in ? > import umfpack > File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/linsolve/umfpack/__init__.py", > line 3, in ? > from umfpack import * > File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/linsolve/umfpack/umfpack.py", > line 11, in ? > import scipy.sparse as sp > File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/sparse/__init__.py", > line 5, in ? > from sparse import * > File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/sparse/sparse.py", > line 12, in ? > import sparsetools > ImportError: Failure linking new module: > /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/sparse/sparsetools.so: > Symbol not found: _sprintf$LDBLStub > Referenced from: > /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/sparse/sparsetools.so > Expected in: dynamic lookup > > > Now, > i could modify the codebase to use the "import scipy" and not "from > scipy import *" (that's code i've been writing on linux and then moved > to mac), but it would take time, maybe too much. > > I have been lookin on list archives, and found something but i've not > really understood what to do... > So, > any good soul? :) > > TIA, > > marco > > PS > RTFM welcomed only if with links on what to read :) > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > -- On obtient beaucoup plus avec un mot gentil et une arme qu'avec seulement un mot gentil - "Al Capone". From gaedol at gmail.com Fri Nov 3 10:52:10 2006 From: gaedol at gmail.com (Marco) Date: Fri, 3 Nov 2006 16:52:10 +0100 Subject: [SciPy-user] Scipy on MacOS X, troubles In-Reply-To: <1d2f6e8c0611030746u6b44805bt6af398132ea35087@mail.gmail.com> References: <1d2f6e8c0611030746u6b44805bt6af398132ea35087@mail.gmail.com> Message-ID: Hi, i will try, asap. Thanks, marco On 11/3/06, Sam frizou wrote: > Hi, > > I installed numpy and scipy on tiger with darminports (py-numpy and py-scipy) > > everything works well. > > On 11/3/06, Marco wrote: > > Hi all, > > new to the ML, here. :) > > > > I have some troubles with SciPy on Tiger. > > > > I have complied scipy (and numpy) on my laptop (ibook g4) using all > > the hints on the "Installing SciPy on MacOSX" page, but i still have > > some problems. > > If i do something list "import scipy", on python 2.4.3 (ActiveState), > > it all runs well, and i have scipy to use. > > If, instead, i use "from scipy import *" then i obtain, as an answer > > from python: > > > > >>> from scipy import * > > Traceback (most recent call last): > > File "", line 1, in ? > > File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/linsolve/__init__.py", > > line 5, in ? > > import umfpack > > File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/linsolve/umfpack/__init__.py", > > line 3, in ? > > from umfpack import * > > File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/linsolve/umfpack/umfpack.py", > > line 11, in ? > > import scipy.sparse as sp > > File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/sparse/__init__.py", > > line 5, in ? > > from sparse import * > > File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/sparse/sparse.py", > > line 12, in ? > > import sparsetools > > ImportError: Failure linking new module: > > /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/sparse/sparsetools.so: > > Symbol not found: _sprintf$LDBLStub > > Referenced from: > > /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/sparse/sparsetools.so > > Expected in: dynamic lookup > > > > > > Now, > > i could modify the codebase to use the "import scipy" and not "from > > scipy import *" (that's code i've been writing on linux and then moved > > to mac), but it would take time, maybe too much. > > > > I have been lookin on list archives, and found something but i've not > > really understood what to do... > > So, > > any good soul? :) > > > > TIA, > > > > marco > > > > PS > > RTFM welcomed only if with links on what to read :) > > _______________________________________________ > > SciPy-user mailing list > > SciPy-user at scipy.org > > http://projects.scipy.org/mailman/listinfo/scipy-user > > > > > -- > On obtient beaucoup plus avec un mot gentil et une arme qu'avec > seulement un mot gentil - "Al Capone". > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > From vmas at carabos.com Fri Nov 3 11:07:52 2006 From: vmas at carabos.com (Vicent Mas (V+)) Date: Fri, 3 Nov 2006 17:07:52 +0100 Subject: [SciPy-user] Bug in find_objects? (Was: Re: image processing) In-Reply-To: <454B5560.30705@bigpond.net.au> References: <200610231057.37151.vmas@carabos.com> <200611021658.00887.vmas@carabos.com> <454B5560.30705@bigpond.net.au> Message-ID: <200611031707.52774.vmas@carabos.com> El Friday, 3 de November de 2006 15:42, Gary Ruben escribi?: > Vicent Mas (V+) wrote: > > > > Hi Gary, > > > > first of all, I didn't mention which versions of scipy and numpy > > I'm using. Sorry. They are 0.5.1 and 1.0rc1. > > > > The problem is that scipy.ndimage.measurements.label returns an > > integer array with > > > > In [18]: label_matrix.dtype.num > > Out[18]: 5 > > I get 7 with this, which indicates an int32. I don't know why you get > a 5, which looks like a native Python int or a dtype=int0. It's > easier to tell if you just look at label_matrix.dtype which is ' on mine. So this may have changed in your scipy version or it may be > a platform dependency. Someone else will have to explain why. > I don't know if this response is helpful to you. Hopefully someone > else who understands this will step up. > > > Notice that if you build an integer array as usual then > > > > In [19]: A = numpy.oldnumeric.array(range(0,5)) > > > > In [20]: A.dtype.num > > Out[20]: 7 > > > > In [21]: B = scipy.array(range(0,5)) > > > > In [22]: B.dtype.num > > Out[22]: 7 > > This is the same in my version, so it seems OK. > > > Passing an array like label_matrix to find_objects raises a runtime > > error as explained in my last mail. Passing an array like A to > > find_objects works fine. The problem is not detected in the > > scipy.ndimage tests module because all arrays passed to > > find_objects are like A. > > > > This being said I can reproduce exactly your results after doing a > > dirty trick in the module numpy/oldnumeric/precision.py. Just > > replace the line > > > > typecodes = > > {'Character':'c', 'Integer':'bhil', 'UnsignedInteger':'BHI', > > 'Float':'fd', 'Complex':'FD'} > > > > by > > > > typecodes = > > {'Character':'c', 'Integer':'bhli', 'UnsignedInteger':'BHI', > > 'Float':'fd', 'Complex':'FD'} > > > > > > Although it works for me it is far from being perfect (I think it > > will not work on 64-bits platforms). One of my colleagues has > > reported the bug to numpy this morning, see > > http://projects.scipy.org/scipy/numpy/ticket/370 > > Hopefully someone will be able to reproduce your error. > You can have a look to numpy trac to see the status of the problem: http://projects.scipy.org/scipy/numpy/ticket/370 It seems that problem could be fixed in two different ways: 1) changing numpy 2) changing scipy.ndimage Possibility 1) has been discarded by backward-compatibility reasons so 2) is the winner. Unfortunately it seems that ndimage is not being maintained so it could take some time to fix the problem :-( Anyway my dirty trick is still working for me :-) CU -- :: \ / Vicent Mas http://www.carabos.com 0;0 / \ C?rabos Coop. Enjoy Data V V " " From erin.sheldon at gmail.com Fri Nov 3 12:50:23 2006 From: erin.sheldon at gmail.com (Erin Sheldon) Date: Fri, 3 Nov 2006 12:50:23 -0500 Subject: [SciPy-user] Scipy on MacOS X, troubles In-Reply-To: <1d2f6e8c0611030746u6b44805bt6af398132ea35087@mail.gmail.com> References: <1d2f6e8c0611030746u6b44805bt6af398132ea35087@mail.gmail.com> Message-ID: <331116dc0611030950p146267cfje307fc36fc6fe1cb@mail.gmail.com> Hi Marco - I also had success with MacPorts (formerly darwinports). It seems to be a very stable solution. For me it required compiling gcc 4.1, however, so it may require patience. I was pleased enough to create at how-to on this wiki page: http://howdy.physics.nyu.edu/index.php/Numpy_For_Mac_Using_Macports Erin On 11/3/06, Sam frizou wrote: > Hi, > > I installed numpy and scipy on tiger with darminports (py-numpy and py-scipy) > > everything works well. > > On 11/3/06, Marco wrote: > > Hi all, > > new to the ML, here. :) > > > > I have some troubles with SciPy on Tiger. > > > > I have complied scipy (and numpy) on my laptop (ibook g4) using all > > the hints on the "Installing SciPy on MacOSX" page, but i still have > > some problems. > > If i do something list "import scipy", on python 2.4.3 (ActiveState), > > it all runs well, and i have scipy to use. > > If, instead, i use "from scipy import *" then i obtain, as an answer > > from python: > > > > >>> from scipy import * > > Traceback (most recent call last): > > File "", line 1, in ? > > File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/linsolve/__init__.py", > > line 5, in ? > > import umfpack > > File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/linsolve/umfpack/__init__.py", > > line 3, in ? > > from umfpack import * > > File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/linsolve/umfpack/umfpack.py", > > line 11, in ? > > import scipy.sparse as sp > > File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/sparse/__init__.py", > > line 5, in ? > > from sparse import * > > File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/sparse/sparse.py", > > line 12, in ? > > import sparsetools > > ImportError: Failure linking new module: > > /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/sparse/sparsetools.so: > > Symbol not found: _sprintf$LDBLStub > > Referenced from: > > /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/sparse/sparsetools.so > > Expected in: dynamic lookup > > > > > > Now, > > i could modify the codebase to use the "import scipy" and not "from > > scipy import *" (that's code i've been writing on linux and then moved > > to mac), but it would take time, maybe too much. > > > > I have been lookin on list archives, and found something but i've not > > really understood what to do... > > So, > > any good soul? :) > > > > TIA, > > > > marco > > > > PS > > RTFM welcomed only if with links on what to read :) > > _______________________________________________ > > SciPy-user mailing list > > SciPy-user at scipy.org > > http://projects.scipy.org/mailman/listinfo/scipy-user > > > > > -- > On obtient beaucoup plus avec un mot gentil et une arme qu'avec > seulement un mot gentil - "Al Capone". > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > From ahoover at eecs.berkeley.edu Fri Nov 3 14:22:50 2006 From: ahoover at eecs.berkeley.edu (Aaron Hoover) Date: Fri, 03 Nov 2006 11:22:50 -0800 Subject: [SciPy-user] Scipy on MacOS X, troubles In-Reply-To: <331116dc0611030950p146267cfje307fc36fc6fe1cb@mail.gmail.com> References: <1d2f6e8c0611030746u6b44805bt6af398132ea35087@mail.gmail.com> <331116dc0611030950p146267cfje307fc36fc6fe1cb@mail.gmail.com> Message-ID: <454B970A.2050600@eecs.berkeley.edu> Just thought I'd chime in with another possible solution. I seem to remember seeing similar errors after compiling SciPy on my MBP. If I recall correctly, updating my cctools fixed the problem. -Aaron Erin Sheldon wrote: > Hi Marco - > > I also had success with MacPorts (formerly darwinports). > It seems to be a very stable solution. For me it required > compiling gcc 4.1, however, so it may require patience. > > I was pleased enough to create at how-to on > this wiki page: > http://howdy.physics.nyu.edu/index.php/Numpy_For_Mac_Using_Macports > > Erin > > On 11/3/06, Sam frizou wrote: > >> Hi, >> >> I installed numpy and scipy on tiger with darminports (py-numpy and py-scipy) >> >> everything works well. >> >> On 11/3/06, Marco wrote: >> >>> Hi all, >>> new to the ML, here. :) >>> >>> I have some troubles with SciPy on Tiger. >>> >>> I have complied scipy (and numpy) on my laptop (ibook g4) using all >>> the hints on the "Installing SciPy on MacOSX" page, but i still have >>> some problems. >>> If i do something list "import scipy", on python 2.4.3 (ActiveState), >>> it all runs well, and i have scipy to use. >>> If, instead, i use "from scipy import *" then i obtain, as an answer >>> from python: >>> >>> >>>>>> from scipy import * >>>>>> >>> Traceback (most recent call last): >>> File "", line 1, in ? >>> File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/linsolve/__init__.py", >>> line 5, in ? >>> import umfpack >>> File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/linsolve/umfpack/__init__.py", >>> line 3, in ? >>> from umfpack import * >>> File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/linsolve/umfpack/umfpack.py", >>> line 11, in ? >>> import scipy.sparse as sp >>> File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/sparse/__init__.py", >>> line 5, in ? >>> from sparse import * >>> File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/sparse/sparse.py", >>> line 12, in ? >>> import sparsetools >>> ImportError: Failure linking new module: >>> /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/sparse/sparsetools.so: >>> Symbol not found: _sprintf$LDBLStub >>> Referenced from: >>> /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/sparse/sparsetools.so >>> Expected in: dynamic lookup >>> >>> >>> Now, >>> i could modify the codebase to use the "import scipy" and not "from >>> scipy import *" (that's code i've been writing on linux and then moved >>> to mac), but it would take time, maybe too much. >>> >>> I have been lookin on list archives, and found something but i've not >>> really understood what to do... >>> So, >>> any good soul? :) >>> >>> TIA, >>> >>> marco >>> >>> PS >>> RTFM welcomed only if with links on what to read :) >>> _______________________________________________ >>> SciPy-user mailing list >>> SciPy-user at scipy.org >>> http://projects.scipy.org/mailman/listinfo/scipy-user >>> >>> >> -- >> On obtient beaucoup plus avec un mot gentil et une arme qu'avec >> seulement un mot gentil - "Al Capone". >> _______________________________________________ >> SciPy-user mailing list >> SciPy-user at scipy.org >> http://projects.scipy.org/mailman/listinfo/scipy-user >> >> > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > From fiepye at atlas.cz Fri Nov 3 14:30:53 2006 From: fiepye at atlas.cz (fiepye at atlas.cz) Date: Fri, 03 Nov 2006 20:30:53 +0100 Subject: [SciPy-user] mpi4py instalation. Message-ID: <41d2e6cb9fe2480eb560ad19843cf1b2@atlas.cz> Hello Brian. Thank you for your suggestions. I downloaded new version of mpi4py, modified mpi.cfg [openmpi] mpi_dir = /usr/local/mpi/open-mpi and installed it. It seams, it will work. Now, I can load mpi4py modul. Best regards. Fie Pye >-----Puvodni zprava----- >Od: Brian Granger [mailto:ellisonbg.net at gmail.com] >Odesl?no: 3. listopadu 2006 0:14 >Komu: SciPy Users List >P?edm?t: Re: [SciPy-user] mpi4py instalation. > > >See inline comments: > >On 11/2/06, fiepye at atlas.cz wrote: >> Hello Brian. >> >> 1. Now, I have installed open-mpi only with --prefix option. >> Things does not change. I got the same error message. >> >> 2. PATH points to /usr/local/mpi/open-mpi/bin:/usr/local/mpi/open-mpi >> LD_LIBRARY_PATH contains /usr/local/mpi/open-mpi/lib > >According to the open-mpi FAQ you also need > >/usr/local/mpi/open-mpi/lib/openmpi > >on your LD_LIBRARY_PATH > > >> 3. I installd >> openmpi-1.1.2.tar.gz >> mpi4py-0.2.0.tar.gz > >I think your version of mpi4py might be the problem. Try this one: > >http://www.python.org/pypi/mpi4py > >> 4. I successfully run >> /usr/local/mpi/open-mpi/bin/mpirun -np 2 xclock >> > >Try the newer version of mpi4py. > > >> My PC: Opteron 275 >> OS: CentOS 4.3 >> >> Fie Pye >> >> >> >-----Puvodni zprava----- >> >Od: Brian Granger [mailto:ellisonbg.net at gmail.com] >> >Odesl?no: 2. listopadu 2006 20:54 >> >Komu: SciPy Users List >> >P?edm?t: Re: [SciPy-user] mpi4py instalation. >> > >> > >> >Hmm, >> > >> >I have not seen this type of failure before. Some questions though? >> > >> >1. Can you retry but only give openmpi the --prefix flag on configure./ >> > >> >2. Have you put the openmpi directories in your LD_LIBRARY_PATH or >> >DYLD_LIBRARY_PATH? >> >Check on the openmpi FAQ for info about how to do this. >> > >> >3. What version of mpi4py are you using? >> > >> >4. Have you tried to compile and run a simple C mpi program? >> > >> >Brian >> > >> > >> >On 11/2/06, fiepye at atlas.cz wrote: >> >> Hello. >> >> >> >> Thank you all, who responded to my posted question >> >> >> >> http://projects.scipy.org/pipermail/scipy-user/2006-October/009705.html >> >> >> >> I have got python2.4.3. I downloaded ipython, open mpi and mpi4py. >> >> >> >> Before instalation I configured Open MPI by the following line >> >> >> >> ./configure --prefix=/usr/local/mpi/open-mpi --with-threads=posix --enable-mpi-threads --enable-progress-threads >> >> >> >> later by >> >> >> >> ./configure --prefix=/usr/local/mpi/open-mpi --with-threads=posix --enable-mpi-threads >> >> >> >> mpi4py was cofigured by >> >> >> >> python2.4 setup.py config --mpicc=/usr/local/mpi/open-mpi/bin/mpicc >> >> >> >> After instalation, whern running python2.4 or ipython and loading mpi4py modul >> >> >> >> from mpi4py import * >> >> >> >> I got the following message: >> >> >> >> [juniper:04298] *** An error occurred in MPI_Errhandler_free >> >> [juniper:04298] *** on communicator MPI_COMM_WORLD >> >> [juniper:04298] *** MPI_ERR_ARG: invalid argument of some other kind >> >> [juniper:04298] *** MPI_ERRORS_ARE_FATAL (goodbye) >> >> [juniper:04298] [0,0,0] ORTE_ERROR_LOG: Not found in file base/pls_base_proxy.c at line 189 >> >> >> >> and python crashed. >> >> >> >> Could anybody help me? >> >> >> >> Fie Pye >> >> >> >> >> >> >> >> _______________________________________________ >> >> SciPy-user mailing list >> >> SciPy-user at scipy.org >> >> http://projects.scipy.org/mailman/listinfo/scipy-user >> >> >> >_______________________________________________ >> >SciPy-user mailing list >> >SciPy-user at scipy.org >> >http://projects.scipy.org/mailman/listinfo/scipy-user >> >> >> >> _______________________________________________ >> SciPy-user mailing list >> SciPy-user at scipy.org >> http://projects.scipy.org/mailman/listinfo/scipy-user >> >_______________________________________________ >SciPy-user mailing list >SciPy-user at scipy.org >http://projects.scipy.org/mailman/listinfo/scipy-user From ryanlists at gmail.com Fri Nov 3 17:52:36 2006 From: ryanlists at gmail.com (Ryan Krauss) Date: Fri, 3 Nov 2006 16:52:36 -0600 Subject: [SciPy-user] ode45 replacment Message-ID: What is the best scipy replacement for Matlab's ode45? Is it scipy.integrate.odeint? What is the difference between odeint and ode? Thanks, Ryan From peridot.faceted at gmail.com Fri Nov 3 18:55:29 2006 From: peridot.faceted at gmail.com (A. M. Archibald) Date: Fri, 3 Nov 2006 18:55:29 -0500 Subject: [SciPy-user] ode45 replacment In-Reply-To: References: Message-ID: On 03/11/06, Ryan Krauss wrote: > What is the best scipy replacement for Matlab's ode45? Is it > scipy.integrate.odeint? What is the difference between odeint and > ode? Either one will probably suit your needs. For practical purposes, the difference is one of interface - odeint has a more procedural interface, while ode has a more object-oriented one. Underneath, both use well-established fortran ODE integrators (odeint uses LSODA from ODEPACK, and ode uses VODE). odeint may also have problems on a 64-bit system, IIRC. If you need a more sophisticated integrator (stopping based on the y value, for example) look at the PyDSTool package. A. M. Archibald From fullung at gmail.com Fri Nov 3 20:06:11 2006 From: fullung at gmail.com (Albert Strasheim) Date: Sat, 4 Nov 2006 03:06:11 +0200 Subject: [SciPy-user] mpi4py instalation. In-Reply-To: <6ce0ac130611021614o5e491907h38456e101ee528f4@mail.gmail.com> References: <8f85b81dcaf24370996797a9f96d1726@atlas.cz> <6ce0ac130611021614o5e491907h38456e101ee528f4@mail.gmail.com> Message-ID: <20061104010611.GA19722@dogbert.sdsl.sun.ac.za> Hello all On Thu, 02 Nov 2006, Brian Granger wrote: > > 3. I installd > > openmpi-1.1.2.tar.gz > > mpi4py-0.2.0.tar.gz > > I think your version of mpi4py might be the problem. Try this one: > > http://www.python.org/pypi/mpi4py Is there somewhere I can get mpi4py from CVS or SVN? It seems like mpi4py has started moving over to mpi4py.scipy.org, but the Subversion repository at http://mpi4py.scipy.org/svn/mpi4py/mpi4py/trunk/ is still empty. Cheers, Albert From ellisonbg.net at gmail.com Fri Nov 3 21:52:15 2006 From: ellisonbg.net at gmail.com (Brian Granger) Date: Fri, 3 Nov 2006 19:52:15 -0700 Subject: [SciPy-user] mpi4py instalation. In-Reply-To: <20061104010611.GA19722@dogbert.sdsl.sun.ac.za> References: <8f85b81dcaf24370996797a9f96d1726@atlas.cz> <6ce0ac130611021614o5e491907h38456e101ee528f4@mail.gmail.com> <20061104010611.GA19722@dogbert.sdsl.sun.ac.za> Message-ID: <6ce0ac130611031852p6d3c93abrbf661e8a08bb0646@mail.gmail.com> Yep, Lisandro has not yet moved things over. I think the most recent version of mpi4py is linked to here: http://mpi4py.scipy.org/Download I may take a little while to get everything moved over, but eventually everything will be in the new SVn repo at mpi4py.scipy.org. Brian On 11/3/06, Albert Strasheim wrote: > Hello all > > On Thu, 02 Nov 2006, Brian Granger wrote: > > > > 3. I installd > > > openmpi-1.1.2.tar.gz > > > mpi4py-0.2.0.tar.gz > > > > I think your version of mpi4py might be the problem. Try this one: > > > > http://www.python.org/pypi/mpi4py > > Is there somewhere I can get mpi4py from CVS or SVN? It seems like > mpi4py has started moving over to mpi4py.scipy.org, but the Subversion > repository at > > http://mpi4py.scipy.org/svn/mpi4py/mpi4py/trunk/ > > is still empty. > > Cheers, > > Albert > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > From fullung at gmail.com Fri Nov 3 22:06:48 2006 From: fullung at gmail.com (Albert Strasheim) Date: Sat, 4 Nov 2006 05:06:48 +0200 Subject: [SciPy-user] mpi4py instalation. References: <8f85b81dcaf24370996797a9f96d1726@atlas.cz><6ce0ac130611021614o5e491907h38456e101ee528f4@mail.gmail.com><20061104010611.GA19722@dogbert.sdsl.sun.ac.za> <6ce0ac130611031852p6d3c93abrbf661e8a08bb0646@mail.gmail.com> Message-ID: <024301c6ffbe$447efd40$0a83a8c0@ratbert> Hey Brian I'm very excited about what's going on with the new IPython and mpi4py. I need exactly this functionality for the code I'm working on now. I'm having a few problems getting mpi4py to build on Windows: http://projects.scipy.org/mpi4py/ticket/1 http://projects.scipy.org/mpi4py/ticket/2 http://projects.scipy.org/mpi4py/ticket/3 and on Fedora Core 5: http://projects.scipy.org/mpi4py/ticket/4 Any suggestions? Thanks. Regards, Albert ----- Original Message ----- From: "Brian Granger" To: "SciPy Users List" Sent: Saturday, November 04, 2006 4:52 AM Subject: Re: [SciPy-user] mpi4py instalation. > Yep, Lisandro has not yet moved things over. I think the most recent > version of mpi4py is linked to here: > > http://mpi4py.scipy.org/Download > > I may take a little while to get everything moved over, but eventually > everything will be in the new SVn repo at mpi4py.scipy.org. > > Brian From ellisonbg.net at gmail.com Sat Nov 4 00:24:48 2006 From: ellisonbg.net at gmail.com (Brian Granger) Date: Fri, 3 Nov 2006 22:24:48 -0700 Subject: [SciPy-user] mpi4py instalation. In-Reply-To: <024301c6ffbe$447efd40$0a83a8c0@ratbert> References: <8f85b81dcaf24370996797a9f96d1726@atlas.cz> <6ce0ac130611021614o5e491907h38456e101ee528f4@mail.gmail.com> <20061104010611.GA19722@dogbert.sdsl.sun.ac.za> <6ce0ac130611031852p6d3c93abrbf661e8a08bb0646@mail.gmail.com> <024301c6ffbe$447efd40$0a83a8c0@ratbert> Message-ID: <6ce0ac130611032124j74c7b1bep690e4801a88a3699@mail.gmail.com> Albert, The best way of building mpi4py is to not use the mpi.cfg file. Rather, just specify the mpicc excutable: python setup.py build --mpicc=mpicc If mpicc is on your PATH should work. At this point, i think mpi.cfg is for more unusual MPi implementations that don't "just work". This should probably be better documented though. Try that and let me know what you get. This might not solve the problems you are seeing on windows, but it should get you going on FC5. Thanks for submitting the tickets. Another thing, i would grab a newer version of openmpi. We are in the process of getting a maililng list for mpi4py working. While there is one shown on the new site, it doesn't work yet. I know that Lisanrdo is really busy right now - he is trying to get things moved over to the new site and finish a paper on mpi4py. Brian On 11/3/06, Albert Strasheim wrote: > Hey Brian > > I'm very excited about what's going on with the new IPython and mpi4py. I > need exactly this functionality for the code I'm working on now. > > I'm having a few problems getting mpi4py to build on Windows: > > http://projects.scipy.org/mpi4py/ticket/1 > http://projects.scipy.org/mpi4py/ticket/2 > http://projects.scipy.org/mpi4py/ticket/3 > > and on Fedora Core 5: > > http://projects.scipy.org/mpi4py/ticket/4 > > Any suggestions? > > Thanks. > > Regards, > > Albert > > ----- Original Message ----- > From: "Brian Granger" > To: "SciPy Users List" > Sent: Saturday, November 04, 2006 4:52 AM > Subject: Re: [SciPy-user] mpi4py instalation. > > > > Yep, Lisandro has not yet moved things over. I think the most recent > > version of mpi4py is linked to here: > > > > http://mpi4py.scipy.org/Download > > > > I may take a little while to get everything moved over, but eventually > > everything will be in the new SVn repo at mpi4py.scipy.org. > > > > Brian > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > From fullung at gmail.com Sat Nov 4 05:43:21 2006 From: fullung at gmail.com (Albert Strasheim) Date: Sat, 4 Nov 2006 12:43:21 +0200 Subject: [SciPy-user] mpi4py instalation. In-Reply-To: <6ce0ac130611032124j74c7b1bep690e4801a88a3699@mail.gmail.com> References: <8f85b81dcaf24370996797a9f96d1726@atlas.cz> <6ce0ac130611021614o5e491907h38456e101ee528f4@mail.gmail.com> <20061104010611.GA19722@dogbert.sdsl.sun.ac.za> <6ce0ac130611031852p6d3c93abrbf661e8a08bb0646@mail.gmail.com> <024301c6ffbe$447efd40$0a83a8c0@ratbert> <6ce0ac130611032124j74c7b1bep690e4801a88a3699@mail.gmail.com> Message-ID: <20061104104321.GA26016@dogbert.sdsl.sun.ac.za> Hello all On Fri, 03 Nov 2006, Brian Granger wrote: > Albert, > > The best way of building mpi4py is to not use the mpi.cfg file. > Rather, just specify the mpicc excutable: > > python setup.py build --mpicc=mpicc > > If mpicc is on your PATH should work. Okay, I'll give this a spin. Fedora Core 6 includes openmpi 1.1 as part of the "core" distribution, so I'll try that. > At this point, i think mpi.cfg is for more unusual MPi implementations > that don't "just work". This should probably be better documented > though. Try that and let me know what you get. This might not solve > the problems you are seeing on windows, but it should get you going on > FC5. Thanks for submitting the tickets. The only real problem that remains on Windows with DeinoMPI is that it doesn't want to link. mpi4py is trying to use Py_GetArgcArgv, but this symbol isn't part of the public API (as far as I can see), so it isn't exported from the Python library on Windows. As I understand it, this just happens to work on Unix-like operating systems because GCC and other C compiler couldn't control visibility of symbols until recently (and as a result, not much code bothers with this yet). pympi already solves this problem. One just has to reconstruct argc and argv from sys.argv. See here: http://projects.scipy.org/mpi4py/ticket/3#comment:2 Cheers, Albert From elcorto at gmx.net Sat Nov 4 06:44:44 2006 From: elcorto at gmx.net (Steve Schmerler) Date: Sat, 04 Nov 2006 12:44:44 +0100 Subject: [SciPy-user] ode45 replacment In-Reply-To: References: Message-ID: <454C7D2C.3040902@gmx.net> A. M. Archibald wrote: > On 03/11/06, Ryan Krauss wrote: >> What is the best scipy replacement for Matlab's ode45? Is it >> scipy.integrate.odeint? What is the difference between odeint and >> ode? > > Either one will probably suit your needs. For practical purposes, the > difference is one of interface - odeint has a more procedural > interface, while ode has a more object-oriented one. Underneath, both > use well-established fortran ODE integrators (odeint uses LSODA from > ODEPACK, and ode uses VODE). odeint may also have problems on a 64-bit > system, IIRC. > I'm planning to set up a 64bit machine and use odeint. In case you remember any thread on the list or can point me in the right direction, I'd be happy to hear about it. A quick search of the list revealed nothing specific... Thanks! -- cheers, steve Random number generation is the art of producing pure gibberish as quickly as possible. From scipy at drtouma.org Sat Nov 4 13:17:30 2006 From: scipy at drtouma.org (Jimmy E Touma) Date: Sat, 04 Nov 2006 12:17:30 -0600 Subject: [SciPy-user] scipy import error on Ubuntu6.10 Message-ID: <1162664250.29177.2.camel@touma-desktop> Can someone please tell me what this error means? touma at touma-desktop:~$ python Python 2.4.4c1 (#2, Oct 11 2006, 20:00:03) [GCC 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import numpy >>> import wx >>> import scipy Traceback (most recent call last): File "", line 1, in ? File "/usr/lib/python2.4/site-packages/scipy/__init__.py", line 37, in ? _num.seterr(all='ignore') TypeError: seterr() got an unexpected keyword argument 'all' >>> from scipy import * Traceback (most recent call last): File "", line 1, in ? File "/usr/lib/python2.4/site-packages/scipy/__init__.py", line 37, in ? _num.seterr(all='ignore') TypeError: seterr() got an unexpected keyword argument 'all' >>> I just installed ubuntu6.10 x86-64 and installed scipy as directed on the scipy page (using apt-get). Numpy seems to import okay. I also have python2.5 installed but it's not the default. Thanks and best regards, JET From le_fdez at yahoo.es Sat Nov 4 15:20:01 2006 From: le_fdez at yahoo.es (Leticia) Date: Sat, 4 Nov 2006 20:20:01 -0000 Subject: [SciPy-user] RV: Read a memory position? Message-ID: <000901c7004e$9c8ec5c0$81932c51@leticiab74e3e8> Hello! I'm using the Quaternion class to get the rotation angles of a vector. The asRotation() method must return the rotation matrix from a quaternion but instead of that, it is returning: I don't know how to read this and I need to get my matrix from there.. I need a little help.. Thanks ** Leticia -------------- next part -------------- An HTML attachment was scrubbed... URL: From strawman at astraw.com Sat Nov 4 15:31:53 2006 From: strawman at astraw.com (Andrew Straw) Date: Sat, 04 Nov 2006 12:31:53 -0800 Subject: [SciPy-user] scipy import error on Ubuntu6.10 In-Reply-To: <1162664250.29177.2.camel@touma-desktop> References: <1162664250.29177.2.camel@touma-desktop> Message-ID: <454CF8B9.4030802@astraw.com> Jimmy E Touma wrote: > I just installed ubuntu6.10 x86-64 and installed scipy as directed on > the scipy page (using apt-get). I take it you mean http://www.scipy.org/Installing_SciPy/Linux ? The instructions on that page are actually for Ubuntu Dapper (6.06). I have just modified the web page to make this more clear. For Ubuntu Edgy (6.10) and beyond, a rather recent numpy/scipy/matplotlib triumvirate is already in the standard Ubuntu universe repository. De-install my packages and use the standard repository. If, with the official universe package, you still get bugs such as this (which indicates a rather grave packaging error/misconfiguration) the place to file a report is at launchpad.net. Of course, we'd be interested here at the scipy-user mailing list in any deeper or more subtle bugs and may be able to provide further support in any event. Cheers! Andrew From ryanlists at gmail.com Sat Nov 4 16:47:22 2006 From: ryanlists at gmail.com (Ryan Krauss) Date: Sat, 4 Nov 2006 15:47:22 -0600 Subject: [SciPy-user] scipy import error on Ubuntu6.10 In-Reply-To: <454CF8B9.4030802@astraw.com> References: <1162664250.29177.2.camel@touma-desktop> <454CF8B9.4030802@astraw.com> Message-ID: I have installed Scipy/Numpy?Matplotlib from the universe repository on Edgy and they seem to work fine (I have been working more in windows lately, much to my dismay, so I haven't used them extensively, but they seem to work). I started a thread a few weeks ago with the subject "ubuntu Edgy Eft and Scipy". I followed the steps outlined in there and it worked flawlessly. On 11/4/06, Andrew Straw wrote: > Jimmy E Touma wrote: > > I just installed ubuntu6.10 x86-64 and installed scipy as directed on > > the scipy page (using apt-get). > I take it you mean http://www.scipy.org/Installing_SciPy/Linux ? > > The instructions on that page are actually for Ubuntu Dapper (6.06). I > have just modified the web page to make this more clear. For Ubuntu Edgy > (6.10) and beyond, a rather recent numpy/scipy/matplotlib triumvirate is > already in the standard Ubuntu universe repository. De-install my > packages and use the standard repository. > > If, with the official universe package, you still get bugs such as this > (which indicates a rather grave packaging error/misconfiguration) the > place to file a report is at launchpad.net. Of course, we'd be > interested here at the scipy-user mailing list in any deeper or more > subtle bugs and may be able to provide further support in any event. > > Cheers! > Andrew > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > From gaedol at gmail.com Sat Nov 4 17:25:27 2006 From: gaedol at gmail.com (Marco) Date: Sat, 4 Nov 2006 23:25:27 +0100 Subject: [SciPy-user] Scipy on MacOS X, troubles In-Reply-To: <454B970A.2050600@eecs.berkeley.edu> References: <1d2f6e8c0611030746u6b44805bt6af398132ea35087@mail.gmail.com> <331116dc0611030950p146267cfje307fc36fc6fe1cb@mail.gmail.com> <454B970A.2050600@eecs.berkeley.edu> Message-ID: On 11/3/06, Aaron Hoover wrote: > cctools fixed the problem. Hi, sorry for the delay. I have googled some, but can't find what cctools are. Any pointer? Thanks, marco From scipy at drtouma.org Sat Nov 4 17:30:39 2006 From: scipy at drtouma.org (Jimmy E Touma) Date: Sat, 04 Nov 2006 16:30:39 -0600 Subject: [SciPy-user] scipy import error on Ubuntu6.10 In-Reply-To: <454CF8B9.4030802@astraw.com> References: <1162664250.29177.2.camel@touma-desktop> <454CF8B9.4030802@astraw.com> Message-ID: <1162679439.29887.0.camel@touma-desktop> Thanks Andrew, it works now. On Sat, 2006-11-04 at 12:31 -0800, Andrew Straw wrote: > Jimmy E Touma wrote: > > I just installed ubuntu6.10 x86-64 and installed scipy as directed on > > the scipy page (using apt-get). > I take it you mean http://www.scipy.org/Installing_SciPy/Linux ? > > The instructions on that page are actually for Ubuntu Dapper (6.06). I > have just modified the web page to make this more clear. For Ubuntu Edgy > (6.10) and beyond, a rather recent numpy/scipy/matplotlib triumvirate is > already in the standard Ubuntu universe repository. De-install my > packages and use the standard repository. > > If, with the official universe package, you still get bugs such as this > (which indicates a rather grave packaging error/misconfiguration) the > place to file a report is at launchpad.net. Of course, we'd be > interested here at the scipy-user mailing list in any deeper or more > subtle bugs and may be able to provide further support in any event. > > Cheers! > Andrew > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user From mwojc at p.lodz.pl Sun Nov 5 04:13:53 2006 From: mwojc at p.lodz.pl (Marek Wojciechowski) Date: Sun, 05 Nov 2006 09:13:53 -0000 Subject: [SciPy-user] fmin_bfgs optimizer hangs? In-Reply-To: <4549F8D5.1040908@iam.uni-stuttgart.de> References: <1265.212.160.252.213.1162473869.squirrel@poczta.p.lodz.pl> <4549F8D5.1040908@iam.uni-stuttgart.de> Message-ID: > Try to start with fmin_powell and switch to fmin_bfgs. > Please let me know if that works for your problem. > > I have observed several scenarios e.g. convergence towards local > extrema, oscillating behaviour (fmin_ncg) , ... > > Sometimes I get a message > Warning: Desired error not necessarily achieved due to precision loss > It seems that the problem of fmin_bfgs is just there is no parameter for maximum calls of function. Together with possible oscilating behavior there are the cases the routine never ends... Maybe this should be considered as a bug?. Using fmin_powell before does not make things better. Till now I found fmin_l_bfgs_b and fmin_tnc, constrained optimizers, useful for me. I can safely set max number of function calls and, if I'm not satisfied with the result, restart from another starting point. Greetings -- Marek Wojciechowski From mwojc at p.lodz.pl Sun Nov 5 04:23:17 2006 From: mwojc at p.lodz.pl (Marek Wojciechowski) Date: Sun, 05 Nov 2006 09:23:17 -0000 Subject: [SciPy-user] RV: Read a memory position? In-Reply-To: <000901c7004e$9c8ec5c0$81932c51@leticiab74e3e8> References: <000901c7004e$9c8ec5c0$81932c51@leticiab74e3e8> Message-ID: On Sat, 04 Nov 2006 20:20:01 -0000, Leticia wrote: > > Hello! > > > I'm using the Quaternion class to get the rotation angles of a vector. > > > > The asRotation() method must return the rotation matrix from a quaternion > but instead of that, > > > it is returning: > > > > > > I don't know how to read this and I need to get my matrix from there.. > Hi, Say, R is your returned Rotation object then A = R.tensor.array is your transformation matrix. Greetings -- Marek Wojciechowski From peridot.faceted at gmail.com Sun Nov 5 04:48:42 2006 From: peridot.faceted at gmail.com (A. M. Archibald) Date: Sun, 5 Nov 2006 04:48:42 -0500 Subject: [SciPy-user] ode45 replacment In-Reply-To: <454C7D2C.3040902@gmx.net> References: <454C7D2C.3040902@gmx.net> Message-ID: On 04/11/06, Steve Schmerler wrote: > A. M. Archibald wrote: > > On 03/11/06, Ryan Krauss wrote: > >> What is the best scipy replacement for Matlab's ode45? Is it > >> scipy.integrate.odeint? What is the difference between odeint and > >> ode? > > > > Either one will probably suit your needs. For practical purposes, the > > difference is one of interface - odeint has a more procedural > > interface, while ode has a more object-oriented one. Underneath, both > > use well-established fortran ODE integrators (odeint uses LSODA from > > ODEPACK, and ode uses VODE). odeint may also have problems on a 64-bit > > system, IIRC. > > > > I'm planning to set up a 64bit machine and use odeint. > In case you remember any thread on the list or can point me in the right > direction, I'd be happy to hear about it. A quick search of the list > revealed nothing specific... I had some difficulties with a FORTRAN wrapper that assumed machine integers were 32 bits, but the current version of odeint appears to be fine. If that problem does occur, it is easily fixed with a bit of grepping through the python interface file. A. M. Archibald From le_fdez at yahoo.es Sun Nov 5 08:12:37 2006 From: le_fdez at yahoo.es (Leticia) Date: Sun, 5 Nov 2006 13:12:37 -0000 Subject: [SciPy-user] RV: Read a memory position? In-Reply-To: Message-ID: <000401c700dc$1484a170$2301a8c0@leticiab74e3e8> Thanks, now it works perfectly! ** Leticia -----Mensaje original----- De: scipy-user-bounces at scipy.org [mailto:scipy-user-bounces at scipy.org] En nombre de Marek Wojciechowski Enviado el: domingo, 05 de noviembre de 2006 9:23 Para: SciPy Users List Asunto: Re: [SciPy-user] RV: Read a memory position? On Sat, 04 Nov 2006 20:20:01 -0000, Leticia wrote: > > Hello! > > > I'm using the Quaternion class to get the rotation angles of a vector. > > > > The asRotation() method must return the rotation matrix from a quaternion > but instead of that, > > > it is returning: > > > > > > I don't know how to read this and I need to get my matrix from there.. > Hi, Say, R is your returned Rotation object then A = R.tensor.array is your transformation matrix. Greetings -- Marek Wojciechowski _______________________________________________ SciPy-user mailing list SciPy-user at scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user ______________________________________________ LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y m?viles desde 1 c?ntimo por minuto. http://es.voice.yahoo.com From le_fdez at yahoo.es Sun Nov 5 13:49:00 2006 From: le_fdez at yahoo.es (Leticia) Date: Sun, 5 Nov 2006 18:49:00 -0000 Subject: [SciPy-user] AttributeError using threeAngles method Message-ID: <000a01c7010b$101bbdb0$2301a8c0@leticiab74e3e8> Hi! I want to obtain the rotation angles between a vector ( for example (1,1,1) ) and 3 axis . The axis are (1,0,0), (0,1,0) and (0,0,1). I think that I didn't forget anything (not really sure :s) This is my "minicode": v = Vector(1,1,1) r = Rotation(v) e1 = Vector (1,0,0) e2 = Vector (0,1,0) e3 = Vector (0,0,1) an = r.threeAngles(e1,e2,e3) When I run it, I had this error: Traceback (most recent call last): File "", line 74, in run_nodebug File "C:\Documents and Settings\Leticia\Escritorio\ModulePrueba.py", line 18, in ? an = r.threeAngles(e1,e2,e3) File "C:\PYTHON24\lib\site-packages\Scientific\Geometry\Transformation.py", line 220, in threeAngles _c = e1*w - (e1*e2)*(e2*e3) File "C:\PYTHON24\lib\site-packages\Scientific\Geometry\VectorModule.py", line 78, in __sub__ return Vector(self.array-other.array) AttributeError: 'float' object has no attribute 'array' I need a little help with this error. Thanks!! *** Leticia -------------- next part -------------- An HTML attachment was scrubbed... URL: From gaedol at gmail.com Sun Nov 5 20:29:44 2006 From: gaedol at gmail.com (Marco) Date: Mon, 6 Nov 2006 02:29:44 +0100 Subject: [SciPy-user] Scipy on MacOS X, troubles In-Reply-To: <331116dc0611030950p146267cfje307fc36fc6fe1cb@mail.gmail.com> References: <1d2f6e8c0611030746u6b44805bt6af398132ea35087@mail.gmail.com> <331116dc0611030950p146267cfje307fc36fc6fe1cb@mail.gmail.com> Message-ID: On 11/3/06, Erin Sheldon wrote: > I also had success with MacPorts (formerly darwinports). > It seems to be a very stable solution. For me it required > compiling gcc 4.1, however, so it may require patience. Hi, i have tried to follow the way of macports. After a few hours of compiling (gcc takes some), i installed py-numpy and then py-scipy. This is the result of the latter (sudo port install py-scipy): ---> Building py-scipy with target build Error: Target com.apple.build returned: shell command "cd "/opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_python_py-scipy/work/scipy-0.5.1" && CCFLAGS="-I/opt/local/include -L/opt/local/lib" /opt/local/bin/python2.4 setup.py build" returned error 1 Command output: Lib/cluster/src/vq_wrap.cpp:315: warning: 'int SWIG_ConvertPtr(PyObject*, void**, swig_type_info*, int)' defined but not used Lib/cluster/src/vq_wrap.cpp:516: warning: 'PyObject* l_output_helper(PyObject*, PyObject*)' defined but not used /usr/bin/g++-4.0 -bundle -undefined dynamic_lookup build/temp.darwin-8.8.0-Power_Macintosh-2.4/Lib/cluster/src/vq_wrap.o -Lbuild/temp.darwin-8.8.0-Power_Macintosh-2.4 -o build/lib.darwin-8.8.0-Power_Macintosh-2.4/scipy/cluster/_vq.so /usr/bin/ld: warning -prebind has no effect with -bundle building 'scipy.fftpack._fftpack' extension compiling C sources C compiler: /usr/bin/gcc-4.0 -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -fno-common -dynamic -DNDEBUG -g -O3 -Wall creating build/temp.darwin-8.8.0-Power_Macintosh-2.4/build creating build/temp.darwin-8.8.0-Power_Macintosh-2.4/build/src.darwin-8.8.0-Power_Macintosh-2.4 creating build/temp.darwin-8.8.0-Power_Macintosh-2.4/build/src.darwin-8.8.0-Power_Macintosh-2.4/Lib creating build/temp.darwin-8.8.0-Power_Macintosh-2.4/build/src.darwin-8.8.0-Power_Macintosh-2.4/Lib/fftpack creating build/temp.darwin-8.8.0-Power_Macintosh-2.4/Lib/fftpack/src compile options: '-DSCIPY_FFTW3_H -I/opt/local/include -Ibuild/src.darwin-8.8.0-Power_Macintosh-2.4 -I/opt/local/lib/python2.4/site-packages/numpy/core/include -I/opt/local/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4 -I/opt/local/include/python2.4 -c' gcc-4.0: build/src.darwin-8.8.0-Power_Macintosh-2.4/fortranobject.c gcc-4.0: Lib/fftpack/src/zfft.c Lib/fftpack/src/zfft.c: In function 'zfft': Lib/fftpack/src/zfft.c:89: warning: unused variable 'ptrm' gcc-4.0: Lib/fftpack/src/drfft.c gcc-4.0: build/src.darwin-8.8.0-Power_Macintosh-2.4/Lib/fftpack/_fftpackmodule.c gcc-4.0: Lib/fftpack/src/zfftnd.c gcc-4.0: Lib/fftpack/src/zrfft.c /usr/bin/g77 -g -Wall -undefined dynamic_lookup -bundle build/temp.darwin-8.8.0-Power_Macintosh-2.4/build/src.darwin-8.8.0-Power_Macintosh-2.4/Lib/fftpack/_fftpackmodule.o build/temp.darwin-8.8.0-Power_Macintosh-2.4/Lib/fftpack/src/zfft.o build/temp.darwin-8.8.0-Power_Macintosh-2.4/Lib/fftpack/src/drfft.o build/temp.darwin-8.8.0-Power_Macintosh-2.4/Lib/fftpack/src/zrfft.o build/temp.darwin-8.8.0-Power_Macintosh-2.4/Lib/fftpack/src/zfftnd.o build/temp.darwin-8.8.0-Power_Macintosh-2.4/build/src.darwin-8.8.0-Power_Macintosh-2.4/fortranobject.o -L/opt/local/lib -L/usr/local/lib/gcc/powerpc-apple-darwin7.9.0/3.4.4 -Lbuild/temp.darwin-8.8.0-Power_Macintosh-2.4 -ldfftpack -lfftw3 -lg2c -lcc_dynamic -o build/lib.darwin-8.8.0-Power_Macintosh-2.4/scipy/fftpack/_fftpack.so /usr/bin/ld: warning -prebind has no effect with -bundle /usr/bin/ld: can't locate file for: -lcc_dynamic collect2: ld returned 1 exit status /usr/bin/ld: warning -prebind has no effect with -bundle /usr/bin/ld: can't locate file for: -lcc_dynamic collect2: ld returned 1 exit status error: Command "/usr/bin/g77 -g -Wall -undefined dynamic_lookup -bundle build/temp.darwin-8.8.0-Power_Macintosh-2.4/build/src.darwin-8.8.0-Power_Macintosh-2.4/Lib/fftpack/_fftpackmodule.o build/temp.darwin-8.8.0-Power_Macintosh-2.4/Lib/fftpack/src/zfft.o build/temp.darwin-8.8.0-Power_Macintosh-2.4/Lib/fftpack/src/drfft.o build/temp.darwin-8.8.0-Power_Macintosh-2.4/Lib/fftpack/src/zrfft.o build/temp.darwin-8.8.0-Power_Macintosh-2.4/Lib/fftpack/src/zfftnd.o build/temp.darwin-8.8.0-Power_Macintosh-2.4/build/src.darwin-8.8.0-Power_Macintosh-2.4/fortranobject.o -L/opt/local/lib -L/usr/local/lib/gcc/powerpc-apple-darwin7.9.0/3.4.4 -Lbuild/temp.darwin-8.8.0-Power_Macintosh-2.4 -ldfftpack -lfftw3 -lg2c -lcc_dynamic -o build/lib.darwin-8.8.0-Power_Macintosh-2.4/scipy/fftpack/_fftpack.so" failed with exit status 1 Error: Status 1 encountered during processing. Dunno if that's a problem of macports (formerly darwinports), or scipy, but that's it. I think the problem is somwhere in fftw, but not really sure... Any ideas? Thanks, marco From erin.sheldon at gmail.com Sun Nov 5 21:13:59 2006 From: erin.sheldon at gmail.com (Erin Sheldon) Date: Sun, 5 Nov 2006 21:13:59 -0500 Subject: [SciPy-user] Scipy on MacOS X, troubles In-Reply-To: References: <1d2f6e8c0611030746u6b44805bt6af398132ea35087@mail.gmail.com> <331116dc0611030950p146267cfje307fc36fc6fe1cb@mail.gmail.com> Message-ID: <331116dc0611051813k746efab0lbdaa502524a348c@mail.gmail.com> I'm not sure, but I find it odd that it is using /usr/bin/gcc after compiling gcc4. But because it worked for me I never bothered to look at the compilation. I'm not sure how this differs from my install. Erin On 11/5/06, Marco wrote: > On 11/3/06, Erin Sheldon wrote: > > > I also had success with MacPorts (formerly darwinports). > > It seems to be a very stable solution. For me it required > > compiling gcc 4.1, however, so it may require patience. > > Hi, > i have tried to follow the way of macports. > > After a few hours of compiling (gcc takes some), i installed py-numpy > and then py-scipy. > This is the result of the latter (sudo port install py-scipy): > > ---> Building py-scipy with target build > Error: Target com.apple.build returned: shell command "cd > "/opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_python_py-scipy/work/scipy-0.5.1" > && CCFLAGS="-I/opt/local/include -L/opt/local/lib" > /opt/local/bin/python2.4 setup.py build" returned error 1 > Command output: Lib/cluster/src/vq_wrap.cpp:315: warning: 'int > SWIG_ConvertPtr(PyObject*, void**, swig_type_info*, int)' defined but > not used > Lib/cluster/src/vq_wrap.cpp:516: warning: 'PyObject* > l_output_helper(PyObject*, PyObject*)' defined but not used > /usr/bin/g++-4.0 -bundle -undefined dynamic_lookup > build/temp.darwin-8.8.0-Power_Macintosh-2.4/Lib/cluster/src/vq_wrap.o > -Lbuild/temp.darwin-8.8.0-Power_Macintosh-2.4 -o > build/lib.darwin-8.8.0-Power_Macintosh-2.4/scipy/cluster/_vq.so > /usr/bin/ld: warning -prebind has no effect with -bundle > building 'scipy.fftpack._fftpack' extension > compiling C sources > C compiler: /usr/bin/gcc-4.0 -fno-strict-aliasing -Wno-long-double > -no-cpp-precomp -mno-fused-madd -fno-common -fno-common -dynamic > -DNDEBUG -g -O3 -Wall > > creating build/temp.darwin-8.8.0-Power_Macintosh-2.4/build > creating build/temp.darwin-8.8.0-Power_Macintosh-2.4/build/src.darwin-8.8.0-Power_Macintosh-2.4 > creating build/temp.darwin-8.8.0-Power_Macintosh-2.4/build/src.darwin-8.8.0-Power_Macintosh-2.4/Lib > creating build/temp.darwin-8.8.0-Power_Macintosh-2.4/build/src.darwin-8.8.0-Power_Macintosh-2.4/Lib/fftpack > creating build/temp.darwin-8.8.0-Power_Macintosh-2.4/Lib/fftpack/src > compile options: '-DSCIPY_FFTW3_H -I/opt/local/include > -Ibuild/src.darwin-8.8.0-Power_Macintosh-2.4 > -I/opt/local/lib/python2.4/site-packages/numpy/core/include > -I/opt/local/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4 > -I/opt/local/include/python2.4 -c' > gcc-4.0: build/src.darwin-8.8.0-Power_Macintosh-2.4/fortranobject.c > gcc-4.0: Lib/fftpack/src/zfft.c > Lib/fftpack/src/zfft.c: In function 'zfft': > Lib/fftpack/src/zfft.c:89: warning: unused variable 'ptrm' > gcc-4.0: Lib/fftpack/src/drfft.c > gcc-4.0: build/src.darwin-8.8.0-Power_Macintosh-2.4/Lib/fftpack/_fftpackmodule.c > gcc-4.0: Lib/fftpack/src/zfftnd.c > gcc-4.0: Lib/fftpack/src/zrfft.c > /usr/bin/g77 -g -Wall -undefined dynamic_lookup -bundle > build/temp.darwin-8.8.0-Power_Macintosh-2.4/build/src.darwin-8.8.0-Power_Macintosh-2.4/Lib/fftpack/_fftpackmodule.o > build/temp.darwin-8.8.0-Power_Macintosh-2.4/Lib/fftpack/src/zfft.o > build/temp.darwin-8.8.0-Power_Macintosh-2.4/Lib/fftpack/src/drfft.o > build/temp.darwin-8.8.0-Power_Macintosh-2.4/Lib/fftpack/src/zrfft.o > build/temp.darwin-8.8.0-Power_Macintosh-2.4/Lib/fftpack/src/zfftnd.o > build/temp.darwin-8.8.0-Power_Macintosh-2.4/build/src.darwin-8.8.0-Power_Macintosh-2.4/fortranobject.o > -L/opt/local/lib -L/usr/local/lib/gcc/powerpc-apple-darwin7.9.0/3.4.4 > -Lbuild/temp.darwin-8.8.0-Power_Macintosh-2.4 -ldfftpack -lfftw3 -lg2c > -lcc_dynamic -o > build/lib.darwin-8.8.0-Power_Macintosh-2.4/scipy/fftpack/_fftpack.so > /usr/bin/ld: warning -prebind has no effect with -bundle > /usr/bin/ld: can't locate file for: -lcc_dynamic > collect2: ld returned 1 exit status > /usr/bin/ld: warning -prebind has no effect with -bundle > /usr/bin/ld: can't locate file for: -lcc_dynamic > collect2: ld returned 1 exit status > error: Command "/usr/bin/g77 -g -Wall -undefined dynamic_lookup > -bundle build/temp.darwin-8.8.0-Power_Macintosh-2.4/build/src.darwin-8.8.0-Power_Macintosh-2.4/Lib/fftpack/_fftpackmodule.o > build/temp.darwin-8.8.0-Power_Macintosh-2.4/Lib/fftpack/src/zfft.o > build/temp.darwin-8.8.0-Power_Macintosh-2.4/Lib/fftpack/src/drfft.o > build/temp.darwin-8.8.0-Power_Macintosh-2.4/Lib/fftpack/src/zrfft.o > build/temp.darwin-8.8.0-Power_Macintosh-2.4/Lib/fftpack/src/zfftnd.o > build/temp.darwin-8.8.0-Power_Macintosh-2.4/build/src.darwin-8.8.0-Power_Macintosh-2.4/fortranobject.o > -L/opt/local/lib -L/usr/local/lib/gcc/powerpc-apple-darwin7.9.0/3.4.4 > -Lbuild/temp.darwin-8.8.0-Power_Macintosh-2.4 -ldfftpack -lfftw3 -lg2c > -lcc_dynamic -o > build/lib.darwin-8.8.0-Power_Macintosh-2.4/scipy/fftpack/_fftpack.so" > failed with exit status 1 > > Error: Status 1 encountered during processing. > > > Dunno if that's a problem of macports (formerly darwinports), or > scipy, but that's it. > I think the problem is somwhere in fftw, but not really sure... > > Any ideas? > > Thanks, > > marco > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > From robert.kern at gmail.com Sun Nov 5 22:52:59 2006 From: robert.kern at gmail.com (Robert Kern) Date: Sun, 05 Nov 2006 21:52:59 -0600 Subject: [SciPy-user] Scipy on MacOS X, troubles In-Reply-To: <331116dc0611051813k746efab0lbdaa502524a348c@mail.gmail.com> References: <1d2f6e8c0611030746u6b44805bt6af398132ea35087@mail.gmail.com> <331116dc0611030950p146267cfje307fc36fc6fe1cb@mail.gmail.com> <331116dc0611051813k746efab0lbdaa502524a348c@mail.gmail.com> Message-ID: <454EB19B.5030207@gmail.com> Erin Sheldon wrote: > I'm not sure, but I find it odd that it is using /usr/bin/gcc after > compiling gcc4. But because it worked for me I never bothered > to look at the compilation. I'm not sure how this > differs from my install. The cc_dynamic library only comes with gcc 3.3. If you are using g77, you need to use gcc 3.3. If you are using gfortran, you need to use gcc 4. GnuFCompiler (for g77) adds -lcc_dynamic; Gnu95FCompiler (for gfortran) does not. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From erin.sheldon at gmail.com Mon Nov 6 00:21:46 2006 From: erin.sheldon at gmail.com (Erin Sheldon) Date: Mon, 6 Nov 2006 00:21:46 -0500 Subject: [SciPy-user] Scipy on MacOS X, troubles In-Reply-To: <454EB19B.5030207@gmail.com> References: <1d2f6e8c0611030746u6b44805bt6af398132ea35087@mail.gmail.com> <331116dc0611030950p146267cfje307fc36fc6fe1cb@mail.gmail.com> <331116dc0611051813k746efab0lbdaa502524a348c@mail.gmail.com> <454EB19B.5030207@gmail.com> Message-ID: <331116dc0611052121v15065e4fva8bd8c194c6fec19@mail.gmail.com> On 11/5/06, Robert Kern wrote: > Erin Sheldon wrote: > > I'm not sure, but I find it odd that it is using /usr/bin/gcc after > > compiling gcc4. But because it worked for me I never bothered > > to look at the compilation. I'm not sure how this > > differs from my install. > > The cc_dynamic library only comes with gcc 3.3. If you are using g77, you need > to use gcc 3.3. If you are using gfortran, you need to use gcc 4. GnuFCompiler > (for g77) adds -lcc_dynamic; Gnu95FCompiler (for gfortran) does not. Exactly. MacPorts compiled gcc4.1 and gfortran. But now it's trying to use gcc4.0, gcc3.3, and g77 in /usr/bin rather than gcc4.1 and gfortran in /opt/local/bin. Some kind of path issue? Erin From lorrmann at physik.uni-wuerzburg.de Mon Nov 6 03:28:13 2006 From: lorrmann at physik.uni-wuerzburg.de (Volker Lorrmann) Date: Mon, 06 Nov 2006 09:28:13 +0100 Subject: [SciPy-user] Saving Data as Modul!! Message-ID: <454EF21D.1050104@physik.uni-wuerzburg.de> Hi guys, just a short question. How can i save data that?s generated by a script as an python modul, so i can "import" my data later again. Something like export (opposite of import ;) ) would be great. I?m running the script on ipython.I know of pickle. But i just wanna save all data in one modul. Thanks so far Volker Lorrmann -- ----------------------- Volker Lorrmann Universit?t W?rzburg Experimentelle Physik 6 Am Hubland 97074 Wuerzburg Germany Tel: +49 931 888 5770 volker.lorrmann at physik.uni-wuerzburg.de From nwagner at iam.uni-stuttgart.de Mon Nov 6 03:31:10 2006 From: nwagner at iam.uni-stuttgart.de (Nils Wagner) Date: Mon, 06 Nov 2006 09:31:10 +0100 Subject: [SciPy-user] fmin_bfgs optimizer hangs? In-Reply-To: References: <1265.212.160.252.213.1162473869.squirrel@poczta.p.lodz.pl> <4549F8D5.1040908@iam.uni-stuttgart.de> Message-ID: <454EF2CE.1020300@iam.uni-stuttgart.de> Marek Wojciechowski wrote: >> Try to start with fmin_powell and switch to fmin_bfgs. >> Please let me know if that works for your problem. >> >> I have observed several scenarios e.g. convergence towards local >> extrema, oscillating behaviour (fmin_ncg) , ... >> >> Sometimes I get a message >> Warning: Desired error not necessarily achieved due to precision loss >> >> > > It seems that the problem of fmin_bfgs is just there is no parameter > for maximum calls of function. Together with possible oscilating behavior > there are the cases the routine never ends... Maybe this should be > considered as a bug?. Using fmin_powell before does not make things > better. > Till now I found fmin_l_bfgs_b and fmin_tnc, constrained optimizers, > useful for me. I can safely set max number of function calls and, if I'm > not satisfied with the result, restart from another starting point. > > Greetings > > Help on function fmin_bfgs fmin_bfgs(f, x0, fprime=None, args=(), gtol=1.0000000000000001e-05, norm=inf, epsilon=1.49011611938e-08, maxiter=None, full_output= 0, disp=1, retall=0, callback=None) Additional Inputs: maxiter -- the maximum number of iterations. full_output -- if non-zero then return fopt, func_calls, grad_calls, and warnflag in addition to xopt. disp -- print convergence message if non-zero. retall -- return a list of results at each iteration if non-zero You can specify the maximum number of iterations. Nils From mwojc at p.lodz.pl Mon Nov 6 04:46:30 2006 From: mwojc at p.lodz.pl (Marek Wojciechowski) Date: Mon, 06 Nov 2006 09:46:30 -0000 Subject: [SciPy-user] fmin_bfgs optimizer hangs? In-Reply-To: <454EF2CE.1020300@iam.uni-stuttgart.de> References: <1265.212.160.252.213.1162473869.squirrel@poczta.p.lodz.pl> <4549F8D5.1040908@iam.uni-stuttgart.de> <454EF2CE.1020300@iam.uni-stuttgart.de> Message-ID: > fmin_bfgs(f, x0, fprime=None, args=(), gtol=1.0000000000000001e-05, > norm=inf, epsilon=1.49011611938e-08, maxiter=None, full_output= > 0, disp=1, retall=0, callback=None) > > Additional Inputs: > > maxiter -- the maximum number of iterations. > full_output -- if non-zero then return fopt, func_calls, > grad_calls, > and warnflag in addition to xopt. > disp -- print convergence message if non-zero. > retall -- return a list of results at each iteration if non-zero > > You can specify the maximum number of iterations. > Yes, but there are circumsatances when the minimizer never reaches this maximum. Thats my point. Note, that there is no parameter to set limit of function calls the minimizer makes. Greetings -- Marek Wojciechowski From gaedol at gmail.com Mon Nov 6 03:56:34 2006 From: gaedol at gmail.com (Marco) Date: Mon, 6 Nov 2006 09:56:34 +0100 Subject: [SciPy-user] Scipy on MacOS X, troubles In-Reply-To: <331116dc0611052121v15065e4fva8bd8c194c6fec19@mail.gmail.com> References: <1d2f6e8c0611030746u6b44805bt6af398132ea35087@mail.gmail.com> <331116dc0611030950p146267cfje307fc36fc6fe1cb@mail.gmail.com> <331116dc0611051813k746efab0lbdaa502524a348c@mail.gmail.com> <454EB19B.5030207@gmail.com> <331116dc0611052121v15065e4fva8bd8c194c6fec19@mail.gmail.com> Message-ID: Hey, i noticed that too this morning, after some sleep. I had previiously installed the g77 compiler from hpc.sf.net. Simply removing that solved the problem: now scipy installed smoothly. I still have to check if it all works right, tho. Thanks all! marco From gaedol at gmail.com Mon Nov 6 04:00:06 2006 From: gaedol at gmail.com (Marco) Date: Mon, 6 Nov 2006 10:00:06 +0100 Subject: [SciPy-user] Scipy on MacOS X, troubles In-Reply-To: References: <1d2f6e8c0611030746u6b44805bt6af398132ea35087@mail.gmail.com> <331116dc0611030950p146267cfje307fc36fc6fe1cb@mail.gmail.com> <331116dc0611051813k746efab0lbdaa502524a348c@mail.gmail.com> <454EB19B.5030207@gmail.com> <331116dc0611052121v15065e4fva8bd8c194c6fec19@mail.gmail.com> Message-ID: I am able now to import scipy without any problems. This, tho, has problems: Python 2.4.3 (#1, Nov 5 2006, 01:11:36) [GCC 4.0.0 20041026 (Apple Computer, Inc. build 4061)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from scipy import * Traceback (most recent call last): File "", line 1, in ? File "/opt/local/lib/python2.4/site-packages/scipy/interpolate/__init__.py", line 7, in ? from interpolate import * File "/opt/local/lib/python2.4/site-packages/scipy/interpolate/interpolate.py", line 13, in ? import fitpack File "/opt/local/lib/python2.4/site-packages/scipy/interpolate/fitpack.py", line 34, in ? import _fitpack ImportError: Failure linking new module: /opt/local/lib/python2.4/site-packages/scipy/interpolate/_fitpack.so: Symbol not found: _e_wsle Referenced from: /opt/local/lib/python2.4/site-packages/scipy/interpolate/_fitpack.so Expected in: dynamic lookup I am puzzled. marco From gael.varoquaux at normalesup.org Mon Nov 6 08:25:56 2006 From: gael.varoquaux at normalesup.org (Gael Varoquaux) Date: Mon, 6 Nov 2006 14:25:56 +0100 Subject: [SciPy-user] Saving Data as Modul!! In-Reply-To: <454EF21D.1050104@physik.uni-wuerzburg.de> References: <454EF21D.1050104@physik.uni-wuerzburg.de> Message-ID: <20061106132555.GA3865@clipper.ens.fr> Hi, Have a look at the shelve module, it provides something similar to what you are talking about. Ga?l On Mon, Nov 06, 2006 at 09:28:13AM +0100, Volker Lorrmann wrote: > Hi guys, > just a short question. How can i save data that?s generated by a script > as an python modul, so i can "import" my data later again. > Something like export (opposite of import ;) ) would be great. > I?m running the script on ipython.I know of pickle. But i just wanna > save all data in one modul. > Thanks so far > Volker Lorrmann From nwagner at iam.uni-stuttgart.de Mon Nov 6 09:09:28 2006 From: nwagner at iam.uni-stuttgart.de (Nils Wagner) Date: Mon, 06 Nov 2006 15:09:28 +0100 Subject: [SciPy-user] Usage of integrate.tplquad Message-ID: <454F4218.7050202@iam.uni-stuttgart.de> Hi all, I tried to compute a triple integral of the form \int\limits_{-1}^1 \int\limits_{-1}^1 \int\limits_{-1}^1 h(r,s,t) J(r,s,t) dr ds dt File "8node.py", line 124, in ? I,err = integrate.tplquad(lambda r,s,t :h(r,s,t)[i]*J(r,s,t),-1., 1., lambda s,t:-1.,-1., lambda s,t:1.,1., lambda t:-1., lambda t:1.) File "/usr/lib64/python2.4/site-packages/scipy/integrate/quadpack.py", line 399, in tplquad return dblquad(_infunc2,a,b,gfun,hfun,(func,qfun,rfun,args),epsabs=epsabs,epsrel=epsrel) File "/usr/lib64/python2.4/site-packages/scipy/integrate/quadpack.py", line 351, in dblquad return quad(_infunc,a,b,(func,gfun,hfun,args),epsabs=epsabs,epsrel=epsrel) File "/usr/lib64/python2.4/site-packages/scipy/integrate/quadpack.py", line 187, in quad retval = _quad(func,a,b,args,full_output,epsabs,epsrel,limit,points) File "/usr/lib64/python2.4/site-packages/scipy/integrate/quadpack.py", line 251, in _quad return _quadpack._qagse(func,a,b,args,full_output,epsabs,epsrel,limit) TypeError: a float is required How can I resolve this problem ? Nils -------------- next part -------------- A non-text attachment was scrubbed... Name: 8node.py Type: text/x-python Size: 3177 bytes Desc: not available URL: From meesters at uni-mainz.de Mon Nov 6 09:10:51 2006 From: meesters at uni-mainz.de (Christian Meesters) Date: Mon, 6 Nov 2006 15:10:51 +0100 Subject: [SciPy-user] Saving Data as Modul!! In-Reply-To: <454EF21D.1050104@physik.uni-wuerzburg.de> References: <454EF21D.1050104@physik.uni-wuerzburg.de> Message-ID: <200611061510.51300.meesters@uni-mainz.de> Hoi Volker, I agree with Gael, shelve is a nice modul, but nothing similar to what you were asking for. Frankly, I doubt such a concept is hacked into code anywere. shelve, pickle or other modules might indeed serve you, but exporting code probably isn't what you are looking for. Your question looks like one that would be better answered by describing what you are trying to do. You might want to describe your actual problem rather than a solution you thought of. (what kind of data are you dealing with? how 'much' data do you have? is it 'plain' data or some blobs? and so on) Cheers Christian On Monday 06 November 2006 09:28, Volker Lorrmann wrote: > Hi guys, > > just a short question. How can i save data that?s generated by a script > as an python modul, so i can "import" my data later again. > Something like export (opposite of import ;) ) would be great. > I?m running the script on ipython.I know of pickle. But i just wanna > save all data in one modul. > > Thanks so far > > Volker Lorrmann From strawman at astraw.com Mon Nov 6 10:29:09 2006 From: strawman at astraw.com (Andrew Straw) Date: Mon, 06 Nov 2006 07:29:09 -0800 Subject: [SciPy-user] Saving Data as Modul!! In-Reply-To: <200611061510.51300.meesters@uni-mainz.de> References: <454EF21D.1050104@physik.uni-wuerzburg.de> <200611061510.51300.meesters@uni-mainz.de> Message-ID: <454F54C5.608@astraw.com> Christian Meesters wrote: > Hoi Volker, > > I agree with Gael, shelve is a nice modul, but nothing similar to what you > were asking for. Frankly, I doubt such a concept is hacked into code anywere. > shelve, pickle or other modules might indeed serve you, but exporting code > probably isn't what you are looking for. > > Your question looks like one that would be better answered by > describing what you are trying to do. You might want to describe your actual > problem rather than a solution you thought of. (what kind of data are you > dealing with? how 'much' data do you have? is it 'plain' data or some blobs? > and so on) > > Cheers > Christian > Actually I've done what Volker asks in several different ways, although none of the solutions is general enough to post here. The most fun instance was saving electrophysiology recordings to a .py file such that I could double-click the file and have the __main__ function plot the data! In fact, now that I think about it, I've constructed most of my examples to operate in this way -- run the .py file as a script and see the data it contains in some kind of visualization. "import" it and use it in another module. The nice thing about making it a module is that it goes along for the ride with distutils without you having to even think about it. A couple of other ideas: http://www.egenix.com/files/python/pyar.py http://www.daniweb.com/code/snippet394.html From elcorto at gmx.net Mon Nov 6 10:57:58 2006 From: elcorto at gmx.net (Steve Schmerler) Date: Mon, 06 Nov 2006 16:57:58 +0100 Subject: [SciPy-user] Debian etch binaries Message-ID: <454F5B86.3090802@gmx.net> Hi Since they are available now, I gave python-numpy_1.0rc1-1_amd64.deb (rev. 3198) python-scipy_0.5.1-3_amd64.deb (rev. 2190) a try on a Debian etch machine (Python 2.4.4c0). numpy.test() runs fine but the scipy: #----------------------------------------------------------------------# [...] ..zswap:n=3 ...Result may be inaccurate, approximate err = 1.66455232845e-08 ...Result may be inaccurate, approximate err = 7.73070496507e-12 ..............................................................Residual: 1.05006987327e-07 . **************************************************************** WARNING: cblas module is empty ----------- See scipy/INSTALL.txt for troubleshooting. Notes: * If atlas library is not found by numpy/distutils/system_info.py, then scipy uses fblas instead of cblas. **************************************************************** .................. ====================================================================== ERROR: check loadmat case cellnest ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/scipy/io/tests/test_mio.py", line 80, in cc self._check_case(name, expected) File "/usr/lib/python2.4/site-packages/scipy/io/tests/test_mio.py", line 75, in _check_case self._check_level(k_label, expected, matdict[k]) File "/usr/lib/python2.4/site-packages/scipy/io/tests/test_mio.py", line 33, in _check_level self._check_level(level_label, ev, actual[i]) File "/usr/lib/python2.4/site-packages/scipy/io/tests/test_mio.py", line 33, in _check_level self._check_level(level_label, ev, actual[i]) File "/usr/lib/python2.4/site-packages/scipy/io/tests/test_mio.py", line 33, in _check_level self._check_level(level_label, ev, actual[i]) File "/usr/lib/python2.4/site-packages/scipy/io/tests/test_mio.py", line 30, in _check_level assert len(expected) == len(actual), "Different list lengths at %s" % label TypeError: len() of unsized object ====================================================================== FAIL: check_rvs (scipy.stats.tests.test_distributions.test_randint) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/scipy/stats/tests/test_distributions.py", line 84, in check_rvs assert isinstance(val, numpy.ScalarType),`type(val)` AssertionError: ---------------------------------------------------------------------- Ran 1569 tests in 3.719s FAILED (failures=1, errors=1) Out[6]: #----------------------------------------------------------------------# I guess this is fixed in svn? Generally, do I have to expect performance issues compared to self-compiled builds (I think I don't as long as I don't build my own ATLAS, FFTW, ...)? -- cheers, steve Random number generation is the art of producing pure gibberish as quickly as possible. From meesters at uni-mainz.de Mon Nov 6 11:01:28 2006 From: meesters at uni-mainz.de (Christian Meesters) Date: Mon, 6 Nov 2006 17:01:28 +0100 Subject: [SciPy-user] Saving Data as Modul!! In-Reply-To: <454F54C5.608@astraw.com> References: <454EF21D.1050104@physik.uni-wuerzburg.de> <200611061510.51300.meesters@uni-mainz.de> <454F54C5.608@astraw.com> Message-ID: <200611061701.28820.meesters@uni-mainz.de> Alright, I shouldn't have written that nobody has done it. (Although I(!) think is runs under 'obfuscation enhanced'.) I certainly did not want to start a discussion on the separation of data and code. In fact my answer was a bit presumptuous, since I didn't comment on the actual question - please ignore my last post. Cheers, Christian > Actually I've done what Volker asks in several different ways, although > none of the solutions is general enough to post here. The most fun > instance was saving electrophysiology recordings to a .py file such that > I could double-click the file and have the __main__ function plot the > data! In fact, now that I think about it, I've constructed most of my > examples to operate in this way -- run the .py file as a script and see > the data it contains in some kind of visualization. "import" it and use > it in another module. The nice thing about making it a module is that it > goes along for the ride with distutils without you having to even think > about it. > > A couple of other ideas: > http://www.egenix.com/files/python/pyar.py > http://www.daniweb.com/code/snippet394.html From erin.sheldon at gmail.com Mon Nov 6 12:03:38 2006 From: erin.sheldon at gmail.com (Erin Sheldon) Date: Mon, 6 Nov 2006 12:03:38 -0500 Subject: [SciPy-user] Scipy on MacOS X, troubles In-Reply-To: References: <1d2f6e8c0611030746u6b44805bt6af398132ea35087@mail.gmail.com> <331116dc0611030950p146267cfje307fc36fc6fe1cb@mail.gmail.com> <331116dc0611051813k746efab0lbdaa502524a348c@mail.gmail.com> <454EB19B.5030207@gmail.com> <331116dc0611052121v15065e4fva8bd8c194c6fec19@mail.gmail.com> Message-ID: <331116dc0611060903l2bc6a5beiabbb05a73261cd21@mail.gmail.com> On 11/6/06, Marco wrote: > I am able now to import scipy without any problems. > This, tho, has problems: > > Python 2.4.3 (#1, Nov 5 2006, 01:11:36) > [GCC 4.0.0 20041026 (Apple Computer, Inc. build 4061)] on darwin Odd. I'm guessing here, but the problem may now be that, due to path issues, some of your modules were compiled with the MacPorts gcc,etc and some were not. From your previous posts, some may have actually used 3.3 which could be a problem. If both are version 4.* it would not usually be a big problem, but in my experience the apple gcc4 behaves differently. Others may have more info on this. If this were the case, it is a pain to fix because you have to trace back all the dependencies compiled in order to install the packages you wanted. Before cleaning everything out, maybe others have better ideas. But if you do brave that route, either start the whole MacPorts tree over from scratch or remove each package: sudo port uninstall package sudo port clean --all package Then follow the instructions again on my MacPorts webpage. In general you might want to add shortcut links to gcc,g++,and gfortran to gaurantee you use those versions. sudo ln -s /opt/local/bin/gcc-dp-4.1 /opt/local/bin/gcc sudo ln -s /opt/local/bin/g++-dp-4.1 /opt/local/bin/g++ sudo ln -s /opt/local/bin/gfortran-dp-4.1 /opt/local/bin/gfortran Erin > Type "help", "copyright", "credits" or "license" for more information. > >>> from scipy import * > Traceback (most recent call last): > File "", line 1, in ? > File "/opt/local/lib/python2.4/site-packages/scipy/interpolate/__init__.py", > line 7, in ? > from interpolate import * > File "/opt/local/lib/python2.4/site-packages/scipy/interpolate/interpolate.py", > line 13, in ? > import fitpack > File "/opt/local/lib/python2.4/site-packages/scipy/interpolate/fitpack.py", > line 34, in ? > import _fitpack > ImportError: Failure linking new module: > /opt/local/lib/python2.4/site-packages/scipy/interpolate/_fitpack.so: > Symbol not found: _e_wsle > Referenced from: > /opt/local/lib/python2.4/site-packages/scipy/interpolate/_fitpack.so > Expected in: dynamic lookup > > I am puzzled. > > marco > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > From fccoelho at gmail.com Mon Nov 6 12:30:03 2006 From: fccoelho at gmail.com (Flavio Coelho) Date: Mon, 6 Nov 2006 15:30:03 -0200 Subject: [SciPy-user] Parallel OO programming in Python. In-Reply-To: <6ce0ac130610301400l491fae58n96e1df7518977845@mail.gmail.com> References: <6ce0ac130610291116rf184702i6d1f5ccc476ae886@mail.gmail.com> <4546062E.1020501@cs.kuleuven.ac.be> <6ce0ac130610300801s5707a6a3h3480ce08899ecd46@mail.gmail.com> <6ce0ac130610301118ncd8d3al32a4c68f6db3801@mail.gmail.com> <6ce0ac130610301400l491fae58n96e1df7518977845@mail.gmail.com> Message-ID: Hi Brian, Sorry for taking so long to answer, I was very busy. I have tried again after updating ZopeInterface to the version you suggest, and Twisted and Nevow to SVN trunk. The error message I am getting is pretty much the same. I also tried running the tests. Here is the output of "trial ipython1": # trial ipython1 Running 29 tests. /usr/lib/python2.4/site-packages/twisted/trial/runner.py:243: exceptions.DeprecationWarning: log.startKeepingErrors is deprecated since Twisted 2.5 ipython1.test.test_controllerpb BasicControllerPBTest testDeferreds ... [ERROR] testExecute ... [ERROR] testInterfaces ... [ERROR] testPullNamespace ... [ERROR] testPushPull ... [ERROR] testPushPullSerialized ... [ERROR] testResult ... [ERROR] testScatterGather ... [ERROR] ipython1.test.test_controllerservice BasicControllerServiceTest testDeferreds ... [ERROR] testExecute ... [ERROR] testInterfaces ... [ERROR] testPullNamespace ... [ERROR] testPushPull ... [ERROR] testPushPullSerialized ... [ERROR] testResult ... [ERROR] testScatterGather ... [ERROR] [ERROR] ipython1.test.test_engineservice BasicEngineServiceTest testCompletedEmptyEngine ... [ERROR] testDeferreds ... [OK] testExecute ... [OK] testGetResult ... [OK] testInterfaces ... [ERROR] testPullNamespace ... [OK] testPushPull ... [OK] testPushPullSerialized ... [OK] testStatus ... [OK] [ERROR] ipython1.test.test_shell BasicShellTest testCommand ... [OK] testExecute ... [OK] testPutGet ... [OK] testUpdate ... [OK] =============================================================================== [ERROR]: ipython1.test.test_controllerpb.BasicControllerPBTest.testDeferreds Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/ipython1/test/test_controllerpb.py", line 36, in setUp self.s = reactor.listenTCP(10111, self.sf) File "/usr/lib/python2.4/site-packages/twisted/internet/posixbase.py", line 386, in listenTCP p.startListening() File "/usr/lib/python2.4/site-packages/twisted/internet/tcp.py", line 733, in startListening raise CannotListenError, (self.interface, self.port, le) twisted.internet.error.CannotListenError: Couldn't listen on any:10111: (98, 'Address already in use'). =============================================================================== [ERROR]: ipython1.test.test_controllerpb.BasicControllerPBTest.testExecute Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/ipython1/test/test_controllerpb.py", line 36, in setUp self.s = reactor.listenTCP(10111, self.sf) File "/usr/lib/python2.4/site-packages/twisted/internet/posixbase.py", line 386, in listenTCP p.startListening() File "/usr/lib/python2.4/site-packages/twisted/internet/tcp.py", line 733, in startListening raise CannotListenError, (self.interface, self.port, le) twisted.internet.error.CannotListenError: Couldn't listen on any:10111: (98, 'Address already in use'). =============================================================================== [ERROR]: ipython1.test.test_controllerpb.BasicControllerPBTest.testInterfaces Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/ipython1/test/test_controllerpb.py", line 36, in setUp self.s = reactor.listenTCP(10111, self.sf) File "/usr/lib/python2.4/site-packages/twisted/internet/posixbase.py", line 386, in listenTCP p.startListening() File "/usr/lib/python2.4/site-packages/twisted/internet/tcp.py", line 733, in startListening raise CannotListenError, (self.interface, self.port, le) twisted.internet.error.CannotListenError: Couldn't listen on any:10111: (98, 'Address already in use'). =============================================================================== [ERROR]: ipython1.test.test_controllerpb.BasicControllerPBTest.testPullNamespace Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/ipython1/test/test_controllerpb.py", line 36, in setUp self.s = reactor.listenTCP(10111, self.sf) File "/usr/lib/python2.4/site-packages/twisted/internet/posixbase.py", line 386, in listenTCP p.startListening() File "/usr/lib/python2.4/site-packages/twisted/internet/tcp.py", line 733, in startListening raise CannotListenError, (self.interface, self.port, le) twisted.internet.error.CannotListenError: Couldn't listen on any:10111: (98, 'Address already in use'). =============================================================================== [ERROR]: ipython1.test.test_controllerpb.BasicControllerPBTest.testPushPull Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/ipython1/test/test_controllerpb.py", line 36, in setUp self.s = reactor.listenTCP(10111, self.sf) File "/usr/lib/python2.4/site-packages/twisted/internet/posixbase.py", line 386, in listenTCP p.startListening() File "/usr/lib/python2.4/site-packages/twisted/internet/tcp.py", line 733, in startListening raise CannotListenError, (self.interface, self.port, le) twisted.internet.error.CannotListenError: Couldn't listen on any:10111: (98, 'Address already in use'). =============================================================================== [ERROR]: ipython1.test.test_controllerpb.BasicControllerPBTest.testPushPullSerialized Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/ipython1/test/test_controllerpb.py", line 36, in setUp self.s = reactor.listenTCP(10111, self.sf) File "/usr/lib/python2.4/site-packages/twisted/internet/posixbase.py", line 386, in listenTCP p.startListening() File "/usr/lib/python2.4/site-packages/twisted/internet/tcp.py", line 733, in startListening raise CannotListenError, (self.interface, self.port, le) twisted.internet.error.CannotListenError: Couldn't listen on any:10111: (98, 'Address already in use'). =============================================================================== [ERROR]: ipython1.test.test_controllerpb.BasicControllerPBTest.testResult Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/ipython1/test/test_controllerpb.py", line 36, in setUp self.s = reactor.listenTCP(10111, self.sf) File "/usr/lib/python2.4/site-packages/twisted/internet/posixbase.py", line 386, in listenTCP p.startListening() File "/usr/lib/python2.4/site-packages/twisted/internet/tcp.py", line 733, in startListening raise CannotListenError, (self.interface, self.port, le) twisted.internet.error.CannotListenError: Couldn't listen on any:10111: (98, 'Address already in use'). =============================================================================== [ERROR]: ipython1.test.test_controllerpb.BasicControllerPBTest.testScatterGather Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/ipython1/test/test_controllerpb.py", line 36, in setUp self.s = reactor.listenTCP(10111, self.sf) File "/usr/lib/python2.4/site-packages/twisted/internet/posixbase.py", line 386, in listenTCP p.startListening() File "/usr/lib/python2.4/site-packages/twisted/internet/tcp.py", line 733, in startListening raise CannotListenError, (self.interface, self.port, le) twisted.internet.error.CannotListenError: Couldn't listen on any:10111: (98, 'Address already in use'). =============================================================================== [ERROR]: ipython1.test.test_controllerservice.BasicControllerServiceTest.testDeferreds Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/ipython1/test/test_controllerservice.py", line 31, in setUp self.addEngine(1) File "/usr/lib/python2.4/site-packages/ipython1/test/multienginetest.py", line 20, in addEngine e = es.completeEngine(es.EngineService(InteractiveShell)) File "/usr/lib/python2.4/site-packages/ipython1/kernel/engineservice.py", line 157, in completeEngine zi.alsoProvides(engine, IEngineComplete) exceptions.AttributeError: 'module' object has no attribute 'alsoProvides' =============================================================================== [ERROR]: ipython1.test.test_controllerservice.BasicControllerServiceTest.testExecute Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/ipython1/test/test_controllerservice.py", line 31, in setUp self.addEngine(1) File "/usr/lib/python2.4/site-packages/ipython1/test/multienginetest.py", line 20, in addEngine e = es.completeEngine(es.EngineService(InteractiveShell)) File "/usr/lib/python2.4/site-packages/ipython1/kernel/engineservice.py", line 157, in completeEngine zi.alsoProvides(engine, IEngineComplete) exceptions.AttributeError: 'module' object has no attribute 'alsoProvides' =============================================================================== [ERROR]: ipython1.test.test_controllerservice.BasicControllerServiceTest.testInterfaces Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/ipython1/test/test_controllerservice.py", line 31, in setUp self.addEngine(1) File "/usr/lib/python2.4/site-packages/ipython1/test/multienginetest.py", line 20, in addEngine e = es.completeEngine(es.EngineService(InteractiveShell)) File "/usr/lib/python2.4/site-packages/ipython1/kernel/engineservice.py", line 157, in completeEngine zi.alsoProvides(engine, IEngineComplete) exceptions.AttributeError: 'module' object has no attribute 'alsoProvides' =============================================================================== [ERROR]: ipython1.test.test_controllerservice.BasicControllerServiceTest.testPullNamespace Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/ipython1/test/test_controllerservice.py", line 31, in setUp self.addEngine(1) File "/usr/lib/python2.4/site-packages/ipython1/test/multienginetest.py", line 20, in addEngine e = es.completeEngine(es.EngineService(InteractiveShell)) File "/usr/lib/python2.4/site-packages/ipython1/kernel/engineservice.py", line 157, in completeEngine zi.alsoProvides(engine, IEngineComplete) exceptions.AttributeError: 'module' object has no attribute 'alsoProvides' =============================================================================== [ERROR]: ipython1.test.test_controllerservice.BasicControllerServiceTest.testPushPull Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/ipython1/test/test_controllerservice.py", line 31, in setUp self.addEngine(1) File "/usr/lib/python2.4/site-packages/ipython1/test/multienginetest.py", line 20, in addEngine e = es.completeEngine(es.EngineService(InteractiveShell)) File "/usr/lib/python2.4/site-packages/ipython1/kernel/engineservice.py", line 157, in completeEngine zi.alsoProvides(engine, IEngineComplete) exceptions.AttributeError: 'module' object has no attribute 'alsoProvides' =============================================================================== [ERROR]: ipython1.test.test_controllerservice.BasicControllerServiceTest.testPushPullSerialized Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/ipython1/test/test_controllerservice.py", line 31, in setUp self.addEngine(1) File "/usr/lib/python2.4/site-packages/ipython1/test/multienginetest.py", line 20, in addEngine e = es.completeEngine(es.EngineService(InteractiveShell)) File "/usr/lib/python2.4/site-packages/ipython1/kernel/engineservice.py", line 157, in completeEngine zi.alsoProvides(engine, IEngineComplete) exceptions.AttributeError: 'module' object has no attribute 'alsoProvides' =============================================================================== [ERROR]: ipython1.test.test_controllerservice.BasicControllerServiceTest.testResult Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/ipython1/test/test_controllerservice.py", line 31, in setUp self.addEngine(1) File "/usr/lib/python2.4/site-packages/ipython1/test/multienginetest.py", line 20, in addEngine e = es.completeEngine(es.EngineService(InteractiveShell)) File "/usr/lib/python2.4/site-packages/ipython1/kernel/engineservice.py", line 157, in completeEngine zi.alsoProvides(engine, IEngineComplete) exceptions.AttributeError: 'module' object has no attribute 'alsoProvides' =============================================================================== [ERROR]: ipython1.test.test_controllerservice.BasicControllerServiceTest.testScatterGather Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/ipython1/test/test_controllerservice.py", line 31, in setUp self.addEngine(1) File "/usr/lib/python2.4/site-packages/ipython1/test/multienginetest.py", line 20, in addEngine e = es.completeEngine(es.EngineService(InteractiveShell)) File "/usr/lib/python2.4/site-packages/ipython1/kernel/engineservice.py", line 157, in completeEngine zi.alsoProvides(engine, IEngineComplete) exceptions.AttributeError: 'module' object has no attribute 'alsoProvides' =============================================================================== [ERROR]: ipython1.test.test_enginepb Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/twisted/trial/runner.py", line 486, in loadPackage module = modinfo.load() File "/usr/lib/python2.4/site-packages/twisted/python/modules.py", line 337, in load return self.pathEntry.pythonPath.moduleLoader(self.name) File "/usr/lib/python2.4/site-packages/twisted/python/modules.py", line 498, in moduleLoader return self._moduleLoader(modname) File "/usr/lib/python2.4/site-packages/twisted/python/reflect.py", line 357, in namedAny topLevelPackage = __import__(trialname) File "/usr/lib/python2.4/site-packages/ipython1/test/test_enginepb.py", line 33, in ? from ipython1.test import completeenginetest as cet File "/usr/lib/python2.4/site-packages/ipython1/test/completeenginetest.py", line 22, in ? class CompleteEngineTestCase(DeferredTestCase): File "/usr/lib/python2.4/site-packages/ipython1/test/completeenginetest.py", line 27, in CompleteEngineTestCase engine = es.completeEngine(Empty()) File "/usr/lib/python2.4/site-packages/ipython1/kernel/engineservice.py", line 157, in completeEngine zi.alsoProvides(engine, IEngineComplete) exceptions.AttributeError: 'module' object has no attribute 'alsoProvides' =============================================================================== [ERROR]: ipython1.test.test_engineservice.BasicEngineServiceTest.testCompletedEmptyEngine Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/ipython1/test/test_engineservice.py", line 73, in testCompletedEmptyEngine c = es.completeEngine(Empty()) File "/usr/lib/python2.4/site-packages/ipython1/kernel/engineservice.py", line 157, in completeEngine zi.alsoProvides(engine, IEngineComplete) exceptions.AttributeError : 'module' object has no attribute 'alsoProvides' =============================================================================== [ERROR]: ipython1.test.test_engineservice.BasicEngineServiceTest.testInterfaces Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/ipython1/test/test_engineservice.py", line 43, in testInterfaces q = es.QueuedEngine(self.engine) File "/usr/lib/python2.4/site-packages/ipython1/kernel/engineservice.py", line 342, in __init__ self.registerMethods() File "/usr/lib/python2.4/site-packages/ipython1/kernel/engineservice.py", line 345, in registerMethods zi.alsoProvides(self, *self.engine.__provides__) exceptions.AttributeError : 'module' object has no attribute 'alsoProvides' =============================================================================== [ERROR]: ipython1.test.test_enginevanilla Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/twisted/trial/runner.py", line 486, in loadPackage module = modinfo.load() File "/usr/lib/python2.4/site-packages/twisted/python/modules.py", line 337, in load return self.pathEntry.pythonPath.moduleLoader(self.name) File "/usr/lib/python2.4/site-packages/twisted/python/modules.py", line 498, in moduleLoader return self._moduleLoader(modname) File "/usr/lib/python2.4/site-packages/twisted/python/reflect.py", line 357, in namedAny topLevelPackage = __import__(trialname) File "/usr/lib/python2.4/site-packages/ipython1/test/test_enginevanilla.py", line 36, in ? from ipython1.test import completeenginetest as cet File "/usr/lib/python2.4/site-packages/ipython1/test/completeenginetest.py", line 22, in ? class CompleteEngineTestCase(DeferredTestCase): File "/usr/lib/python2.4/site-packages/ipython1/test/completeenginetest.py", line 27, in CompleteEngineTestCase engine = es.completeEngine(Empty()) File "/usr/lib/python2.4/site-packages/ipython1/kernel/engineservice.py", line 157, in completeEngine zi.alsoProvides(engine, IEngineComplete) exceptions.AttributeError: 'module' object has no attribute 'alsoProvides' ------------------------------------------------------------------------------- Ran 29 tests in 1.931s FAILED (errors=20, successes=11) On 10/30/06, Brian Granger wrote: > > It looks like you are using an older version of zope.interface. I > would grab this version and try it. > > > http://www.zope.org/Products/ZopeInterface/3.1.0c1/ZopeInterface-3.1.0c1.tgz > > also, I would use a recent (I alway use the svn trunk) version of > twisted. Let me know if that helps. > > > I am playing with it right now! I am planning to run it soon on > multiple > > machines with multiple CPUs. Will I have to install Ipython1 on every > node > > or Will the controller host spawn the processes across the net? In the > > README you seem to be starting the engines locally on each host.... > > Yes, you will need to install everything on each host and start the > engines on each machine. If you have mpi installed, you can start the > engines using mpirun and this will handle it. Let us know how it > goes. > > Brian > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fperez.net at gmail.com Mon Nov 6 12:35:15 2006 From: fperez.net at gmail.com (Fernando Perez) Date: Mon, 6 Nov 2006 10:35:15 -0700 Subject: [SciPy-user] Parallel OO programming in Python. In-Reply-To: References: <6ce0ac130610291116rf184702i6d1f5ccc476ae886@mail.gmail.com> <4546062E.1020501@cs.kuleuven.ac.be> <6ce0ac130610300801s5707a6a3h3480ce08899ecd46@mail.gmail.com> <6ce0ac130610301118ncd8d3al32a4c68f6db3801@mail.gmail.com> <6ce0ac130610301400l491fae58n96e1df7518977845@mail.gmail.com> Message-ID: Hi Flavio, On 11/6/06, Flavio Coelho wrote: > Hi Brian, > > Sorry for taking so long to answer, I was very busy. I have tried again > after updating ZopeInterface to the version you suggest, and Twisted and > Nevow to SVN trunk. The error message I am getting is pretty much the same. > I also tried running the tests. Here is the output of "trial ipython1": Many thanks for the report. We'll look into it (well, probably Brian will, mostly :) but I'd like to ask you that we take this particular discussion over to the ipython list, since it's getting to be a little off-topic for scipy-user. Even if there is significant overlap between the two groups of users, this is now technically an ipython discussion and is thust best held over at the ipython lists. In case you are not on the lists, the subscription info is here: http://ipython.scipy.org/moin/MailingLists Regards, f From fccoelho at gmail.com Mon Nov 6 12:58:59 2006 From: fccoelho at gmail.com (Flavio Coelho) Date: Mon, 6 Nov 2006 15:58:59 -0200 Subject: [SciPy-user] Parallel OO programming in Python. In-Reply-To: References: <4546062E.1020501@cs.kuleuven.ac.be> <6ce0ac130610300801s5707a6a3h3480ce08899ecd46@mail.gmail.com> <6ce0ac130610301118ncd8d3al32a4c68f6db3801@mail.gmail.com> <6ce0ac130610301400l491fae58n96e1df7518977845@mail.gmail.com> Message-ID: Ok Fernando, I have subscribed to the Ipython-users list. Lets take it from there Fl?vio On 11/6/06, Fernando Perez wrote: > > Hi Flavio, > > On 11/6/06, Flavio Coelho wrote: > > Hi Brian, > > > > Sorry for taking so long to answer, I was very busy. I have tried again > > after updating ZopeInterface to the version you suggest, and Twisted > and > > Nevow to SVN trunk. The error message I am getting is pretty much the > same. > > I also tried running the tests. Here is the output of "trial ipython1": > > Many thanks for the report. We'll look into it (well, probably Brian > will, mostly :) but I'd like to ask you that we take this particular > discussion over to the ipython list, since it's getting to be a little > off-topic for scipy-user. Even if there is significant overlap > between the two groups of users, this is now technically an ipython > discussion and is thust best held over at the ipython lists. > > In case you are not on the lists, the subscription info is here: > > http://ipython.scipy.org/moin/MailingLists > > Regards, > > f > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > -- Fl?vio Code?o Coelho registered Linux user # 386432 --------------------------- "Laws are like sausages. It's better not to see them being made." Otto von Bismark -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.u.r.e.l.i.a.n at gmx.net Mon Nov 6 13:17:30 2006 From: a.u.r.e.l.i.a.n at gmx.net (Johannes Loehnert) Date: Mon, 6 Nov 2006 19:17:30 +0100 Subject: [SciPy-user] Saving Data as Modul!! In-Reply-To: <454F54C5.608@astraw.com> References: <454EF21D.1050104@physik.uni-wuerzburg.de> <200611061510.51300.meesters@uni-mainz.de> <454F54C5.608@astraw.com> Message-ID: <200611061917.31354.a.u.r.e.l.i.a.n@gmx.net> Hi, > Actually I've done what Volker asks in several different ways, although > none of the solutions is general enough to post here. The most fun > instance was saving electrophysiology recordings to a .py file such that > I could double-click the file and have the __main__ function plot the > data! In fact, now that I think about it, I've constructed most of my > examples to operate in this way -- run the .py file as a script and see > the data it contains in some kind of visualization. "import" it and use > it in another module. The nice thing about making it a module is that it > goes along for the ride with distutils without you having to even think > about it. Actually I had similar thoughts recently. However I did not think about storing everything into a .py file, I was more along the line of storing a chunk of plotting code with the data. How do you deal with large arrays? Do you store them as ASCII data or as binary string? If second, how? Johannes From elcorto at gmx.net Mon Nov 6 13:41:10 2006 From: elcorto at gmx.net (Steve Schmerler) Date: Mon, 06 Nov 2006 19:41:10 +0100 Subject: [SciPy-user] Saving Data as Modul!! In-Reply-To: <200611061917.31354.a.u.r.e.l.i.a.n@gmx.net> References: <454EF21D.1050104@physik.uni-wuerzburg.de> <200611061510.51300.meesters@uni-mainz.de> <454F54C5.608@astraw.com> <200611061917.31354.a.u.r.e.l.i.a.n@gmx.net> Message-ID: <454F81C6.10209@gmx.net> Johannes Loehnert wrote: > > How do you deal with large arrays? Do you store them as ASCII data or as > binary string? If second, how? > I do it like this: write: f = open(filename, "wb") _data = numpy.asarray(data, dtype) if sys.byteorder == 'big': _data = _data.byteswap() f.write(_data) f.close() read: f = open(filename, "rb") data = f.read() f.close() _data = numpy.fromstring(data, dtype) if sys.byteorder == 'big': _data = _data.byteswap() _data: numpy array usually dtype = 'd' This reads and writes always in little endian (I do this because I interchange data from several machines). HTH -- cheers, steve Random number generation is the art of producing pure gibberish as quickly as possible. From ellisonbg.net at gmail.com Mon Nov 6 13:39:39 2006 From: ellisonbg.net at gmail.com (Brian Granger) Date: Mon, 6 Nov 2006 11:39:39 -0700 Subject: [SciPy-user] Parallel OO programming in Python. In-Reply-To: References: <4546062E.1020501@cs.kuleuven.ac.be> <6ce0ac130610300801s5707a6a3h3480ce08899ecd46@mail.gmail.com> <6ce0ac130610301118ncd8d3al32a4c68f6db3801@mail.gmail.com> <6ce0ac130610301400l491fae58n96e1df7518977845@mail.gmail.com> Message-ID: <6ce0ac130611061039we3a0e59k2166be4ce8757b40@mail.gmail.com> I have reponded on the ipython-users list. But just for the record, this still looks like you don't have a new enough version of ZopeInterface. Brian On 11/6/06, Flavio Coelho wrote: > Ok Fernando, > > I have subscribed to the Ipython-users list. Lets take it from there > > Fl?vio > > > On 11/6/06, Fernando Perez < fperez.net at gmail.com> wrote: > > Hi Flavio, > > > > On 11/6/06, Flavio Coelho < fccoelho at gmail.com> wrote: > > > Hi Brian, > > > > > > Sorry for taking so long to answer, I was very busy. I have tried again > > > after updating ZopeInterface to the version you suggest, and Twisted > and > > > Nevow to SVN trunk. The error message I am getting is pretty much the > same. > > > I also tried running the tests. Here is the output of "trial ipython1": > > > > Many thanks for the report. We'll look into it (well, probably Brian > > will, mostly :) but I'd like to ask you that we take this particular > > discussion over to the ipython list, since it's getting to be a little > > off-topic for scipy-user. Even if there is significant overlap > > between the two groups of users, this is now technically an ipython > > discussion and is thust best held over at the ipython lists. > > > > In case you are not on the lists, the subscription info is here: > > > > http://ipython.scipy.org/moin/MailingLists > > > > Regards, > > > > f > > _______________________________________________ > > SciPy-user mailing list > > SciPy-user at scipy.org > > http://projects.scipy.org/mailman/listinfo/scipy-user > > > > > > -- > > Fl?vio Code?o Coelho > registered Linux user # 386432 > --------------------------- > "Laws are like sausages. It's better not to see them being made." > Otto von Bismark > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > > > From iain at day-online.org.uk.invalid Mon Nov 6 12:45:01 2006 From: iain at day-online.org.uk.invalid (Iain Day) Date: Mon, 06 Nov 2006 17:45:01 +0000 Subject: [SciPy-user] Fitting with global parameters optimize.leastsq Message-ID: Dear All, I apologise in advance if this has been covered elsewhere, I can't seem to get my head around it. I'm trying to globally fit a series of traces to the same function with some common and some local parameters. I have a 2D array (raw_signals) which contains each data trace as its columns. I have a 1D array of the time points. I'd like to fit an exponential of the form: y(t) = A * exp(-t/B) + C and I'd like C to be global across all data sets, but A and B to be local to each trace. So far I've put A and B into arrays ntraces long. I'm trying to keep the code as general as possible as I've got lots to fit each with differing numbers of traces. I've followed the example on the SciPy cookbook and I see the principle but I'm not sure ow to extend it in my case. I've got some code which generates the error (cost) function as an array of the same dimensions as raw_signals, but I can't see how to use optimize.leastsq with that. I hope this makes sense. I'll happily provide more info if needs be. Any help would be greatly appreciated. Best wishes, Iain From a.u.r.e.l.i.a.n at gmx.net Mon Nov 6 15:21:54 2006 From: a.u.r.e.l.i.a.n at gmx.net (Johannes Loehnert) Date: Mon, 6 Nov 2006 21:21:54 +0100 Subject: [SciPy-user] Saving Data as Modul!! In-Reply-To: <454F81C6.10209@gmx.net> References: <454EF21D.1050104@physik.uni-wuerzburg.de> <200611061917.31354.a.u.r.e.l.i.a.n@gmx.net> <454F81C6.10209@gmx.net> Message-ID: <200611062121.54791.a.u.r.e.l.i.a.n@gmx.net> Hi, > > How do you deal with large arrays? Do you store them as ASCII data or as > > binary string? If second, how? should have been clearer... Andrew wrote that he stores data as a .py file containing both data and visualization code. I wondered how he deals with large arrays (since Ascii storage is waste of space, but OTOH .py files should be ascii IIAMNM). But thanks anyway :-) Johannes From elcorto at gmx.net Mon Nov 6 15:53:28 2006 From: elcorto at gmx.net (Steve Schmerler) Date: Mon, 06 Nov 2006 21:53:28 +0100 Subject: [SciPy-user] Fitting with global parameters optimize.leastsq In-Reply-To: References: Message-ID: <454FA0C8.2020409@gmx.net> Iain Day wrote: > Dear All, > > I apologise in advance if this has been covered elsewhere, I can't seem > to get my head around it. > > I'm trying to globally fit a series of traces to the same function with > some common and some local parameters. I have a 2D array (raw_signals) > which contains each data trace as its columns. I have a 1D array of the > time points. > > I'd like to fit an exponential of the form: > y(t) = A * exp(-t/B) + C > > and I'd like C to be global across all data sets, but A and B to be > local to each trace. > > So far I've put A and B into arrays ntraces long. I'm trying to keep the > code as general as possible as I've got lots to fit each with differing > numbers of traces. > > I've followed the example on the SciPy cookbook and I see the principle > but I'm not sure ow to extend it in my case. > > I've got some code which generates the error (cost) function as an array > of the same dimensions as raw_signals, but I can't see how to use > optimize.leastsq with that. > I'm not sure if I understood what you're doing, but your error function must return an 1D array of residuals, no 2D (like raw_signals). import numpy as nu from scipy.optimize import leastsq # t is your time array # x the parameter array for the current trace # y = raw_signals[:,i] = the (i+1)th column # fit a trace def model(t, x): A = x[0] B = x[1] C = x[2] return A * nu.exp(-t/B) + C def residuals(x, t, y): return y - model(t, x) x_sol = leastsq(residuals, x0, args = (t,y)) -- cheers, steve Random number generation is the art of producing pure gibberish as quickly as possible. From elcorto at gmx.net Mon Nov 6 16:11:53 2006 From: elcorto at gmx.net (Steve Schmerler) Date: Mon, 06 Nov 2006 22:11:53 +0100 Subject: [SciPy-user] Fitting with global parameters optimize.leastsq In-Reply-To: <454FA3D0.80408@dsl.pipex.com> References: <454FA0C8.2020409@gmx.net> <454FA3D0.80408@dsl.pipex.com> Message-ID: <454FA519.6020202@gmx.net> Iain Day wrote: > Steve Schmerler wrote: >> Iain Day wrote: >>> Dear All, >>> >>> I apologise in advance if this has been covered elsewhere, I can't >>> seem to get my head around it. >>> >>> I'm trying to globally fit a series of traces to the same function >>> with some common and some local parameters. I have a 2D array >>> (raw_signals) which contains each data trace as its columns. I have a >>> 1D array of the time points. >>> >>> I'd like to fit an exponential of the form: >>> y(t) = A * exp(-t/B) + C >>> >>> and I'd like C to be global across all data sets, but A and B to be >>> local to each trace. >>> >>> So far I've put A and B into arrays ntraces long. I'm trying to keep >>> the code as general as possible as I've got lots to fit each with >>> differing numbers of traces. >>> >>> I've followed the example on the SciPy cookbook and I see the >>> principle but I'm not sure ow to extend it in my case. >>> >>> I've got some code which generates the error (cost) function as an >>> array of the same dimensions as raw_signals, but I can't see how to >>> use optimize.leastsq with that. >>> >> >> I'm not sure if I understood what you're doing, but your error >> function must return an 1D array of residuals, no 2D (like raw_signals). > > Sure, I'm working on that now! > >> import numpy as nu >> from scipy.optimize import leastsq >> >> # t is your time array >> # x the parameter array for the current trace >> # y = raw_signals[:,i] = the (i+1)th column >> >> # fit a trace >> def model(t, x): >> A = x[0] >> B = x[1] >> C = x[2] >> return A * nu.exp(-t/B) + C >> >> def residuals(x, t, y): >> return y - model(t, x) >> >> x_sol = leastsq(residuals, x0, args = (t,y)) > > Right, this is the sort of thing I want to do, except I'd like to > simulateously fit all y[:] using the *same* C, i.e. globally fit them. > Hope that's clearer. > > I'm messing about with scipy.reshape at the moment and sort of getting > somewhere. The residuals is now a 1D array, as is t and y. However, when > I use leastsq I get the following error: > > File "/sw/lib/python2.4/site-packages/scipy/optimize/minpack.py", line > 229, in leastsq > retval = > _minpack._lmdif(func,x0,args,full_output,ftol,xtol,gtol,maxfev,epsfcn,factor,diag) > > minpack.error: Result from function call is not a proper array of floats. > > I'm obviously not quite getting this!! > > Thanks for your help, > Could you post an example code producing this error? -- cheers, steve Random number generation is the art of producing pure gibberish as quickly as possible. From elcorto at gmx.net Mon Nov 6 16:06:19 2006 From: elcorto at gmx.net (Steve Schmerler) Date: Mon, 06 Nov 2006 22:06:19 +0100 Subject: [SciPy-user] Saving Data as Modul!! In-Reply-To: <200611062121.54791.a.u.r.e.l.i.a.n@gmx.net> References: <454EF21D.1050104@physik.uni-wuerzburg.de> <200611061917.31354.a.u.r.e.l.i.a.n@gmx.net> <454F81C6.10209@gmx.net> <200611062121.54791.a.u.r.e.l.i.a.n@gmx.net> Message-ID: <454FA3CB.307@gmx.net> Johannes Loehnert wrote: > Hi, > >>> How do you deal with large arrays? Do you store them as ASCII data or as >>> binary string? If second, how? > > should have been clearer... Andrew wrote that he stores data as a .py file > containing both data and visualization code. I wondered how he deals with > large arrays (since Ascii storage is waste of space, but OTOH .py files > should be ascii IIAMNM). But thanks anyway :-) uh OK, no prob :) -- cheers, steve Random number generation is the art of producing pure gibberish as quickly as possible. From iain at day-online.org.uk.invalid Mon Nov 6 16:30:26 2006 From: iain at day-online.org.uk.invalid (Iain Day) Date: Mon, 06 Nov 2006 21:30:26 +0000 Subject: [SciPy-user] Fitting with global parameters optimize.leastsq In-Reply-To: <454FA519.6020202@gmx.net> References: <454FA0C8.2020409@gmx.net> <454FA3D0.80408@dsl.pipex.com> <454FA519.6020202@gmx.net> Message-ID: >> >> I'm messing about with scipy.reshape at the moment and sort of getting >> somewhere. The residuals is now a 1D array, as is t and y. However, when >> I use leastsq I get the following error: >> >> File "/sw/lib/python2.4/site-packages/scipy/optimize/minpack.py", line >> 229, in leastsq >> retval = >> _minpack._lmdif(func,x0,args,full_output,ftol,xtol,gtol,maxfev,epsfcn,factor,diag) >> >> minpack.error: Result from function call is not a proper array of floats. > > Could you post an example code producing this error? > I hope the line wrapping doesn't hamper things too much. The model function is working fine, and the simple fit of the model to one trace works fine, its the extension to simutaneous fitting of several traces thats got me stumped. Thanks for your help, import scipy, scipy.optimize, scipy.io rawdata = scipy.io.read_array(open(datadir + filename + ".csv", "rb"), separator=',') data_points = rawdata[:, 0] raw_signals = rawdata[:, 1:] # These are the guesses. I want to use the same fitted value to # B across all traces, it should be a common parameter. A = [40.0, 40.0, 40.0, 40.0, 40.0, 40.0] B = 0.3 C = [45.0, 45.0, 45.0, 3.0, 3.0, 15.0] p0 = scipy.r_[A, B, C] fix0 = [x, y, z] expdata = scipy.reshape(raw_signals, (1, len(A)*len(data_points))) p1, success = scipy.optimize.leastsq(residuals, p0, args=(fix0, data_points, expdata)) def residuals(varpars, fixpars, points, expdata): ntraces = (len(varpars) - 1) / 2 A = varpars[:ntraces] B = varpars[ntraces] C = varpars[ntraces+1:] err = scipy.zeros((len(points), ntraces), dtype=float) raw_data = scipy.zeros((len(points), ntraces), dtype=float) raw_data = scipy.reshape(expdata, (len(points), ntraces)) for i in range(ntraces): err[:, i] = raw_data[:, i] - model([A[i], B, C[i]], fixpars, points) err = scipy.reshape(err, (1, ntraces*len(points))) return err From gruben at bigpond.net.au Mon Nov 6 17:48:28 2006 From: gruben at bigpond.net.au (Gary Ruben) Date: Tue, 07 Nov 2006 09:48:28 +1100 Subject: [SciPy-user] Saving Data as Modul!! In-Reply-To: <454EF21D.1050104@physik.uni-wuerzburg.de> References: <454EF21D.1050104@physik.uni-wuerzburg.de> Message-ID: <454FBBBC.1030105@bigpond.net.au> Hi Volker, If your only requirement is that your data all be stored in a single file, you may be able to do this by pickling it if you group it into one object first. If you have a lot of disparate data, perhaps building an hdf5 file with pytables may be the best solution. Gary R. Volker Lorrmann wrote: > Hi guys, > > just a short question. How can i save data that?s generated by a script > as an python modul, so i can "import" my data later again. > Something like export (opposite of import ;) ) would be great. > I?m running the script on ipython.I know of pickle. But i just wanna > save all data in one modul. > > Thanks so far > > Volker Lorrmann > From fccoelho at gmail.com Mon Nov 6 18:58:18 2006 From: fccoelho at gmail.com (Flavio Coelho) Date: Mon, 6 Nov 2006 21:58:18 -0200 Subject: [SciPy-user] Saving Data as Modul!! In-Reply-To: <454FBBBC.1030105@bigpond.net.au> References: <454EF21D.1050104@physik.uni-wuerzburg.de> <454FBBBC.1030105@bigpond.net.au> Message-ID: Just be careful with pickle, last time I checked, Numpy arrays were not picklable... Pylab ( matplotlib offers a function to save and load matrices in csv format:) import Pylab as P mymatrix = P.arange(1000) P.save("data.csv", mymatrix) mym = P.load("data.csv") cheers, Flavio On 11/6/06, Gary Ruben wrote: > > Hi Volker, > If your only requirement is that your data all be stored in a single > file, you may be able to do this by pickling it if you group it into one > object first. If you have a lot of disparate data, perhaps building an > hdf5 file with pytables may be the best solution. > Gary R. > > Volker Lorrmann wrote: > > Hi guys, > > > > just a short question. How can i save data that?s generated by a script > > as an python modul, so i can "import" my data later again. > > Something like export (opposite of import ;) ) would be great. > > I?m running the script on ipython.I know of pickle. But i just wanna > > save all data in one modul. > > > > Thanks so far > > > > Volker Lorrmann > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > -- Fl?vio Code?o Coelho registered Linux user # 386432 --------------------------- "Laws are like sausages. It's better not to see them being made." Otto von Bismark -------------- next part -------------- An HTML attachment was scrubbed... URL: From robert.kern at gmail.com Mon Nov 6 19:06:00 2006 From: robert.kern at gmail.com (Robert Kern) Date: Mon, 06 Nov 2006 18:06:00 -0600 Subject: [SciPy-user] Saving Data as Modul!! In-Reply-To: References: <454EF21D.1050104@physik.uni-wuerzburg.de> <454FBBBC.1030105@bigpond.net.au> Message-ID: <454FCDE8.6010908@gmail.com> Flavio Coelho wrote: > Just be careful with pickle, last time I checked, Numpy arrays were not > picklable... Yes, they are. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From fccoelho at gmail.com Mon Nov 6 19:12:27 2006 From: fccoelho at gmail.com (Flavio Coelho) Date: Mon, 6 Nov 2006 22:12:27 -0200 Subject: [SciPy-user] Saving Data as Modul!! In-Reply-To: <454FCDE8.6010908@gmail.com> References: <454EF21D.1050104@physik.uni-wuerzburg.de> <454FBBBC.1030105@bigpond.net.au> <454FCDE8.6010908@gmail.com> Message-ID: Good to know! On 11/6/06, Robert Kern wrote: > > Flavio Coelho wrote: > > Just be careful with pickle, last time I checked, Numpy arrays were not > > picklable... > > Yes, they are. > > -- > Robert Kern > > "I have come to believe that the whole world is an enigma, a harmless > enigma > that is made terrible by our own mad attempt to interpret it as though it > had > an underlying truth." > -- Umberto Eco > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > -- Fl?vio Code?o Coelho registered Linux user # 386432 --------------------------- "Laws are like sausages. It's better not to see them being made." Otto von Bismark -------------- next part -------------- An HTML attachment was scrubbed... URL: From ajikoe at gmail.com Mon Nov 6 20:45:10 2006 From: ajikoe at gmail.com (Pujo Aji) Date: Tue, 7 Nov 2006 08:45:10 +0700 Subject: [SciPy-user] setup sandbox xplt fail Message-ID: Hello, I try to run setup.py install in my sandbox directory and create enabled_packages.txt. I got the following messages: C:\Python24\Lib\site-packages\scipy\sandbox>setup install Warning: Assuming default configuration (.\xplt/{setup_xplt,setup}.py was not found) Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sandbox\setup.py", line 71, in ? setup(**configuration(top_path='').todict()) File "C:\Python24\Lib\site-packages\scipy\sandbox\setup.py", line 22, in configuration config.add_subpackage(p) File "C:\Python24\Lib\site-packages\numpy\distutils\misc_util.py", line 740, in add_subpackage caller_level = 2) File "C:\Python24\Lib\site-packages\numpy\distutils\misc_util.py", line 716, in get_subpackage caller_level = caller_level+1) File "C:\Python24\Lib\site-packages\numpy\distutils\misc_util.py", line 516, in __init__ raise ValueError("%r is not a directory" % (package_path,)) ValueError: '.\\xplt' is not a directory How can I solve this problem ? TIA, pujo -------------- next part -------------- An HTML attachment was scrubbed... URL: From robert.kern at gmail.com Mon Nov 6 20:49:53 2006 From: robert.kern at gmail.com (Robert Kern) Date: Mon, 06 Nov 2006 19:49:53 -0600 Subject: [SciPy-user] setup sandbox xplt fail In-Reply-To: References: Message-ID: <454FE641.8080503@gmail.com> Pujo Aji wrote: > Hello, > > I try to run setup.py install in my sandbox directory and create > enabled_packages.txt. I got the following messages: Do not run setup.py install from the sandbox directory. Just create Lib/sandbox/enabled_packages.txt and then build/install scipy as a whole. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From lorrmann at physik.uni-wuerzburg.de Tue Nov 7 04:12:15 2006 From: lorrmann at physik.uni-wuerzburg.de (Volker Lorrmann) Date: Tue, 07 Nov 2006 10:12:15 +0100 Subject: [SciPy-user] Saving data as a Modul!! In-Reply-To: References: Message-ID: <45504DEF.9080708@physik.uni-wuerzburg.de> Hi guys, thanks for your answers first. Some data?s i wanna save are 3-dim arrays (size:6,600,1000), others are objects. I found "save" from scipy.io, which is exactly what i?m looking for. Here?s what i?m doing (Here the object is just named as "object", the array, "array") ;) ): >>> save('my_object', {'object': object}) # saves the object into the modul "my_data.py" >>> save('my_array', {'array': array}) >>> from my_object import * >>> from my_array import * # and all my data?s are back Maybe this will be usefull for others too. Greetings Volker > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 6 Nov 2006 19:17:30 +0100 > From: Johannes Loehnert > Subject: Re: [SciPy-user] Saving Data as Modul!! > To: SciPy Users List > Message-ID: <200611061917.31354.a.u.r.e.l.i.a.n at gmx.net> > Content-Type: text/plain; charset="iso-8859-1" > > Hi, > > >> Actually I've done what Volker asks in several different ways, although >> none of the solutions is general enough to post here. The most fun >> instance was saving electrophysiology recordings to a .py file such that >> I could double-click the file and have the __main__ function plot the >> data! In fact, now that I think about it, I've constructed most of my >> examples to operate in this way -- run the .py file as a script and see >> the data it contains in some kind of visualization. "import" it and use >> it in another module. The nice thing about making it a module is that it >> goes along for the ride with distutils without you having to even think >> about it. >> > > Actually I had similar thoughts recently. However I did not think about > storing everything into a .py file, I was more along the line of storing a > chunk of plotting code with the data. > > How do you deal with large arrays? Do you store them as ASCII data or as > binary string? If second, how? > > Johannes > > > ------------------------------ > > Message: 2 > Date: Mon, 06 Nov 2006 19:41:10 +0100 > From: Steve Schmerler > Subject: Re: [SciPy-user] Saving Data as Modul!! > To: SciPy Users List > Message-ID: <454F81C6.10209 at gmx.net> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Johannes Loehnert wrote: > > >> How do you deal with large arrays? Do you store them as ASCII data or as >> binary string? If second, how? >> >> > > I do it like this: > > write: > f = open(filename, "wb") > _data = numpy.asarray(data, dtype) > if sys.byteorder == 'big': > _data = _data.byteswap() > f.write(_data) > f.close() > > > read: > f = open(filename, "rb") > data = f.read() > f.close() > _data = numpy.fromstring(data, dtype) > if sys.byteorder == 'big': > _data = _data.byteswap() > > _data: numpy array > usually dtype = 'd' > > This reads and writes always in little endian (I do this because I > interchange data from several machines). > > HTH > > -- ----------------------- Volker Lorrmann Universit?t W?rzburg Experimentelle Physik 6 Am Hubland 97074 Wuerzburg Germany Tel: +49 931 888 5770 volker.lorrmann at physik.uni-wuerzburg.de From maik.troemel at maitro.net Tue Nov 7 05:38:42 2006 From: maik.troemel at maitro.net (=?ISO-8859-1?Q?Maik_Tr=F6mel?=) Date: Tue, 07 Nov 2006 11:38:42 +0100 Subject: [SciPy-user] exact spline interpolation of an irregular dataset Message-ID: <45506232.5040104@maitro.net> Hello list, (again) i've got some problems concerning spline interpolation. I want to interpolate a irregular data field. I've mapped this data field on a 2d-array. "iObj_spline_smooth = scipy.interpolate.fitpack2.SmoothBivariateSpline(x, y, v)" works fine. But i want to make an exact interpolation, With "scipy.interpolate.fitpack2.LSQBivariateSpline(x, y , z, tx, ty)" it would work if the datafield was regular. But it isn't. Is there a posibility to make an exact interpolation? Thanks for help. From elcorto at gmx.net Tue Nov 7 07:37:55 2006 From: elcorto at gmx.net (Steve Schmerler) Date: Tue, 07 Nov 2006 13:37:55 +0100 Subject: [SciPy-user] Fitting with global parameters optimize.leastsq In-Reply-To: References: <454FA0C8.2020409@gmx.net> <454FA3D0.80408@dsl.pipex.com> <454FA519.6020202@gmx.net> Message-ID: <45507E23.5040903@gmx.net> Iain Day wrote: >>> I'm messing about with scipy.reshape at the moment and sort of getting >>> somewhere. The residuals is now a 1D array, as is t and y. However, when >>> I use leastsq I get the following error: >>> >>> File "/sw/lib/python2.4/site-packages/scipy/optimize/minpack.py", line >>> 229, in leastsq >>> retval = >>> _minpack._lmdif(func,x0,args,full_output,ftol,xtol,gtol,maxfev,epsfcn,factor,diag) >>> >>> minpack.error: Result from function call is not a proper array of floats. >> Could you post an example code producing this error? >> > > I hope the line wrapping doesn't hamper things too much. The model > function is working fine, and the simple fit of the model to one trace > works fine, its the extension to simutaneous fitting of several traces > thats got me stumped. > > Thanks for your help, > > > > import scipy, scipy.optimize, scipy.io > > rawdata = scipy.io.read_array(open(datadir + filename + ".csv", "rb"), > separator=',') > > data_points = rawdata[:, 0] > raw_signals = rawdata[:, 1:] > > # These are the guesses. I want to use the same fitted value to > # B across all traces, it should be a common parameter. > A = [40.0, 40.0, 40.0, 40.0, 40.0, 40.0] > B = 0.3 > C = [45.0, 45.0, 45.0, 3.0, 3.0, 15.0] > > p0 = scipy.r_[A, B, C] > fix0 = [x, y, z] > > expdata = scipy.reshape(raw_signals, (1, len(A)*len(data_points))) > > p1, success = scipy.optimize.leastsq(residuals, p0, args=(fix0, > data_points, expdata)) > > > def residuals(varpars, fixpars, points, expdata): > ntraces = (len(varpars) - 1) / 2 > A = varpars[:ntraces] > B = varpars[ntraces] > C = varpars[ntraces+1:] > > err = scipy.zeros((len(points), ntraces), dtype=float) > raw_data = scipy.zeros((len(points), ntraces), dtype=float) > raw_data = scipy.reshape(expdata, (len(points), ntraces)) > > for i in range(ntraces): > err[:, i] = raw_data[:, i] - model([A[i], B, C[i]], fixpars, > points) > > err = scipy.reshape(err, (1, ntraces*len(points))) > > return err > What's x, y, z and def model(...) is missing :). I thought more of a copy-paste-and-run example (e.g. with rawdata = numpy.random.randn(100, 7) where 100 == len(data_points)) that produces the error :-) Anyway: 1) The error comes from the shape of err in your residuals(). leastsq expects an array of shape (,), not (1, ) (i.e. len(err.shape) = 1, not 2. You would have to do reshape(err, (ntraces*len(points),)). I get this error when I replace def residuals(x, t, y): return y - model(t, x) by def residuals(x, t, y): err = y - model(t, x) err = scipy.reshape(err, (1, len(err))) print "### err.shape:", err.shape return err 2) You're trying to fit all data sets (t == data_points, y == raw_signals[:, i]) at once and I guess that won't work. You have to loop over A (or C or raw_signals[:, i]) building one data set and one initial guess (x0 = numpy.array([A[i], B, C[i]])) per loop. -- cheers, steve Random number generation is the art of producing pure gibberish as quickly as possible. From jtravs at gmail.com Tue Nov 7 08:07:54 2006 From: jtravs at gmail.com (John Travers) Date: Tue, 7 Nov 2006 13:07:54 +0000 Subject: [SciPy-user] exact spline interpolation of an irregular dataset In-Reply-To: <45506232.5040104@maitro.net> References: <45506232.5040104@maitro.net> Message-ID: <3a1077e70611070507n14ab9599j750ef48bf4e9dc52@mail.gmail.com> Hi Maik, On 07/11/06, Maik Tr?mel wrote: > (again) i've got some problems concerning spline interpolation. I want > to interpolate a irregular data field. I've mapped this data field on a > 2d-array. > "iObj_spline_smooth = > scipy.interpolate.fitpack2.SmoothBivariateSpline(x, y, v)" works fine. > Is there a posibility to make an exact interpolation? Yes, but not with the method used in BivariateSpline (exact interpolation requires the parameter s to be set to 0, but this will fail for the currently used method). If you have a regular grid then using RectBivariateSpline will work. As you haven't got a regular grid then I suggest you look at http://www.scipy.org/Cookbook/Matplotlib/Gridding_irregularly_spaced_data which tells you how to do it with a package in the sandbox. We are currently working on improving this situation (within the next few weeks), so stay tuned. Best regards, John Travers From gaedol at gmail.com Tue Nov 7 08:54:27 2006 From: gaedol at gmail.com (Marco) Date: Tue, 7 Nov 2006 14:54:27 +0100 Subject: [SciPy-user] Ideas about matrices Message-ID: Hi, i finally decided to keep the "import scipy" option and rewrite what needed. :) Just, i have a question. I am not really good at python programming (nor programming in general, to say), and every time i want to modify a matrix (an array) i have to run thru all indices. In the example, i want a matrix with random ones or zeros: import scipy import random jik=scipy.zeros((10,10)) for i in range(len(jik)): for k in range(len(jik)): if random.random()<0.5: jik[i,k]=1 print jik Is there a more fast and synthetic way to write the same code? What if my matrix is not square? Sorry for my incompetence, TIA! marco PS As always, RTFM much welcomed with pointers on what to read! :) From Giovanni.Samaey at cs.kuleuven.be Tue Nov 7 09:03:18 2006 From: Giovanni.Samaey at cs.kuleuven.be (Giovanni Samaey) Date: Tue, 07 Nov 2006 15:03:18 +0100 Subject: [SciPy-user] Ideas about matrices In-Reply-To: References: Message-ID: <45509226.4000204@cs.kuleuven.ac.be> from scipy import * size = (8,3) A = random.random(size) B = where(A>0.5,0.,1.) B is your matrix Marco wrote: > Hi, > > i finally decided to keep the "import scipy" option and rewrite what needed. :) > Just, i have a question. > > I am not really good at python programming (nor programming in > general, to say), and every time i want to modify a matrix (an array) > i have to run thru all indices. > > In the example, i want a matrix with random ones or zeros: > > import scipy > import random > > jik=scipy.zeros((10,10)) > for i in range(len(jik)): > for k in range(len(jik)): > if random.random()<0.5: > jik[i,k]=1 > > print jik > > Is there a more fast and synthetic way to write the same code? > What if my matrix is not square? > > Sorry for my incompetence, TIA! > > marco > > PS > As always, RTFM much welcomed with pointers on what to read! :) > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > From aisaac at american.edu Tue Nov 7 09:06:41 2006 From: aisaac at american.edu (Alan Isaac) Date: Tue, 7 Nov 2006 09:06:41 -0500 Subject: [SciPy-user] Ideas about matrices In-Reply-To: References: Message-ID: On Tue, 7 Nov 2006, Marco wrote: > i want a matrix with random ones or zeros: >>> import numpy >>> from numpy import random >>> x=random.random((10,10)) >>> y=x<0.5 (Or change the dtype if you prefer.) Cheers, Alan Isaac From gaedol at gmail.com Tue Nov 7 09:40:28 2006 From: gaedol at gmail.com (Marco) Date: Tue, 7 Nov 2006 15:40:28 +0100 Subject: [SciPy-user] Ideas about matrices In-Reply-To: References: Message-ID: Hi! What about: from scipy import array from scipy import random size=(8,3) a=random.randint(0,2,size) print a ? Returns this: array([[1, 0, 1], [1, 0, 1], [0, 0, 0], [1, 0, 0], [1, 0, 1], [1, 0, 1], [1, 1, 1], [0, 0, 0]]) which is good to me. Any contraindication? Thanks, marco From anand at soe.ucsc.edu Tue Nov 7 14:12:10 2006 From: anand at soe.ucsc.edu (Anand Patil) Date: Tue, 07 Nov 2006 11:12:10 -0800 Subject: [SciPy-user] Another OS X issue Message-ID: <4550DA8A.9070400@cse.ucsc.edu> Hi everyone, I had installed scipy from the installer packages available on the website, then installed numpy 1.0 when it came out, and then scipy didn't work. Now I'm having a bit of trouble compiling scipy from source: /usr/bin/ld: can't locate file for: -lcc_dynamic collect2: ld returned 1 exit status /usr/bin/ld: can't locate file for: -lcc_dynamic collect2: ld returned 1 exit status error: Command "/sw/bin/g77 -g -Wall -undefined dynamic_lookup -bundle build/temp.macosx-10.4-fat-2.4/build/src.macosx-10.4-fat-2.4/Lib/fftpack/_fftpackmodule.o build/temp.macosx-10.4-fat-2.4/Lib/fftpack/src/zfft.o build/temp.macosx-10.4-fat-2.4/Lib/fftpack/src/drfft.o build/temp.macosx-10.4-fat-2.4/Lib/fftpack/src/zrfft.o build/temp.macosx-10.4-fat-2.4/Lib/fftpack/src/zfftnd.o build/temp.macosx-10.4-fat-2.4/build/src.macosx-10.4-fat-2.4/fortranobject.o -L/sw/lib/gcc/powerpc-apple-darwin7.9.0/3.4.3 -Lbuild/temp.macosx-10.4-fat-2.4 -ldfftpack -lg2c -lcc_dynamic -o build/lib.macosx-10.4-fat-2.4/scipy/fftpack/_fftpack.so" failed with exit status 1 I'm on a PowerBook G4 running Tiger. Thanks, Anand From robert.kern at gmail.com Tue Nov 7 14:26:01 2006 From: robert.kern at gmail.com (Robert Kern) Date: Tue, 07 Nov 2006 13:26:01 -0600 Subject: [SciPy-user] Another OS X issue In-Reply-To: <4550DA8A.9070400@cse.ucsc.edu> References: <4550DA8A.9070400@cse.ucsc.edu> Message-ID: <4550DDC9.2090802@gmail.com> Anand Patil wrote: > Hi everyone, > > I had installed scipy from the installer packages available on the > website, then installed numpy 1.0 when it came out, and then scipy > didn't work. Now I'm having a bit of trouble compiling scipy from source: > > /usr/bin/ld: can't locate file for: -lcc_dynamic > collect2: ld returned 1 exit status > /usr/bin/ld: can't locate file for: -lcc_dynamic > collect2: ld returned 1 exit status > error: Command "/sw/bin/g77 -g -Wall -undefined dynamic_lookup -bundle > build/temp.macosx-10.4-fat-2.4/build/src.macosx-10.4-fat-2.4/Lib/fftpack/_fftpackmodule.o > I'm on a PowerBook G4 running Tiger. You cannot use gcc 4.0 with g77, and you need to use gcc 4.0 to build Universal binaries for the Python that you are using. You need to use gfortran with gcc 4.0. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From iain at day-online.org.uk.invalid Tue Nov 7 15:30:45 2006 From: iain at day-online.org.uk.invalid (Iain Day) Date: Tue, 07 Nov 2006 20:30:45 +0000 Subject: [SciPy-user] Fitting with global parameters optimize.leastsq In-Reply-To: <45507E23.5040903@gmx.net> References: <454FA0C8.2020409@gmx.net> <454FA3D0.80408@dsl.pipex.com> <454FA519.6020202@gmx.net> <45507E23.5040903@gmx.net> Message-ID: > What's x, y, z and def model(...) is missing :). I thought more of a > copy-paste-and-run example (e.g. with rawdata = numpy.random.randn(100, > 7) where 100 == len(data_points)) that produces the error :-) Sorry, my mistake. I was quite tired! > Anyway: > > 1) The error comes from the shape of err in your residuals(). leastsq > expects an array of shape (,), not (1, ) (i.e. > len(err.shape) = 1, not 2. > You would have to do reshape(err, (ntraces*len(points),)). > > I get this error when I replace > > def residuals(x, t, y): > return y - model(t, x) > > by > > def residuals(x, t, y): > err = y - model(t, x) > err = scipy.reshape(err, (1, len(err))) > print "### err.shape:", err.shape > return err Okay, thanks for the pointer. If I reshape the array as (ntraces*len(points),) it works fine. Though this leads to my next question: what is the difference between (length,) and (length,1)? > 2) You're trying to fit all data sets (t == data_points, y == > raw_signals[:, i]) at once and I guess that won't work. You have to loop > over A (or C or raw_signals[:, i]) building one data set and one initial > guess (x0 = numpy.array([A[i], B, C[i]])) per loop. That sounds similar to fitting each trace separately, and wouldn't give you the global B? Thanks for your help, I think I have a better understanding so far. Well, its only been 10 days since I started with Python and SciPy! Iain From elcorto at gmx.net Wed Nov 8 12:25:31 2006 From: elcorto at gmx.net (Steve Schmerler) Date: Wed, 08 Nov 2006 18:25:31 +0100 Subject: [SciPy-user] Fitting with global parameters optimize.leastsq In-Reply-To: References: <454FA0C8.2020409@gmx.net> <454FA3D0.80408@dsl.pipex.com> <454FA519.6020202@gmx.net> <45507E23.5040903@gmx.net> Message-ID: <4552130B.70207@gmx.net> Iain Day wrote: > > what is the difference between (length,) and (length,1)? > # numpy 1D array In [31]: numpy.random.randn(5) Out[31]: array([-1.56082001, 0.60259947, -1.54174779, -1.0866519 , 0.82230522]) # Matlab-style 1D-arrays # column vector (Nx1) In [32]: numpy.random.randn(5,1) Out[32]: array([[ 1.36237411], [ 0.34596444], [ 1.0227412 ], [-0.9647568 ], [ 0.18561302]]) # row vector (1xN) In [33]: numpy.random.randn(1,5) Out[33]: array([[-0.82907498, 0.00139096, -0.34764322, -0.4300095 , 0.61331211]]) >> 2) You're trying to fit all data sets (t == data_points, y == >> raw_signals[:, i]) at once and I guess that won't work. You have to loop >> over A (or C or raw_signals[:, i]) building one data set and one initial >> guess (x0 = numpy.array([A[i], B, C[i]])) per loop. > > That sounds similar to fitting each trace separately, and wouldn't give > you the global B? > Well, yes. Taking a closer look at the cookbook example I see that this is indeed the right thing to do :) Although, I'm curious as to how this works if you don't fit 2 data sets but, say 100 with respect to local mimima in a such a high-dimensional search space. -- cheers, steve Random number generation is the art of producing pure gibberish as quickly as possible. From anand at soe.ucsc.edu Wed Nov 8 13:32:35 2006 From: anand at soe.ucsc.edu (Anand Patil) Date: Wed, 08 Nov 2006 10:32:35 -0800 Subject: [SciPy-user] Another OS X issue In-Reply-To: References: Message-ID: <455222C3.20807@cse.ucsc.edu> Sorry about the hassle: $ sudo python setup.py config_fc --fcompiler=gfortran install ... error: don't know how to compile Fortran code on platform 'posix' with 'gfortran' compiler. Supported compilers are: compaq,none,absoft,intel,f,gnu,sun,nag,vast,ibm,gnu95,intelv,g95,intele,pg,lahey,compaqv,mips,hpux,intelev,intelem) $ python -c 'import os,sys;print os.name,sys.platform' posix darwin $ python -c 'import sys;print sys.version' 2.4.3 (#1, Apr 7 2006, 10:54:33) [GCC 4.0.1 (Apple Computer, Inc. build 5250)] > You cannot use gcc 4.0 with g77, and you need to use gcc 4.0 to build Universal > binaries for the Python that you are using. You need to use gfortran with gcc 4.0 From robert.kern at gmail.com Wed Nov 8 13:37:01 2006 From: robert.kern at gmail.com (Robert Kern) Date: Wed, 08 Nov 2006 12:37:01 -0600 Subject: [SciPy-user] Another OS X issue In-Reply-To: <455222C3.20807@cse.ucsc.edu> References: <455222C3.20807@cse.ucsc.edu> Message-ID: <455223CD.4030706@gmail.com> Anand Patil wrote: > Sorry about the hassle: > > $ sudo python setup.py config_fc --fcompiler=gfortran install --fcompiler=gnu95 No, I don't like the name, either, but that's what the author decided to call it. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From iain at day-online.org.uk.invalid Wed Nov 8 15:04:52 2006 From: iain at day-online.org.uk.invalid (Iain Day) Date: Wed, 08 Nov 2006 20:04:52 +0000 Subject: [SciPy-user] Fitting with global parameters optimize.leastsq In-Reply-To: <4552130B.70207@gmx.net> References: <454FA0C8.2020409@gmx.net> <454FA3D0.80408@dsl.pipex.com> <454FA519.6020202@gmx.net> <45507E23.5040903@gmx.net> <4552130B.70207@gmx.net> Message-ID: Steve Schmerler wrote: >>> 2) You're trying to fit all data sets (t == data_points, y == >>> raw_signals[:, i]) at once and I guess that won't work. You have to loop >>> over A (or C or raw_signals[:, i]) building one data set and one initial >>> guess (x0 = numpy.array([A[i], B, C[i]])) per loop. >> That sounds similar to fitting each trace separately, and wouldn't give >> you the global B? >> > > Well, yes. Taking a closer look at the cookbook example I see that this > is indeed the right thing to do :) > > Although, I'm curious as to how this works if you don't fit 2 data sets > but, say 100 with respect to local mimima in a such a high-dimensional > search space. That's beyond my little brain I'm afraid, but the results I'm getting look good. I think you need pretty good initial guesses, but allowing several linked (i.e. global) parameters does reduce the number of degrees of freedom and hence the size of the search space. Thanks again. Iain From David.L.Goldsmith at noaa.gov Wed Nov 8 22:37:58 2006 From: David.L.Goldsmith at noaa.gov (David L Goldsmith) Date: Wed, 08 Nov 2006 19:37:58 -0800 Subject: [SciPy-user] Shooting method function? Message-ID: <4552A296.9010700@noaa.gov> Hi! New to this list, but have been on the numpy list for a while. I need a shooting method ODE BVP solver; before I write one (using scipy/numpy of course) is there one already, either: A) "hidden" somewhere in scipy (I found integrate.ode and integrate.odeint, but am I correct in assuming that these are IVP solvers - which I would of course use in my shooting implementation if need be), or B) in some other module/package, or C) in someone's (shareable) personal collection of numerical Python tools? Thanks! DG -- HMRD/ORR/NOS/NOAA From peridot.faceted at gmail.com Thu Nov 9 02:13:36 2006 From: peridot.faceted at gmail.com (A. M. Archibald) Date: Thu, 9 Nov 2006 02:13:36 -0500 Subject: [SciPy-user] Shooting method function? In-Reply-To: <4552A296.9010700@noaa.gov> References: <4552A296.9010700@noaa.gov> Message-ID: On 08/11/06, David L Goldsmith wrote: > Hi! New to this list, but have been on the numpy list for a while. I > need a shooting method ODE BVP solver; before I write one (using > scipy/numpy of course) is there one already, either: A) "hidden" > somewhere in scipy (I found integrate.ode and integrate.odeint, but am I > correct in assuming that these are IVP solvers - which I would of course > use in my shooting implementation if need be), or B) in some other > module/package, or C) in someone's (shareable) personal collection of > numerical Python tools? Thanks! If you want to do anything more sophisticated with ODEs than odeint and ode allow, take a look at PyDSTool. I haven't used it, but it seems to cover pretty much all the bases I could think of. A. M. Archibald From David.L.Goldsmith at noaa.gov Thu Nov 9 02:46:36 2006 From: David.L.Goldsmith at noaa.gov (David Goldsmith) Date: Wed, 08 Nov 2006 23:46:36 -0800 Subject: [SciPy-user] Shooting method function? In-Reply-To: References: <4552A296.9010700@noaa.gov> Message-ID: <4552DCDC.9080400@noaa.gov> Will do, thanks! DG A. M. Archibald wrote: > On 08/11/06, David L Goldsmith wrote: > >> Hi! New to this list, but have been on the numpy list for a while. I >> need a shooting method ODE BVP solver; before I write one (using >> scipy/numpy of course) is there one already, either: A) "hidden" >> somewhere in scipy (I found integrate.ode and integrate.odeint, but am I >> correct in assuming that these are IVP solvers - which I would of course >> use in my shooting implementation if need be), or B) in some other >> module/package, or C) in someone's (shareable) personal collection of >> numerical Python tools? Thanks! >> > > If you want to do anything more sophisticated with ODEs than odeint > and ode allow, take a look at PyDSTool. I haven't used it, but it > seems to cover pretty much all the bases I could think of. > > A. M. Archibald > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > From rclewley at cam.cornell.edu Thu Nov 9 09:56:04 2006 From: rclewley at cam.cornell.edu (Robert Clewley) Date: Thu, 9 Nov 2006 09:56:04 -0500 (EST) Subject: [SciPy-user] Shooting method function? In-Reply-To: References: <4552A296.9010700@noaa.gov> Message-ID: Hi, Actually, we haven't finished the BVP class we've wanted to put into PyDSTool. But at least the use of our state events with an IVP solver provide an efficient way to shoot for things like "when does some function of my state variables reach a certain value?" (i.e., not just for problems defined over a fixed interval in the independent variable). We provide examples of model parameter fitting which are really shooting problems, and the use of events allows us to cast the problem in a way that can be solved using scipy's fsolve and the like. Rob PS When we're done you'll be able to use AUTO via PyCont to do sophisticated (and C-level) BVP solving! From David.L.Goldsmith at noaa.gov Thu Nov 9 10:41:20 2006 From: David.L.Goldsmith at noaa.gov (David Goldsmith) Date: Thu, 09 Nov 2006 07:41:20 -0800 Subject: [SciPy-user] Shooting method function? In-Reply-To: References: <4552A296.9010700@noaa.gov> Message-ID: <45534C20.6070308@noaa.gov> OK. Not that I (or anyone else, right guys? ;-) ) will hold you to it, but is there a projected release date for these enhancements? Thanks, DG Robert Clewley wrote: > Hi, > > Actually, we haven't finished the BVP class we've wanted to put into > PyDSTool. But at least the use of our state events with an IVP solver > provide an efficient way to shoot for things like "when does some function > of my state variables reach a certain value?" (i.e., not just for problems > defined over a fixed interval in the independent variable). We provide > examples of model parameter fitting which are really shooting problems, > and the use of events allows us to cast the problem in a way that can be > solved using scipy's fsolve and the like. > > Rob > > PS When we're done you'll be able to use AUTO via PyCont to do > sophisticated (and C-level) BVP solving! > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > From rclewley at cam.cornell.edu Thu Nov 9 11:14:12 2006 From: rclewley at cam.cornell.edu (Robert Clewley) Date: Thu, 9 Nov 2006 11:14:12 -0500 (EST) Subject: [SciPy-user] Shooting method function? In-Reply-To: <45534C20.6070308@noaa.gov> References: <4552A296.9010700@noaa.gov> <45534C20.6070308@noaa.gov> Message-ID: Well, not really. A projected release date is far too formal an idea for us at the moment! We are all very busy on other things right now, but I'd like to think we could get to it before the new year. ... Sorry about that! Rob On Thu, 9 Nov 2006, David Goldsmith wrote: > OK. Not that I (or anyone else, right guys? ;-) ) will hold you to it, > but is there a projected release date for these enhancements? > Thanks, > > DG From ganesh.iitm at gmail.com Thu Nov 9 12:00:25 2006 From: ganesh.iitm at gmail.com (Ganesh V) Date: Thu, 9 Nov 2006 22:30:25 +0530 Subject: [SciPy-user] Tridiagonal solver extensive use Message-ID: Hi! I have a specific problem (actually fluid mechanics.. solving 2 species and 1 energy eqn for those concerned !!!) where I'll have to solve around 8 eqns of the type Ax =b where A is tridiagonal PER TIME STEP to get the various derivatives.. And I may have to solve for a million time steps or so (pretty small.. of the order of microseconds). I was planning to use Scipy.lianalg.solve_banded for this purpose. How do I optimize storing these arrays if all/most of the diagonal/off diagonal terms are the same. I guess this comes in many places esp.. wherever Finite differencing is used. In my case, most of the Diagonal terms are one (except the first 2 and last 2) and same is the case with the off diagonal terms as well. Now comes the main question. Do I really go for doing this in Fortran or make my life easier by writing it in Python- Scipy. Actually I may finish writing the code pretty soon if it were in Python.. some 50-60 lines..!! , but my only worry is performance !! Once the code is written I'll want results fast (I guess everybody does !!). Will I really gain by coding in Fortran (actually my programming skills aren't that great, so that may offset the benefit as well) ?? bye !! ganesh -- Ganesh V Undergraduate student, Department of Aerospace Engineering, IIT Madras, Chennai-36. My homepage --> http://www.ae.iitm.ac.in/~ae03b007 My blog --> http://gantech.wordpress.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From David.L.Goldsmith at noaa.gov Thu Nov 9 15:59:12 2006 From: David.L.Goldsmith at noaa.gov (David L Goldsmith) Date: Thu, 09 Nov 2006 12:59:12 -0800 Subject: [SciPy-user] Shooting method function? In-Reply-To: References: <4552A296.9010700@noaa.gov> <45534C20.6070308@noaa.gov> Message-ID: <455396A0.7020500@noaa.gov> NP (I think I figured out a way to solve my problem w/out needing to resort to a shooting method after all). DG Robert Clewley wrote: > Well, not really. A projected release date is far too formal an idea for > us at the moment! We are all very busy on other things right now, but I'd > like to think we could get to it before the new year. ... Sorry about > that! > > Rob > > On Thu, 9 Nov 2006, David Goldsmith wrote: > > >> OK. Not that I (or anyone else, right guys? ;-) ) will hold you to it, >> but is there a projected release date for these enhancements? >> Thanks, >> >> DG >> > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > -- HMRD/ORR/NOS/NOAA From peridot.faceted at gmail.com Thu Nov 9 16:59:25 2006 From: peridot.faceted at gmail.com (A. M. Archibald) Date: Thu, 9 Nov 2006 16:59:25 -0500 Subject: [SciPy-user] Tridiagonal solver extensive use In-Reply-To: References: Message-ID: On 09/11/06, Ganesh V wrote: > Hi! > > I have a specific problem (actually fluid mechanics.. solving 2 species > and 1 energy eqn for those concerned !!!) where I'll have to solve around 8 > eqns of the type > > Ax =b where A is tridiagonal > > PER TIME STEP to get the various derivatives.. And I may have to solve for > a million time steps or so (pretty small.. of the order of microseconds). I > was planning to use Scipy.lianalg.solve_banded for this purpose. How do I > optimize storing these arrays if all/most of the diagonal/off diagonal terms > are the same. I guess this comes in many places esp.. wherever Finite > differencing is used. In my case, most of the Diagonal terms are one (except > the first 2 and last 2) and same is the case with the off diagonal terms as > well. > > Now comes the main question. Do I really go for doing this in Fortran or > make my life easier by writing it in Python- Scipy. Actually I may finish > writing the code pretty soon if it were in Python.. some 50-60 lines..!! , > but my only worry is performance !! Once the code is written I'll want > results fast (I guess everybody does !!). Will I really gain by coding in > Fortran (actually my programming skills aren't that great, so that may > offset the benefit as well) ?? I would suggest implementing a tridiagonal solver directly in python (it should be simple) if you can do so without using a for loop. It probably won't really take advantage of the simplicity of your coefficients, but it will run fairly quickly. If you have a solution to your problem that works but is a bit too slow, then you can try weave, pyrex, or writing a module in C or FORTRAN. That will certainly be faster, but you don't necessarily care. The general rule is, get it working first, then make it fast. A. M. Archibald From jdawe at eos.ubc.ca Thu Nov 9 17:39:28 2006 From: jdawe at eos.ubc.ca (Jordan Dawe) Date: Thu, 9 Nov 2006 14:39:28 -0800 Subject: [SciPy-user] spline interpolation Message-ID: I've been looking at scipy's interpolation routines and I can't make heads or tails of them. I just want to do a spline interp1d like matlab does. Is there any way to do this? Jordan -------------- next part -------------- An HTML attachment was scrubbed... URL: From robert.kern at gmail.com Thu Nov 9 17:54:40 2006 From: robert.kern at gmail.com (Robert Kern) Date: Thu, 09 Nov 2006 16:54:40 -0600 Subject: [SciPy-user] spline interpolation In-Reply-To: References: Message-ID: <4553B1B0.5010700@gmail.com> Jordan Dawe wrote: > I've been looking at scipy's interpolation routines and I can't make > heads or tails of them. I just want to do a spline interp1d like matlab > does. Is there any way to do this? I don't know exactly what features you want from Matlab's interp1d, but you probably want scipy.interpolate.UnivariateSpline. In [92]: from scipy import interpolate In [93]: interpolate? Type: module Base Class: Namespace: Interactive File: /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/scipy-0.5.2.dev2310-py2.5-macosx-10.4-i386.egg /scipy/interpolate/__init__.py Docstring: Interpolation Tools =================== Wrappers around FITPACK functions: splrep -- find smoothing spline given (x,y) points on curve. splprep -- find smoothing spline given parametrically defined curve. splev -- evaluate the spline or its derivatives. splint -- compute definite integral of a spline. sproot -- find the roots of a cubic spline. spalde -- compute all derivatives of a spline at given points. bisplrep -- find bivariate smoothing spline representation. bisplev -- evaluate bivariate smoothing spline. UnivariateSpline -- A more recent, object-oriented wrapper; finds a (possibly smoothed) interpolating spline. InterpolatedUnivariateSpline LSQUnivariateSpline BivariateSpline -- A more recent, object-oriented wrapper; finds a interpolating spline for a bivariate function. SmoothBivariateSpline Interpolation Class interp1d -- Create a class whose instances can linearly interpolate to compute unknown values of a univariate function. interp2d -- Create a class whose instances can interpolate to compute unknown values of a bivariate function. In [95]: interpolate.UnivariateSpline? Type: type Base Class: Namespace: Interactive File: /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/scipy-0.5.2.dev2310-py2.5-macosx-10.4-i386.egg/scipy/interpolate/fitpack2.py Docstring: Univariate spline s(x) of degree k on the interval [xb,xe] calculated from a given set of data points (x,y). Can include least-squares fitting. See also: splrep, splev, sproot, spint, spalde - an older wrapping of FITPACK BivariateSpline - a similar class for bivariate spline interpolation In [99]: from numpy import * In [100]: x = linspace(0, 2, num=201) In [101]: x = linspace(0, 2, num=21) In [102]: y = sin(x*pi) In [103]: us = interpolate.UnivariateSpline(x, y, s=0.0) In [104]: x2 = linspace(0, 2, num=201) In [105]: y2 = us(x2) -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From jdawe at eos.ubc.ca Thu Nov 9 18:14:26 2006 From: jdawe at eos.ubc.ca (Jordan Dawe) Date: Thu, 9 Nov 2006 15:14:26 -0800 Subject: [SciPy-user] spline interpolation Message-ID: Robert Kern wrote: Jordan Dawe wrote: I've been looking at scipy's interpolation routines and I can't make heads or tails of them. I just want to do a spline interp1d like matlab does. Is there any way to do this? I don't know exactly what features you want from Matlab's interp1d, but you probably want scipy.interpolate.UnivariateSpline. I want a cubic spline fit that passes through every point it is fit to. I haven't been able to figure out how to make UnivariateSpline do this; it goes near the points, but is not constrained to satisfy the points exactly. Matlab does this by a series of piecewise spline interpolations that are continuous in the first two derivatives at each data point. Matlab's man page: http://www.mathworks.com/access/helpdesk/help/techdoc/ref/index.html?/access/helpdesk/help/techdoc/ref/interp1.html I believe it is essentially implementing the cubic spline interpolation algorithm from Numerical Recipes: http://www.nrbook.com/a/bookcpdf/c3-3.pdf Jordan -------------- next part -------------- An HTML attachment was scrubbed... URL: From robert.kern at gmail.com Thu Nov 9 18:19:28 2006 From: robert.kern at gmail.com (Robert Kern) Date: Thu, 09 Nov 2006 17:19:28 -0600 Subject: [SciPy-user] spline interpolation In-Reply-To: References: Message-ID: <4553B780.1020801@gmail.com> Jordan Dawe wrote: > Robert Kern wrote: >> Jordan Dawe wrote: >>> I've been looking at scipy's interpolation routines and I can't make >>> heads or tails of them. I just want to do a spline interp1d like matlab >>> does. Is there any way to do this? >> >> I don't know exactly what features you want from Matlab's interp1d, but you >> probably want scipy.interpolate.UnivariateSpline. > I want a cubic spline fit that passes through every point it is fit to. > I haven't been able to figure out how to make UnivariateSpline do this; > it goes near the points, but is not constrained to satisfy the points > exactly. Matlab does this by a series of piecewise spline > interpolations that are continuous in the first two derivatives at each > data point. Did you see the example that I gave you? Passing s=0 as the smoothing parameter makes the interpolant pass through the given data points. Alternatively, InterpolatedUnivariateSpline will do this for you. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From jdawe at eos.ubc.ca Thu Nov 9 18:32:33 2006 From: jdawe at eos.ubc.ca (Jordan Dawe) Date: Thu, 9 Nov 2006 15:32:33 -0800 Subject: [SciPy-user] spline interpolation Message-ID: Did you see the example that I gave you? Passing s=0 as the smoothing parameter makes the interpolant pass through the given data points. Alternatively, InterpolatedUnivariateSpline will do this for you. Ah! s=0. Thank you very much. Jordan -------------- next part -------------- An HTML attachment was scrubbed... URL: From ckkart at hoc.net Thu Nov 9 21:54:49 2006 From: ckkart at hoc.net (Christian Kristukat) Date: Fri, 10 Nov 2006 11:54:49 +0900 Subject: [SciPy-user] spline interpolation In-Reply-To: <4553B1B0.5010700@gmail.com> References: <4553B1B0.5010700@gmail.com> Message-ID: <4553E9F9.5050203@hoc.net> Robert Kern wrote: > Jordan Dawe wrote: >> I've been looking at scipy's interpolation routines and I can't make >> heads or tails of them. I just want to do a spline interp1d like matlab >> does. Is there any way to do this? > > I don't know exactly what features you want from Matlab's interp1d, but you > probably want scipy.interpolate.UnivariateSpline. I just noticed that UnivariateSpline.derivatives() seems to be broken: import numpy as N from scipy.interpolate import UnivariateSpline as spline x=N.arange(10,dtype=float) y=x**2 a=N.linspace(2,5,100) sp=spline(x,y) b=sp(a) der=sp.derivatives(a) fails with: 0-th dimension must be fixed to 8 but got 4 --------------------------------------------------------------------------- dfitpack.error Traceback (most recent call last) /mnt/home/ck/ /usr/local/lib/python2.4/site-packages/scipy/interpolate/fitpack2.py in derivatives(self, x) 179 def derivatives(self, x): 180 """ Return all derivatives of the spline at the point x.""" --> 181 d,ier = dfitpack.spalde(*(self._eval_args+(x,))) 182 assert ier==0,`ier` 183 return d error: failed in converting 2nd argument `c' of dfitpack.spalde to C/Fortran array Christian From ckkart at hoc.net Thu Nov 9 21:55:25 2006 From: ckkart at hoc.net (Christian Kristukat) Date: Fri, 10 Nov 2006 11:55:25 +0900 Subject: [SciPy-user] spline interpolation In-Reply-To: <4553B1B0.5010700@gmail.com> References: <4553B1B0.5010700@gmail.com> Message-ID: <4553EA1D.6030908@hoc.net> Robert Kern wrote: > Jordan Dawe wrote: >> I've been looking at scipy's interpolation routines and I can't make >> heads or tails of them. I just want to do a spline interp1d like matlab >> does. Is there any way to do this? > > I don't know exactly what features you want from Matlab's interp1d, but you > probably want scipy.interpolate.UnivariateSpline. I just noticed that UnivariateSpline.derivatives() seems to be broken: import numpy as N from scipy.interpolate import UnivariateSpline as spline x=N.arange(10,dtype=float) y=x**2 a=N.linspace(2,5,100) sp=spline(x,y) b=sp(a) der=sp.derivatives(a) fails with: 0-th dimension must be fixed to 8 but got 4 --------------------------------------------------------------------------- dfitpack.error Traceback (most recent call last) /mnt/home/ck/ /usr/local/lib/python2.4/site-packages/scipy/interpolate/fitpack2.py in derivatives(self, x) 179 def derivatives(self, x): 180 """ Return all derivatives of the spline at the point x.""" --> 181 d,ier = dfitpack.spalde(*(self._eval_args+(x,))) 182 assert ier==0,`ier` 183 return d error: failed in converting 2nd argument `c' of dfitpack.spalde to C/Fortran array with numpy 1.0rc2, scipy 0.5.1 on linux Christian From nwagner at iam.uni-stuttgart.de Fri Nov 10 02:42:03 2006 From: nwagner at iam.uni-stuttgart.de (Nils Wagner) Date: Fri, 10 Nov 2006 08:42:03 +0100 Subject: [SciPy-user] spline interpolation In-Reply-To: <4553EA1D.6030908@hoc.net> References: <4553B1B0.5010700@gmail.com> <4553EA1D.6030908@hoc.net> Message-ID: <45542D4B.8000407@iam.uni-stuttgart.de> Christian Kristukat wrote: > Robert Kern wrote: > >> Jordan Dawe wrote: >> >>> I've been looking at scipy's interpolation routines and I can't make >>> heads or tails of them. I just want to do a spline interp1d like matlab >>> does. Is there any way to do this? >>> >> I don't know exactly what features you want from Matlab's interp1d, but you >> probably want scipy.interpolate.UnivariateSpline. >> > > I just noticed that UnivariateSpline.derivatives() seems to be broken: > > import numpy as N > from scipy.interpolate import UnivariateSpline as spline > x=N.arange(10,dtype=float) > y=x**2 > a=N.linspace(2,5,100) > sp=spline(x,y) > b=sp(a) > der=sp.derivatives(a) > > fails with: > > 0-th dimension must be fixed to 8 but got 4 > --------------------------------------------------------------------------- > dfitpack.error Traceback (most recent call last) > > /mnt/home/ck/ > > /usr/local/lib/python2.4/site-packages/scipy/interpolate/fitpack2.py in > derivatives(self, x) > 179 def derivatives(self, x): > 180 """ Return all derivatives of the spline at the point x.""" > --> 181 d,ier = dfitpack.spalde(*(self._eval_args+(x,))) > 182 assert ier==0,`ier` > 183 return d > > error: failed in converting 2nd argument `c' of dfitpack.spalde to C/Fortran array > > with numpy 1.0rc2, scipy 0.5.1 on linux > > Christian > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > Works fine for me. >>> der array([ 4.00000000e+00, 4.00000000e+00, 2.00000000e+00, -1.92438658e-15]) >>> N.__version__ '1.0.1.dev3432' >>> scipy.__version__ '0.5.2.dev2314' Nils From ganesh.iitm at gmail.com Fri Nov 10 03:08:36 2006 From: ganesh.iitm at gmail.com (Ganesh V) Date: Fri, 10 Nov 2006 13:38:36 +0530 Subject: [SciPy-user] Tridiagonal solver extensive use In-Reply-To: References: Message-ID: Hi! I would like to add this question to my set of other questions !! The Scipy tutorial by Travis Oliphiant says that '.. if you dig deep enough, you can have access to these raw ATLAS LAPACK BLAS libraries at even more speed'.. Can somebody give me pointers on where to dig ?? And many thanks Archibald.. I got atleast the main part of the code (the tridiagonal solver!!) working in Python !! It runs fast enough for me I guess !! I am greedy for more :) !! bye !! ganesh -- Ganesh V Undergraduate student, Department of Aerospace Engineering, IIT Madras, Chennai-36. My homepage --> http://www.ae.iitm.ac.in/~ae03b007 My blog --> http://gantech.wordpress.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From ckkart at hoc.net Fri Nov 10 07:07:32 2006 From: ckkart at hoc.net (Christian Kristukat) Date: Fri, 10 Nov 2006 21:07:32 +0900 Subject: [SciPy-user] spline interpolation In-Reply-To: <45542D4B.8000407@iam.uni-stuttgart.de> References: <4553B1B0.5010700@gmail.com> <4553EA1D.6030908@hoc.net> <45542D4B.8000407@iam.uni-stuttgart.de> Message-ID: <45546B84.2090000@hoc.net> Nils Wagner wrote: > Christian Kristukat wrote: >> Robert Kern wrote: >> >>> Jordan Dawe wrote: >>> >>>> I've been looking at scipy's interpolation routines and I can't make >>>> heads or tails of them. I just want to do a spline interp1d like matlab >>>> does. Is there any way to do this? >>>> >>> I don't know exactly what features you want from Matlab's interp1d, but you >>> probably want scipy.interpolate.UnivariateSpline. >>> >> I just noticed that UnivariateSpline.derivatives() seems to be broken: >> >> import numpy as N >> from scipy.interpolate import UnivariateSpline as spline >> x=N.arange(10,dtype=float) >> y=x**2 >> a=N.linspace(2,5,100) >> sp=spline(x,y) >> b=sp(a) >> der=sp.derivatives(a) >> >> fails with: >> >> 0-th dimension must be fixed to 8 but got 4 >> --------------------------------------------------------------------------- >> dfitpack.error Traceback (most recent call last) >> >> /mnt/home/ck/ >> >> /usr/local/lib/python2.4/site-packages/scipy/interpolate/fitpack2.py in >> derivatives(self, x) >> 179 def derivatives(self, x): >> 180 """ Return all derivatives of the spline at the point x.""" >> --> 181 d,ier = dfitpack.spalde(*(self._eval_args+(x,))) >> 182 assert ier==0,`ier` >> 183 return d >> >> error: failed in converting 2nd argument `c' of dfitpack.spalde to C/Fortran array >> >> with numpy 1.0rc2, scipy 0.5.1 on linux >> >> Christian >> >> >> _______________________________________________ >> SciPy-user mailing list >> SciPy-user at scipy.org >> http://projects.scipy.org/mailman/listinfo/scipy-user >> > Works fine for me. > >>>> der > array([ 4.00000000e+00, 4.00000000e+00, 2.00000000e+00, > -1.92438658e-15]) >>>> N.__version__ > '1.0.1.dev3432' >>>> scipy.__version__ > '0.5.2.dev2314' Thanks for trying. But I don't understand the result. Why does it have 4 elements, when b had 100? What is meant by 'return all derivatives'? Is that 'all derivatives until the derivative is zero'? Christian From nwagner at iam.uni-stuttgart.de Fri Nov 10 07:55:05 2006 From: nwagner at iam.uni-stuttgart.de (Nils Wagner) Date: Fri, 10 Nov 2006 13:55:05 +0100 Subject: [SciPy-user] spline interpolation In-Reply-To: <45546B84.2090000@hoc.net> References: <4553B1B0.5010700@gmail.com> <4553EA1D.6030908@hoc.net> <45542D4B.8000407@iam.uni-stuttgart.de> <45546B84.2090000@hoc.net> Message-ID: <455476A9.50201@iam.uni-stuttgart.de> Christian Kristukat wrote: > Nils Wagner wrote: > >> Christian Kristukat wrote: >> >>> Robert Kern wrote: >>> >>> >>>> Jordan Dawe wrote: >>>> >>>> >>>>> I've been looking at scipy's interpolation routines and I can't make >>>>> heads or tails of them. I just want to do a spline interp1d like matlab >>>>> does. Is there any way to do this? >>>>> >>>>> >>>> I don't know exactly what features you want from Matlab's interp1d, but you >>>> probably want scipy.interpolate.UnivariateSpline. >>>> >>>> >>> I just noticed that UnivariateSpline.derivatives() seems to be broken: >>> >>> import numpy as N >>> from scipy.interpolate import UnivariateSpline as spline >>> x=N.arange(10,dtype=float) >>> y=x**2 >>> a=N.linspace(2,5,100) >>> sp=spline(x,y) >>> b=sp(a) >>> der=sp.derivatives(a) >>> >>> fails with: >>> >>> 0-th dimension must be fixed to 8 but got 4 >>> --------------------------------------------------------------------------- >>> dfitpack.error Traceback (most recent call last) >>> >>> /mnt/home/ck/ >>> >>> /usr/local/lib/python2.4/site-packages/scipy/interpolate/fitpack2.py in >>> derivatives(self, x) >>> 179 def derivatives(self, x): >>> 180 """ Return all derivatives of the spline at the point x.""" >>> --> 181 d,ier = dfitpack.spalde(*(self._eval_args+(x,))) >>> 182 assert ier==0,`ier` >>> 183 return d >>> >>> error: failed in converting 2nd argument `c' of dfitpack.spalde to C/Fortran array >>> >>> with numpy 1.0rc2, scipy 0.5.1 on linux >>> >>> Christian >>> >>> >>> _______________________________________________ >>> SciPy-user mailing list >>> SciPy-user at scipy.org >>> http://projects.scipy.org/mailman/listinfo/scipy-user >>> >>> >> Works fine for me. >> >> >>>>> der >>>>> >> array([ 4.00000000e+00, 4.00000000e+00, 2.00000000e+00, >> -1.92438658e-15]) >> >>>>> N.__version__ >>>>> >> '1.0.1.dev3432' >> >>>>> scipy.__version__ >>>>> >> '0.5.2.dev2314' >> > > Thanks for trying. But I don't understand the result. Why does it have 4 > elements, when b had 100? What is meant by 'return all derivatives'? Is that > 'all derivatives until the derivative is zero'? > > Christian > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > If you use sp=spline(x,y,k=2) you obtain >>> der array([ 4., 4., 2.]) From ckkart at hoc.net Fri Nov 10 08:39:05 2006 From: ckkart at hoc.net (Christian Kristukat) Date: Fri, 10 Nov 2006 22:39:05 +0900 Subject: [SciPy-user] spline interpolation In-Reply-To: <455476A9.50201@iam.uni-stuttgart.de> References: <4553B1B0.5010700@gmail.com> <4553EA1D.6030908@hoc.net> <45542D4B.8000407@iam.uni-stuttgart.de> <45546B84.2090000@hoc.net> <455476A9.50201@iam.uni-stuttgart.de> Message-ID: <455480F9.9060901@hoc.net> Nils Wagner wrote: > Christian Kristukat wrote: >> Nils Wagner wrote: >> >>> Christian Kristukat wrote: >>> >>>> Robert Kern wrote: >>>> >>>> >>>>> Jordan Dawe wrote: >>>>> >>>>> >>>>>> I've been looking at scipy's interpolation routines and I can't make >>>>>> heads or tails of them. I just want to do a spline interp1d like matlab >>>>>> does. Is there any way to do this? >>>>>> >>>>>> >>>>> I don't know exactly what features you want from Matlab's interp1d, but you >>>>> probably want scipy.interpolate.UnivariateSpline. >>>>> >>>>> >>>> I just noticed that UnivariateSpline.derivatives() seems to be broken: >>>> >>>> import numpy as N >>>> from scipy.interpolate import UnivariateSpline as spline >>>> x=N.arange(10,dtype=float) >>>> y=x**2 >>>> a=N.linspace(2,5,100) >>>> sp=spline(x,y) >>>> b=sp(a) >>>> der=sp.derivatives(a) >>>> >>>> fails with: >>>> >>>> 0-th dimension must be fixed to 8 but got 4 >>>> --------------------------------------------------------------------------- >>>> dfitpack.error Traceback (most recent call last) >>>> >>>> /mnt/home/ck/ >>>> >>>> /usr/local/lib/python2.4/site-packages/scipy/interpolate/fitpack2.py in >>>> derivatives(self, x) >>>> 179 def derivatives(self, x): >>>> 180 """ Return all derivatives of the spline at the point x.""" >>>> --> 181 d,ier = dfitpack.spalde(*(self._eval_args+(x,))) >>>> 182 assert ier==0,`ier` >>>> 183 return d >>>> >>>> error: failed in converting 2nd argument `c' of dfitpack.spalde to C/Fortran array >>>> >>>> with numpy 1.0rc2, scipy 0.5.1 on linux >>>> >>>> Christian >>>> >>>> >>>> _______________________________________________ >>>> SciPy-user mailing list >>>> SciPy-user at scipy.org >>>> http://projects.scipy.org/mailman/listinfo/scipy-user >>>> >>>> >>> Works fine for me. >>> >>> >>>>>> der >>>>>> >>> array([ 4.00000000e+00, 4.00000000e+00, 2.00000000e+00, >>> -1.92438658e-15]) >>> >>>>>> N.__version__ >>>>>> >>> '1.0.1.dev3432' >>> >>>>>> scipy.__version__ >>>>>> >>> '0.5.2.dev2314' >>> >> Thanks for trying. But I don't understand the result. Why does it have 4 >> elements, when b had 100? What is meant by 'return all derivatives'? Is that >> 'all derivatives until the derivative is zero'? >> >> Christian >> _______________________________________________ >> SciPy-user mailing list >> SciPy-user at scipy.org >> http://projects.scipy.org/mailman/listinfo/scipy-user >> > > > If you use sp=spline(x,y,k=2) > you obtain >>>> der > array([ 4., 4., 2.]) So this seems to be the 0th, 1st and 2nd derivative. Not very intuitive, nor the fact, that it silently considers only the first element of the array I passed to derivatives() and ignores the rest. Christian From anand at soe.ucsc.edu Fri Nov 10 12:21:38 2006 From: anand at soe.ucsc.edu (Anand Patil) Date: Fri, 10 Nov 2006 09:21:38 -0800 Subject: [SciPy-user] Weave.inline type conversion issue? Message-ID: <4554B522.9020004@cse.ucsc.edu> Hi everyone, the following Python code: expr=""" int i1; for(i1 = 0; i1 < N; i1++){ //Nothing yet } """ weave.inline(expr, ['N'],type_converters = converters.blitz) produces: /Users/anand/.python24_compiled/sc_54201e8f7bd668d2944eb33b14c9fe9e0.cpp: In function 'PyObject* compiled_func(PyObject*, PyObject*)': /Users/anand/.python24_compiled/sc_54201e8f7bd668d2944eb33b14c9fe9e0.cpp:667: error: ambiguous overload for 'operator<' in 'i1 < N' /Users/anand/.python24_compiled/sc_54201e8f7bd668d2944eb33b14c9fe9e0.cpp:667: note: candidates are: operator<(int, int) /Users/anand/.python24_compiled/sc_54201e8f7bd668d2944eb33b14c9fe9e0.cpp:667: note: operator<(int, float) /Users/anand/.python24_compiled/sc_54201e8f7bd668d2944eb33b14c9fe9e0.cpp:667: note: operator<(int, double) /Users/anand/.python24_compiled/sc_54201e8f7bd668d2944eb33b14c9fe9e0.cpp: In function 'PyObject* compiled_func(PyObject*, PyObject*)': /Users/anand/.python24_compiled/sc_54201e8f7bd668d2944eb33b14c9fe9e0.cpp:667: error: ambiguous overload for 'operator<' in 'i1 < N' /Users/anand/.python24_compiled/sc_54201e8f7bd668d2944eb33b14c9fe9e0.cpp:667: note: candidates are: operator<(int, int) /Users/anand/.python24_compiled/sc_54201e8f7bd668d2944eb33b14c9fe9e0.cpp:667: note: operator<(int, float) /Users/anand/.python24_compiled/sc_54201e8f7bd668d2944eb33b14c9fe9e0.cpp:667: note: operator<(int, double) lipo: can't figure out the architecture type of: /var/tmp//ccuaUHvY.out /Users/anand/.python24_compiled/sc_54201e8f7bd668d2944eb33b14c9fe9e0.cpp: In function 'PyObject* compiled_func(PyObject*, PyObject*)': /Users/anand/.python24_compiled/sc_54201e8f7bd668d2944eb33b14c9fe9e0.cpp:667: error: ambiguous overload for 'operator<' in 'i1 < N' /Users/anand/.python24_compiled/sc_54201e8f7bd668d2944eb33b14c9fe9e0.cpp:667: note: candidates are: operator<(int, int) /Users/anand/.python24_compiled/sc_54201e8f7bd668d2944eb33b14c9fe9e0.cpp:667: note: operator<(int, float) /Users/anand/.python24_compiled/sc_54201e8f7bd668d2944eb33b14c9fe9e0.cpp:667: note: operator<(int, double) /Users/anand/.python24_compiled/sc_54201e8f7bd668d2944eb33b14c9fe9e0.cpp: In function 'PyObject* compiled_func(PyObject*, PyObject*)': /Users/anand/.python24_compiled/sc_54201e8f7bd668d2944eb33b14c9fe9e0.cpp:667: error: ambiguous overload for 'operator<' in 'i1 < N' /Users/anand/.python24_compiled/sc_54201e8f7bd668d2944eb33b14c9fe9e0.cpp:667: note: candidates are: operator<(int, int) /Users/anand/.python24_compiled/sc_54201e8f7bd668d2944eb33b14c9fe9e0.cpp:667: note: operator<(int, float) /Users/anand/.python24_compiled/sc_54201e8f7bd668d2944eb33b14c9fe9e0.cpp:667: note: operator<(int, double) lipo: can't figure out the architecture type of: /var/tmp//ccuaUHvY.out --------------------------------------------------------------------------- scipy.weave.build_tools.CompileError Traceback (most recent call last) This is where the traceback leaves my code: --> 201 weave.inline(expr, ['N'],type_converters = converters.blitz) /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/weave/inline_tools.py in inline(code, arg_names, local_dict, global_dict, force, compiler, verbose, support_code, headers, customize, type_converters, auto_downcast, newarr_converter, **kw) 336 customize=customize, 337 type_converters = type_converters, --> 338 auto_downcast = auto_downcast, 339 **kw) 340 /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/weave/inline_tools.py in compile_function(code, arg_names, local_dict, global_dict, module_dir, compiler, verbose, support_code, headers, customize, type_converters, auto_downcast, **kw) 445 # setting. All input keywords are passed through to distutils 446 mod.compile(location=storage_dir,compiler=compiler, --> 447 verbose=verbose, **kw) 448 449 # import the module and return the function. Make sure /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/weave/ext_tools.py in compile(self, location, compiler, verbose, **kw) 363 success = build_tools.build_extension(file, temp_dir = temp, 364 compiler_name = compiler, --> 365 verbose = verbose, **kw) 366 if not success: 367 raise SystemError, 'Compilation failed' /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/weave/build_tools.py in build_extension(module_path, compiler_name, build_dir, temp_dir, verbose, **kw) 267 environ = copy.deepcopy(os.environ) 268 try: --> 269 setup(name = module_name, ext_modules = [ext],verbose=verb) 270 finally: 271 # restore state /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/numpy/distutils/core.py in setup(**attr) 172 new_attr['headers'] = [] 173 --> 174 return old_setup(**new_attr) 175 176 def _check_append_library(libraries, item): /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/distutils/core.py in setup(**attrs) 164 raise 165 else: --> 166 raise SystemExit, "error: " + str(msg) 167 168 return dist CompileError: error: Command "c++ -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -I/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/weave -I/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/weave/scxx -I/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4 -c /Users/anand/.python24_compiled/sc_54201e8f7bd668d2944eb33b14c9fe9e0.cpp -o /tmp/anand/python24_intermediate/compiler_af5eb7f7d8bab69813921c69a7e13082/Users/anand/.python24_compiled/sc_54201e8f7bd668d2944eb33b14c9fe9e0.o" failed with exit status 1 on my PowerBook G4, running Tiger and MacPython 2.4. What am I doing wrong? Thanks in advance, Anand From sbasu at physics.cornell.edu Sat Nov 11 20:55:56 2006 From: sbasu at physics.cornell.edu (Sourish Basu) Date: Sat, 11 Nov 2006 20:55:56 -0500 Subject: [SciPy-user] Problem importing scipy compiled with intel compiler (/opt/intel/fc/9.0/lib/libifcore.so.5: undefined symbol: __subq) Message-ID: <45567F2C.7040408@physics.cornell.edu> I compiled both numpy and scipy with intel compilers on a Xeon (4 cpu-s) which has ATLAS. It appears that numpy works fine, but scipy does not :( In IPython, I see the following In [1]: import numpy.linalg In [2]: import numpy.numarray.random_array In [3]: A = numpy.numarray.random_array.standard_normal((5,5)) In [4]: B = A + numpy.transpose(A) In [5]: numpy.linalg.eigvals(B) Out[5]: array([ 4.92466336, -0.25626135, -3.83930089, -2.68608889, -3.19828771]) In [6]: import scipy In [7]: import scipy.linalg --------------------------------------------------------------------------- Traceback (most recent call last) /home/sourish/ in () /opt/pub/lib/python2.5/site-packages/scipy/linalg/__init__.py in () 6 from linalg_version import linalg_version as __version__ 7 ----> 8 from basic import * 9 from decomp import * 10 from matfuncs import * /opt/pub/lib/python2.5/site-packages/scipy/linalg/basic.py in () 15 #from blas import get_blas_funcs 16 from flinalg import get_flinalg_funcs ---> 17 from lapack import get_lapack_funcs 18 from numpy import asarray,zeros,sum,newaxis,greater_equal,subtract,arange,\ 19 conjugate,ravel,r_,mgrid,take,ones,dot,transpose,sqrt,add,real /opt/pub/lib/python2.5/site-packages/scipy/linalg/lapack.py in () 15 import numpy 16 ---> 17 from scipy.linalg import flapack 18 from scipy.linalg import clapack 19 _use_force_clapack = 1 : /opt/intel/fc/9.0/lib/libifcore.so.5: undefined symbol: __subq So I can see that the linear algebra routines in numpy work fine, but not the ones in scipy. I compiled/installed numpy with ATLAS and Intel MKL libraries, defined in site.cfg, and I compiled/installed scipy with the command python setup.py config_fc --fcompiler=intel config --compiler=intel config --cc=/opt/intel_cc_80/bin/icc install I don't really understand what the error message means and how to fix it. Google wasn't much of a help. Can anyone help? Thanks, Sourish P.S. - importing scipy.optimize, scipy.interpolate, or scipy.integrate also gives the same error. From iain at day-online.org.uk.invalid Sun Nov 12 15:55:07 2006 From: iain at day-online.org.uk.invalid (Iain Day) Date: Sun, 12 Nov 2006 20:55:07 +0000 Subject: [SciPy-user] Puzzle with Monte Carlo error estimation Message-ID: Hi, I've got a puzzle doing some Monte Carlo stuff to get standard deviations for some fitting parameters I've calculated. The code is below. The problem is that p1 is changing each time optimize.leastsq is called in the loop and I can't see why. Any ideas? Thanks, Iain from scipy import * pts = linspace(0, 10000.0, 1000) expdata = 3500.0 * (1.0 - exp(-pts / 565.0)) + 1870.0 + rand(len(pts)) p0 = [4000.0, 600.0, 2000.0] fix0 = [] num_mc = 1000 # This is the number of MC runs p1, success = optimize.leastsq(residuals, p0, args=(fix0, pts, expdata)) sigma = std(residuals(p0, fix0, pts, expdata)) mocked_para = zeros((num_mc, len(p0)), dtype=float) for i in range(num_mc): mock_data = buildup(p1, fix0, time_points) + sigma * rand(len(time_points)) p2, success = optimize.leastsq(residuals, p1, args=(fix0, ts, expdata)) mocked_parameters[i] = p2 mc_errors = std(mocked_parameters, axis=0) def buildup(varpars, fixpars, time): amplitude, tau, offset = varpars buildup = amplitude * (1.0 - exp(- time / tau)) + offset return buildup def residuals(varpars, fixpars, time, expdata): err = expdata - buildup(varpars, fixpars, time) return err From iain at day-online.org.uk.invalid Sun Nov 12 16:03:06 2006 From: iain at day-online.org.uk.invalid (Iain Day) Date: Sun, 12 Nov 2006 21:03:06 +0000 Subject: [SciPy-user] Puzzle with Monte Carlo error estimation In-Reply-To: References: Message-ID: Iain Day wrote: > Hi, > > I've got a puzzle doing some Monte Carlo stuff to get standard > deviations for some fitting parameters I've calculated. The code is > below. The problem is that p1 is changing each time optimize.leastsq is > called in the loop and I can't see why. Any ideas? > > Thanks, > > Iain Sorry, there is a typo here: > for i in range(num_mc): > mock_data = buildup(p1, fix0, time_points) + sigma * > rand(len(time_points)) > p2, success = optimize.leastsq(residuals, p1, args=(fix0, ts, expdata)) replace line above with p2, success = optimize.leastsq(residuals, p1, args=(fix0, pts, mock_data)) > mocked_parameters[i] = p2 > > mc_errors = std(mocked_parameters, axis=0) > > > def buildup(varpars, fixpars, time): > amplitude, tau, offset = varpars > buildup = amplitude * (1.0 - exp(- time / tau)) + offset > return buildup > > def residuals(varpars, fixpars, time, expdata): > err = expdata - buildup(varpars, fixpars, time) > return err From iain at day-online.org.uk.invalid Sun Nov 12 16:52:42 2006 From: iain at day-online.org.uk.invalid (Iain Day) Date: Sun, 12 Nov 2006 21:52:42 +0000 Subject: [SciPy-user] Puzzle with Monte Carlo error estimation In-Reply-To: References: Message-ID: Iain Day wrote: > Hi, > > I've got a puzzle doing some Monte Carlo stuff to get standard > deviations for some fitting parameters I've calculated. The code is > below. The problem is that p1 is changing each time optimize.leastsq is > called in the loop and I can't see why. Any ideas? > > Thanks, > > Iain > > > > from scipy import * > > pts = linspace(0, 10000.0, 1000) > expdata = 3500.0 * (1.0 - exp(-pts / 565.0)) + 1870.0 + rand(len(pts)) > p0 = [4000.0, 600.0, 2000.0] > fix0 = [] > num_mc = 1000 # This is the number of MC runs > > p1, success = optimize.leastsq(residuals, p0, args=(fix0, pts, expdata)) > > sigma = std(residuals(p0, fix0, pts, expdata)) > mocked_para = zeros((num_mc, len(p0)), dtype=float) > > for i in range(num_mc): > mock_data = buildup(p1, fix0, time_points) + sigma * > rand(len(time_points)) > p2, success = optimize.leastsq(residuals, p1, args=(fix0, ts, expdata)) > mocked_parameters[i] = p2 > > mc_errors = std(mocked_parameters, axis=0) > > > def buildup(varpars, fixpars, time): > amplitude, tau, offset = varpars > buildup = amplitude * (1.0 - exp(- time / tau)) + offset > return buildup > > def residuals(varpars, fixpars, time, expdata): > err = expdata - buildup(varpars, fixpars, time) > return err Okay, sorry to follow up my own post, but I've figured something out, and I'm not sure I understand it fully. When I create p0, I create it as , and optimize.leastsq returns p1 as . If I pass p0 as then it gets changed to the best fit parameters, whereas if it is it doesn't. So, the fix for my code is to have: p1 = list(p1) just before the Monte Carlo run. Have I missed (or misunderstood) something obvious here? Thanks, Iain From josegomez at gmx.net Mon Nov 13 05:59:48 2006 From: josegomez at gmx.net (Jose Gomez) Date: Mon, 13 Nov 2006 10:59:48 +0000 (UTC) Subject: [SciPy-user] Interpolating weather data Message-ID: Hi! Not entirely related to scipy, but I thought that maybe folks in the list might know about a scipy-callable (or f2py-able) library for interpolating weather data. The methods available in scipy are not useful for temperature or precipitation. Any pointers appreciated! Many thanks, Jose From pgmdevlist at gmail.com Mon Nov 13 10:39:58 2006 From: pgmdevlist at gmail.com (Pierre GM) Date: Mon, 13 Nov 2006 10:39:58 -0500 Subject: [SciPy-user] Interpolating weather data In-Reply-To: References: Message-ID: <200611131039.58339.pgmdevlist@gmail.com> On Monday 13 November 2006 05:59, Jose Gomez wrote: > Hi! > Not entirely related to scipy, but I thought that maybe folks in the list > might know about a scipy-callable (or f2py-able) library for interpolating > weather data. The methods available in scipy are not useful for temperature > or precipitation. Can you be a bit more specific ? What do you need ? Why is scipy not useful for your problem ? I work regularly with temperatures and precips myself, and would be quite happy to help if I could. From David.L.Goldsmith at noaa.gov Mon Nov 13 15:02:33 2006 From: David.L.Goldsmith at noaa.gov (David Goldsmith) Date: Mon, 13 Nov 2006 12:02:33 -0800 Subject: [SciPy-user] Import error trying to import scipy.integrate Message-ID: <4558CF59.9080702@noaa.gov> Hi! I'm on a Mac running OSX 10.4.8, Python 2.4.3 (#1, Apr 7 2006, 10:54:33) [GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin). I downloaded the zipped SciPy package installer from http://pythonmac.org/packages/py24-fat/index.html, unpacked and installed seemingly without incident and I can import scipy fine. However, when I try to import integrate (both with the package loader and with "from scipy import integrate as SI") I get: Traceback (most recent call last): File "", line 1, in ? File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/integrate/__init__.py", line 9, in ? from quadrature import * File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/integrate/quadrature.py", line 8, in ? from scipy.special.orthogonal import p_roots File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/special/__init__.py", line 8, in ? from basic import * File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/special/basic.py", line 8, in ? from _cephes import * ImportError: Failure linking new module: /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/special/_cephes.so: Library not loaded: /usr/local/lib/libg2c.0.dylib Referenced from: /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/special/_cephes.so Reason: image not found I've looked for libg2c.0.dylib in my /usr/local/lib/ and elsewhere (using locate) and sure enough, I don't have it. Running the tests, I get two errors, one of which is the more or less the same: ERROR: check_integer (scipy.io.tests.test_array_import.test_read_array) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/io/tests/test_array_import.py", line 55, in check_integer from scipy import stats File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/stats/__init__.py", line 7, in ? from stats import * File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/stats/stats.py", line 191, in ? import scipy.special as special File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/special/__init__.py", line 8, in ? from basic import * File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/special/basic.py", line 8, in ? from _cephes import * ImportError: Failure linking new module: /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/special/_cephes.so: Library not loaded: /usr/local/lib/libg2c.0.dylib Referenced from: /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/special/_cephes.so Reason: image not found (For the record, the other error is: ERROR: check_simple_todense (scipy.io.tests.test_mmio.test_mmio_coordinate) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/io/tests/test_mmio.py", line 151, in check_simple_todense b = mmread(fn).todense() AttributeError: 'numpy.ndarray' object has no attribute 'todense' numpy version is 1.0b5) Oh, I think I just figured it out: as per the COMPILER NOTES in INSTALL.txt, my OSX gcc compiler is (and I believe was) set to 3.3: gcc --version gcc (GCC) 3.3 20030304 (Apple Computer, Inc. build 1640) because: "SciPy is not fully compatible with gcc 4.0.x on OS X" but, I just realized, the Python I'm running appears to have been built using gcc 4.0.1 (see above). I bet this is the problem, isn't it? Anyone have a Mac binary of Python built w/ gcc 3.3, or, preferably, when is SciPy expected to be fully gcc 4 compatible on OSX? Thanks! DG From fullung at gmail.com Mon Nov 13 20:32:44 2006 From: fullung at gmail.com (Albert Strasheim) Date: Tue, 14 Nov 2006 03:32:44 +0200 Subject: [SciPy-user] Problem importing scipy compiled with intel compiler (/opt/intel/fc/9.0/lib/libifcore.so.5: undefined symbol: __subq) References: <45567F2C.7040408@physics.cornell.edu> Message-ID: <005f01c7078c$c8a71f00$0a83a8c0@ratbert> Hey Sourish I managed to build a working Python + NumPy + SciPy + Intel CC + Intel FC + Intel MKL configuration over the weekend. I built everything in my home directory under opt since I don't have root access to the machines I'm using. The main trick was to set LD_RUN_PATH before I built anything (including Python itself) so that the linker included the paths to the Intel libraries in all the executables I built. If I built Python without these paths, I had unresolved symbols turning up as the NumPy test suite was running. If you don't want to go this route (and use LD_LIBRARY_PATH instead), you might check that you included the right libraries for MKL in library_dirs in site.cfg. I think one wants mkl, vml. Check the README that comes with MKL for details on these libraries. I recommend the LD_RUN_PATH way -- I think one can run into problems when you try to invoke NumPy scripts through non-login shells if you need LD_LIBRARY_PATH to find your libraries. You might also want to tune the Intel CC flags. I've attempted to document most of this stuff here: http://www.scipy.org/Installing_SciPy/Linux#head-7ce43956a69ec51c6f2cedd894a4715d5bfff974 I still have to sort out the Intel FC flags -- the defaults currently in numpy.distutils give some warnings with Intel FC 9.1. I see it's also trying to link in the 32-bit and 64-bit LAPACK libraries. Don't know if this is right. Anyway, good luck. ldd is your friend to check that the various NumPy and SciPy binary modules are linked against the right Intel libraries and that they can be found in your environment. Cheers, Albert P.S. You'll probably see a few NumPy test failures in test_ufunclike.py due to sign-of-NaN issues. I also see a few test failures in the weave stuff. Here's a snippet to run all the tests: python -c "import numpy as N; import scipy as S; [N.testing.NumpyTest(x).testall(level=4,verbosity=9999) for x in [N,S]]" For NumPy: Ran 666 tests in 3.889s For SciPy: Ran 1723 tests in 8.527s, FAILED (failures=2) ----- Original Message ----- From: "Sourish Basu" To: Sent: Sunday, November 12, 2006 3:55 AM Subject: [SciPy-user] Problem importing scipy compiled with intel compiler (/opt/intel/fc/9.0/lib/libifcore.so.5: undefined symbol: __subq) >I compiled both numpy and scipy with intel compilers on a Xeon (4 cpu-s) > which has ATLAS. It appears that numpy works fine, but scipy does not :( > In IPython, I see the following > From sbasu at physics.cornell.edu Mon Nov 13 21:12:55 2006 From: sbasu at physics.cornell.edu (Sourish Basu) Date: Mon, 13 Nov 2006 21:12:55 -0500 Subject: [SciPy-user] Problem importing scipy compiled with intel compiler: New Problem :( In-Reply-To: <005f01c7078c$c8a71f00$0a83a8c0@ratbert> References: <45567F2C.7040408@physics.cornell.edu> <005f01c7078c$c8a71f00$0a83a8c0@ratbert> Message-ID: <45592627.5090301@physics.cornell.edu> An HTML attachment was scrubbed... URL: From sbasu at physics.cornell.edu Tue Nov 14 00:05:17 2006 From: sbasu at physics.cornell.edu (Sourish Basu) Date: Tue, 14 Nov 2006 00:05:17 -0500 Subject: [SciPy-user] Problem importing scipy compiled with intel compiler: New Problem :( In-Reply-To: <45592627.5090301@physics.cornell.edu> References: <45567F2C.7040408@physics.cornell.edu> <005f01c7078c$c8a71f00$0a83a8c0@ratbert> <45592627.5090301@physics.cornell.edu> Message-ID: <45594E8D.2050007@physics.cornell.edu> Hi all, I'm following up to my own post for archival purposes. It turns out that the compiler was (for some reason) not linking to the correct libgcc. Doing this: [sourish at nanolab Sources]$ nm /lib/ssa/libgcc_s.so.1 | grep fixunsdfdi 00001a60 T __fixunsdfdi [sourish at nanolab Sources]$ and also doing an "ldd" on _lbfgsb.so I realized that it wasn't linking to libgcc. So I changed my install command to: python setup.py build_clib --fcompiler=intel build_ext --fcompiler=intel -L/lib/ssa -lg2c -lgcc_s install and everything is fine and dandy now! -Sourish Sourish Basu wrote: > > > In [1]: import scipy > > In [2]: import scipy.linalg > > In [3]: import scipy.interpolate > > In [4]: import scipy.integrate > > In [5]: import scipy.optimize > --------------------------------------------------------------------------- > Traceback (most recent call > last) > > /home/sourish/ in () > > /opt/pub/lib/python2.5/site-packages/scipy/optimize/__init__.py in > () > 9 from zeros import * > 10 from anneal import * > ---> 11 from lbfgsb import fmin_l_bfgs_b > 12 from tnc import fmin_tnc > 13 from cobyla import fmin_cobyla > > /opt/pub/lib/python2.5/site-packages/scipy/optimize/lbfgsb.py in > () > 28 > 29 from numpy import zeros, float64, array, int32 > ---> 30 import _lbfgsb > 31 import optimize > 32 > > : > /opt/pub/lib/python2.5/site-packages/scipy/optimize/_lbfgsb.so: > undefined symbol: __fixunsdfdi > > From David.L.Goldsmith at noaa.gov Tue Nov 14 02:15:17 2006 From: David.L.Goldsmith at noaa.gov (David Goldsmith) Date: Mon, 13 Nov 2006 23:15:17 -0800 Subject: [SciPy-user] [Fwd: Re: [Pythonmac-SIG] In need of an OS 10.4.8-compatible Universal binary built w/ gcc 3.3 (NOT 4.0)] Message-ID: <45596D05.40104@noaa.gov> David Goldsmith wrote: > > I'm sorry, I guess I need to be walked through this: the install > > instructions are to issue the command > > > > python setup.py install > > > > so I tried > > > > python setup.py install --fcompiler=gnu95 > > > > yielding > > > > error: option --fcompiler not recognized. > > $ python setup.py build_src build_clib --fcompiler=gnu95 build_ext --fcompiler=gnu95 build > $ python setup.py install > > Let's carry on any further discussion on the scipy list. Agreed. (People should be able to find this info in an archive.) DG -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From David.L.Goldsmith at noaa.gov Tue Nov 14 02:20:22 2006 From: David.L.Goldsmith at noaa.gov (David Goldsmith) Date: Mon, 13 Nov 2006 23:20:22 -0800 Subject: [SciPy-user] [Pythonmac-SIG] In need of an OS 10.4.8-compatible Universal binary built w/ gcc 3.3 (NOT 4.0) In-Reply-To: References: <4558E42D.8090200@noaa.gov> <4472C533-D982-48A1-9E98-03062CD1F8BC@mac.com> <45596C01.3020000@noaa.gov> Message-ID: <45596E36.1070906@noaa.gov> Ronald Oussoren wrote: > > On 14 Nov 2006, at 8:10 AM, David Goldsmith wrote: > >> Ronald Oussoren wrote: >>> >>> On 13 Nov 2006, at 11:59 PM, Robert Kern wrote: >>> >>>> David L Goldsmith wrote: >>>>> Hi! I'm experiencing a problem with scipy; its install notes say >>>>> that it is not yet fully compatible with OSX and further say that >>>>> in OSX >>>>> one should ensure that one's gcc selection is set to 3.3. Mine >>>>> is, but >>>>> I noticed that the Universal build Python binary I downloaded and am >>>>> using was built w/ gcc 4.0.1. Accordingly, I suspect this might >>>>> be the >>>>> basis of my problem - any idea where I might obtain an OSX-compatible >>>>> Python built w/ gcc 3.3? Thanks! >>>> >>>> You can't do it. Universal binary capability was only added to gcc >>>> 4.0. >>>> >>>> You are looking at somewhat old instructions. While there are still >>>> some >>>> problems with gfortran (which only supports gcc 4.0 rather than g77 >>>> with only >>>> supports gcc 3.x), they are few and minor. >>>> >>>> Install a gfortran binary from this page: >>>> >>>> http://hpc.sourceforge.net >>>> >>>> Then build scipy using --fcompiler=gnu95 >>> >>> And don't forget to reset your gcc selection to 4.x. >> Is there a different way to do this, 'cause when I try: >> >> gcc_select 4, 4.0, or 4.0.1 >> >> I get: >> >> usage: gcc_select [-n] [-force] [2 | 3 | 3.x] [-h | --help] [-v | >> --version] >> [-l | --list] [-root] >> Invalid argument (4.0.1) >> >> Does this mean I now have to download and install gcc 4.0.1? > > What version of Xcode do you use? On my system: I'm not using Xcode, I'm doing all this in a terminal. DG From David.L.Goldsmith at noaa.gov Tue Nov 14 02:25:43 2006 From: David.L.Goldsmith at noaa.gov (David Goldsmith) Date: Mon, 13 Nov 2006 23:25:43 -0800 Subject: [SciPy-user] [Fwd: Re: [Pythonmac-SIG] In need of an OS 10.4.8-compatible Universal binary built w/ gcc 3.3 (NOT 4.0)] In-Reply-To: <45596D05.40104@noaa.gov> References: <45596D05.40104@noaa.gov> Message-ID: <45596F77.8050807@noaa.gov> David Goldsmith wrote: > David Goldsmith wrote: > >>> I'm sorry, I guess I need to be walked through this: the install >>> instructions are to issue the command >>> >>> python setup.py install >>> >>> so I tried >>> >>> python setup.py install --fcompiler=gnu95 >>> >>> yielding >>> >>> error: option --fcompiler not recognized. >>> >> >> > Robert Kern wrote: > >> $ python setup.py build_src build_clib --fcompiler=gnu95 build_ext --fcompiler=gnu95 build >> Result: Lib/integrate/odepack/vode.f:3368: internal compiler error: tree check: expected ssa_name, have var_decl in verify_ssa, at tree-ssa.c:677 Please submit a full bug report, with preprocessed source if appropriate. See for instructions. error: Command "/usr/bin/gfortran -Wall -ffixed-form -fno-second-underscore -fPIC -O3 -funroll-loops -mcpu=7450 -mtune=7450 -c -c Lib/integrate/odepack/vode.f -o build/temp.macosx-10.4-fat-2.4/Lib/integrate/odepack/vode.o" failed with exit status 1 Note: Ronald Oussoren also responded saying that I also need to switch back to gcc 4, but when I try: gcc_select 4.0.1 (or 4.0, or 4) I get: usage: gcc_select [-n] [-force] [2 | 3 | 3.x] [-h | --help] [-v | --version] [-l | --list] [-root] Invalid argument (4.0.1). DG From lists.steve at arachnedesign.net Tue Nov 14 02:36:46 2006 From: lists.steve at arachnedesign.net (Steve Lianoglou) Date: Tue, 14 Nov 2006 02:36:46 -0500 Subject: [SciPy-user] [Pythonmac-SIG] In need of an OS 10.4.8-compatible Universal binary built w/ gcc 3.3 (NOT 4.0) In-Reply-To: <45596E36.1070906@noaa.gov> References: <4558E42D.8090200@noaa.gov> <4472C533-D982-48A1-9E98-03062CD1F8BC@mac.com> <45596C01.3020000@noaa.gov> <45596E36.1070906@noaa.gov> Message-ID: <11822CC5-ED36-4FC8-AD52-11356737A06A@arachnedesign.net> >>> Is there a different way to do this, 'cause when I try: >>> >>> gcc_select 4, 4.0, or 4.0.1 >>> >>> I get: >>> >>> usage: gcc_select [-n] [-force] [2 | 3 | 3.x] [-h | --help] [-v | >>> --version] >>> [-l | --list] [-root] >>> Invalid argument (4.0.1) >>> >>> Does this mean I now have to download and install gcc 4.0.1? >> >> What version of Xcode do you use? On my system: > I'm not using Xcode, I'm doing all this in a terminal. I think he asked about XCode because new versions of XCode install new version of gcc on your system. Getting/using the right gcc is probably the easiest way to get you moving .. the latest version of XCode also installs gcc 4.0.1 -steve From David.L.Goldsmith at noaa.gov Tue Nov 14 10:48:11 2006 From: David.L.Goldsmith at noaa.gov (David Goldsmith) Date: Tue, 14 Nov 2006 07:48:11 -0800 Subject: [SciPy-user] [Pythonmac-SIG] In need of an OS 10.4.8-compatible Universal binary built w/ gcc 3.3 (NOT 4.0) In-Reply-To: <11822CC5-ED36-4FC8-AD52-11356737A06A@arachnedesign.net> References: <4558E42D.8090200@noaa.gov> <4472C533-D982-48A1-9E98-03062CD1F8BC@mac.com> <45596C01.3020000@noaa.gov> <45596E36.1070906@noaa.gov> <11822CC5-ED36-4FC8-AD52-11356737A06A@arachnedesign.net> Message-ID: <4559E53B.808@noaa.gov> Steve Lianoglou wrote: >>>> Does this mean I now have to download and install gcc 4.0.1? >>>> >>> What version of Xcode do you use? On my system: >>> >> I'm not using Xcode, I'm doing all this in a terminal. >> > > I think he asked about XCode because new versions of XCode install > new version of gcc on your system. > > Getting/using the right gcc is probably the easiest way to get you > moving .. the latest version of XCode also installs gcc 4.0.1 > > 1.2 DG From David.L.Goldsmith at noaa.gov Tue Nov 14 10:59:08 2006 From: David.L.Goldsmith at noaa.gov (David L Goldsmith) Date: Tue, 14 Nov 2006 07:59:08 -0800 Subject: [SciPy-user] [Pythonmac-SIG] In need of an OS 10.4.8-compatible Universal binary built w/ gcc 3.3 (NOT 4.0) In-Reply-To: <4559E53B.808@noaa.gov> References: <4558E42D.8090200@noaa.gov> <4472C533-D982-48A1-9E98-03062CD1F8BC@mac.com> <45596C01.3020000@noaa.gov> <45596E36.1070906@noaa.gov> <11822CC5-ED36-4FC8-AD52-11356737A06A@arachnedesign.net> <4559E53B.808@noaa.gov> Message-ID: <4559E7CC.6030407@noaa.gov> David Goldsmith wrote: > Steve Lianoglou wrote: > >>>>> Does this mean I now have to download and install gcc 4.0.1? >>>>> >>>>> >>>> What version of Xcode do you use? On my system: >>>> >>>> >>> I'm not using Xcode, I'm doing all this in a terminal. >>> >>> >> I think he asked about XCode because new versions of XCode install >> new version of gcc on your system. >> >> Getting/using the right gcc is probably the easiest way to get you >> moving .. the latest version of XCode also installs gcc 4.0.1 >> >> >> > 1.2 > > DG > OK, I see Apple's up to 2.4.1 - I'm downloading it now. DG -- ERD/ORR/NOS/NOAA From David.L.Goldsmith at noaa.gov Tue Nov 14 12:48:01 2006 From: David.L.Goldsmith at noaa.gov (David Goldsmith) Date: Tue, 14 Nov 2006 09:48:01 -0800 Subject: [SciPy-user] [Pythonmac-SIG] In need of an OS 10.4.8-compatible Universal binary built w/ gcc 3.3 (NOT 4.0) In-Reply-To: <11822CC5-ED36-4FC8-AD52-11356737A06A@arachnedesign.net> References: <4558E42D.8090200@noaa.gov> <4472C533-D982-48A1-9E98-03062CD1F8BC@mac.com> <45596C01.3020000@noaa.gov> <45596E36.1070906@noaa.gov> <11822CC5-ED36-4FC8-AD52-11356737A06A@arachnedesign.net> Message-ID: <455A0151.5000505@noaa.gov> Steve Lianoglou wrote: >>> What version of Xcode do you use? On my system: >>> >> I'm not using Xcode, I'm doing all this in a terminal. >> > > I think he asked about XCode because new versions of XCode install > new version of gcc on your system. > > Getting/using the right gcc is probably the easiest way to get you > moving .. the latest version of XCode also installs gcc 4.0.1 > > OK, I now have: $ gcc --version powerpc-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5367) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. I do: $ python setup.py build_src build_clib --fcompiler=gnu95 build_ext --fcompiler=gnu95 build I (still) get: : : Lib/integrate/odepack/vode.f:3368: internal compiler error: tree check: expected ssa_name, have var_decl in verify_ssa, at tree-ssa.c:677 Please submit a full bug report, with preprocessed source if appropriate. See for instructions. error: Command "/usr/bin/gfortran -Wall -ffixed-form -fno-second-underscore -fPIC -O3 -funroll-loops -mcpu=7450 -mtune=7450 -c -c Lib/integrate/odepack/vode.f -o build/temp.macosx-10.4-fat-2.4/Lib/integrate/odepack/vode.o" failed with exit status 1 I'm fast approaching the point in time at which I could have written my own R-K solver; it shouldn't be this difficult (i.e., if you actually want to build a user base) - why is it? DG PS: How do I check that my vecLib is installed/working correctly? I looked for tests (locally) but couldn't find any - is there a test suite for it online somewhere? From iain at day-online.org.uk.invalid Tue Nov 14 13:18:55 2006 From: iain at day-online.org.uk.invalid (Iain Day) Date: Tue, 14 Nov 2006 18:18:55 +0000 Subject: [SciPy-user] Precision error on Mac OS X (PPC) Message-ID: Hi, I apologise if this is the wrong list for this. I have been having some precision issues with some code I've got. I've searched the list archives and came across these tests. SciPy and numpy are installed from Fink, and running on a 1.5GHz G4 with Mac os x 10.4.8. >>> import numpy >>> import scipy >>> numpy.__version__ '1.0' >>> scipy.__version__ '0.5.1' >>> print numpy.finfo(numpy.float32).min -3.40282346639e+38 >>> print numpy.finfo(numpy.float32).min, numpy.finfo(numpy.float32).max, numpy.finfo(numpy.float32).eps -3.40282346639e+38 3.40282346639e+38 1.19209289551e-07 >>> print numpy.finfo(numpy.float64).min, numpy.finfo(numpy.float64).max, numpy.finfo(numpy.float64).eps -1.79769313486e+308 1.79769313486e+308 2.22044604925e-16 >>> print numpy.finfo(numpy.float128).min, numpy.finfo(numpy.float128).max, numpy.finfo(numpy.float128).eps Warning: overflow encountered in add Warning: invalid value encountered in subtract Warning: invalid value encountered in subtract Warning: overflow encountered in add Warning: invalid value encountered in subtract Warning: invalid value encountered in subtract 9223372034707292160.0 -9223372034707292160.0 1.38178697010200053818e-76 Any thoughts? Iain From fzwaard at gmail.com Wed Nov 15 11:10:27 2006 From: fzwaard at gmail.com (Frank Zwaard) Date: Wed, 15 Nov 2006 17:10:27 +0100 Subject: [SciPy-user] Problems with numpy.ndarray Message-ID: Hi I am super-new to python. I was trying the examples here: http://www.scipy.org/Cookbook/Interpolation but I get really strange graphics :(( Even with the first example (Interpolation of an N-D curve) I have problems: all the points are plotted with a y value of 0!!! I simplified the example as follows from numpy import r_, sin from scipy.signal import cspline1d, cspline1d_eval from pylab import plot, show x = r_[0:10] y = sin(x) plot(x, y, 'o') show() But I get the same problem, every data in plotted on the axis x=0 :((( I checked the arrays x and y and they are: >>> type(x) >>> type(y) >>> print x [0 1 2 3 4 5 6 7 8 9] >>> print y [ 0. 0.84147098 0.90929743 0.14112001 -0.7568025 -0.95892427 -0.2794155 0.6569866 0.98935825 0.41211849] I tried also this example t = arange(0, 2.0, 0.1) y = sin(2*pi*t) tck = interpolate.splrep(t, y, s=1) tnew = arange(0, 2.0, 0.01) ynew = interpolate.splev(tnew, tck, der=0) plot(t, y, "o", tnew, ynew) print type(t) print type(y) print type(tnew) print type(ynew) The plot t,y is perfect, while the plot tnew,ynew is a flat line :( The only thing that I could see is that t,y,tnew are while ynew is the same type as the first example. Does anyone has any idea what could be the problem? I am using a Linux FC5 intel 32 bit machine, with the following python related packages: via RPM: rpm -qa|grep py dbus-python-0.61-3 pycairo-1.0.2-1.2.1 gnome-python2-2.12.4-1 gnome-python2-gtkhtml2-2.14.0-1 python-urlgrabber-2.9.8-2 python-sqlite-1.1.7-1.2 audit-libs-python-1.1.5-1 gnome-python2-bonobo-2.12.4-1 python-devel-2.4.3-9.FC5 pytz-2005r-2.fc5 pyorbit-2.0.1-4.2.1 python-ldap-2.0.6-5.2.1 python-2.4.3-9.FC5 python-dateutil-1.1-2.fc5 python-imaging-1.1.5-5.fc5 rpm-python-4.4.2-15.2 python-elementtree-1.2.6-4.2.1 python-numeric-23.7-2.2.1 MySQL-python-1.2.0-3.2.2 gnome-python2-gtksourceview-2.14.0-1 gnome-python2-gnomevfs-2.12.4-1 pygtk2-libglade-2.8.6-0.fc5.1 libxml2-python-2.6.23-1.2 gnome-python2-desktop-2.14.0-1 gnome-python2-gnomeprint-2.14.0-1 pygtk2-devel-2.8.6-0.fc5.1 python-matplotlib-0.87.3-1.fc5 pyxf86config-0.3.24-1 libselinux-python-1.29.7-1.2 gnome-python2-canvas-2.12.4-1 gnome-python2-extras-2.14.0-1 pygtk2-2.8.6-0.fc5.1 Installed manually: basemap-0.9.3.tar.gz basemap-data-0.9.tar.gz gnuplot-py-1.7.tar.gz numpy-1.0.tar.gz scipy-0.5.1.tar.gz Thank you very much for any help that you can give me Ciao Frank From aisaac at american.edu Wed Nov 15 11:24:03 2006 From: aisaac at american.edu (Alan G Isaac) Date: Wed, 15 Nov 2006 11:24:03 -0500 Subject: [SciPy-user] Problems with numpy.ndarray In-Reply-To: References: Message-ID: On Wed, 15 Nov 2006, Frank Zwaard apparently wrote: > from numpy import r_, sin > from pylab import plot, show > x = r_[0:10] > y = sin(x) > plot(x, y, 'o') > show() > But I get the same problem, every data in plotted on the axis x=0 I do not see this problem (numpy 1.0 and matplotlib 0.87.7). Are your matploblib and numpy versions compatible? Cheers, Alan Isaac From fzwaard at gmail.com Wed Nov 15 11:46:21 2006 From: fzwaard at gmail.com (Frank Zwaard) Date: Wed, 15 Nov 2006 17:46:21 +0100 Subject: [SciPy-user] Problems with numpy.ndarray In-Reply-To: References: Message-ID: Hi Alan I use python-matplotlib-0.87.3-1.fc5 and numpy-1.0 How do I know if the versions are compatible? Do you seggest to install the new/last version of matplotlib (not via rpm)? I have also a problem while importing from numpy import Float64 I can use only from numpy import float64 can it be related to the other problem? Thanks Francesco On 11/15/06, Alan G Isaac wrote: > I do not see this problem (numpy 1.0 and matplotlib 0.87.7). > Are your matploblib and numpy versions compatible? From aisaac at american.edu Wed Nov 15 12:22:40 2006 From: aisaac at american.edu (Alan G Isaac) Date: Wed, 15 Nov 2006 12:22:40 -0500 Subject: [SciPy-user] Problems with numpy.ndarray In-Reply-To: References: Message-ID: On Wed, 15 Nov 2006, Frank Zwaard apparently wrote: > I use > python-matplotlib-0.87.3-1.fc5 > and > numpy-1.0 My understanding is that for numpy 1.0 you need matplotlib 0.87.7. (I am just a user.) Cheers, Alan Isaac From sbasu at physics.cornell.edu Wed Nov 15 12:29:17 2006 From: sbasu at physics.cornell.edu (Sourish Basu) Date: Wed, 15 Nov 2006 12:29:17 -0500 Subject: [SciPy-user] Problems with numpy.ndarray In-Reply-To: References: Message-ID: <455B4E6D.3030500@physics.cornell.edu> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Hi Francesco, | | I have also a problem while importing | from numpy import Float64 | I can use only | from numpy import float64 | can it be related to the other problem? ~ Scipy/matplotlib used to use Numeric (or numarray) as their 'numerix' backend before they switched to numpy, and there are a few things that are different in numpy (from Numeric). The example you gave is one; Numeric used to have a Float64 type, which got changed to float64, so scipy.Float64 (or pylab.Float64) no longer works. I'm not really sure if numpy ever had a Float64 type, bcause I never used it before I had to (because of scipy). ~ While on the topic, significantly more annoying was the fact that default behavior of certain scipy/matplotlib functions changed due to the backend switch. For example, previously scipy.log(+ve number) or scipy.sqrt(+ve number) used to return floating point results, while scipy.log(-ve) or scipy.sqrt(-ve) returned the appropriate complex (imaginary) number. After the switch, scipy.sqrt(-ve) returns 'nan' while you have to ask for scipy.sqrt(-ve+0j) to get the proper complex result. You need to watch out for that, too, in case you're switching scipy/numpy versions (I know all too well, because suddenly my codes started spewing out nonsensical results after I switched versions). - -Sourish -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iQIVAwUBRVtObLq7YmsVF20EAQpUKA//UJTrUIwy2rlEwHv0jm/7p2hrn5f5qXZR N27n/hIuGy5F9uKWP9hY/4WMc2tNvV7RuBRHJUULYnBP02irO9D7LWMdCAbYl74o +CNDggyiYMF1Pwo/1bs0feAS8F2oQ+T6UablZ66paPfaTI/j7iXHCXPJGdYrpqPU yyuFavRZejiEFO6+SM0b3DPEUla97vULIg/AmTra1spczSgbQeSi28AtcYY+aTzB nAn8ngo2Wve2X1+pQKvdg8HLA58JSEkj9plMy7P9QD6FHud06C9b07PN+UQAH5nA LZyS0vST40SE9XsxLFcKuUW6VYApAx0cw/5ukLo1570K2mScd4Ym9YKvqjOTSXaY 6u/x+1WuoU+erOsw72vzigCJ4ve/i7Y9/80juuM4+xWfHIK2w01mdK8lzFyhOwE1 OaJqUE/8aDS9seilDngCSFXlhI2GHV0dxYbCuuzbbIRHTTUhrqCJaHWWAwCoZuHs 7/YIA4ZK6/kLXnq7xG+tefo9YGVkvh1Xk/oxYcTZYacuo3y/aFlNMyIMjXNcxfhZ wWdCelKjo2efORSSFOF6q0gyK2us44Yo/E/VQiuUeB54yl8wvx0s/5vSn3Rcmios dYzQI8/RlYAFMu84arM03HJaedHEkwvn0XvafRtdSUKOWhE3xAZK54LFPFPQ68QF kow8f66SJb8= =QJUr -----END PGP SIGNATURE----- From David.L.Goldsmith at noaa.gov Wed Nov 15 13:59:01 2006 From: David.L.Goldsmith at noaa.gov (David L Goldsmith) Date: Wed, 15 Nov 2006 10:59:01 -0800 Subject: [SciPy-user] Have I been given up on? (Was: In need of an OS 10.4.8-compatible Universal binary) In-Reply-To: <455A0151.5000505@noaa.gov> References: <4558E42D.8090200@noaa.gov> <4472C533-D982-48A1-9E98-03062CD1F8BC@mac.com> <45596C01.3020000@noaa.gov> <45596E36.1070906@noaa.gov> <11822CC5-ED36-4FC8-AD52-11356737A06A@arachnedesign.net> <455A0151.5000505@noaa.gov> Message-ID: <455B6375.5080703@noaa.gov> I apologize for the tone of my last post. Have I been given up on? DG David Goldsmith wrote: > Steve Lianoglou wrote: > >>>> What version of Xcode do you use? On my system: >>>> >>>> >>> I'm not using Xcode, I'm doing all this in a terminal. >>> >>> >> I think he asked about XCode because new versions of XCode install >> new version of gcc on your system. >> >> Getting/using the right gcc is probably the easiest way to get you >> moving .. the latest version of XCode also installs gcc 4.0.1 >> >> >> > OK, I now have: > > $ gcc --version > powerpc-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. > build 5367) > Copyright (C) 2005 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There > is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR > PURPOSE. > > I do: > > $ python setup.py build_src build_clib --fcompiler=gnu95 build_ext > --fcompiler=gnu95 build > > I (still) get: > > : > : > Lib/integrate/odepack/vode.f:3368: internal compiler error: tree > check: expected ssa_name, have var_decl in verify_ssa, at tree-ssa.c:677 > Please submit a full bug report, > with preprocessed source if appropriate. > See for instructions. > error: Command "/usr/bin/gfortran -Wall -ffixed-form > -fno-second-underscore -fPIC -O3 -funroll-loops -mcpu=7450 -mtune=7450 > -c -c > Lib/integrate/odepack/vode.f -o > build/temp.macosx-10.4-fat-2.4/Lib/integrate/odepack/vode.o" failed with > exit status 1 > > I'm fast approaching the point in time at which I could have written my > own R-K solver; it shouldn't be this difficult (i.e., if you actually > want to build a user base) - why is it? > > DG > > PS: How do I check that my vecLib is installed/working correctly? I > looked for tests (locally) but couldn't find any - is there a test suite > for it online somewhere? > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > -- ERD/ORR/NOS/NOAA From lists.steve at arachnedesign.net Wed Nov 15 15:03:59 2006 From: lists.steve at arachnedesign.net (Steve Lianoglou) Date: Wed, 15 Nov 2006 15:03:59 -0500 Subject: [SciPy-user] Have I been given up on? (Was: In need of an OS 10.4.8-compatible Universal binary) In-Reply-To: <455B6375.5080703@noaa.gov> References: <4558E42D.8090200@noaa.gov> <4472C533-D982-48A1-9E98-03062CD1F8BC@mac.com> <45596C01.3020000@noaa.gov> <45596E36.1070906@noaa.gov> <11822CC5-ED36-4FC8-AD52-11356737A06A@arachnedesign.net> <455A0151.5000505@noaa.gov> <455B6375.5080703@noaa.gov> Message-ID: Well .. I'm not quite sure where to go from here, or how far you've gotten w/ everything: >> I do: >> >> $ python setup.py build_src build_clib --fcompiler=gnu95 >> build_ext >> --fcompiler=gnu95 build What happens if you don't add any of that garbage, just do a $ python setup.py build $ sudo python setup.py install Does *that* at least work? I'm not sure, I think scipy is correctly using my fortran compiler (gfortran) and I'm not doing anything special .. I'm also on an intel- mac Have you cleaned out your build/ directories so as to not get any surprises? You should def. do that. Does numpy work for you when you build it alone? -steve From robert.kern at gmail.com Wed Nov 15 15:16:09 2006 From: robert.kern at gmail.com (Robert Kern) Date: Wed, 15 Nov 2006 14:16:09 -0600 Subject: [SciPy-user] Have I been given up on? (Was: In need of an OS 10.4.8-compatible Universal binary) In-Reply-To: <455B6375.5080703@noaa.gov> References: <4558E42D.8090200@noaa.gov> <4472C533-D982-48A1-9E98-03062CD1F8BC@mac.com> <45596C01.3020000@noaa.gov> <45596E36.1070906@noaa.gov> <11822CC5-ED36-4FC8-AD52-11356737A06A@arachnedesign.net> <455A0151.5000505@noaa.gov> <455B6375.5080703@noaa.gov> Message-ID: <455B7589.9010102@gmail.com> David L Goldsmith wrote: > I apologize for the tone of my last post. Have I been given up on? No, but please have patience. We all help out on the list only according to how much time we have available. Sometimes, that's less than we'd like. > David Goldsmith wrote: >> Steve Lianoglou wrote: >> >>>>> What version of Xcode do you use? On my system: >>>>> >>>>> >>>> I'm not using Xcode, I'm doing all this in a terminal. >>>> >>>> >>> I think he asked about XCode because new versions of XCode install >>> new version of gcc on your system. >>> >>> Getting/using the right gcc is probably the easiest way to get you >>> moving .. the latest version of XCode also installs gcc 4.0.1 >>> >>> >>> >> OK, I now have: >> >> $ gcc --version >> powerpc-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. >> build 5367) >> Copyright (C) 2005 Free Software Foundation, Inc. >> This is free software; see the source for copying conditions. There >> is NO >> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR >> PURPOSE. >> >> I do: >> >> $ python setup.py build_src build_clib --fcompiler=gnu95 build_ext >> --fcompiler=gnu95 build >> >> I (still) get: >> >> : >> : >> Lib/integrate/odepack/vode.f:3368: internal compiler error: tree >> check: expected ssa_name, have var_decl in verify_ssa, at tree-ssa.c:677 >> Please submit a full bug report, >> with preprocessed source if appropriate. >> See for instructions. >> error: Command "/usr/bin/gfortran -Wall -ffixed-form >> -fno-second-underscore -fPIC -O3 -funroll-loops -mcpu=7450 -mtune=7450 >> -c -c >> Lib/integrate/odepack/vode.f -o >> build/temp.macosx-10.4-fat-2.4/Lib/integrate/odepack/vode.o" failed with >> exit status 1 Did you deliberately move the gfortran executable into /usr/bin/? The binary tarball I pointed you to would unpack it into /usr/local/bin/. >> PS: How do I check that my vecLib is installed/working correctly? I >> looked for tests (locally) but couldn't find any - is there a test suite >> for it online somewhere? You could probably download the LAPACK 3.0 tarball and modify its Makefiles to build its test programs using vecLib.framework . However, it is always installed, and unless something has modified it since you installed your OS, it is almost certainly working correctly (at least as correctly as it ever will work). -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From David.L.Goldsmith at noaa.gov Wed Nov 15 15:53:16 2006 From: David.L.Goldsmith at noaa.gov (David L Goldsmith) Date: Wed, 15 Nov 2006 12:53:16 -0800 Subject: [SciPy-user] Have I been given up on? (Was: In need of an OS 10.4.8-compatible Universal binary) In-Reply-To: <455B7589.9010102@gmail.com> References: <4558E42D.8090200@noaa.gov> <4472C533-D982-48A1-9E98-03062CD1F8BC@mac.com> <45596C01.3020000@noaa.gov> <45596E36.1070906@noaa.gov> <11822CC5-ED36-4FC8-AD52-11356737A06A@arachnedesign.net> <455A0151.5000505@noaa.gov> <455B6375.5080703@noaa.gov> <455B7589.9010102@gmail.com> Message-ID: <455B7E3C.2000607@noaa.gov> Robert Kern wrote: > David L Goldsmith wrote: > >> I apologize for the tone of my last post. Have I been given up on? >> No, but please have patience. We all help out on the list only according to how >> much time we have available. Sometimes, that's less than we'd like. >> Of course, I just wanted to make sure that people hadn't abandoned me because, in a moment of frustration, I vented on-list. >> David Goldsmith wrote: >> >>> Steve Lianoglou wrote: >>> >>> >>>>>> What version of Xcode do you use? On my system: >>>>>> >>>>>> >>>>>> >>>>> I'm not using Xcode, I'm doing all this in a terminal. >>>>> >>>>> >>>>> >>>> I think he asked about XCode because new versions of XCode install >>>> new version of gcc on your system. >>>> >>>> Getting/using the right gcc is probably the easiest way to get you >>>> moving .. the latest version of XCode also installs gcc 4.0.1 >>>> >>>> >>>> >>>> >>> OK, I now have: >>> >>> $ gcc --version >>> powerpc-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. >>> build 5367) >>> Copyright (C) 2005 Free Software Foundation, Inc. >>> This is free software; see the source for copying conditions. There >>> is NO >>> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR >>> PURPOSE. >>> >>> I do: >>> >>> $ python setup.py build_src build_clib --fcompiler=gnu95 build_ext >>> --fcompiler=gnu95 build >>> >>> I (still) get: >>> >>> : >>> : >>> Lib/integrate/odepack/vode.f:3368: internal compiler error: tree >>> check: expected ssa_name, have var_decl in verify_ssa, at tree-ssa.c:677 >>> Please submit a full bug report, >>> with preprocessed source if appropriate. >>> See for instructions. >>> error: Command "/usr/bin/gfortran -Wall -ffixed-form >>> -fno-second-underscore -fPIC -O3 -funroll-loops -mcpu=7450 -mtune=7450 >>> -c -c >>> Lib/integrate/odepack/vode.f -o >>> build/temp.macosx-10.4-fat-2.4/Lib/integrate/odepack/vode.o" failed with >>> exit status 1 >>> > > Did you deliberately move the gfortran executable into /usr/bin/? The binary > tarball I pointed you to would unpack it into /usr/local/bin/. > No, but I'll deliberately move it to /usr/local/bin/ and see what results. >>> PS: How do I check that my vecLib is installed/working correctly? I >>> looked for tests (locally) but couldn't find any - is there a test suite >>> for it online somewhere? >>> > > You could probably download the LAPACK 3.0 tarball and modify its Makefiles to > build its test programs using vecLib.framework . However, it is always > installed, and unless something has modified it since you installed your OS, it > is almost certainly working correctly (at least as correctly as it ever will work). > Yeah, I think I'll wait on that 'til I've exhausted all other possibilities. Steve (et al.): might it help to see the entire build output - maybe there's something earlier that's not registering w/ me? (It's quite long, which is why previously I've only provided the last, fatal error, but there are other warnings and some non-fatal errors prior to failure.) My presumption is that, if the answers is yes, I should email it directly to interested parties? Thanks again, DG -- ERD/ORR/NOS/NOAA From lists.steve at arachnedesign.net Wed Nov 15 15:56:35 2006 From: lists.steve at arachnedesign.net (Steve Lianoglou) Date: Wed, 15 Nov 2006 15:56:35 -0500 Subject: [SciPy-user] Have I been given up on? (Was: In need of an OS 10.4.8-compatible Universal binary) In-Reply-To: <455B7E3C.2000607@noaa.gov> References: <4558E42D.8090200@noaa.gov> <4472C533-D982-48A1-9E98-03062CD1F8BC@mac.com> <45596C01.3020000@noaa.gov> <45596E36.1070906@noaa.gov> <11822CC5-ED36-4FC8-AD52-11356737A06A@arachnedesign.net> <455A0151.5000505@noaa.gov> <455B6375.5080703@noaa.gov> <455B7589.9010102@gmail.com> <455B7E3C.2000607@noaa.gov> Message-ID: > Steve (et al.): might it help to see the entire build output - maybe > there's something earlier that's not registering w/ me? (It's quite > long, which is why previously I've only provided the last, fatal > error, > but there are other warnings and some non-fatal errors prior to > failure.) My presumption is that, if the answers is yes, I should > email > it directly to interested parties? Maybe not email, but perhaps you can post it up somewhere online :-) Still, though ... are you able to compile numpy correclty? Did you try removing the build directory and trying again? Does a normal `$ python setup.py build` get you anywhere? -steve From David.L.Goldsmith at noaa.gov Wed Nov 15 16:03:36 2006 From: David.L.Goldsmith at noaa.gov (David L Goldsmith) Date: Wed, 15 Nov 2006 13:03:36 -0800 Subject: [SciPy-user] Have I been given up on? (Was: In need of an OS 10.4.8-compatible Universal binary) In-Reply-To: <455B7E3C.2000607@noaa.gov> References: <4558E42D.8090200@noaa.gov> <4472C533-D982-48A1-9E98-03062CD1F8BC@mac.com> <45596C01.3020000@noaa.gov> <45596E36.1070906@noaa.gov> <11822CC5-ED36-4FC8-AD52-11356737A06A@arachnedesign.net> <455A0151.5000505@noaa.gov> <455B6375.5080703@noaa.gov> <455B7589.9010102@gmail.com> <455B7E3C.2000607@noaa.gov> Message-ID: <455B80A8.7040200@noaa.gov> David L Goldsmith wrote: > Robert Kern wrote: > >> Did you deliberately move the gfortran executable into /usr/bin/? The binary >> tarball I pointed you to would unpack it into /usr/local/bin/. >> > > No, but I'll deliberately move it to /usr/local/bin/ and see what results. > Didn't fix - still same "crash". DG -- ERD/ORR/NOS/NOAA From robert.kern at gmail.com Wed Nov 15 16:08:59 2006 From: robert.kern at gmail.com (Robert Kern) Date: Wed, 15 Nov 2006 15:08:59 -0600 Subject: [SciPy-user] Have I been given up on? (Was: In need of an OS 10.4.8-compatible Universal binary) In-Reply-To: <455B80A8.7040200@noaa.gov> References: <4558E42D.8090200@noaa.gov> <4472C533-D982-48A1-9E98-03062CD1F8BC@mac.com> <45596C01.3020000@noaa.gov> <45596E36.1070906@noaa.gov> <11822CC5-ED36-4FC8-AD52-11356737A06A@arachnedesign.net> <455A0151.5000505@noaa.gov> <455B6375.5080703@noaa.gov> <455B7589.9010102@gmail.com> <455B7E3C.2000607@noaa.gov> <455B80A8.7040200@noaa.gov> Message-ID: <455B81EB.8070205@gmail.com> David L Goldsmith wrote: > David L Goldsmith wrote: >> Robert Kern wrote: >> >>> Did you deliberately move the gfortran executable into /usr/bin/? The binary >>> tarball I pointed you to would unpack it into /usr/local/bin/. >>> >> No, but I'll deliberately move it to /usr/local/bin/ and see what results. >> > Didn't fix - still same "crash". The location of the executable isn't the issue itself. It merely demonstrates that it didn't come from the same source that I was expecting. Where did you get gfortran from? -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From David.L.Goldsmith at noaa.gov Wed Nov 15 16:09:35 2006 From: David.L.Goldsmith at noaa.gov (David L Goldsmith) Date: Wed, 15 Nov 2006 13:09:35 -0800 Subject: [SciPy-user] Have I been given up on? (Was: In need of an OS 10.4.8-compatible Universal binary) In-Reply-To: References: <4558E42D.8090200@noaa.gov> <4472C533-D982-48A1-9E98-03062CD1F8BC@mac.com> <45596C01.3020000@noaa.gov> <45596E36.1070906@noaa.gov> <11822CC5-ED36-4FC8-AD52-11356737A06A@arachnedesign.net> <455A0151.5000505@noaa.gov> <455B6375.5080703@noaa.gov> <455B7589.9010102@gmail.com> <455B7E3C.2000607@noaa.gov> Message-ID: <455B820F.4010006@noaa.gov> Steve Lianoglou wrote: >> Steve (et al.): might it help to see the entire build output - maybe >> there's something earlier that's not registering w/ me? (It's quite >> long, which is why previously I've only provided the last, fatal >> error, >> but there are other warnings and some non-fatal errors prior to >> failure.) My presumption is that, if the answers is yes, I should >> email >> it directly to interested parties? >> > > Maybe not email, but perhaps you can post it up somewhere online :-) > I'll check (I haven't yet done it here, but I know others have). > Still, though ... are you able to compile numpy correclty? > Yes? (It's been a while, but I think I "built" it, i.e., didn't just install a binary, but I'm not 100% sure. It definitely seems to be working fine, though, at least as much of it as I've been calling in my other work.) > Did you try removing the build directory and trying again? > I assume you mean the scipy build directory, yes? > Does a normal `$ python setup.py build` get you anywhere? > It didn't, but I haven't tried that since I've made the various adjustments, so I'll try it again. DG > -steve > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > -- ERD/ORR/NOS/NOAA From lists.steve at arachnedesign.net Wed Nov 15 16:18:31 2006 From: lists.steve at arachnedesign.net (Steve Lianoglou) Date: Wed, 15 Nov 2006 16:18:31 -0500 Subject: [SciPy-user] Have I been given up on? (Was: In need of an OS 10.4.8-compatible Universal binary) In-Reply-To: <455B820F.4010006@noaa.gov> References: <4558E42D.8090200@noaa.gov> <4472C533-D982-48A1-9E98-03062CD1F8BC@mac.com> <45596C01.3020000@noaa.gov> <45596E36.1070906@noaa.gov> <11822CC5-ED36-4FC8-AD52-11356737A06A@arachnedesign.net> <455A0151.5000505@noaa.gov> <455B6375.5080703@noaa.gov> <455B7589.9010102@gmail.com> <455B7E3C.2000607@noaa.gov> <455B820F.4010006@noaa.gov> Message-ID: <8C197B8C-2E6E-45CD-A7B7-85FBB2776AFE@arachnedesign.net> >> Still, though ... are you able to compile numpy correclty? >> > Yes? (It's been a while, but I think I "built" it, i.e., didn't just > install a binary, but I'm not 100% sure. It definitely seems to be > working fine, though, at least as much of it as I've been calling > in my > other work.) You can be a bit more certain if it works correctly by running the test suite, like: ===== import numpy as np np.test(10) # I'm not real sure what that number means, you can even leave it blank # also what numpy version do you have? np.__version__ ===== >> Did you try removing the build directory and trying again? >> > I assume you mean the scipy build directory, yes? Yes, sorry for not making it clear. The build directory in /path/to/ scipy_src/build -steve From David.L.Goldsmith at noaa.gov Wed Nov 15 19:44:01 2006 From: David.L.Goldsmith at noaa.gov (David Goldsmith) Date: Wed, 15 Nov 2006 16:44:01 -0800 Subject: [SciPy-user] Have I been given up on? (Was: In need of an OS 10.4.8-compatible Universal binary) In-Reply-To: <455B81EB.8070205@gmail.com> References: <4558E42D.8090200@noaa.gov> <4472C533-D982-48A1-9E98-03062CD1F8BC@mac.com> <45596C01.3020000@noaa.gov> <45596E36.1070906@noaa.gov> <11822CC5-ED36-4FC8-AD52-11356737A06A@arachnedesign.net> <455A0151.5000505@noaa.gov> <455B6375.5080703@noaa.gov> <455B7589.9010102@gmail.com> <455B7E3C.2000607@noaa.gov> <455B80A8.7040200@noaa.gov> <455B81EB.8070205@gmail.com> Message-ID: <455BB451.8080708@noaa.gov> Robert Kern wrote: > David L Goldsmith wrote: > >> David L Goldsmith wrote: >> >>> Robert Kern wrote: >>> >>> >>>> Did you deliberately move the gfortran executable into /usr/bin/? The binary >>>> tarball I pointed you to would unpack it into /usr/local/bin/. >>>> >>>> >>> No, but I'll deliberately move it to /usr/local/bin/ and see what results. >>> >>> >> Didn't fix - still same "crash". >> > > The location of the executable isn't the issue itself. It merely demonstrates > that it didn't come from the same source that I was expecting. Where did you get > gfortran from? > Ah, I see. I got it from where you said, but in the process of getting it from there again, just to be sure, I figured out that it _was_ unpacking everything into a folder called usr/local/bin (and usr/local/lib, etc.), but not _the_ /usr/local/bin. Rather, probably since my default download location is my Desktop, it was creating a usr folder tree on my Desktop and unpacking everything there (though rather understandable behavior, I would say this is a bug, i.e., it should be able to find _the correct_ /usr/local to put things in, agreed?). So, I moved the usr/local tree on my Desktop to my /usr/local directory - it didn't result in success, but did change the point and nature of the failure: Fortran fix compiler: /usr/local/bin/gfortran -Wall -ffixed-form -fno-second-underscore -Wall -fno-second-underscore -fPIC -O3 -funroll-loops -mcpu=7450 -mtune=7450 creating build/temp.macosx-10.4-fat-2.4 creating build/temp.macosx-10.4-fat-2.4/Lib creating build/temp.macosx-10.4-fat-2.4/Lib/fftpack creating build/temp.macosx-10.4-fat-2.4/Lib/fftpack/dfftpack compile options: '-c' gfortran:f77: Lib/fftpack/dfftpack/dcosqb.f gfortran: error trying to exec 'f951': execvp: No such file or directory gfortran: error trying to exec 'f951': execvp: No such file or directory error: Command "/usr/local/bin/gfortran -Wall -ffixed-form -fno-second-underscore -fPIC -O3 -funroll-loops -mcpu=7450 -mtune=7450 -c -c Lib/fftpack/dfftpack/dcosqb.f -o build/temp.macosx-10.4-fat-2.4/Lib/fftpack/dfftpack/dcosqb.o" failed with exit status 1 I've put the entire stdout and stderr output of the build(s) (in the order in which they were generated, i.e., there's a modicum of stderr output amongst the stdout output) at (anonymous) ftp://ftp.orr.noaa.gov/public/HMRD/DG/buildlogs/. buildlog_Kern is the output from issuing the long command you indicated in a previous post, Robert, and buildlog_Steve is the output from issuing simply "python setup.py build." And yes, I did delete the entire build folder before each attempt. Again, thanks! DG From robert.kern at gmail.com Wed Nov 15 20:30:29 2006 From: robert.kern at gmail.com (Robert Kern) Date: Wed, 15 Nov 2006 19:30:29 -0600 Subject: [SciPy-user] Have I been given up on? (Was: In need of an OS 10.4.8-compatible Universal binary) In-Reply-To: <455BB451.8080708@noaa.gov> References: <4558E42D.8090200@noaa.gov> <4472C533-D982-48A1-9E98-03062CD1F8BC@mac.com> <45596C01.3020000@noaa.gov> <45596E36.1070906@noaa.gov> <11822CC5-ED36-4FC8-AD52-11356737A06A@arachnedesign.net> <455A0151.5000505@noaa.gov> <455B6375.5080703@noaa.gov> <455B7589.9010102@gmail.com> <455B7E3C.2000607@noaa.gov> <455B80A8.7040200@noaa.gov> <455B81EB.8070205@gmail.com> <455BB451.8080708@noaa.gov> Message-ID: <455BBF35.3080209@gmail.com> David Goldsmith wrote: > Robert Kern wrote: >> David L Goldsmith wrote: >> >>> David L Goldsmith wrote: >>> >>>> Robert Kern wrote: >>>> >>>> >>>>> Did you deliberately move the gfortran executable into /usr/bin/? The binary >>>>> tarball I pointed you to would unpack it into /usr/local/bin/. >>>>> >>>>> >>>> No, but I'll deliberately move it to /usr/local/bin/ and see what results. >>>> >>>> >>> Didn't fix - still same "crash". >>> >> The location of the executable isn't the issue itself. It merely demonstrates >> that it didn't come from the same source that I was expecting. Where did you get >> gfortran from? >> > Ah, I see. I got it from where you said, but in the process of getting > it from there again, just to be sure, I figured out that it _was_ > unpacking everything into a folder called usr/local/bin (and > usr/local/lib, etc.), but not _the_ /usr/local/bin. Rather, probably > since my default download location is my Desktop, it was creating a usr > folder tree on my Desktop and unpacking everything there (though rather > understandable behavior, I would say this is a bug, i.e., it should be > able to find _the correct_ /usr/local to put things in, agreed?). If you followed the instructions on the page, it would have installed correctly. It's just a dumb tarball; it can't find anything other than the relative paths to install to (and tarballs with absolute paths are very, very bad). The instructions show you how to give the appropriate root. sudo tar -xvf gfortran-bin.tar -C / http://hpc.sourceforge.net/ > So, I > moved the usr/local tree on my Desktop to my /usr/local directory - it > didn't result in success, but did change the point and nature of the > failure: > > > Fortran fix compiler: /usr/local/bin/gfortran -Wall -ffixed-form > -fno-second-underscore -Wall -fno-second-underscore -fPIC -O3 > -funroll-loops -mcpu=7450 -mtune=7450 > creating build/temp.macosx-10.4-fat-2.4 > creating build/temp.macosx-10.4-fat-2.4/Lib > creating build/temp.macosx-10.4-fat-2.4/Lib/fftpack > creating build/temp.macosx-10.4-fat-2.4/Lib/fftpack/dfftpack > compile options: '-c' > gfortran:f77: Lib/fftpack/dfftpack/dcosqb.f > gfortran: error trying to exec 'f951': execvp: No such file or directory > gfortran: error trying to exec 'f951': execvp: No such file or directory > error: Command "/usr/local/bin/gfortran -Wall -ffixed-form > -fno-second-underscore -fPIC -O3 -funroll-loops -mcpu=7450 -mtune=7450 > -c -c > Lib/fftpack/dfftpack/dcosqb.f -o > build/temp.macosx-10.4-fat-2.4/Lib/fftpack/dfftpack/dcosqb.o" failed > with exit status 1 Well, then something is still messed up with your gfortran installation. My f951 executable is here: /usr/local/libexec/gcc/i386-apple-darwin8.8.1/4.2.0/f951 > I've put the entire stdout and stderr output of the build(s) (in the > order in which they were generated, i.e., there's a modicum of stderr > output amongst the stdout output) at (anonymous) > ftp://ftp.orr.noaa.gov/public/HMRD/DG/buildlogs/. buildlog_Kern is the > output from issuing the long command you indicated in a previous post, > Robert, and buildlog_Steve is the output from issuing simply "python > setup.py build." And yes, I did delete the entire build folder before > each attempt. I'm getting a 550 error code in response. 550 yet been approved for downloading by the site administrators.rators. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From lists.steve at arachnedesign.net Wed Nov 15 21:15:05 2006 From: lists.steve at arachnedesign.net (Steve Lianoglou) Date: Wed, 15 Nov 2006 21:15:05 -0500 Subject: [SciPy-user] Have I been given up on? (Was: In need of an OS 10.4.8-compatible Universal binary) In-Reply-To: <455BB451.8080708@noaa.gov> References: <4558E42D.8090200@noaa.gov> <4472C533-D982-48A1-9E98-03062CD1F8BC@mac.com> <45596C01.3020000@noaa.gov> <45596E36.1070906@noaa.gov> <11822CC5-ED36-4FC8-AD52-11356737A06A@arachnedesign.net> <455A0151.5000505@noaa.gov> <455B6375.5080703@noaa.gov> <455B7589.9010102@gmail.com> <455B7E3C.2000607@noaa.gov> <455B80A8.7040200@noaa.gov> <455B81EB.8070205@gmail.com> <455BB451.8080708@noaa.gov> Message-ID: <7390CEFA-572D-4EB4-8B01-FD6C96030089@arachnedesign.net> > I've put the entire stdout and stderr output of the build(s) (in the > order in which they were generated, i.e., there's a modicum of stderr > output amongst the stdout output) at (anonymous) > ftp://ftp.orr.noaa.gov/public/HMRD/DG/buildlogs/. buildlog_Kern is > the > output from issuing the long command you indicated in a previous post, > Robert, and buildlog_Steve is the output from issuing simply "python > setup.py build." And yes, I did delete the entire build folder before > each attempt. No luck here w/ that. I keep getting an error on d/l: Server said: This file has been uploaded by an anonymous user. It has not Error -160: could not start data transfer I reckon you can just email me ... dunno how much help I'll be, but I can try. Can you just let us know again what type of system you're running? Thx, -steve From David.L.Goldsmith at noaa.gov Wed Nov 15 23:17:24 2006 From: David.L.Goldsmith at noaa.gov (David L. Goldsmith) Date: Wed, 15 Nov 2006 20:17:24 -0800 Subject: [SciPy-user] Have I been given up on? (Was: In need of an OS 10.4.8-compatible Universal binary) In-Reply-To: <455BBF35.3080209@gmail.com> References: <4558E42D.8090200@noaa.gov> <4472C533-D982-48A1-9E98-03062CD1F8BC@mac.com> <45596C01.3020000@noaa.gov> <45596E36.1070906@noaa.gov> <11822CC5-ED36-4FC8-AD52-11356737A06A@arachnedesign.net> <455A0151.5000505@noaa.gov> <455B6375.5080703@noaa.gov> <455B7589.9010102@gmail.com> <455B7E3C.2000607@noaa.gov> <455B80A8.7040200@noaa.gov> <455B81EB.8070205@gmail.com> <455BB451.8080708@noaa.gov> <455BBF35.3080209@gmail.com> Message-ID: <455BE654.70207@noaa.gov> Robert Kern wrote: > David Goldsmith wrote: > >> Robert Kern wrote: >> >>> David L Goldsmith wrote: >>> >>> >>>> David L Goldsmith wrote: >>>> >>>> >>>>> Robert Kern wrote: >>>>> >>>>> >>>>> >>>>>> Did you deliberately move the gfortran executable into /usr/bin/? The binary >>>>>> tarball I pointed you to would unpack it into /usr/local/bin/. >>>>>> >>>>>> >>>>>> >>>>> No, but I'll deliberately move it to /usr/local/bin/ and see what results. >>>>> >>>>> >>>>> >>>> Didn't fix - still same "crash". >>>> >>>> >>> The location of the executable isn't the issue itself. It merely demonstrates >>> that it didn't come from the same source that I was expecting. Where did you get >>> gfortran from? >>> >>> >> Ah, I see. I got it from where you said, but in the process of getting >> it from there again, just to be sure, I figured out that it _was_ >> unpacking everything into a folder called usr/local/bin (and >> usr/local/lib, etc.), but not _the_ /usr/local/bin. Rather, probably >> since my default download location is my Desktop, it was creating a usr >> folder tree on my Desktop and unpacking everything there (though rather >> understandable behavior, I would say this is a bug, i.e., it should be >> able to find _the correct_ /usr/local to put things in, agreed?). >> > > If you followed the instructions on the page, it would have installed correctly. > It's just a dumb tarball; it can't find anything other than the relative paths > to install to (and tarballs with absolute paths are very, very bad). The > instructions show you how to give the appropriate root. > > sudo tar -xvf gfortran-bin.tar -C / > > http://hpc.sourceforge.net/ > Stuffit didn't even give me a chance to say where it should go, nor did it leave the tarball "balled up" so that I might (would have to) do what you indicate above, it automatically unballed it after downloading and unzipping it - I suppose that means I need to change my Stuffit preferences. :-) >> So, I >> moved the usr/local tree on my Desktop to my /usr/local directory - it >> didn't result in success, but did change the point and nature of the >> failure: >> >> >> Fortran fix compiler: /usr/local/bin/gfortran -Wall -ffixed-form >> -fno-second-underscore -Wall -fno-second-underscore -fPIC -O3 >> -funroll-loops -mcpu=7450 -mtune=7450 >> creating build/temp.macosx-10.4-fat-2.4 >> creating build/temp.macosx-10.4-fat-2.4/Lib >> creating build/temp.macosx-10.4-fat-2.4/Lib/fftpack >> creating build/temp.macosx-10.4-fat-2.4/Lib/fftpack/dfftpack >> compile options: '-c' >> gfortran:f77: Lib/fftpack/dfftpack/dcosqb.f >> gfortran: error trying to exec 'f951': execvp: No such file or directory >> gfortran: error trying to exec 'f951': execvp: No such file or directory >> error: Command "/usr/local/bin/gfortran -Wall -ffixed-form >> -fno-second-underscore -fPIC -O3 -funroll-loops -mcpu=7450 -mtune=7450 >> -c -c >> Lib/fftpack/dfftpack/dcosqb.f -o >> build/temp.macosx-10.4-fat-2.4/Lib/fftpack/dfftpack/dcosqb.o" failed >> with exit status 1 >> > > Well, then something is still messed up with your gfortran installation. My f951 > executable is here: > > /usr/local/libexec/gcc/i386-apple-darwin8.8.1/4.2.0/f951 > OK, I'll follow that lead next. | I've put the entire stdout and stderr output of the build(s) (in the >> order in which they were generated, i.e., there's a modicum of stderr >> output amongst the stdout output) at (anonymous) >> ftp://ftp.orr.noaa.gov/public/HMRD/DG/buildlogs/. buildlog_Kern is the >> output from issuing the long command you indicated in a previous post, >> Robert, and buildlog_Steve is the output from issuing simply "python >> setup.py build." And yes, I did delete the entire build folder before >> each attempt. >> > > I'm getting a 550 error code in response. > > 550 yet been approved for downloading by the site administrators.rators. > > Damn, I'm sorry, I was told that _after_ I put it up I'd have to let my help desk know (I guess this is why) - I let them know _before_, but I suppose that wasn't good enough. :-) Just as well, I'll follow the lead above and post fresher results if necessary. DG From erin.sheldon at gmail.com Wed Nov 15 23:22:03 2006 From: erin.sheldon at gmail.com (Erin Sheldon) Date: Wed, 15 Nov 2006 23:22:03 -0500 Subject: [SciPy-user] Precision error on Mac OS X (PPC) In-Reply-To: References: Message-ID: <331116dc0611152022p6d0f6db4nc1b71aab91578d55@mail.gmail.com> Hi Iain - So I ran this on my powerbook G4, 10.4.8: [~]|11> print numpy.finfo(numpy.float128).min,numpy.finfo(numpy.float128).max,numpy.finfo(numpy.float128).eps 9223372034707292160.0 -9223372034707292160.0 1.38178697010200053818e-76 Same answer you got but no errors reported. But of course those answers are totally wrong. Same thing on my AMD64 machine: In [6]: print numpy.finfo(numpy.float128).min,numpy.finfo(numpy.float128).max, numpy.finfo(numpy.float128).eps -1.18973149535723176502e+4932 1.18973149535723176502e+4932 1.08420217248550443401e-19 Looks better. So there is a bug on OS X it seems. Erin On 11/14/06, Iain Day wrote: > Hi, > > I apologise if this is the wrong list for this. I have been having some > precision issues with some code I've got. I've searched the list > archives and came across these tests. SciPy and numpy are installed from > Fink, and running on a 1.5GHz G4 with Mac os x 10.4.8. > > >>> import numpy > >>> import scipy > >>> numpy.__version__ > '1.0' > >>> scipy.__version__ > '0.5.1' > >>> print numpy.finfo(numpy.float32).min > -3.40282346639e+38 > >>> print numpy.finfo(numpy.float32).min, > numpy.finfo(numpy.float32).max, numpy.finfo(numpy.float32).eps > -3.40282346639e+38 3.40282346639e+38 1.19209289551e-07 > >>> print numpy.finfo(numpy.float64).min, > numpy.finfo(numpy.float64).max, numpy.finfo(numpy.float64).eps > -1.79769313486e+308 1.79769313486e+308 2.22044604925e-16 > >>> print numpy.finfo(numpy.float128).min, > numpy.finfo(numpy.float128).max, numpy.finfo(numpy.float128).eps > Warning: overflow encountered in add > Warning: invalid value encountered in subtract > Warning: invalid value encountered in subtract > Warning: overflow encountered in add > Warning: invalid value encountered in subtract > Warning: invalid value encountered in subtract > 9223372034707292160.0 -9223372034707292160.0 1.38178697010200053818e-76 > > Any thoughts? > > Iain > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > From David.L.Goldsmith at noaa.gov Thu Nov 16 01:38:31 2006 From: David.L.Goldsmith at noaa.gov (David Goldsmith) Date: Wed, 15 Nov 2006 22:38:31 -0800 Subject: [SciPy-user] Yeah, hat did the trick! (Was: Have I been given up on?) In-Reply-To: <455BE654.70207@noaa.gov> References: <4558E42D.8090200@noaa.gov> <4472C533-D982-48A1-9E98-03062CD1F8BC@mac.com> <45596C01.3020000@noaa.gov> <45596E36.1070906@noaa.gov> <11822CC5-ED36-4FC8-AD52-11356737A06A@arachnedesign.net> <455A0151.5000505@noaa.gov> <455B6375.5080703@noaa.gov> <455B7589.9010102@gmail.com> <455B7E3C.2000607@noaa.gov> <455B80A8.7040200@noaa.gov> <455B81EB.8070205@gmail.com> <455BB451.8080708@noaa.gov> <455BBF35.3080209@gmail.com> <455BE654.70207@noaa.gov> Message-ID: <455C0767.8020701@noaa.gov> David L. Goldsmith wrote: > Robert Kern wrote: > >> If you followed the instructions on the page, it would have installed correctly. >> It's just a dumb tarball; it can't find anything other than the relative paths >> to install to (and tarballs with absolute paths are very, very bad). The >> instructions show you how to give the appropriate root. >> >> sudo tar -xvf gfortran-bin.tar -C / >> >> http://hpc.sourceforge.net/ >> >> > Stuffit didn't even give me a chance to say where it should go, nor did > it leave the tarball "balled up" so that I might (would have to) do what > you indicate above, it automatically unballed it after downloading and > unzipping it - I suppose that means I need to change my Stuffit > preferences. :-) > OK, I moved the gzipped to /usr/local, unzipped and then untarred it using the command you gave previously, and low and behold scipy built w/out errors! Then I python setup.py install-ed, and that completed sans errors! Finally, I imported scipy.integrate, and believe it or not, it worked! Yeah! Thanks so much for walking me through it, and thanks for your patience! DG From a.h.jaffe at gmail.com Thu Nov 16 05:38:00 2006 From: a.h.jaffe at gmail.com (Andrew Jaffe) Date: Thu, 16 Nov 2006 10:38:00 +0000 Subject: [SciPy-user] FAIL: check_dot (scipy.linalg.tests.test_blas.test_fblas1_simple) In-Reply-To: References: Message-ID: Hi All, I still get these (related) errors. My setup is Python 2.5 OS X 10.4.8 PPC Numpy 1.0.1.dev3436 Scipy 0.5.2.dev2316 Latest xcode compilers with gcc_select 4.0.1 gnu fortran gfortran 4.2.0 20061007 on this platform, LAPACK/BLAS come from the altivec and accelerate framework Does anyone else see this? Andrew Andrew Jaffe wrote: > Hi All- > > I get the following error with > > scipy.__version__ = '0.5.0.2121' > > on PPC OSX 2.4.3 Universal Build with numpy 1.0.2889 (note that the > latter has a known longdouble problem, but I don't think that's > related). Indeed the fblas complex [c,z]dot[c,u] functions do seem to > fail. (In fact, zdotc([1,-4,3],[2,3,1]) hangs the interpreter...) > > Andrew > > > ====================================================================== > FAIL: check_dot (scipy.linalg.tests.test_blas.test_fblas1_simple) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy-0.5.0.2121-py2.4-macosx-10.3-fat.egg/scipy/linalg/tests/test_blas.py", > line 75, in check_dot > assert_almost_equal(f([3j,-4,3-4j],[2,3,1]),-9+2j) > File > "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/numpy-1.0.2889-py2.4-macosx-10.3-fat.egg/numpy/testing/utils.py", > line 156, in assert_almost_equal > assert round(abs(desired - actual),decimal) == 0, msg > AssertionError: > Items are not equal: > ACTUAL: (-1.9980511665344238+2.1130658899732593e-36j) > DESIRED: (-9+2j) > > ====================================================================== > FAIL: check_dot (scipy.lib.tests.test_blas.test_fblas1_simple) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy-0.5.0.2121-py2.4-macosx-10.3-fat.egg/scipy/lib/blas/tests/test_blas.py", > line 76, in check_dot > assert_almost_equal(f([3j,-4,3-4j],[2,3,1]),-9+2j) > File > "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/numpy-1.0.2889-py2.4-macosx-10.3-fat.egg/numpy/testing/utils.py", > line 156, in assert_almost_equal > assert round(abs(desired - actual),decimal) == 0, msg > AssertionError: > Items are not equal: > ACTUAL: (-1.9980511665344238+2.1996782422872647e-36j) > DESIRED: (-9+2j) From bblais at bryant.edu Thu Nov 16 05:53:57 2006 From: bblais at bryant.edu (Brian Blais) Date: Thu, 16 Nov 2006 05:53:57 -0500 Subject: [SciPy-user] Regression report like in Excel Message-ID: <455C4345.7070904@bryant.edu> Hello, I was wondering if there is a function in numpy/scipy for returning/printing a regression report like I get in Excel. I know that some of the functions are there, like the t-test, least square, etc. but is there a convenient wrapper for doing the following (sorry for the wrapping, but I think you can get the point): SUMMARY OUTPUT Regression Statistics Multiple R 0.26 R Square 0.07 Adjusted R Square -0.01 Standard Error 3.08 Observations 55 ANOVA df SS MS F Significance of F Regression 4 34.24 8.56 0.90 0.47 Residual 50 474.87 9.50 Total 54 509.11 Coefficients Standard Error t Stat P-value Lower 95% Upper 95% Intercept -12.98 23.62 -0.55 0.59 -60.42 34.46 Ave Isotope Value C -0.47 0.53 -0.89 0.38 -1.53 0.59 Ave Isotope Value Amt% C 0.42 0.29 1.42 0.16 -0.17 1.01 Ave Isotope Value N 0.13 0.23 0.60 0.55 -0.32 0.59 Ave Isotope Value Amt% N 1.17 1.13 1.04 0.30 -1.10 3.45 thanks, Brian Blais -- ----------------- bblais at bryant.edu http://web.bryant.edu/~bblais From nmarais at sun.ac.za Thu Nov 16 08:48:27 2006 From: nmarais at sun.ac.za (Neilen Marais) Date: Thu, 16 Nov 2006 15:48:27 +0200 Subject: [SciPy-user] fast kd-tree or octree implementations for python Message-ID: Hi. I'm doing a FEM (Finite Elements) code in python. It uses a tetrahedral mesh to represent the geometry. For post-processing one specifies a list of 3D coordinates to calculate field values at, which requires the tet that contains a given point. Right now I'm brute-forcing it checking each tet for each point, which is very slow on large meshes since the number of points you are looking for also tend to increase with mesh size. It seems a kd-tree or octree data-structure will allow me to do lookups in O(logN) time at the cost of building the data structure in O(N*logN) time. I am looking for preferably a fast kd-tree implementation with a GPL-compatible license that is already wrapped for Python, but I'd be willing to make my own wrappers if needed. So far I've found CGAL - and GTS -- The GNU Triangulated Surface Library - . CGAL has python wrappers but the tree code is under the QPL license (not GPL compat) while GTS doesn't come with ready-made python wrappers. What are other good choices? Thanks Neilen -- you know its kind of tragic we live in the new world but we've lost the magic -- Battery 9 (www.battery9.co.za) From jelle.feringa at ezct.net Thu Nov 16 09:17:21 2006 From: jelle.feringa at ezct.net (Jelle Feringa / EZCT Architecture & Design Research) Date: Thu, 16 Nov 2006 15:17:21 +0100 Subject: [SciPy-user] fast kd-tree or octree implementations for python In-Reply-To: Message-ID: <000701c70989$ef1ca570$c000a8c0@JELLE> Biopython has a good kd-tree implementation, that takes Numeric arrays as input. Jelle Feringa EZCT ARCHITECTURE & DESIGN RESEARCH Office: +33 (0) 1 42 40 19 81 Fax: +33 (0) 1 43 14 94 61 Cell Nl: +31 (0) 6 44 02 10 15 Cell Fr: +33 (0) 6 63 51 27 46 www.ezct.net jelle.feringa at ezct.net From jelle.feringa at ezct.net Thu Nov 16 09:18:19 2006 From: jelle.feringa at ezct.net (Jelle Feringa / EZCT Architecture & Design Research) Date: Thu, 16 Nov 2006 15:18:19 +0100 Subject: [SciPy-user] fast kd-tree or octree implementations for python In-Reply-To: Message-ID: <000801c7098a$118fc4c0$c000a8c0@JELLE> By the way; have you heared of the python cgal project? http://cgal-python.gforge.inria.fr/ Jelle Feringa EZCT ARCHITECTURE & DESIGN RESEARCH Office: +33 (0) 1 42 40 19 81 Fax: +33 (0) 1 43 14 94 61 Cell Nl: +31 (0) 6 44 02 10 15 Cell Fr: +33 (0) 6 63 51 27 46 www.ezct.net jelle.feringa at ezct.net -----Original Message----- From: scipy-user-bounces at scipy.org [mailto:scipy-user-bounces at scipy.org] On Behalf Of Neilen Marais Sent: Thursday, November 16, 2006 2:48 PM To: scipy-user at scipy.org Cc: python-list at python.org Subject: [SciPy-user] fast kd-tree or octree implementations for python Hi. I'm doing a FEM (Finite Elements) code in python. It uses a tetrahedral mesh to represent the geometry. For post-processing one specifies a list of 3D coordinates to calculate field values at, which requires the tet that contains a given point. Right now I'm brute-forcing it checking each tet for each point, which is very slow on large meshes since the number of points you are looking for also tend to increase with mesh size. It seems a kd-tree or octree data-structure will allow me to do lookups in O(logN) time at the cost of building the data structure in O(N*logN) time. I am looking for preferably a fast kd-tree implementation with a GPL-compatible license that is already wrapped for Python, but I'd be willing to make my own wrappers if needed. So far I've found CGAL - and GTS -- The GNU Triangulated Surface Library - . CGAL has python wrappers but the tree code is under the QPL license (not GPL compat) while GTS doesn't come with ready-made python wrappers. What are other good choices? Thanks Neilen -- you know its kind of tragic we live in the new world but we've lost the magic -- Battery 9 (www.battery9.co.za) _______________________________________________ SciPy-user mailing list SciPy-user at scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user __________ Informacisn de NOD32, revisisn 1868 (20061115) __________ Este mensaje ha sido analizado con NOD32 antivirus system http://www.nod32.com From jonathan.taylor at stanford.edu Thu Nov 16 11:45:59 2006 From: jonathan.taylor at stanford.edu (Jonathan Taylor) Date: Thu, 16 Nov 2006 11:45:59 -0500 Subject: [SciPy-user] Regression report like in Excel In-Reply-To: <455C4345.7070904@bryant.edu> References: <455C4345.7070904@bryant.edu> Message-ID: <455C95C7.4060907@stanford.edu> Hi Brian, There is a package in the sandbox (that I will hopefully get moved out eventually) called models that has regression models. The result of the fit has the things you want.... -- Jonathan Brian Blais a ?crit : > Hello, > > I was wondering if there is a function in numpy/scipy for returning/printing a > regression report like I get in Excel. I know that some of the functions are there, > like the t-test, least square, etc. but is there a convenient wrapper for doing the > following (sorry for the wrapping, but I think you can get the point): > > SUMMARY OUTPUT > > Regression Statistics > Multiple R 0.26 > R Square 0.07 > Adjusted R Square -0.01 > Standard Error 3.08 > Observations 55 > > ANOVA > df SS MS F Significance of F > Regression 4 34.24 8.56 0.90 0.47 > Residual 50 474.87 9.50 > Total 54 509.11 > > Coefficients Standard Error t Stat P-value Lower 95% Upper 95% > Intercept -12.98 23.62 -0.55 0.59 -60.42 34.46 > Ave Isotope Value C -0.47 0.53 -0.89 0.38 -1.53 0.59 > Ave Isotope Value Amt% C 0.42 0.29 1.42 0.16 -0.17 1.01 > Ave Isotope Value N 0.13 0.23 0.60 0.55 -0.32 0.59 > Ave Isotope Value Amt% N 1.17 1.13 1.04 0.30 -1.10 3.45 > > > > > thanks, > > Brian Blais > > > > From iain at day-online.org.uk.invalid Thu Nov 16 15:33:28 2006 From: iain at day-online.org.uk.invalid (Iain Day) Date: Thu, 16 Nov 2006 20:33:28 +0000 Subject: [SciPy-user] Precision error on Mac OS X (PPC) In-Reply-To: <331116dc0611152022p6d0f6db4nc1b71aab91578d55@mail.gmail.com> References: <331116dc0611152022p6d0f6db4nc1b71aab91578d55@mail.gmail.com> Message-ID: Hi, I've just found the numpy mailing list, so I'll post there, and see if any one can help. Thanks, Iain Erin Sheldon wrote: > Hi Iain - > > So I ran this on my powerbook G4, 10.4.8: > [~]|11> print numpy.finfo(numpy.float128).min,numpy.finfo(numpy.float128).max,numpy.finfo(numpy.float128).eps > 9223372034707292160.0 -9223372034707292160.0 1.38178697010200053818e-76 > > Same answer you got but no errors reported. But of > course those answers are totally wrong. > > Same thing on my AMD64 machine: > In [6]: print numpy.finfo(numpy.float128).min,numpy.finfo(numpy.float128).max, > numpy.finfo(numpy.float128).eps > -1.18973149535723176502e+4932 1.18973149535723176502e+4932 > 1.08420217248550443401e-19 > > Looks better. So there is a bug on OS X it seems. > Erin > > > On 11/14/06, Iain Day wrote: >> Hi, >> >> I apologise if this is the wrong list for this. I have been having some >> precision issues with some code I've got. I've searched the list >> archives and came across these tests. SciPy and numpy are installed from >> Fink, and running on a 1.5GHz G4 with Mac os x 10.4.8. >> >> >>> import numpy >> >>> import scipy >> >>> numpy.__version__ >> '1.0' >> >>> scipy.__version__ >> '0.5.1' >> >>> print numpy.finfo(numpy.float32).min >> -3.40282346639e+38 >> >>> print numpy.finfo(numpy.float32).min, >> numpy.finfo(numpy.float32).max, numpy.finfo(numpy.float32).eps >> -3.40282346639e+38 3.40282346639e+38 1.19209289551e-07 >> >>> print numpy.finfo(numpy.float64).min, >> numpy.finfo(numpy.float64).max, numpy.finfo(numpy.float64).eps >> -1.79769313486e+308 1.79769313486e+308 2.22044604925e-16 >> >>> print numpy.finfo(numpy.float128).min, >> numpy.finfo(numpy.float128).max, numpy.finfo(numpy.float128).eps >> Warning: overflow encountered in add >> Warning: invalid value encountered in subtract >> Warning: invalid value encountered in subtract >> Warning: overflow encountered in add >> Warning: invalid value encountered in subtract >> Warning: invalid value encountered in subtract >> 9223372034707292160.0 -9223372034707292160.0 1.38178697010200053818e-76 >> >> Any thoughts? >> >> Iain >> >> _______________________________________________ >> SciPy-user mailing list >> SciPy-user at scipy.org >> http://projects.scipy.org/mailman/listinfo/scipy-user >> From anand at soe.ucsc.edu Fri Nov 17 00:08:22 2006 From: anand at soe.ucsc.edu (Anand Patil) Date: Fri, 17 Nov 2006 00:08:22 -0500 Subject: [SciPy-user] Array indexing in Weave Message-ID: <455D43C6.7050307@cse.ucsc.edu> Hi all, I'm trying to get the hang of Weave. The following: from numpy import * from numpy.random import * from scipy import weave A=zeros((10,10),'int') code = """ int i, j; for(i=0;i<10;i++){ for(j=0;j<10;j++){ A(i,j) = i * j; } } """ weave.inline(code,['A']) causes a mysterious error: In [4]: run test /Users/anand/.python24_compiled/sc_b84b6757c6b3041e185ca5eff00c331c0.cpp: In function 'PyObject* compiled_func(PyObject*, PyObject*)': /Users/anand/.python24_compiled/sc_b84b6757c6b3041e185ca5eff00c331c0.cpp:677: error: 'A' cannot be used as a function It looks like it doesn't like the syntax A(i,j) for accessing the elements of A, but isn't that how it's done in the examples in the numpy book? Thanks in advance, Anand From ckkart at hoc.net Fri Nov 17 00:10:55 2006 From: ckkart at hoc.net (Christian Kristukat) Date: Fri, 17 Nov 2006 14:10:55 +0900 Subject: [SciPy-user] Array indexing in Weave In-Reply-To: <455D43C6.7050307@cse.ucsc.edu> References: <455D43C6.7050307@cse.ucsc.edu> Message-ID: <455D445F.3090705@hoc.net> Anand Patil wrote: > Hi all, > > I'm trying to get the hang of Weave. The following: > > from numpy import * > from numpy.random import * > from scipy import weave > > A=zeros((10,10),'int') > code = """ > > int i, j; > > for(i=0;i<10;i++){ > for(j=0;j<10;j++){ > A(i,j) = i * j; > } > } > > """ > weave.inline(code,['A']) > > causes a mysterious error: > > In [4]: run test > > /Users/anand/.python24_compiled/sc_b84b6757c6b3041e185ca5eff00c331c0.cpp: > In function 'PyObject* compiled_func(PyObject*, PyObject*)': > /Users/anand/.python24_compiled/sc_b84b6757c6b3041e185ca5eff00c331c0.cpp:677: > error: 'A' cannot be used as a function > > It looks like it doesn't like the syntax A(i,j) for accessing the > elements of A, but isn't that how it's done in the examples in the numpy > book? > > Thanks in advance, > Anand > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user You need anadditional keyword argument: from scipy.weave import converters weave.inline(code,['A'],type_converters = converters.blitz) Christian From anand at soe.ucsc.edu Fri Nov 17 00:13:10 2006 From: anand at soe.ucsc.edu (Anand Patil) Date: Fri, 17 Nov 2006 00:13:10 -0500 Subject: [SciPy-user] General parallel processing question Message-ID: <455D44E6.3030506@cse.ucsc.edu> Hi again everyone, Say I have two objects A and B. A's member functions _occasionally_ want to call the member functions of B, and vice versa. Both A and B have to do a lot of work between calls to each other's member functions. I'd like to push B off to a new process, but be able to program as if it were still in the same process as A. That is, I'd like to be able to call B's member functions from A without having to teach A how to do interprocess communication. The solution I've been thinking of is to write 'avatar' objects that represent objects living in different processes and know how to pass member function calls along to their 'true selves' (probably using mpi4py and/or IPython1, but I haven't worked out the details yet). If A lives in process 0 and B gets pushed to process 1, I would create an avatar of B in process 0 and one of A in process 1. That scheme would get kind of klunky, though. Has anyone thought about/ dealt with this situation before? Thanks, Anand From robert.kern at gmail.com Fri Nov 17 00:18:08 2006 From: robert.kern at gmail.com (Robert Kern) Date: Thu, 16 Nov 2006 23:18:08 -0600 Subject: [SciPy-user] General parallel processing question In-Reply-To: <455D44E6.3030506@cse.ucsc.edu> References: <455D44E6.3030506@cse.ucsc.edu> Message-ID: <455D4610.5040303@gmail.com> Anand Patil wrote: > Hi again everyone, > > Say I have two objects A and B. A's member functions _occasionally_ want > to call the member functions of B, and vice versa. Both A and B have to > do a lot of work between calls to each other's member functions. > > I'd like to push B off to a new process, but be able to program as if it > were still in the same process as A. That is, I'd like to be able to > call B's member functions from A without having to teach A how to do > interprocess communication. > > The solution I've been thinking of is to write 'avatar' objects that > represent objects living in different processes and know how to pass > member function calls along to their 'true selves' (probably using > mpi4py and/or IPython1, but I haven't worked out the details yet). If A > lives in process 0 and B gets pushed to process 1, I would create an > avatar of B in process 0 and one of A in process 1. > > That scheme would get kind of klunky, though. Has anyone thought about/ > dealt with this situation before? Yes, lots. You almost certainly don't want to roll your own solution. Look at Twisted's Perspective Broker (links near the bottom of the page): http://twistedmatrix.com/projects/core/documentation/howto/index.html and Pyro: http://pyro.sourceforge.net/ There are a handful of other solutions, too. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From ellisonbg.net at gmail.com Fri Nov 17 00:49:19 2006 From: ellisonbg.net at gmail.com (Brian Granger) Date: Thu, 16 Nov 2006 22:49:19 -0700 Subject: [SciPy-user] General parallel processing question In-Reply-To: <455D44E6.3030506@cse.ucsc.edu> References: <455D44E6.3030506@cse.ucsc.edu> Message-ID: <6ce0ac130611162149q3c53fdedm1a9e3b8b6bcadb0f@mail.gmail.com> I think the best approach for this is to use Twisted. Roberts recommendation of using Perspective Broker is a good one. There is also a relatively new protocol in Twisted that might work well: http://glyf.livejournal.com/61507.html There is one critical point though that in my mind makes non-blocking sockets absolutely necessary for this type of thing (Twisted uses non-blocking sockets I don't think Pyro does). If you use blocking sockets a CPU bound activity in one process will *completely block* the execution path in the other process. Because of this if you use blocking sockets your system will not experience any performance benefits even though it appears to be running in parallel. The proper way of handling this is to use non-blocking sockets to hide the fact that the process on the other end of the wire may be executing blocking code. While IPython1 is not really designed for the usage case you are talking about (it could still be done though), it does use this architecture of hiding blocking code using multiple processes and non-blocking sockets. While mpi4py is an amazing package, I think Twisted is better for this type of thing. The focus of MPI is moving data around, not calling remote methods. One more point as I think about it. Even though IPython1 is not designed for this type of thing, it would be possible to quickly build something on top of IPython1 that does what you mention. IPython1 provides 3 basic operations, pushing Python objects to another process, calling Python code in another process and pull Python objects back from another process. To do what you mention, you could do the following: 1. Push the object to a remote system, call it myObject 2. Write a simple wrapper class that proxies the remote myObject on your local process. You proxy object would simply be calling IPython's execute and pull methods. 3. Then you can call the local proxy and it act just like the real thing. There are some subtleties about this though. Currently IPython 1 has two clients: a synchronous one and an asynchronous one (that uses Perspective Broker). While the synchronous client is more pleasant to use, you would need to poll to get the result of the remote call (either that or it would block). All that to say: have a look at Twisted and IPython1 - which is best for your case really depends on if you are trying to get a performance boost or just need to have distributed objects. Feel free to bug us more on the ipython-dev list. Brian On 11/16/06, Anand Patil wrote: > Hi again everyone, > > Say I have two objects A and B. A's member functions _occasionally_ want > to call the member functions of B, and vice versa. Both A and B have to > do a lot of work between calls to each other's member functions. > > I'd like to push B off to a new process, but be able to program as if it > were still in the same process as A. That is, I'd like to be able to > call B's member functions from A without having to teach A how to do > interprocess communication. > > The solution I've been thinking of is to write 'avatar' objects that > represent objects living in different processes and know how to pass > member function calls along to their 'true selves' (probably using > mpi4py and/or IPython1, but I haven't worked out the details yet). If A > lives in process 0 and B gets pushed to process 1, I would create an > avatar of B in process 0 and one of A in process 1. > > That scheme would get kind of klunky, though. Has anyone thought about/ > dealt with this situation before? > > Thanks, > Anand > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > From David.L.Goldsmith at noaa.gov Fri Nov 17 02:28:24 2006 From: David.L.Goldsmith at noaa.gov (David Goldsmith) Date: Thu, 16 Nov 2006 23:28:24 -0800 Subject: [SciPy-user] What can and cannot be interpreted as a vector by odeint? Message-ID: <455D6498.1010706@noaa.gov> I was having trouble getting odeint to work w/ what I thought should be legitimate vector arguments. Looking for examples, I found test_integrate.py and thus found at least one way which works. However, I'm left wondering why the following behaves the way it does: >>> import numpy as N >>> import scipy as S >>> from scipy import integrate as SI >>> def f(y,t0=0): ... return N.matrix([[0,1],[-1,0]])*N.matrix([[y[0]],[y[1]]]) # [y,y']'=f([y,y']) = "simplest" harmonic oscillator system ... >>> f([3,2]) # check that f does what I think it does matrix([[ 2], [-3]]) >>> # it does >>> SI.odeint(f, (1,0), N.linspace(0,2*N.pi)) # should return cosine over the domain 0 to 2pi, instead results in: ValueError: object too deep for desired array odepack.error: Result from function call is not a proper array of floats. ValueError: object too deep for desired array odepack.error: Result from function call is not a proper array of floats. Illegal input detected (internal error). Granted, my way is more verbose than how it's done in the test, but what's wrong with it technically? DG PS: Is there a substantive difference between odeint and odepack (I couldn't detect one from their resp. help doc)? And what're the chances of getting more examples, described as such and placed in a folder called Examples (even if it's only by essentially duplicating the tests)? Thanks! From robert.kern at gmail.com Fri Nov 17 02:41:00 2006 From: robert.kern at gmail.com (Robert Kern) Date: Fri, 17 Nov 2006 01:41:00 -0600 Subject: [SciPy-user] What can and cannot be interpreted as a vector by odeint? In-Reply-To: <455D6498.1010706@noaa.gov> References: <455D6498.1010706@noaa.gov> Message-ID: <455D678C.5090308@gmail.com> David Goldsmith wrote: > I was having trouble getting odeint to work w/ what I thought should be > legitimate vector arguments. Looking for examples, I found > test_integrate.py and thus found at least one way which works. However, > I'm left wondering why the following behaves the way it does: > > >>> import numpy as N > >>> import scipy as S > >>> from scipy import integrate as SI > >>> def f(y,t0=0): > ... return N.matrix([[0,1],[-1,0]])*N.matrix([[y[0]],[y[1]]]) # > [y,y']'=f([y,y']) = "simplest" harmonic oscillator system You'll probably want to return a real array object, not a matrix. The handwritten C code that wraps FORTRAN ODEPACK was written long before arrays could be subclassed. > PS: Is there a substantive difference between odeint and odepack (I > couldn't detect one from their resp. help doc)? odeint() is a function that wraps the functionality of ODEPACK. It is defined in the module called odepack. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From bblais at bryant.edu Fri Nov 17 08:30:06 2006 From: bblais at bryant.edu (Brian Blais) Date: Fri, 17 Nov 2006 08:30:06 -0500 Subject: [SciPy-user] Regression report like in Excel In-Reply-To: <455C95C7.4060907@stanford.edu> References: <455C4345.7070904@bryant.edu> <455C95C7.4060907@stanford.edu> Message-ID: <455DB95E.9050300@bryant.edu> Jonathan Taylor wrote: > Hi Brian, > > There is a package in the sandbox (that I will hopefully get moved out > eventually) called models that has regression models. The result of the > fit has the things you want.... > How do I access functions in the sandbox? I have to do a recompile of scipy soon anyway, but I never could figure out what I needed to do to get sandbox things working. Is there an FAQ for this? thanks, bb -- ----------------- bblais at bryant.edu http://web.bryant.edu/~bblais From H.J.C.Berendsen at rug.nl Fri Nov 17 08:30:41 2006 From: H.J.C.Berendsen at rug.nl (Herman Berendsen) Date: Fri, 17 Nov 2006 13:30:41 +0000 (UTC) Subject: [SciPy-user] Array documentation Message-ID: For my own use, but maybe useful for others, I have made an HTML documentation on arrays (attributes, methods, functions, scipy subpackages, with examples). It can be found on my website http://www.hjcb.nl/python/ This site also contains suggestions how to install scipy on windows. The documentation will be further improved with more examples in the future. Comments to H.J.C.Berendsen at rug.nl are welcome. From David.L.Goldsmith at noaa.gov Fri Nov 17 11:46:22 2006 From: David.L.Goldsmith at noaa.gov (David L. Goldsmith) Date: Fri, 17 Nov 2006 08:46:22 -0800 Subject: [SciPy-user] What can and cannot be interpreted as a vector by odeint? In-Reply-To: <455D678C.5090308@gmail.com> References: <455D6498.1010706@noaa.gov> <455D678C.5090308@gmail.com> Message-ID: <455DE75E.4000007@noaa.gov> Robert Kern wrote: > David Goldsmith wrote: > >> I was having trouble getting odeint to work w/ what I thought should be >> legitimate vector arguments. Looking for examples, I found >> test_integrate.py and thus found at least one way which works. However, >> I'm left wondering why the following behaves the way it does: >> >> >>> import numpy as N >> >>> import scipy as S >> >>> from scipy import integrate as SI >> >>> def f(y,t0=0): >> ... return N.matrix([[0,1],[-1,0]])*N.matrix([[y[0]],[y[1]]]) # >> [y,y']'=f([y,y']) = "simplest" harmonic oscillator system >> > > You'll probably want to return a real array object, not a matrix. The > handwritten C code that wraps FORTRAN ODEPACK was written long before arrays > could be subclassed. > Ah, I see. Two follow ups: so neither can I return a Python sequence? Nor a complex-valued array? DG From strawman at astraw.com Fri Nov 17 13:39:17 2006 From: strawman at astraw.com (Andrew Straw) Date: Fri, 17 Nov 2006 10:39:17 -0800 Subject: [SciPy-user] General parallel processing question In-Reply-To: <6ce0ac130611162149q3c53fdedm1a9e3b8b6bcadb0f@mail.gmail.com> References: <455D44E6.3030506@cse.ucsc.edu> <6ce0ac130611162149q3c53fdedm1a9e3b8b6bcadb0f@mail.gmail.com> Message-ID: <455E01D5.1070108@astraw.com> Brian Granger wrote: > There is one critical point though that in my mind makes non-blocking > sockets absolutely necessary for this type of thing (Twisted uses > non-blocking sockets I don't think Pyro does). If you use blocking > sockets a CPU bound activity in one process will *completely block* > the execution path in the other process. Because of this if you use > blocking sockets your system will not experience any performance > benefits even though it appears to be running in parallel. > I just want to clear up any misconception about Pyro - there are several ways to avoid the issue Brian mentions. The easiest are "one way" calls. Another approach is to use multi-threading. Anyhow, I find Pyro to be a quick and easy way to get started on IPC. Pyro's approach is apparently inflammatory to some of the Twisted developers, I think because they're (rightfully) concerned about security. However, if you're running on a single, (possibly multi-core) machine or a trusted LAN, the security issue is a non-issue. -Andrew From robert.kern at gmail.com Fri Nov 17 13:43:26 2006 From: robert.kern at gmail.com (Robert Kern) Date: Fri, 17 Nov 2006 12:43:26 -0600 Subject: [SciPy-user] Regression report like in Excel In-Reply-To: <455DB95E.9050300@bryant.edu> References: <455C4345.7070904@bryant.edu> <455C95C7.4060907@stanford.edu> <455DB95E.9050300@bryant.edu> Message-ID: <455E02CE.5020006@gmail.com> Brian Blais wrote: > How do I access functions in the sandbox? I have to do a recompile of scipy soon > anyway, but I never could figure out what I needed to do to get sandbox things > working. Is there an FAQ for this? Create a file Lib/sandbox/enabled_packages.txt with one package name that you want to enable per line. Rebuild. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From strawman at astraw.com Fri Nov 17 13:44:34 2006 From: strawman at astraw.com (Andrew Straw) Date: Fri, 17 Nov 2006 10:44:34 -0800 Subject: [SciPy-user] General parallel processing question In-Reply-To: <6ce0ac130611162149q3c53fdedm1a9e3b8b6bcadb0f@mail.gmail.com> References: <455D44E6.3030506@cse.ucsc.edu> <6ce0ac130611162149q3c53fdedm1a9e3b8b6bcadb0f@mail.gmail.com> Message-ID: <455E0312.5080308@astraw.com> Brian Granger wrote: > There is one critical point though that in my mind makes non-blocking > sockets absolutely necessary for this type of thing (Twisted uses > non-blocking sockets I don't think Pyro does). If you use blocking > sockets a CPU bound activity in one process will *completely block* > the execution path in the other process. Because of this if you use > blocking sockets your system will not experience any performance > benefits even though it appears to be running in parallel. > I just want to clear up any misconception about Pyro - there are several ways to avoid the issue Brian mentions. The easiest are "one way" calls. Another approach is to use multi-threading. Anyhow, I find Pyro to be a quick and easy way to get started on IPC. [Note: Pyro's approach is apparently inflammatory to some of the Twisted developers, I think because they're (rightfully) concerned about security. However, if you're running on a single, (possibly multi-core) machine or a trusted LAN, the security issue is a non-issue.] -Andrew From bblais at bryant.edu Fri Nov 17 13:51:02 2006 From: bblais at bryant.edu (Brian Blais) Date: Fri, 17 Nov 2006 13:51:02 -0500 Subject: [SciPy-user] About alternatives to Matlab In-Reply-To: <1163720268.611923.3180@e3g2000cwe.googlegroups.com> References: <1161613941.550194.204870@e3g2000cwe.googlegroups.com> <1163711343.870829.110030@h48g2000cwc.googlegroups.com> <1163720268.611923.3180@e3g2000cwe.googlegroups.com> Message-ID: <455E0496.4020703@bryant.edu> Matimus wrote: > Boris wrote: > > Hi, is there any alternative software for Matlab? Although Matlab is > > powerful & popular among mathematical & engineering guys, it still > > costs too much & not publicly open. So I wonder if there's similar > > software/lang that is open & with comparable functionality, at least > > for numerical aspect. Thanks! > > There is also Scilab. > If anybody knows the reason I'd be happy to hear it. I feel like I need to respond on this thread, as a recent Matlab/Octave/Scilab to Python convert. I'm cross-posting this to the scipy list, because there was a recent thread about advantages to Python over Matlab. Bottom line: Python is more than a replacement for Matlab, in almost every capacity. There are a couple of places here and there where I feel Matlab still has an advantage, but since I converted about 12 months ago, I have run Matlab only a couple of times, and only to send something to someone who didn't have Python installed. I've been using Matlab for more than 10 years, in every part of my research and teaching. When I started to teach courses with a larger Matlab component, I looked for free/cheap alternatives that the students could use on their own machines. There was the student version of Matlab, which was crippled in ways unacceptable to me. Octave was good, and I used it a couple of years, but the MS Windows port is pretty horrible. I still use it some on Linux, but on Windows it requires Cygwin to be installed, and performance takes a *huge* hit with the compiled extensions in Windows. The community is pretty amazing, and the main author John Eaton is nothing short of incredible (I've personally received bug fix responses within minutes of submitting the bug report!). Writing C++ extensions is also pretty easy in Octave, and I made a lot of use of that. The graphics uses a connection to Gnuplot, which is ok. I used Scilab for a short while. It did install more cleanly in Windows, and the performance was generally better than Octave. I didn't like how some things were not Matlab compatible for no good reason. I got the feeling from the community that it wasn't as open, and that decisions were somewhat arbitrary. GUI syntax was weird, and compiling extensions was a real pain, requiring more than one file per function. I was introduced to python about 12 months ago, and haven't looked back since. :) I want to state some of the hurdles that I felt in the transition, in the hope that it will help others to overcome them. The advantages to Python far outweigh the problems that I had. 1) in Matlab, you can call a function without any execfile() or import statements. This impacts Python negatively in the ease of using it interactively. On the other hand, the one-function per file organization of Matlab can get a little hard to follow. 2) following up on point 1), this has an effect on matplotlib more drastically. Turning it to interactive mode (ion()) helps, but in Linux I get window refresh issues with this mode. Switching to ipython for the shell, making sure to call it with ipython -pylab, has been a big help in this regard. 3) 3D plotting requires yet-another library. luckily I haven't had to use this much, but I hope that someday that it will be part of matplotlib. 4) GUI development is a bit easier in Matlab for small projects, and harder for larger ones. I like using wax in python, which wraps wxPython. Others swear by Dabo, but I always get two windows popping up when I run even the hello world daboui program. At any rate, wxPython looks much better on Windows than the same interface in Matlab, and it is more robust across operating systems. 5) although stated in the python docs that python is easy to interface with C, and in the scipy docs that it is easier to interface to C than Matlab, I cannot agree. perhaps it is my limitation, but I found that the API was more complicated (because of the multiple data structures), and having to keep track of references was something I never had to do in writing Matlab extensions. HOWEVER, once I found Pyrex, all of that changed. Pyrex is simply the best way to write an extension that I have ever seen, and I have never seen its equal for any other language. So my recommendation for a (nearly) complete Matlab replacement would be: python numpy scipy matplotlib pyrex There is a bit of a learning curve, but it is well worth it. On an amusing note, if you work in Python for a while, and go back to Matlab for a bit, you will find that you will forget your semi-colons at the ends of the Matlab lines, and all of your arrays will display and scroll like crazy on your screen. :) thanks all for making such a great set of tools! Brian Blais -- ----------------- bblais at bryant.edu http://web.bryant.edu/~bblais From David.L.Goldsmith at noaa.gov Fri Nov 17 16:44:55 2006 From: David.L.Goldsmith at noaa.gov (David L. Goldsmith) Date: Fri, 17 Nov 2006 13:44:55 -0800 Subject: [SciPy-user] Using odeint to solve complex-valued ode's Message-ID: <455E2D57.5090602@noaa.gov> OK, I tried odeint(f, y0, t) where f is a complex-valued function of y and y' and was told: TypeError: a float is required in line 120 of odeint so I tried: odeint(real(f), real(y0), t) and was told: odepack.error: The function and its Jacobian must be callable in line 120 of odeint. I also tried a few other ways I could think of, all failed. So it would appear that I must convert my complex-valued f into a real vector-valued function before passing it to odeint - if this is incorrect, please supply an example of how to construct things so that odeint will take a complex-valued f. Thanks! DG From robert.kern at gmail.com Fri Nov 17 17:02:02 2006 From: robert.kern at gmail.com (Robert Kern) Date: Fri, 17 Nov 2006 16:02:02 -0600 Subject: [SciPy-user] Using odeint to solve complex-valued ode's In-Reply-To: <455E2D57.5090602@noaa.gov> References: <455E2D57.5090602@noaa.gov> Message-ID: <455E315A.5060503@gmail.com> David L. Goldsmith wrote: > OK, I tried odeint(f, y0, t) where f is a complex-valued function of y > and y' and was told: > > TypeError: a float is required in line 120 of odeint > > so I tried: > > odeint(real(f), real(y0), t) > > and was told: > > odepack.error: The function and its Jacobian must be callable in line > 120 of odeint. Calling real(f) where f is a function object won't do anything sensible. In fact, what's happening is that numpy doesn't recognize it as an ndarray, so it calls array(f) to make it an array. array() doesn't recognize it as any kind of sequence or number, so it assumes that you wanted to treat it as a scalar type numpy.object_ (the numpy scalar version of object arrays). I believe when faced with an object array, real() simply returns its input just like it does for any dtype that is not explicitly complex. The result is a scalar object, which is not callable; thus, you get that exception. > I also tried a few other ways I could think of, all failed. So it would > appear that I must convert my complex-valued f into a real vector-valued > function before passing it to odeint - if this is incorrect, please > supply an example of how to construct things so that odeint will take a > complex-valued f. Thanks! This is correct from what I remember. I don't think that the underlying ODEPACK handles complex-valued ODEs (except as converted to a real vector-valued ODE). -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From David.L.Goldsmith at noaa.gov Fri Nov 17 18:09:52 2006 From: David.L.Goldsmith at noaa.gov (David L. Goldsmith) Date: Fri, 17 Nov 2006 15:09:52 -0800 Subject: [SciPy-user] Using odeint to solve complex-valued ode's In-Reply-To: <455E315A.5060503@gmail.com> References: <455E2D57.5090602@noaa.gov> <455E315A.5060503@gmail.com> Message-ID: <455E4140.1010703@noaa.gov> Robert Kern wrote: > Calling real(f) where f is a function object won't do anything sensible. In > fact, what's happening is that numpy doesn't recognize it as an ndarray, so it > calls array(f) to make it an array. array() doesn't recognize it as any kind of > sequence or number, so it assumes that you wanted to treat it as a scalar type > numpy.object_ (the numpy scalar version of object arrays). I believe when faced > with an object array, real() simply returns its input just like it does for any > dtype that is not explicitly complex. The result is a scalar object, which is > not callable; thus, you get that exception. > > Yeah, I figured something like that was what was happening. >> This is correct from what I remember. I don't think that the underlying ODEPACK >> handles complex-valued ODEs (except as converted to a real vector-valued ODE) OK. Perhaps you can save me a little time. Let cv() = transpose(u + iv, u' + iv'). Then if I have: cv()' = L * cv() = A*cv() + iB*cv() (where A and B, the real and imaginary parts of L, resp., are real-valued 2x2 matrices) which expanded and separated into real and imaginary parts becomes: cv(u, u')' = A*cv(u,u') - B*cv(v,v') cv(v, v')' = A*cv(v,v') + B*cv(u,u') then this is equivalent to the four by four real-valued system: | A -B | cv(u, u', v, v')' = | B A | * cv(u, u', v, v'), correct? (I hope none of my former linear algebra teachers are reading this :-) . If they are: for the record, A) I'm 99% sure this is right; B) I could of course go look it up, but all my LA books are at work and I'm working at home; and C) I'm still capable of proving it, but it's time consuming, thus the preface: "perhaps you can save me a little time".) Thanks as always, DG From robert.kern at gmail.com Fri Nov 17 18:21:33 2006 From: robert.kern at gmail.com (Robert Kern) Date: Fri, 17 Nov 2006 17:21:33 -0600 Subject: [SciPy-user] Using odeint to solve complex-valued ode's In-Reply-To: <455E4140.1010703@noaa.gov> References: <455E2D57.5090602@noaa.gov> <455E315A.5060503@gmail.com> <455E4140.1010703@noaa.gov> Message-ID: <455E43FD.1040509@gmail.com> David L. Goldsmith wrote: > Robert Kern wrote: >>> This is correct from what I remember. I don't think that the underlying ODEPACK >>> handles complex-valued ODEs (except as converted to a real vector-valued ODE) > OK. Perhaps you can save me a little time. Probably easiest is to assemble your complex arrays from the "packed" inputs, do your complex math, then "repack" the result into the real arrays on output. Something like the following (untested): def pack_into_real(cy): """ Pack a complex array into a real array. """ # Too clever by half, but it works. return N.column_stack([cy.real, cy.imag]).ravel() def unpack_into_complex(y): """ Unpack a complex array from a real array. """ return y[::2] + 1j*y[1::2] def f(y, t0=0): cy = unpack_into_complex(y) cyp = N.dot(N.array([[0.0, 1],[-1,0]]), cy) yp = pack_into_real(cyp) return yp -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From lanceboyle at qwest.net Fri Nov 17 22:06:08 2006 From: lanceboyle at qwest.net (Jerry) Date: Fri, 17 Nov 2006 20:06:08 -0700 Subject: [SciPy-user] Array documentation In-Reply-To: References: Message-ID: <3DCB8FE6-9DE9-4768-84F0-DE63E961E30D@qwest.net> This is a _substantial_ piece of work. You shouldn't have been so modest in your announcement. Jerry On Nov 17, 2006, at 6:30 AM, Herman Berendsen wrote: > For my own use, but maybe useful for others, I have made an HTML > documentation > on arrays (attributes, methods, functions, scipy subpackages, with > examples). It > can be found on my website http://www.hjcb.nl/python/ This site > also contains > suggestions how to install scipy on windows. The documentation will > be further > improved with more examples in the future. Comments to > H.J.C.Berendsen at rug.nl > are welcome. > From gael.varoquaux at normalesup.org Sat Nov 18 04:45:31 2006 From: gael.varoquaux at normalesup.org (Gael Varoquaux) Date: Sat, 18 Nov 2006 10:45:31 +0100 Subject: [SciPy-user] Array documentation In-Reply-To: References: Message-ID: <20061118094531.GA3639@clipper.ens.fr> Very nice and very complete work. Did you do this be hand or did your generate some part from docstrings. In the later case, would you consider sharing the scripts used ? Ga?l On Fri, Nov 17, 2006 at 01:30:41PM +0000, Herman Berendsen wrote: > For my own use, but maybe useful for others, I have made an HTML documentation > on arrays (attributes, methods, functions, scipy subpackages, with examples). It > can be found on my website http://www.hjcb.nl/python/ This site also contains > suggestions how to install scipy on windows. The documentation will be further > improved with more examples in the future. Comments to H.J.C.Berendsen at rug.nl > are welcome. > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user From prabhu at aero.iitb.ac.in Sat Nov 18 05:39:31 2006 From: prabhu at aero.iitb.ac.in (Prabhu Ramachandran) Date: Sat, 18 Nov 2006 16:09:31 +0530 Subject: [SciPy-user] About alternatives to Matlab In-Reply-To: <455E0496.4020703@bryant.edu> References: <1161613941.550194.204870@e3g2000cwe.googlegroups.com> <1163711343.870829.110030@h48g2000cwc.googlegroups.com> <1163720268.611923.3180@e3g2000cwe.googlegroups.com> <455E0496.4020703@bryant.edu> Message-ID: <17758.58083.69027.862918@prpc.aero.iitb.ac.in> >>>>> "Brian" == Brian Blais writes: Brian> 3) 3D plotting requires yet-another library. luckily I Brian> haven't had to use this much, but I hope that someday that Brian> it will be part of matplotlib. I'd rather not say anything about this since I have strong opinions about the subject. Brian> 4) GUI development is a bit easier in Matlab for small Brian> projects, and harder for larger ones. I like using wax in Brian> python, which wraps wxPython. Others swear by Dabo, but I Brian> always get two windows popping up when I run even the hello Brian> world daboui program. At any rate, wxPython looks much Brian> better on Windows than the same interface in Matlab, and it Brian> is more robust across operating systems. You should try and take a look at enthought.traits. It makes creating UIs a lot easier than anything else I've seen. cheers, prabhu From gael.varoquaux at normalesup.org Sat Nov 18 05:48:53 2006 From: gael.varoquaux at normalesup.org (Gael Varoquaux) Date: Sat, 18 Nov 2006 11:48:53 +0100 Subject: [SciPy-user] About alternatives to Matlab In-Reply-To: <17758.58083.69027.862918@prpc.aero.iitb.ac.in> References: <1161613941.550194.204870@e3g2000cwe.googlegroups.com> <1163711343.870829.110030@h48g2000cwc.googlegroups.com> <1163720268.611923.3180@e3g2000cwe.googlegroups.com> <455E0496.4020703@bryant.edu> <17758.58083.69027.862918@prpc.aero.iitb.ac.in> Message-ID: <20061118104853.GB3639@clipper.ens.fr> On Sat, Nov 18, 2006 at 04:09:31PM +0530, Prabhu Ramachandran wrote: > You should try and take a look at enthought.traits. It makes creating > UIs a lot easier than anything else I've seen. I concure. traits/traitsUI is great. Learning curve is a bit steep, though. I am currently writing a tutorial on creating scientific GUI application with traits that should help. I just need to finish it. Ga?l From david at ar.media.kyoto-u.ac.jp Sat Nov 18 06:36:49 2006 From: david at ar.media.kyoto-u.ac.jp (David Cournapeau) Date: Sat, 18 Nov 2006 20:36:49 +0900 Subject: [SciPy-user] About alternatives to Matlab In-Reply-To: <20061118104853.GB3639@clipper.ens.fr> References: <1161613941.550194.204870@e3g2000cwe.googlegroups.com> <1163711343.870829.110030@h48g2000cwc.googlegroups.com> <1163720268.611923.3180@e3g2000cwe.googlegroups.com> <455E0496.4020703@bryant.edu> <17758.58083.69027.862918@prpc.aero.iitb.ac.in> <20061118104853.GB3639@clipper.ens.fr> Message-ID: <455EF051.1010900@ar.media.kyoto-u.ac.jp> Gael Varoquaux wrote: > > I concure. traits/traitsUI is great. Learning curve is a bit steep, > though. I am currently writing a tutorial on creating scientific GUI > application with traits that should help. I just need to finish it. > > Ga?l > > That would be great. matplotlib is practical for "quick" plots, but I don't like it very much (it may be just I don't use it correctly; I invested quite some time into learning python + numpy, and almost non in matplotlib). cheers, David From gael.varoquaux at normalesup.org Sat Nov 18 06:45:09 2006 From: gael.varoquaux at normalesup.org (Gael Varoquaux) Date: Sat, 18 Nov 2006 12:45:09 +0100 Subject: [SciPy-user] About alternatives to Matlab In-Reply-To: <455EF051.1010900@ar.media.kyoto-u.ac.jp> References: <1161613941.550194.204870@e3g2000cwe.googlegroups.com> <1163711343.870829.110030@h48g2000cwc.googlegroups.com> <1163720268.611923.3180@e3g2000cwe.googlegroups.com> <455E0496.4020703@bryant.edu> <17758.58083.69027.862918@prpc.aero.iitb.ac.in> <20061118104853.GB3639@clipper.ens.fr> <455EF051.1010900@ar.media.kyoto-u.ac.jp> Message-ID: <20061118114509.GD3639@clipper.ens.fr> On Sat, Nov 18, 2006 at 08:36:49PM +0900, David Cournapeau wrote: > That would be great. matplotlib is practical for "quick" plots, but I > don't like it very much (it may be just I don't use it correctly; I > invested quite some time into learning python + numpy, and almost non in > matplotlib). You might be thinking of chaco, here, rather than traits/traitsUI. traits and traisUI are not meant for scientific visualisation, but for GUI designing (they do have a few plot widgets that call chaco, but they are not very powerful). Chaco is the enthought library for plotting. It looks great, but I must confess I haven't spent any time learn it. You can have an idea of the basics of traits and traitsUI by checking out http://code.enthought.com/traits . Ga?l From david at ar.media.kyoto-u.ac.jp Sat Nov 18 06:54:47 2006 From: david at ar.media.kyoto-u.ac.jp (David Cournapeau) Date: Sat, 18 Nov 2006 20:54:47 +0900 Subject: [SciPy-user] About alternatives to Matlab In-Reply-To: <20061118114509.GD3639@clipper.ens.fr> References: <1161613941.550194.204870@e3g2000cwe.googlegroups.com> <1163711343.870829.110030@h48g2000cwc.googlegroups.com> <1163720268.611923.3180@e3g2000cwe.googlegroups.com> <455E0496.4020703@bryant.edu> <17758.58083.69027.862918@prpc.aero.iitb.ac.in> <20061118104853.GB3639@clipper.ens.fr> <455EF051.1010900@ar.media.kyoto-u.ac.jp> <20061118114509.GD3639@clipper.ens.fr> Message-ID: <455EF487.9020904@ar.media.kyoto-u.ac.jp> Gael Varoquaux wrote: > > You might be thinking of chaco, here, rather than traits/traitsUI. traits > and traisUI are not meant for scientific visualisation, but for GUI > designing (they do have a few plot widgets that call chaco, but they are > not very powerful). Chaco is the enthought library for plotting. It looks > great, but I must confess I haven't spent any time learn it. > > You can have an idea of the basics of traits and traitsUI by checking out > http://code.enthought.com/traits . > > What I meant was to have a good graphic library to have more complex plots than maplotlib, and to build GUI. I was aware of traits/chaco, but I was not sure about the status, nor if it was ready to be used by end users, David From gael.varoquaux at normalesup.org Sat Nov 18 06:58:55 2006 From: gael.varoquaux at normalesup.org (Gael Varoquaux) Date: Sat, 18 Nov 2006 12:58:55 +0100 Subject: [SciPy-user] About alternatives to Matlab In-Reply-To: <455EF487.9020904@ar.media.kyoto-u.ac.jp> References: <1161613941.550194.204870@e3g2000cwe.googlegroups.com> <1163711343.870829.110030@h48g2000cwc.googlegroups.com> <1163720268.611923.3180@e3g2000cwe.googlegroups.com> <455E0496.4020703@bryant.edu> <17758.58083.69027.862918@prpc.aero.iitb.ac.in> <20061118104853.GB3639@clipper.ens.fr> <455EF051.1010900@ar.media.kyoto-u.ac.jp> <20061118114509.GD3639@clipper.ens.fr> <455EF487.9020904@ar.media.kyoto-u.ac.jp> Message-ID: <20061118115855.GE3639@clipper.ens.fr> On Sat, Nov 18, 2006 at 08:54:47PM +0900, David Cournapeau wrote: > What I meant was to have a good graphic library to have more complex > plots than maplotlib, and to build GUI. I have used matplotlib with traits in a very successful way (The tutorial I am writing will discuss this). Ga?l From jonas.kahn at math.u-psud.fr Sat Nov 18 07:23:23 2006 From: jonas.kahn at math.u-psud.fr (Jonas Kahn) Date: Sat, 18 Nov 2006 13:23:23 +0100 Subject: [SciPy-user] Unexpected behaviour of convolve2d and correlate2d Message-ID: <20061118122323.GA27558@clipper.ens.fr> Hi I have had reproducible segmentation faults on running my code (though it would not crash on all computers, or even on the same on two days interval, even if I think I did not change the configuration). After looking for a while, I think that scipy.signal.correlate2d was the culprit. Here I use it maybe outside its specifications, though. Essentially I am correlating (or convolving with the same consequences...) two input arrays, of which the first has more rows and the second more columns, with periodicity (so flag 'wrap') and expecting output the same size as the first array (so flag 'same'). The first behaviour I find strange from my experiments to get a minimal error-generating example is that, if one array is bigger than the other in both rows and columns, then we keep its shape for the "same" output. I would have expected that we keep the shape of the first array. In [25]: ss.correlate2d(s.ones((2,2)),s.ones((4,4)), 'same', 'wrap') Out[25]: array([[ 4., 4., 4., 4.], [ 4., 4., 4., 4.], [ 4., 4., 4., 4.], [ 4., 4., 4., 4.]]) In [20]: ss.correlate2d(s.ones((4,4)),s.ones((2,2)), 'same', 'wrap') Out[20]: array([[ 4., 4., 4., 4.], [ 4., 4., 4., 4.], [ 4., 4., 4., 4.], [ 4., 4., 4., 4.]]) In fact the decision seems to be based on the total number of entries. In case of equality, the first is chosen. More of a nuisance: when we convolve two arrays with more rows and less columns in the first, we get completely fancy results: In [13]: ss.convolve2d(s.ones((4,4)),s.ones((1,15)), 'same', 'wrap') Out[13]: array([[ 6.21107620e+223, 6.21107620e+223, 1.40000000e+001, 1.50000000e+001], [ 1.50000000e+001, 1.50000000e+001, 1.50000000e+001, 1.50000000e+001], [ 1.50000000e+001, 1.50000000e+001, 1.50000000e+001, 1.50000000e+001], [ 1.50000000e+001, 1.40000000e+001, 1.30000000e+001, 1.71130456e+059]]) instead of 15 everywhere, or: In [34]: ss.correlate2d(s.ones((5,5)),s.ones((1,24)), 'same', 'wrap') Out[34]: array([[ 1.68696161e+69, 1.90000000e+01, 2.00000000e+01, 2.10000000e+01, 2.20000000e+01], [ 2.30000000e+01, 2.40000000e+01, 2.40000000e+01, 2.40000000e+01, 2.40000000e+01], [ 2.40000000e+01, 2.40000000e+01, 2.40000000e+01, 2.40000000e+01, 2.40000000e+01], [ 2.40000000e+01, 2.40000000e+01, 2.40000000e+01, 2.30000000e+01, 2.20000000e+01], [ 2.10000000e+01, nan, nan, nan, nan]]) instead of 24 everywhere. The bigger the arrays, the more fancy the outcome... I am currently on Xubuntu Edgy Eft (fresh install) with: Python 2.4.4c1 within ipython 0.7.2 Scipy 0.5.1 Numpy 1.0.rc1 I have also installed Pywavelets from Pypi: pywt 0.1.4 Hope to see whether this should be considered as a bug, or specifically outside the scope of the function. Meanwhile I rewrite my code to avoid such "extreme" uses of convolve2d and correlate2d... Jonas From david at ar.media.kyoto-u.ac.jp Sun Nov 19 04:43:43 2006 From: david at ar.media.kyoto-u.ac.jp (David Cournapeau) Date: Sun, 19 Nov 2006 18:43:43 +0900 Subject: [SciPy-user] What is missing in scipy to be a top notch environment for signal processing (lpc and co) ? Message-ID: <4560274F.5020908@ar.media.kyoto-u.ac.jp> Hi there, I was wondering how many people here are using numpy/scipy for signal processing, and what are their impression compared to eg matlab ? The point is not to do a matlab vs scipy, but more to spot weak points in scipy, and to change the situation; neither do I want to criticize anything. The whole point is really to improve scipy. I've just finished my second big conversion of matlab -> python code (~5000 lines of matlab code), and I think there are some "holes" in scipy, which would be really useful to fill in. I believe they are general enough so I am not the only one missing them. Here are some functions I missed 1: linear prediction coefficients computation (the matlab lpc function). 2: more flexible autocorrelation method (ala xcorr in matlab). 3: good resampling function in time domain 4: functions capable of running the same algorithm on some strides of an array. More detailed: 1 requires a method to invert a Toeplitz matrix (durbin levinson) and a method for autocorrelation. 2 right now, I believe there is only time domain autocorrelation implementation, which is expensive for any size exceeding a few tens/hundreds samples in numpy. Also, it is not possible to select the lag required. In LPC coding for speech, we often need only a few lags of signals around a few hundreds samples; just computing what is needed would already give a 10 times fold speed increase at least for this kind of problems. For problems where the size of the signal and the number of coefficients is the same scale, a fft based autocorrelation would also be beneficial. 3 basically, we want an equivalent to upfirdn, which is using a polyphase implementation according to matlab doc + good filter design methods (which already exist in scipy AFAIK). 4 I am not sure about this one. A concrete example: if I want to compute the autocorrelation of some frames of a signal, the obvious thing is to use a loop. This is expensive. If I had a matrix which each column is a frame, and an autocorrelation function capable of running an algorithm on each column, this would be much faster. Incidentally, Matlab offers a function buffer, which builds a matrix which each column is a frame, with options for overlapping and border cases. The doc says "Y = BUFFER(X,N) partitions signal vector X into nonoverlapping data segments (frames) of length N. Each data frame occupies one column in the output matrix, resulting in a matrix with N rows." I don't know how, if at all possible, to generalize that to the numpy array. Now, because I don't want to look like a whiner, I have some code to solve partially or totally some of the points: - I have C code to compute Levinson Durbin, checked against matlab. It expects to have the autocorrelation as an contiguous array; as it is mono dimensional, adapt it to multiple stride would be trivial - I have C code to compute only one side, and a few lags of autocorrelation in time domain. This also expects contiguous array, and would be a bit more tricky to adapt. - I have code based on fftw to compute the autocorrelation using fft (can be adapted for cross correlation too). As I think this would be useful in scipy, I understand that it cannot use fftw. Which fft should I use in scipy C code ? - I would be interested in solving 3, and eventually 4, but I would need some advices from others, as I am not sure how to solve them API-wise. I don't know if this is of any interest for other, but I believe some of those functionalities to be a basic requirement for scipy to be used by people in signal processing. Cheers, David From H.J.C.Berendsen at rug.nl Sun Nov 19 05:36:43 2006 From: H.J.C.Berendsen at rug.nl (Herman Berendsen) Date: Sun, 19 Nov 2006 10:36:43 +0000 (UTC) Subject: [SciPy-user] Array documentation References: <20061118094531.GA3639@clipper.ens.fr> Message-ID: Gael Varoquaux normalesup.org> writes: > > Very nice and very complete work. Did you do this be hand or did your > generate some part from docstrings. In the later case, would you consider > sharing the scripts used ? Thanks both respondents and those who sent me an email for the nice comments. Actually, the array documentation is not yet complete, as I do not have added examples for all methods and functions. More will follow, so please check-out in the future. I used the docstrings, but modified and extended by hand (programs never add anything original!). I use the public domain web editor Arachnophilia which keeps the layout of the html file simple and readable. Please also check my posted message (Nov 19) on a module physcon. Herman From H.J.C.Berendsen at rug.nl Sun Nov 19 05:52:02 2006 From: H.J.C.Berendsen at rug.nl (Herman Berendsen) Date: Sun, 19 Nov 2006 10:52:02 +0000 (UTC) Subject: [SciPy-user] physical constants module Message-ID: If you use physical constants (like Planck's constant h, gas constant R, etc.) with python, you may be interested to copy my module physcon.py from http://www.hjcb.nl/python/ It contains a library of physical constants (CODATA values in SI units, with accuracy) and it defines variables. For example, after 'import physcon as pc', pc.h will contain Planck's constant as a float. To see the contents, type help(). From gael.varoquaux at normalesup.org Sun Nov 19 10:38:10 2006 From: gael.varoquaux at normalesup.org (Gael Varoquaux) Date: Sun, 19 Nov 2006 16:38:10 +0100 Subject: [SciPy-user] Unexpected behaviour of convolve2d and correlate2d In-Reply-To: <20061118122323.GA27558@clipper.ens.fr> References: <20061118122323.GA27558@clipper.ens.fr> Message-ID: <20061119153810.GD6313@clipper.ens.fr> Hi, I think you have uncovered a bug, this is taken from a ipython session (I didn't cheat): In [42]: signal.convolve2d(ones((4,4)), ones((1,15)), 'same', 'wrap') Out[42]: array([[ nan, 13. , 14. , 15. ], [ 15. , 15. , 15. , 15. ], [ 15. , 15. , 15. , 15. ], [ 15. , 15892918649396384. , 15892918649396384. , 15892918649396384. ]]) In [43]: signal.convolve2d(ones((4,4)), ones((1,15)), 'same', 'wrap') Out[43]: array([[ nan, 13. , 14. , 15. ], [ 15. , 15. , 15. , 15. ], [ 15. , 15. , 15. , 15. ], [ 15. , 14. , 13. , 12. ]]) In [44]: signal.convolve2d(ones((4,4)), ones((1,15)), 'same', 'wrap') Out[44]: array([[ nan, 13. , 14. , 15. ], [ 15. , 15. , 15. , 15. ], [ 15. , 15. , 15. , 15. ], [ 15. , 14. , 13. , 12. ]]) In [45]: signal.convolve2d(ones((4,4)), ones((1,15)), 'same', 'wrap') Out[45]: array([[ nan, 13. , 14. , 15. ], [ 15. , 15. , 15. , 15. ], [ 15. , 15. , 15. , 15. ], [ 15. , 14. , 13. , 12. ]]) In [46]: signal.convolve2d(ones((4,4)), ones((1,15)), 'same', 'wrap') Out[46]: array([[ 12., 13., 14., 15.], [ 15., 15., 15., 15.], [ 15., 15., 15., 15.], [ 15., 14., 13., 12.]]) Could someone more qualified than me look into this ? Scipy version is 0.5.1 (ubuntu breezy), and numpy 1.0rc1 Ga??l From robert.kern at gmail.com Sun Nov 19 15:15:24 2006 From: robert.kern at gmail.com (Robert Kern) Date: Sun, 19 Nov 2006 14:15:24 -0600 Subject: [SciPy-user] Array documentation In-Reply-To: References: <20061118094531.GA3639@clipper.ens.fr> Message-ID: <4560BB5C.4010107@gmail.com> Herman Berendsen wrote: > I used the docstrings, but modified and extended by hand (programs never add > anything original!). Do you think you could modify the docstrings in the source and submit a patch? That would be lovely. http://projects.scipy.org/scipy/numpy Oh, and do add a link to yourself on the wiki. This is good work. http://www.scipy.org/Documentation -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From robert.kern at gmail.com Sun Nov 19 15:22:30 2006 From: robert.kern at gmail.com (Robert Kern) Date: Sun, 19 Nov 2006 14:22:30 -0600 Subject: [SciPy-user] What is missing in scipy to be a top notch environment for signal processing (lpc and co) ? In-Reply-To: <4560274F.5020908@ar.media.kyoto-u.ac.jp> References: <4560274F.5020908@ar.media.kyoto-u.ac.jp> Message-ID: <4560BD06.4000500@gmail.com> David Cournapeau wrote: > - I have code based on fftw to compute the autocorrelation using fft > (can be adapted for cross correlation too). As I think this would be > useful in scipy, I understand that it cannot use fftw. Which fft should > I use in scipy C code ? Hmm. It would be best if scipy.fftpack were to expose a C API such that the combination of libraries that we wrap could be used by other extension modules. Does the whole autocorrelation function have to be written in C? Could it perhaps be written in Python and simply call scipy.fftpack.fft? > - I would be interested in solving 3, and eventually 4, but I would > need some advices from others, as I am not sure how to solve them API-wise. This kind of signal processing isn't my bailiwick; however, if you have specific questions, I'll try to answer them. > I don't know if this is of any interest for other, but I believe > some of those functionalities to be a basic requirement for scipy to be > used by people in signal processing. I'm certainly interested in seeing our offerings expand. If you want SVN access to start playing around in the sandbox, please email Jeff Strunk , and he will set you up. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From alister at rocketmail.com Sun Nov 19 15:29:11 2006 From: alister at rocketmail.com (Adrian Lister) Date: Sun, 19 Nov 2006 12:29:11 -0800 (PST) Subject: [SciPy-user] Designing Elliptic Filters Message-ID: <705304.14983.qm@web33807.mail.mud.yahoo.com> I'm trying to get some elliptic filters for some crtitical band speech processing to work in python and I seem to always get errors. I've tried changing my parameters and still nothing. I can design Chebychev filters and not error but elliptic just aren't working. I have also designed the filters in matlab and run them in python and that's fine. The only thing that I haven't been able to change is the computer that I'm running it on. Suggestions / comments greatly appreciated alister n=5 rp=3 rs=80 wn=[.33,.66] b,a=scipy.signal.ellip(n,rp,rs,wn) Traceback (most recent call last): File "", line 1, in ? b,a=scipy.signal.ellip(5,3,80,[.33,.66]) File "C:\Python24\lib\site-packages\scipy\signal\filter_design.py", line 516, in ellip return iirfilter(N, Wn, rs=rs, rp=rp, btype=btype, analog=analog, output=output, ftype='elliptic') File "C:\Python24\lib\site-packages\scipy\signal\filter_design.py", line 444, in iirfilter z, p, k = typefunc(N, rp, rs) File "C:\Python24\lib\site-packages\scipy\signal\filter_design.py", line 1049, in ellipap disp=0) File "C:\Python24\lib\site-packages\scipy\optimize\optimize.py", line 140, in fmin N = len(x0) TypeError: len() of unsized object ____________________________________________________________________________________ Sponsored Link Mortgage rates near 39yr lows. $510k for $1,698/mo. Calculate new payment! www.LowerMyBills.com/lre From wegwerp at gmail.com Sun Nov 19 17:41:21 2006 From: wegwerp at gmail.com (wegwerp) Date: Sun, 19 Nov 2006 23:41:21 +0100 Subject: [SciPy-user] physical constants module In-Reply-To: References: Message-ID: <6f54c160611191441w76abfa89k66e46660ef977717@mail.gmail.com> Hi Herman, did you see the codata.py and constants.py modules which are located in the scipy sandbox? The first one is the complete codata set and the second one uses the first and is more intended as a convenient wrapper for the most common cases plus some aditional metric <-> imperial conversion constants. I made those a few months ago based on some old newsgroup posting, the latest values from NIST and a few hours of surfing the net for definitions of obscure constants. For some reason I am not able to download your version, so I cannot check the differences between your version and mine. I would hate to see that we duplicate efforts, so I am happy discuss any changes or merges of our code. And please send me a copy of your physcon.py, I cannot access it. Groeten, Bas From waterbug at pangalactic.us Sun Nov 19 18:27:32 2006 From: waterbug at pangalactic.us (Stephen Waterbury) Date: Sun, 19 Nov 2006 18:27:32 -0500 Subject: [SciPy-user] physical constants module In-Reply-To: References: Message-ID: <4560E864.6070103@pangalactic.us> Herman Berendsen wrote: > If you use physical constants (like Planck's constant h, gas constant R, etc.) > with python, you may be interested to copy my module physcon.py from > http://www.hjcb.nl/python/ ... You might want to change the wording in the explanation next to your "installation tips" button, which says: "tips for installing scientific python for windows users" ^^^^^^^^^^^^^^^^^ ... because there is an open source library called "ScientificPython", by Konrad Hinsen (), which should not be confused with SciPy. I know you did not capitalize "scientific python", but it still might be confusing for end-users who are not aware that there is a "Scientific Python" that is distinct from SciPy. Cheers, Steve From peridot.faceted at gmail.com Sun Nov 19 23:43:25 2006 From: peridot.faceted at gmail.com (A. M. Archibald) Date: Sun, 19 Nov 2006 23:43:25 -0500 Subject: [SciPy-user] What is missing in scipy to be a top notch environment for signal processing (lpc and co) ? In-Reply-To: <4560274F.5020908@ar.media.kyoto-u.ac.jp> References: <4560274F.5020908@ar.media.kyoto-u.ac.jp> Message-ID: On 19/11/06, David Cournapeau wrote: > I've just finished my second big conversion of matlab -> python code > (~5000 lines of matlab code), and I think there are some "holes" in > scipy, which would be really useful to fill in. I believe they are > general enough so I am not the only one missing them. Here are some > functions I missed [...] > 4: functions capable of running the same algorithm on some strides > of an array. Much of this can be done with numpy's indexing, but it sounds like you want something slightly more particular. > More detailed: [...] > 4 I am not sure about this one. A concrete example: if I want to > compute the autocorrelation of some frames of a signal, the obvious > thing is to use a loop. This is expensive. If I had a matrix which each > column is a frame, and an autocorrelation function capable of running an > algorithm on each column, this would be much faster. Incidentally, > Matlab offers a function buffer, which builds a matrix which each column > is a frame, with options for overlapping and border cases. The doc says > "Y = BUFFER(X,N) partitions signal vector X into nonoverlapping data > segments (frames) of length N. Each data frame occupies one column in > the output matrix, resulting in a matrix with N rows." I don't know how, > if at all possible, to generalize that to the numpy array. A quick-and-dirty function to do this can be written in a few lines: if you want non-overlapping slices, just pad and then use reshape. If you want overlapping slices, pad and reshape the nonoverlapping parts then use one of the stacking functions to stick the overlaps on the ends. If you want to avoid unnecessary copies (which is reasonable, and mostly possible modulo a numpy quirk), and if you want reasonable handling of corner cases, and of segmentation of arbitrary axes of arbitrarily-dimensioned arrays, the function starts to expand, but is still reasonable. I've attached a version. It does sound like a useful sort of function that we might want to include in scipy (or numpy, really, it has no dependence on any fancy libraries). A. M. Archibald -------------- next part -------------- A non-text attachment was scrubbed... Name: segmentaxis.py Type: text/x-python Size: 4806 bytes Desc: not available URL: From david at ar.media.kyoto-u.ac.jp Mon Nov 20 00:37:13 2006 From: david at ar.media.kyoto-u.ac.jp (David Cournapeau) Date: Mon, 20 Nov 2006 14:37:13 +0900 Subject: [SciPy-user] What is missing in scipy to be a top notch environment for signal processing (lpc and co) ? In-Reply-To: <4560BD06.4000500@gmail.com> References: <4560274F.5020908@ar.media.kyoto-u.ac.jp> <4560BD06.4000500@gmail.com> Message-ID: <45613F09.2070400@ar.media.kyoto-u.ac.jp> Robert Kern wrote: > > Hmm. It would be best if scipy.fftpack were to expose a C API such that the > combination of libraries that we wrap could be used by other extension modules. > Does the whole autocorrelation function have to be written in C? Could it > perhaps be written in Python and simply call scipy.fftpack.fft? Yes it could, but it would hurt performance (I should profile more thoroughly, but I think we are talking about several times slower). > > This kind of signal processing isn't my bailiwick; however, if you have specific > questions, I'll try to answer them. I will try to expose some simple cases in a later email about some problems. A. M Archibald already gave some answers, though. > > I'm certainly interested in seeing our offerings expand. If you want SVN access > to start playing around in the sandbox, please email Jeff Strunk enthought dot com>, and he will set you up. It is even easier than that, since I already have a svn account (I am the maintainer of the package pyem, for Gaussian Mixture Models). Is there a name I should pick, or can I just create a directory with my name like rkern or oliphant and start hacking there ? cheers, David From robert.kern at gmail.com Mon Nov 20 00:51:54 2006 From: robert.kern at gmail.com (Robert Kern) Date: Sun, 19 Nov 2006 23:51:54 -0600 Subject: [SciPy-user] What is missing in scipy to be a top notch environment for signal processing (lpc and co) ? In-Reply-To: <45613F09.2070400@ar.media.kyoto-u.ac.jp> References: <4560274F.5020908@ar.media.kyoto-u.ac.jp> <4560BD06.4000500@gmail.com> <45613F09.2070400@ar.media.kyoto-u.ac.jp> Message-ID: <4561427A.7060905@gmail.com> David Cournapeau wrote: > Robert Kern wrote: >> I'm certainly interested in seeing our offerings expand. If you want SVN access >> to start playing around in the sandbox, please email Jeff Strunk > enthought dot com>, and he will set you up. > It is even easier than that, since I already have a svn account (I am > the maintainer of the package pyem, for Gaussian Mixture Models). Is > there a name I should pick, or can I just create a directory with my > name like rkern or oliphant and start hacking there ? Oops. I wasn't paying attention. Pick whatever you think is sensible. Your username is a reasonable one for now since these will probably end up in scipy.signal rather than their own package. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From pwang at enthought.com Mon Nov 20 01:01:15 2006 From: pwang at enthought.com (Peter Wang) Date: Mon, 20 Nov 2006 00:01:15 -0600 Subject: [SciPy-user] About alternatives to Matlab In-Reply-To: <455EF487.9020904@ar.media.kyoto-u.ac.jp> References: <1161613941.550194.204870@e3g2000cwe.googlegroups.com> <1163711343.870829.110030@h48g2000cwc.googlegroups.com> <1163720268.611923.3180@e3g2000cwe.googlegroups.com> <455E0496.4020703@bryant.edu> <17758.58083.69027.862918@prpc.aero.iitb.ac.in> <20061118104853.GB3639@clipper.ens.fr> <455EF051.1010900@ar.media.kyoto-u.ac.jp> <20061118114509.GD3639@clipper.ens.fr> <455EF487.9020904@ar.media.kyoto-u.ac.jp> Message-ID: On Nov 18, 2006, at 5:54 AM, David Cournapeau wrote: > What I meant was to have a good graphic library to have more complex > plots than maplotlib, and to build GUI. I was aware of traits/ > chaco, but > I was not sure about the status, nor if it was ready to be used by end > users, Chaco is under very active development, but I do believe it is ready to be used by end users, especially if they don't mind giving much- needed feedback on what docs and additional examples would be most helpful. :) We are using chaco for a lot of internal projects and it works quite well. What sorts of plots and visualizations were you hoping to put together? (Note that by "chaco" I am referring to chaco2; the original is pretty much in maintenance-only mode right now.) -Peter From david at ar.media.kyoto-u.ac.jp Mon Nov 20 01:36:26 2006 From: david at ar.media.kyoto-u.ac.jp (David Cournapeau) Date: Mon, 20 Nov 2006 15:36:26 +0900 Subject: [SciPy-user] About alternatives to Matlab In-Reply-To: References: <1161613941.550194.204870@e3g2000cwe.googlegroups.com> <1163711343.870829.110030@h48g2000cwc.googlegroups.com> <1163720268.611923.3180@e3g2000cwe.googlegroups.com> <455E0496.4020703@bryant.edu> <17758.58083.69027.862918@prpc.aero.iitb.ac.in> <20061118104853.GB3639@clipper.ens.fr> <455EF051.1010900@ar.media.kyoto-u.ac.jp> <20061118114509.GD3639@clipper.ens.fr> <455EF487.9020904@ar.media.kyoto-u.ac.jp> Message-ID: <45614CEA.5020402@ar.media.kyoto-u.ac.jp> Peter Wang wrote > > Chaco is under very active development, but I do believe it is ready > to be used by end users, especially if they don't mind giving much- > needed feedback on what docs and additional examples would be most > helpful. :) My impression was chaco was abandonned, because it was difficult to find any information on chaco from google (but this was a few weeks, maybe even a few months ago). The precedent emails seem to imply I was wrong, and I should check it further. I understand that chaco is a toolkit to build "scientific" GUI, right ? > We are using chaco for a lot of internal projects and it > works quite well. What sorts of plots and visualizations were you > hoping to put together? As I said, maybe I've used matplotlib incorrectly, or I didn't spend enough time, but I found it really slow (and I have a powerful workstation on today's standart), and not really useful interactively; also, I often have various threading issues with the python interpreter hanging (using ipython with pylab option). In matlab, you can zoom, edit plots (to remove some lines, for example), and I couldn't do that with matplotlib. Again, I cannot stress enough that it may just because of my laziness and lack of investigation on matplotlib side. Also, I would like to do things that matlab can not do, like select data visually, and get the corresponding data back in the python interpreter (why matlab does not make this kind of things easy is beyond me for such an expensive software), etc... Something else which would be really great is a (limited) waveform editor, something I always dreamt of in matlab. Let's say I have a 10 second waveform in numpy array: a widget to plot its waveform (which may require special interpolation), zoom it horizontaly or vertically, select a part of to get the corresponding data... Right now, many researchers I know in audio signal processing use something like wavesurfer (http://www.speech.kth.se/wavesurfer/) or an audio editor like audacity for the editing/visualization, and matlab for the signal processing. This is ackward. Being able to do this kind of visualization is one of the reason why I switched to python/numpy/scipy (thinking at worse, I could program it from scratch using qt, gtk or whatever toolkit available); I haven't taken the time yet to do it. Having this kind of plot would be really useful, I believe, for people doing audio signal processing. Can chaco helps me for this ? Or should I investigate further matplotlib ? David From sbasu at physics.cornell.edu Mon Nov 20 01:51:55 2006 From: sbasu at physics.cornell.edu (Sourish Basu) Date: Mon, 20 Nov 2006 01:51:55 -0500 Subject: [SciPy-user] About alternatives to Matlab In-Reply-To: <45614CEA.5020402@ar.media.kyoto-u.ac.jp> References: <1161613941.550194.204870@e3g2000cwe.googlegroups.com> <1163711343.870829.110030@h48g2000cwc.googlegroups.com> <1163720268.611923.3180@e3g2000cwe.googlegroups.com> <455E0496.4020703@bryant.edu> <17758.58083.69027.862918@prpc.aero.iitb.ac.in> <20061118104853.GB3639@clipper.ens.fr> <455EF051.1010900@ar.media.kyoto-u.ac.jp> <20061118114509.GD3639@clipper.ens.fr> <455EF487.9020904@ar.media.kyoto-u.ac.jp> <45614CEA.5020402@ar.media.kyoto-u.ac.jp> Message-ID: <4561508B.5090406@physics.cornell.edu> > Peter Wang wrote > >> We are using chaco for a lot of internal projects and it >> works quite well. What sorts of plots and visualizations were you >> hoping to put together? >> From looking at the results in Google, it seemes to me that Chaco is integrated with Enthought, which is exclusively for windows. Is there a similar ongoing effort for Linux/Unix systems? I like matplotlib, but there are a few quirks that makes me think that I would like to try out a few alternatives. Thanks, Sourish From pwang at enthought.com Mon Nov 20 01:57:55 2006 From: pwang at enthought.com (Peter Wang) Date: Mon, 20 Nov 2006 00:57:55 -0600 Subject: [SciPy-user] About alternatives to Matlab In-Reply-To: <45614CEA.5020402@ar.media.kyoto-u.ac.jp> References: <1161613941.550194.204870@e3g2000cwe.googlegroups.com> <1163711343.870829.110030@h48g2000cwc.googlegroups.com> <1163720268.611923.3180@e3g2000cwe.googlegroups.com> <455E0496.4020703@bryant.edu> <17758.58083.69027.862918@prpc.aero.iitb.ac.in> <20061118104853.GB3639@clipper.ens.fr> <455EF051.1010900@ar.media.kyoto-u.ac.jp> <20061118114509.GD3639@clipper.ens.fr> <455EF487.9020904@ar.media.kyoto-u.ac.jp> <45614CEA.5020402@ar.media.kyoto-u.ac.jp> Message-ID: On Nov 20, 2006, at 12:36 AM, David Cournapeau wrote: >> Chaco is under very active development, but I do believe it is ready >> to be used by end users, especially if they don't mind giving much- >> needed feedback on what docs and additional examples would be most >> helpful. :) > My impression was chaco was abandonned, because it was difficult to > find > any information on chaco from google (but this was a few weeks, maybe > even a few months ago). The precedent emails seem to imply I was > wrong, > and I should check it further. Hmm... Chaco currently doesn't have as much visibility as I would like, but the first few non-mailing-list links that google turns up for "chaco plotting" are: https://svn.enthought.com/enthought/wiki/ChacoProject http://code.enthought.com/chaco/ Both are correct pages for the "current" chaco. I've been trying to keep the wiki updated with developments, but (as always) the code moves faster than the documentation. :) > I understand that chaco is a toolkit to build "scientific" GUI, > right ? Well, it's a toolkit for building interactive visualizations, mostly plots. The more traditional "GUI" things like sliders and dropdowns and text boxes are all done using Traits UI. > In matlab, you can zoom, edit plots (to remove some lines, for > example), > and I couldn't do that with matplotlib. Again, I cannot stress enough > that it may just because of my laziness and lack of investigation on > matplotlib side. Also, I would like to do things that matlab can > not do, > like select data visually, and get the corresponding data back in the > python interpreter (why matlab does not make this kind of things > easy is > beyond me for such an expensive software), etc... I don't have a plot editing demo in the chaco2/examples directory yet, but we have built exactly such a tool/interaction for a customer project, and I can easily move it over. It lets you redraw a section of a line plot, or select a region and apply an arbitrary expression to it, among other things. To see an example of selecting data visually, take a look at chaco2/ examples/scatter_select.py. You can use your left-click and drag to select points. It prints out the selection to screen, but you can access the LassoTool programmatically and get the list of selected points, listen for events (selection changed, selection complete, etc.), and a variety of other things. > Something else which would be really great is a (limited) waveform > editor, something I always dreamt of in matlab. Let's say I have a 10 > second waveform in numpy array: a widget to plot its waveform > (which may > require special interpolation), zoom it horizontaly or vertically, > select a part of to get the corresponding data... Haha... we actually have this *exact* thing implemented as a demo: chaco2/examples/zoomed_plot/zoom_plot.py. You can left click and drag in the upper window to zoom into a region for the lower window. You can then drag the selection around, or drag its borders to resize it. Note that if you are not running this demo on windows (i.e. you are running it on Linux), then you should edit the function read_music_data() to return some meaningful data, since the .wav file it looks for doesn't exist on non-windows systems. Eric and I put the zoom_plot demo together for a talk he was doing a while back (Europython, maybe?); at the time we also discussed adding some simple buttons like "play", "pause", etc. It wouldn't be hard to do that. I would encourage you to look at some of the other examples to get some idea of what Chaco can do. Each of the examples in chaco2/ examples/ has a docstring at the top of the file, and there is a set of slides I put together for a tutorial session at SciPy '06: http://code.enthought.com/chaco/scipy06/chaco_talk.html -peter From robert.kern at gmail.com Mon Nov 20 02:00:07 2006 From: robert.kern at gmail.com (Robert Kern) Date: Mon, 20 Nov 2006 01:00:07 -0600 Subject: [SciPy-user] About alternatives to Matlab In-Reply-To: <4561508B.5090406@physics.cornell.edu> References: <1161613941.550194.204870@e3g2000cwe.googlegroups.com> <1163711343.870829.110030@h48g2000cwc.googlegroups.com> <1163720268.611923.3180@e3g2000cwe.googlegroups.com> <455E0496.4020703@bryant.edu> <17758.58083.69027.862918@prpc.aero.iitb.ac.in> <20061118104853.GB3639@clipper.ens.fr> <455EF051.1010900@ar.media.kyoto-u.ac.jp> <20061118114509.GD3639@clipper.ens.fr> <455EF487.9020904@ar.media.kyoto-u.ac.jp> <45614CEA.5020402@ar.media.kyoto-u.ac.jp> <4561508B.5090406@physics.cornell.edu> Message-ID: <45615277.20708@gmail.com> Sourish Basu wrote: >> Peter Wang wrote >> >>> We are using chaco for a lot of internal projects and it >>> works quite well. What sorts of plots and visualizations were you >>> hoping to put together? >>> > From looking at the results in Google, it seemes to me that Chaco is > integrated with Enthought, which is exclusively for windows. Good heavens, no. We make binaries for Windows, but it works on Linux just fine. In fact we even make some binaries for Linux, too. http://code.enthought.com/ets/ http://code.enthought.com/chaco/ Note that the "enthought" package (the "Enthought Tool Suite") is different from "Python, Enthought Edition" which is just a collection of packages. OS X, on the other hand, has a snag or two. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From pwang at enthought.com Mon Nov 20 02:01:16 2006 From: pwang at enthought.com (Peter Wang) Date: Mon, 20 Nov 2006 01:01:16 -0600 Subject: [SciPy-user] About alternatives to Matlab In-Reply-To: <4561508B.5090406@physics.cornell.edu> References: <1161613941.550194.204870@e3g2000cwe.googlegroups.com> <1163711343.870829.110030@h48g2000cwc.googlegroups.com> <1163720268.611923.3180@e3g2000cwe.googlegroups.com> <455E0496.4020703@bryant.edu> <17758.58083.69027.862918@prpc.aero.iitb.ac.in> <20061118104853.GB3639@clipper.ens.fr> <455EF051.1010900@ar.media.kyoto-u.ac.jp> <20061118114509.GD3639@clipper.ens.fr> <455EF487.9020904@ar.media.kyoto-u.ac.jp> <45614CEA.5020402@ar.media.kyoto-u.ac.jp> <4561508B.5090406@physics.cornell.edu> Message-ID: <53519B54-BD3B-4851-B02E-1AB928368A8D@enthought.com> On Nov 20, 2006, at 12:51 AM, Sourish Basu wrote: > From looking at the results in Google, it seemes to me that Chaco is > integrated with Enthought, which is exclusively for windows. Is > there a > similar ongoing effort for Linux/Unix systems? Actually, the Enthought Python Distribution ("Enthon") is not the same as the Enthought Tool Suite ("ETS"), which includes Traits, Envisage, Chaco, and other libraries. The former is Windows-only right now, but the latter runs well on Windows, Linux, and (mostly) Mac. Chaco runs on linux, and until I fix some things and get it working for Mac natively, I actually develop it in Ubuntu running in Parallels on my mac. -Peter From david at ar.media.kyoto-u.ac.jp Mon Nov 20 02:02:14 2006 From: david at ar.media.kyoto-u.ac.jp (David Cournapeau) Date: Mon, 20 Nov 2006 16:02:14 +0900 Subject: [SciPy-user] About alternatives to Matlab In-Reply-To: References: <1161613941.550194.204870@e3g2000cwe.googlegroups.com> <1163711343.870829.110030@h48g2000cwc.googlegroups.com> <1163720268.611923.3180@e3g2000cwe.googlegroups.com> <455E0496.4020703@bryant.edu> <17758.58083.69027.862918@prpc.aero.iitb.ac.in> <20061118104853.GB3639@clipper.ens.fr> <455EF051.1010900@ar.media.kyoto-u.ac.jp> <20061118114509.GD3639@clipper.ens.fr> <455EF487.9020904@ar.media.kyoto-u.ac.jp> <45614CEA.5020402@ar.media.kyoto-u.ac.jp> Message-ID: <456152F6.10003@ar.media.kyoto-u.ac.jp> Peter Wang wrote: > > > Haha... we actually have this *exact* thing implemented as a demo: > chaco2/examples/zoomed_plot/zoom_plot.py. You can left click and > drag in the upper window to zoom into a region for the lower window. > You can then drag the selection around, or drag its borders to resize > it. Note that if you are not running this demo on windows (i.e. you > are running it on Linux), then you should edit the function > read_music_data() to return some meaningful data, since the .wav file > it looks for doesn't exist on non-windows systems. This is *awesome*; it may look minor, but I can tell you this may be a killer feature for people who are not sure about going to python instead of matlab for audio signal processing. It will hard to force myself finishing debugging my ported code from matlab before trying this out :) David From david at ar.media.kyoto-u.ac.jp Mon Nov 20 02:11:23 2006 From: david at ar.media.kyoto-u.ac.jp (David Cournapeau) Date: Mon, 20 Nov 2006 16:11:23 +0900 Subject: [SciPy-user] About alternatives to Matlab In-Reply-To: <45615277.20708@gmail.com> References: <1161613941.550194.204870@e3g2000cwe.googlegroups.com> <1163711343.870829.110030@h48g2000cwc.googlegroups.com> <1163720268.611923.3180@e3g2000cwe.googlegroups.com> <455E0496.4020703@bryant.edu> <17758.58083.69027.862918@prpc.aero.iitb.ac.in> <20061118104853.GB3639@clipper.ens.fr> <455EF051.1010900@ar.media.kyoto-u.ac.jp> <20061118114509.GD3639@clipper.ens.fr> <455EF487.9020904@ar.media.kyoto-u.ac.jp> <45614CEA.5020402@ar.media.kyoto-u.ac.jp> <4561508B.5090406@physics.cornell.edu> <45615277.20708@gmail.com> Message-ID: <4561551B.9090607@ar.media.kyoto-u.ac.jp> Robert Kern wrote: > > Good heavens, no. We make binaries for Windows, but it works on Linux just fine. > In fact we even make some binaries for Linux, too. I got the same impression, actually, concerning enthought packages. It may be useful to have a wiki page on this ? Right now, in topical software, it says " Python Enthought Edition: for Windows users, this is a very useful download, in a single package, of a number of different tools for scientific computing (including many listed in this page). This saves Windows users the hassles of manually building all of these packages, some of which can be fairly difficult to get to work. A similar project is underway for Mac OSX users." which implies to me that it is just a binary thing for windows... On the other hand, if I had follow the chaco link before, it would have avoided some of my misconceptions... David From gael.varoquaux at normalesup.org Mon Nov 20 02:21:13 2006 From: gael.varoquaux at normalesup.org (Gael Varoquaux) Date: Mon, 20 Nov 2006 08:21:13 +0100 Subject: [SciPy-user] About alternatives to Matlab In-Reply-To: <45614CEA.5020402@ar.media.kyoto-u.ac.jp> References: <1163711343.870829.110030@h48g2000cwc.googlegroups.com> <1163720268.611923.3180@e3g2000cwe.googlegroups.com> <455E0496.4020703@bryant.edu> <17758.58083.69027.862918@prpc.aero.iitb.ac.in> <20061118104853.GB3639@clipper.ens.fr> <455EF051.1010900@ar.media.kyoto-u.ac.jp> <20061118114509.GD3639@clipper.ens.fr> <455EF487.9020904@ar.media.kyoto-u.ac.jp> <45614CEA.5020402@ar.media.kyoto-u.ac.jp> Message-ID: <20061120072113.GB5996@clipper.ens.fr> I use the ETS on a day to day basis, under Ubuntu. I just love Traits ! Regarding chaco2/matplotlib they both have pros and cons. Chaco2 is way better at building interactive GUI. It is also way faster. However it is not as nice to use from an interactive ipython prompt. I also have the fealing it is not as developed as mpl. I must say I am quite sad to see two great plotting suites under python that both have different strength and weakness. I would like one to steal as much as possible from the other. Chaco relies heavily on other enthought components, and the Enthought Tools Suite was not terribly modular up to now. Hopefully this is changing with the making of eggs out of the ETS. Ga?l From pwang at enthought.com Mon Nov 20 02:41:01 2006 From: pwang at enthought.com (Peter Wang) Date: Mon, 20 Nov 2006 01:41:01 -0600 Subject: [SciPy-user] About alternatives to Matlab In-Reply-To: <20061120072113.GB5996@clipper.ens.fr> References: <1163711343.870829.110030@h48g2000cwc.googlegroups.com> <1163720268.611923.3180@e3g2000cwe.googlegroups.com> <455E0496.4020703@bryant.edu> <17758.58083.69027.862918@prpc.aero.iitb.ac.in> <20061118104853.GB3639@clipper.ens.fr> <455EF051.1010900@ar.media.kyoto-u.ac.jp> <20061118114509.GD3639@clipper.ens.fr> <455EF487.9020904@ar.media.kyoto-u.ac.jp> <45614CEA.5020402@ar.media.kyoto-u.ac.jp> <20061120072113.GB5996@clipper.ens.fr> Message-ID: On Nov 20, 2006, at 1:21 AM, Gael Varoquaux wrote: > Regarding chaco2/matplotlib they both have pros and cons. Chaco2 is > way > better at building interactive GUI. It is also way faster. However > it is > not as nice to use from an interactive ipython prompt. I've been working on that slowly in my spare time. :) > I also have the fealing it is not as developed as mpl. Do you mean not as actively developed, or not as many total man hours put into the project? I guess I can't make a comparison in either case, because I don't know the level of effort (past and present) on MPL. I do know that for most of this year, we've had two people full time on Chaco (along with a geophysics plotting toolkit built on top of Chaco), and several other folks have contributed. It definitely does not yet have the community that matplotlib does. There are about... two architectural changes I'd like to get done before we cut a "wide public" release of chaco, at which point we will get some more users. :) > I must say I am quite sad to see two great plotting suites under > python > that both have different strength and weakness. I would like one to > steal > as much as possible from the other. Heh... I think it would be possible to build a Chaco/Kiva backend for Matplotlib that would allow any mpl artist to render into a Chaco plot, and play well with layout, backbuffering, overlays, etc. I don't know how well various tools would work, though. But in any case that would be a small first step. > Chaco relies heavily on other > enthought components, and the Enthought Tools Suite was not terribly > modular up to now. It does rely on some other components, but a few of those components really are just lower levels of Chaco that have been factored out. Kiva and Enable are really part of the Chaco stack, and other than that, Chaco really only needs Traits. You don't even need Traits UI if you don't want to pop up the TraitsTool. (I guess we also import enthought.logger, but that is not really critical.) I hear you about the interdependencies, though, and that is something I'd like to get straightened out before the release. -Peter From robert.kern at gmail.com Mon Nov 20 03:54:12 2006 From: robert.kern at gmail.com (Robert Kern) Date: Mon, 20 Nov 2006 02:54:12 -0600 Subject: [SciPy-user] About alternatives to Matlab In-Reply-To: <4561551B.9090607@ar.media.kyoto-u.ac.jp> References: <1161613941.550194.204870@e3g2000cwe.googlegroups.com> <1163711343.870829.110030@h48g2000cwc.googlegroups.com> <1163720268.611923.3180@e3g2000cwe.googlegroups.com> <455E0496.4020703@bryant.edu> <17758.58083.69027.862918@prpc.aero.iitb.ac.in> <20061118104853.GB3639@clipper.ens.fr> <455EF051.1010900@ar.media.kyoto-u.ac.jp> <20061118114509.GD3639@clipper.ens.fr> <455EF487.9020904@ar.media.kyoto-u.ac.jp> <45614CEA.5020402@ar.media.kyoto-u.ac.jp> <4561508B.5090406@physics.cornell.edu> <45615277.20708@gmail.com> <4561551B.9090607@ar.media.kyoto-u.ac.jp> Message-ID: <45616D34.5030905@gmail.com> David Cournapeau wrote: > Robert Kern wrote: >> Good heavens, no. We make binaries for Windows, but it works on Linux just fine. >> In fact we even make some binaries for Linux, too. > I got the same impression, actually, concerning enthought packages. It > may be useful to have a wiki page on this ? > > Right now, in topical software, it says " Python Enthought Edition: for > Windows users, this is a very useful download, in a single package, of a > number of different tools for scientific computing (including many > listed in this page). This saves Windows users the hassles of manually > building all of these packages, some of which can be fairly difficult to > get to work. A similar project is underway for Mac OSX users." which > implies to me that it is just a binary thing for windows... I'm really not sure what we can do here. There are already several pages discussing what our offerings are. http://code.enthought.com/ One of them is "Python, Enthought Edition" which is just a binary distribution of a large number of open source packages, most of which are not ours. Another completely separate offering is the "Enthought Tool Suite" which are the open source packages that we wrote. I'm not entirely certain why people think that just because we make Windows binaries means that we don't do anything else. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From pgmdevlist at gmail.com Mon Nov 20 04:13:29 2006 From: pgmdevlist at gmail.com (Pierre GM) Date: Mon, 20 Nov 2006 04:13:29 -0500 Subject: [SciPy-user] About alternatives to Matlab In-Reply-To: <45616D34.5030905@gmail.com> References: <1161613941.550194.204870@e3g2000cwe.googlegroups.com> <4561551B.9090607@ar.media.kyoto-u.ac.jp> <45616D34.5030905@gmail.com> Message-ID: <200611200413.29747.pgmdevlist@gmail.com> On Monday 20 November 2006 03:54, Robert Kern wrote: > I'm really not sure what we can do here. There are already several pages > discussing what our offerings are. > > http://code.enthought.com/ > > One of them is "Python, Enthought Edition" which is just a binary > distribution of a large number of open source packages, most of which are > not ours. Another completely separate offering is the "Enthought Tool > Suite" which are the open source packages that we wrote. I'm not entirely > certain why people think that just because we make Windows binaries means > that we don't do anything else. As a potential user, I downloaded the sources from that link a few months ago http://code.enthought.com/downloads/ets/enthought-1.1.0.tar.gz which beautifully failed to compile on my machine, and didn't have time to investigate. Seems that the link is broken somehow: the tar.gz is < 1MB, when the advertised size is ~20MB. I just downloaded the Python2.3 version instead, hoping that it'd work. We'll see. From prabhu at aero.iitb.ac.in Mon Nov 20 04:39:06 2006 From: prabhu at aero.iitb.ac.in (Prabhu Ramachandran) Date: Mon, 20 Nov 2006 15:09:06 +0530 Subject: [SciPy-user] About alternatives to Matlab In-Reply-To: <20061120072113.GB5996@clipper.ens.fr> References: <1163711343.870829.110030@h48g2000cwc.googlegroups.com> <1163720268.611923.3180@e3g2000cwe.googlegroups.com> <455E0496.4020703@bryant.edu> <17758.58083.69027.862918@prpc.aero.iitb.ac.in> <20061118104853.GB3639@clipper.ens.fr> <455EF051.1010900@ar.media.kyoto-u.ac.jp> <20061118114509.GD3639@clipper.ens.fr> <455EF487.9020904@ar.media.kyoto-u.ac.jp> <45614CEA.5020402@ar.media.kyoto-u.ac.jp> <20061120072113.GB5996@clipper.ens.fr> Message-ID: <17761.30650.622192.50963@prpc.aero.iitb.ac.in> >>>>> "Gael" == Gael Varoquaux writes: Gael> I use the ETS on a day to day basis, under Ubuntu. I just Gael> love Traits ! Regarding chaco2/matplotlib they both have FWIW, ETS includes tvtk and MayaVi2 for 3D plotting. More information here: http://svn.enthought.com/enthought/wiki/TVTK http://svn.enthought.com/enthought/wiki/MayaVi There is also a cookbook page that users have contributed here: http://scipy.org/Cookbook/MayaVi cheers, prabhu From maik.troemel at maitro.net Mon Nov 20 08:11:28 2006 From: maik.troemel at maitro.net (Maik Troemel) Date: Mon, 20 Nov 2006 14:11:28 +0100 Subject: [SciPy-user] exact spline interpolation of an irregular dataset Message-ID: <1164028288.32324.8.camel@nebel.ewc.weather-consult.com> Hello again, thank for your help. Now I've tested the delaunay package from the sandbox, It works but there are some problems creating a convex hull of the dataset. It seems to me as there are two hulls and not one. It looks a little bit strange. Probably I'm not alone with this problem. If someone is interested I can send a picture of the result of the interpolation. Is it possible that the spatial distribution of my input data is the reason of the problem? Greetings Maik > Hi Maik, > > On 07/11/06, Maik Tr??mel wrote: >> (again) i've got some problems concerning spline interpolation. I want >> to interpolate a irregular data field. I've mapped this data field on a >> 2d-array. >> "iObj_spline_smooth = >> scipy.interpolate.fitpack2.SmoothBivariateSpline(x, y, v)" works fine. > > Is there a posibility to make an exact interpolation? > > Yes, but not with the method used in BivariateSpline (exact > interpolation requires the parameter s to be set to 0, but this will > fail for the currently used method). If you have a regular grid then > using RectBivariateSpline will work. As you haven't got a regular grid > then I suggest you look at > > http://www.scipy.org/Cookbook/Matplotlib/Gridding_irregularly_spaced_data > > which tells you how to do it with a package in the sandbox. We are > currently working on improving this situation (within the next few > weeks), so stay tuned. > > Best regards, > John Travers From fzwaard at gmail.com Mon Nov 20 10:05:33 2006 From: fzwaard at gmail.com (Frank Zwaard) Date: Mon, 20 Nov 2006 16:05:33 +0100 Subject: [SciPy-user] Problems installing Scipy from source Message-ID: During the compilation of Numpy I get some strange messages (see below), but the compilation seems to be ok and the tests too. But the tests of scipy give me 3 failures and 2 errors :( Doesn anyone understand what should I do? Below I copy some useful informations about my system/config Thanx F I have a Fedora Core 5 installation $uname -a Linux 2.6.15-1.2054_FC5smp #1 SMP Tue Mar 14 16:05:46 EST 2006 i686 i686 i386 GNU/Linux $python -c 'import os,sys;print os.name,sys.platform' posix linux2 $ python -V Python 2.4.3 $ gcc -v Using built-in specs. Target: i386-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux Thread model: posix gcc version 4.1.0 20060304 (Red Hat 4.1.0-3) $ g77 --version GNU Fortran (GCC 3.2.3 20030502 (Red Hat Linux 3.2.3-56.fc5)) 3.2.3 20030502 (Red Hat Linux 3.2.3-13) $ python -c 'import sys;print sys.version' 2.4.3 (#1, Oct 23 2006, 14:19:47) [GCC 4.1.1 20060525 (Red Hat 4.1.1-1)] $ python -c 'import numpy;print numpy.__version__' 1.0 let me know if the output of python /usr/lib/python2.4/site-packages/numpy/distutils/system _info.py con be useful, since it is quite long ... If needed I have also the output of the installation of both numpy and scipy. $ cd /usr/lib/python2.4/site-packages/scipy/linalg/ $ python setup_atlas_version.py build_ext --inplace --force /usr/lib/python2.4/site-packages/numpy/distutils/misc_util.py:1391: UserWarning: Use Configuration('linalg','',top_path=None) instead of deprecated default_config_dict('linalg','',None) warnings.warn('Use Configuration(%r,%r,top_path=%r) instead of '\ Traceback (most recent call last): File "setup_atlas_version.py", line 29, in ? setup(**configuration()) File "setup_atlas_version.py", line 13, in configuration del config['fortran_libraries'] KeyError: 'fortran_libraries' $ python -c 'import atlas_version' ATLAS version 3.6.0 built by camm on Tue Jun 15 03:19:44 UTC 2004: UNAME : Linux intech131 2.4.20 #1 SMP Thu Jan 23 11:24:05 EST 2003 i686 GNU/Linux INSTFLG : MMDEF : ARCHDEF : F2CDEFS : -DAdd__ -DStringSunStyle CACHEEDGE: 196608 F77 : /usr/bin/g77, version GNU Fortran (GCC) 3.3.5 (Debian 1:3.3.5-1) F77FLAGS : -O CC : /usr/bin/gcc, version gcc (GCC) 3.3.5 (Debian 1:3.3.5-1) CC FLAGS : -fomit-frame-pointer -O3 -funroll-all-loops MCC : /usr/bin/gcc, version gcc (GCC) 3.3.5 (Debian 1:3.3.5-1) MCCFLAGS : -fomit-frame-pointer -O I installed the following rpms: atlas-3.6.0-10.fc5 atlas-devel-3.6.0-10.fc5 blas-3.0-37.fc5 blas-devel-3.0-37.fc5 lapack-3.0-37.fc5 lapack-devel-3.0-37.fc5 fftw-devel-3.1.1-1.fc5 fftw2-2.1.5-12.fc5 fftw2-devel-2.1.5-12.fc5 fftw-3.1.1-1.fc5 I have installed both g77 and Intel Fortran, but it seems that the compilation is made with g77. NUMPY: ======= [Compilation messages] Running from numpy source directory. F2PY Version 2_3396 blas_opt_info: blas_mkl_info: libraries mkl,vml,guide not found in /usr/local/lib libraries mkl,vml,guide not found in /usr/lib NOT AVAILABLE ... compiling '_configtest.c': /* This file is generated from numpy_distutils/system_info.py */ void ATL_buildinfo(void); int main(void) { ATL_buildinfo(); return 0; } C compiler: gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -fPIC ... lapack_opt_info: lapack_mkl_info: mkl_info: libraries mkl,vml,guide not found in /usr/local/lib libraries mkl,vml,guide not found in /usr/lib NOT AVAILABLE NOT AVAILABLE ... /home/fzwaard/Installed_software/numpy-1.0/numpy/distutils/system_info.py:934: UserWarning: ********************************************************************* Lapack library (from ATLAS) is probably incomplete: size of /usr/lib/atlas/liblapack.so is 3855k (expected >4000k) Follow the instructions in the KNOWN PROBLEMS section of the file numpy/INSTALL.txt. ********************************************************************* warnings.warn(message) Setting PTATLAS=ATLAS FOUND: libraries = ['lapack', 'lapack', 'blas'] library_dirs = ['/usr/lib/atlas'] language = c include_dirs = ['/usr/include/atlas'] ... compile options: '-Inumpy/core/src -Inumpy/core/include -I/usr/include/python2.4 -c' gcc: _configtest.c gcc -pthread _configtest.o -o _configtest _configtest.o: In function `main':/home/fzwaard/Installed_software/numpy-1.0/_configtest.c:5: undefined reference to `exp' collect2: ld returned 1 exit status _configtest.o: In function `main':/home/fspada/Installed_software/numpy-1.0/_configtest.c:5: undefined reference to `exp' collect2: ld returned 1 exit status failure. removing: _configtest.c _configtest.o C compiler: gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -fPIC ... compile options: '-Inumpy/core/src -Inumpy/core/include -I/usr/include/python2.4 -c' gcc: _configtest.c _configtest.c:7:2: error: #error No _WIN32 _configtest.c:7:2: error: #error No _WIN32 failure. removing: _configtest.c _configtest.o [Test] >>> import numpy >>> numpy.test() ... Ran 517 tests in 1.171s >>> numpy.show_config() atlas_threads_info: libraries = ['lapack', 'lapack', 'blas'] library_dirs = ['/usr/lib/atlas'] language = c include_dirs = ['/usr/include/atlas'] blas_opt_info: libraries = ['lapack', 'blas'] library_dirs = ['/usr/lib/atlas'] define_macros = [('ATLAS_INFO', '"\\"3.6.0\\""')] language = c include_dirs = ['/usr/include/atlas'] atlas_blas_threads_info: libraries = ['lapack', 'blas'] library_dirs = ['/usr/lib/atlas'] language = c include_dirs = ['/usr/include/atlas'] lapack_opt_info: libraries = ['lapack', 'lapack', 'blas'] library_dirs = ['/usr/lib/atlas'] define_macros = [('ATLAS_INFO', '"\\"3.6.0\\""')] language = c include_dirs = ['/usr/include/atlas'] lapack_mkl_info: NOT AVAILABLE blas_mkl_info: NOT AVAILABLE mkl_info: NOT AVAILABLE SCIPY: ====== >From the install messages I have the same problems ad numpy + these: djbfft_info: NOT AVAILABLE ... ATLAS version 3.6.0 ATLAS version 3.6.0 non-existing path in 'Lib/linsolve': 'tests' umfpack_info: libraries umfpack not found in /usr/local/lib libraries umfpack not found in /usr/lib /usr/lib/python2.4/site-packages/numpy/distutils/system_info.py:401: UserWarning: UMFPACK sparse solver (http://www.cise.ufl.edu/research/sparse/umfpack/) not found. Directories to search for the libraries can be specified in the numpy/distutils/site.cfg file (section [umfpack]) or by setting the UMFPACK environment variable. warnings.warn(self.notfounderror.__doc__) NOT AVAILABLE Warning: Subpackage 'Lib' configuration returned as 'scipy' non-existing path in 'Lib/maxentropy': 'doc' [Test] >>> scipy.show_config() umfpack_info: NOT AVAILABLE atlas_threads_info: libraries = ['lapack', 'lapack', 'blas'] library_dirs = ['/usr/lib/atlas'] language = c include_dirs = ['/usr/include/atlas'] fft_opt_info: libraries = ['fftw3'] library_dirs = ['/usr/lib'] define_macros = [('SCIPY_FFTW3_H', None)] include_dirs = ['/usr/include'] atlas_blas_threads_info: libraries = ['lapack', 'blas'] library_dirs = ['/usr/lib/atlas'] language = c include_dirs = ['/usr/include/atlas'] djbfft_info: NOT AVAILABLE lapack_opt_info: libraries = ['lapack', 'lapack', 'blas'] library_dirs = ['/usr/lib/atlas'] define_macros = [('ATLAS_INFO', '"\\"3.6.0\\""')] language = c include_dirs = ['/usr/include/atlas'] fftw3_info: libraries = ['fftw3'] library_dirs = ['/usr/lib'] define_macros = [('SCIPY_FFTW3_H', None)] include_dirs = ['/usr/include'] blas_opt_info: libraries = ['lapack', 'blas'] library_dirs = ['/usr/lib/atlas'] define_macros = [('ATLAS_INFO', '"\\"3.6.0\\""')] language = c include_dirs = ['/usr/include/atlas'] lapack_mkl_info: NOT AVAILABLE blas_mkl_info: NOT AVAILABLE mkl_info: NOT AVAILABLE >>> scipy.test() Found 4 tests for scipy.io.array_import Found 128 tests for scipy.linalg.fblas [...] Calling _superlu.sgssv Use minimum degree ordering on A'+A. .......E.......................................................................................................................................................................................................................................................Warning: invalid value encountered in divide Warning: invalid value encountered in divide Warning: invalid value encountered in divide Warning: invalid value encountered in divide .....................Warning: invalid value encountered in divide [...] ..zswap:n=3 ...Result may be inaccurate, approximate err = 1.43408433945e-08 ...Result may be inaccurate, approximate err = 1.61696391382e-10 ......................................................F.......Warning: divide by zero encountered in log ..Ties preclude use of exact statistic. ..Ties preclude use of exact statistic. .............F.............. ====================================================================== ERROR: Solve: single precision complex ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/scipy/linsolve/umfpack/tests/test_umfpack.py", line 25, in check_solve_complex_without_umfpack x = linsolve.spsolve(a, b) File "/usr/lib/python2.4/site-packages/scipy/linsolve/linsolve.py", line 76, in spsolve return gssv(N, lastel, data, index0, index1, b, csc, permc_spec)[0] TypeError: array cannot be safely cast to required type ====================================================================== ERROR: check loadmat case cellnest ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/scipy/io/tests/test_mio.py", line 80, in cc self._check_case(name, expected) File "/usr/lib/python2.4/site-packages/scipy/io/tests/test_mio.py", line 75, in _check_case self._check_level(k_label, expected, matdict[k]) File "/usr/lib/python2.4/site-packages/scipy/io/tests/test_mio.py", line 33, in _check_level self._check_level(level_label, ev, actual[i]) File "/usr/lib/python2.4/site-packages/scipy/io/tests/test_mio.py", line 33, in _check_level self._check_level(level_label, ev, actual[i]) File "/usr/lib/python2.4/site-packages/scipy/io/tests/test_mio.py", line 33, in _check_level self._check_level(level_label, ev, actual[i]) File "/usr/lib/python2.4/site-packages/scipy/io/tests/test_mio.py", line 30, in _check_level assert len(expected) == len(actual), "Different list lengths at %s" % label TypeError: len() of unsized object ====================================================================== FAIL: check_rvs (scipy.stats.tests.test_distributions.test_randint) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/scipy/stats/tests/test_distributions.py", line 84, in check_rvs assert isinstance(val, numpy.ScalarType),`type(val)` AssertionError: ====================================================================== FAIL: check_dot (scipy.lib.tests.test_blas.test_fblas1_simple) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/scipy/lib/blas/tests/test_blas.py", line 76, in check_dot assert_almost_equal(f([3j,-4,3-4j],[2,3,1]),-9+2j) File "/usr/lib/python2.4/site-packages/numpy/testing/utils.py", line 156, in assert_almost_equal assert round(abs(desired - actual),decimal) == 0, msg AssertionError: Items are not equal: ACTUAL: (3.8672949819489671e-37-1.3059511184692383j) DESIRED: (-9+2j) ====================================================================== FAIL: check_dot (scipy.linalg.tests.test_blas.test_fblas1_simple) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/scipy/linalg/tests/test_blas.py", line 75, in check_dot assert_almost_equal(f([3j,-4,3-4j],[2,3,1]),-9+2j) File "/usr/lib/python2.4/site-packages/numpy/testing/utils.py", line 156, in assert_almost_equal assert round(abs(desired - actual),decimal) == 0, msg AssertionError: Items are not equal: ACTUAL: (3.8672949819489671e-37-1.3059511184692383j) DESIRED: (-9+2j) ---------------------------------------------------------------------- Ran 1569 tests in 42.945s FAILED (failures=3, errors=2) From sbasu at physics.cornell.edu Mon Nov 20 17:14:27 2006 From: sbasu at physics.cornell.edu (Sourish Basu) Date: Mon, 20 Nov 2006 17:14:27 -0500 Subject: [SciPy-user] About alternatives to Matlab In-Reply-To: <45615277.20708@gmail.com> References: <1161613941.550194.204870@e3g2000cwe.googlegroups.com> <1163711343.870829.110030@h48g2000cwc.googlegroups.com> <1163720268.611923.3180@e3g2000cwe.googlegroups.com> <455E0496.4020703@bryant.edu> <17758.58083.69027.862918@prpc.aero.iitb.ac.in> <20061118104853.GB3639@clipper.ens.fr> <455EF051.1010900@ar.media.kyoto-u.ac.jp> <20061118114509.GD3639@clipper.ens.fr> <455EF487.9020904@ar.media.kyoto-u.ac.jp> <45614CEA.5020402@ar.media.kyoto-u.ac.jp> <4561508B.5090406@physics.cornell.edu> <45615277.20708@gmail.com> Message-ID: <456228C3.1030207@physics.cornell.edu> An HTML attachment was scrubbed... URL: From lanceboyle at qwest.net Mon Nov 20 18:09:51 2006 From: lanceboyle at qwest.net (Jerry) Date: Mon, 20 Nov 2006 16:09:51 -0700 Subject: [SciPy-user] About alternatives to Matlab In-Reply-To: <45615277.20708@gmail.com> References: <1161613941.550194.204870@e3g2000cwe.googlegroups.com> <1163711343.870829.110030@h48g2000cwc.googlegroups.com> <1163720268.611923.3180@e3g2000cwe.googlegroups.com> <455E0496.4020703@bryant.edu> <17758.58083.69027.862918@prpc.aero.iitb.ac.in> <20061118104853.GB3639@clipper.ens.fr> <455EF051.1010900@ar.media.kyoto-u.ac.jp> <20061118114509.GD3639@clipper.ens.fr> <455EF487.9020904@ar.media.kyoto-u.ac.jp> <45614CEA.5020402@ar.media.kyoto-u.ac.jp> <4561508B.5090406@physics.cornell.edu> <45615277.20708@gmail.com> Message-ID: <95D05D9F-4E04-44E7-A9AC-08DD67E5FFB6@qwest.net> On Nov 20, 2006, at 12:00 AM, Robert Kern wrote: >> From looking at the results in Google, it seemes to me that Chaco is >> integrated with Enthought, which is exclusively for windows. > > Good heavens, no. We make binaries for Windows, but it works on > Linux just fine. > In fact we even make some binaries for Linux, too. > > http://code.enthought.com/ets/ > http://code.enthought.com/chaco/ > > Note that the "enthought" package (the "Enthought Tool Suite") is > different from > "Python, Enthought Edition" which is just a collection of packages. > > OS X, on the other hand, has a snag or two. Such as? Jerry From robert.kern at gmail.com Mon Nov 20 18:14:48 2006 From: robert.kern at gmail.com (Robert Kern) Date: Mon, 20 Nov 2006 17:14:48 -0600 Subject: [SciPy-user] About alternatives to Matlab In-Reply-To: <95D05D9F-4E04-44E7-A9AC-08DD67E5FFB6@qwest.net> References: <1161613941.550194.204870@e3g2000cwe.googlegroups.com> <1163711343.870829.110030@h48g2000cwc.googlegroups.com> <1163720268.611923.3180@e3g2000cwe.googlegroups.com> <455E0496.4020703@bryant.edu> <17758.58083.69027.862918@prpc.aero.iitb.ac.in> <20061118104853.GB3639@clipper.ens.fr> <455EF051.1010900@ar.media.kyoto-u.ac.jp> <20061118114509.GD3639@clipper.ens.fr> <455EF487.9020904@ar.media.kyoto-u.ac.jp> <45614CEA.5020402@ar.media.kyoto-u.ac.jp> <4561508B.5090406@physics.cornell.edu> <45615277.20708@gmail.com> <95D05D9F-4E04-44E7-A9AC-08DD67E5FFB6@qwest.net> Message-ID: <456236E8.1050603@gmail.com> Jerry wrote: > On Nov 20, 2006, at 12:00 AM, Robert Kern wrote: >> OS X, on the other hand, has a snag or two. > > Such as? 1. Obtaining a usable graphics context from a wxWidget widget. 2. Interfacing with the OS X font engine (for one such approach to the previous problem). -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From lanceboyle at qwest.net Mon Nov 20 18:46:24 2006 From: lanceboyle at qwest.net (Jerry) Date: Mon, 20 Nov 2006 16:46:24 -0700 Subject: [SciPy-user] About alternatives to Matlab In-Reply-To: <45614CEA.5020402@ar.media.kyoto-u.ac.jp> References: <1161613941.550194.204870@e3g2000cwe.googlegroups.com> <1163711343.870829.110030@h48g2000cwc.googlegroups.com> <1163720268.611923.3180@e3g2000cwe.googlegroups.com> <455E0496.4020703@bryant.edu> <17758.58083.69027.862918@prpc.aero.iitb.ac.in> <20061118104853.GB3639@clipper.ens.fr> <455EF051.1010900@ar.media.kyoto-u.ac.jp> <20061118114509.GD3639@clipper.ens.fr> <455EF487.9020904@ar.media.kyoto-u.ac.jp> <45614CEA.5020402@ar.media.kyoto-u.ac.jp> Message-ID: I know this is a shot from the dark, but IMO a better paradigm to emulate is that of Igor Pro (what Matlab wants to be if it ever grows up). Demo versions for Mac OS X and Windows are at www.wavemetrics.com. It's hard to describe what this amazing program does because it does so much. I have a few personal dislikes about it but by comparison, Matlab "isn't even wrong," to misuse a quote from Wolfgang Pauli. Yes, you can build a customized GUI _very_ easily (I'm guessing with much less programming than Chaco2) but it comes out-of-the-box with more GUI than most people need. I'll try to summarize, then kick myself later for forgetting most things: - Interactive interpreter - Compiled language - Tons and tons of GIU for interactive data exploration - Get this-- everything you do on-screen with your mouse can be programmed if you desire. Most dialogs will EITHER execute the task that you have set up (say, import some data from a file with X bytes of header arranged in M rows and N columns in little-endian single precision floats, or plot a particular set of array data with fine control over appearance) OR place the command to do same in the clipboard or command line. This is a great way to learn how to write your own programs. - Lots and lots of built-in analysis functions--an amazing assortment with built-in LAPACK (but weak in signal processing) - Report-quality graphics - Many import and export possibilities, both data and graphical - Notebooks for organizing data, programs, plots, and commentary - Built-in word processor integrated with everything else - Real-time interface to external devices for data collection and control - A well-thought-out data inspector, a kind of project manager for any amount of data. - It is friendly to enormous amounts of data. - Plotting is bloody fast. Its not just a kitchen-sink program but all of its components are highly integrated. It is at least 15 years old and getting a little creaky in some ways. For example, it doesn't use antialiased drawing on OS X and in some cases fonts aren't antialiased either. (However, Postscript and PDF export are fine, I believe.) I believe the price is around $500. Matlab should be embarassed. Jerry From ajikoe at gmail.com Mon Nov 20 20:02:34 2006 From: ajikoe at gmail.com (Pujo Aji) Date: Tue, 21 Nov 2006 08:02:34 +0700 Subject: [SciPy-user] setup sandbox xplt fail In-Reply-To: <454FE641.8080503@gmail.com> References: <454FE641.8080503@gmail.com> Message-ID: Hello Robert, I use windows xp and try the following method: 1. Create enabled_packages.txt in directory c:\python24\Lib\sandbox\ And use scipy-0.4.9.win32-py2.4.exe to reinstall scipy It still can not recognize scipy.xplt ------------------------------------------------------------------------------------------------- 2. Create enabled_packages.txt in directory c:\python24\Lib\sandbox\ And use command line in c:\python24\Lib\site-packages\scipy\setup install It gives error message such as: C:\Python24\Lib\site-packages\scipy>setup install fft_opt_info: fftw3_info: looking libraries fftw3 in C:\Python24\lib but found None looking libraries fftw3 in C:\Python24\lib but found None looking libraries fftw3 in C:\ but found None looking libraries fftw3 in C:\ but found None looking libraries fftw3 in C:\Python24\libs but found None looking libraries fftw3 in C:\Python24\libs but found None fftw3 not found NOT AVAILABLE fftw2_info: looking libraries rfftw,fftw in C:\Python24\lib but found None looking libraries rfftw,fftw in C:\Python24\lib but found None looking libraries rfftw,fftw in C:\ but found None looking libraries rfftw,fftw in C:\ but found None looking libraries rfftw,fftw in C:\Python24\libs but found None looking libraries rfftw,fftw in C:\Python24\libs but found None fftw2 not found NOT AVAILABLE dfftw_info: looking libraries drfftw,dfftw in C:\Python24\lib but found None looking libraries drfftw,dfftw in C:\Python24\lib but found None looking libraries drfftw,dfftw in C:\ but found None looking libraries drfftw,dfftw in C:\ but found None looking libraries drfftw,dfftw in C:\Python24\libs but found None looking libraries drfftw,dfftw in C:\Python24\libs but found None dfftw not found NOT AVAILABLE djbfft_info: NOT AVAILABLE NOT AVAILABLE could not resolve pattern in 'fftpack': 'dfftpack\\*.f' non-existing path in 'fftpack': 'fftpack.pyf' non-existing path in 'fftpack': 'src/zfft.c' non-existing path in 'fftpack': 'src/drfft.c' non-existing path in 'fftpack': 'src/zrfft.c' non-existing path in 'fftpack': 'src/zfftnd.c' non-existing path in 'fftpack': 'convolve.pyf' non-existing path in 'fftpack': 'src/convolve.c' Appending scipy.fftpack configuration to scipy Ignoring attempt to set 'name' (from 'scipy' to 'scipy.fftpack') blas_opt_info: blas_mkl_info: looking libraries mkl,vml,guide in C:\Python24\lib but found None looking libraries mkl,vml,guide in C:\ but found None looking libraries mkl,vml,guide in C:\Python24\libs but found None NOT AVAILABLE atlas_blas_threads_info: Setting PTATLAS=ATLAS looking libraries ptf77blas,ptcblas,atlas in C:\Python24\lib but found None looking libraries ptf77blas,ptcblas,atlas in C:\Python24\lib but found None looking libraries ptf77blas,ptcblas,atlas in C:\ but found None looking libraries ptf77blas,ptcblas,atlas in C:\ but found None looking libraries ptf77blas,ptcblas,atlas in C:\Python24\libs but found None looking libraries ptf77blas,ptcblas,atlas in C:\Python24\libs but found None NOT AVAILABLE atlas_blas_info: looking libraries f77blas,cblas,atlas in C:\Python24\lib but found None looking libraries f77blas,cblas,atlas in C:\Python24\lib but found None looking libraries f77blas,cblas,atlas in C:\ but found None looking libraries f77blas,cblas,atlas in C:\ but found None looking libraries f77blas,cblas,atlas in C:\Python24\libs but found None looking libraries f77blas,cblas,atlas in C:\Python24\libs but found None NOT AVAILABLE C:\Python24\lib\site-packages\numpy\distutils\system_info.py:1281: UserWarning: Atlas (http://math-atlas.sourceforge.net/) libraries not found. Directories to search for the libraries can be specified in the numpy/distutils/site.cfg file (section [atlas]) or by setting the ATLAS environment variable. warnings.warn(AtlasNotFoundError.__doc__) blas_info: looking libraries blas in C:\Python24\lib but found None looking libraries blas in C:\Python24\lib but found None looking libraries blas in C:\ but found None looking libraries blas in C:\ but found None looking libraries blas in C:\Python24\libs but found None looking libraries blas in C:\Python24\libs but found None NOT AVAILABLE C:\Python24\lib\site-packages\numpy\distutils\system_info.py:1290: UserWarning: Blas (http://www.netlib.org/blas/) libraries not found. Directories to search for the libraries can be specified in the numpy/distutils/site.cfg file (section [blas]) or by setting the BLAS environment variable. warnings.warn(BlasNotFoundError.__doc__) blas_src_info: NOT AVAILABLE C:\Python24\lib\site-packages\numpy\distutils\system_info.py:1293: UserWarning: Blas (http://www.netlib.org/blas/) sources not found. Directories to search for the sources can be specified in the numpy/distutils/site.cfg file (section [blas_src]) or by setting the BLAS_SRC environment variable. warnings.warn(BlasSrcNotFoundError.__doc__) Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\setup.py", line 30, in ? setup(**configuration(top_path='').todict()) File "C:\Python24\Lib\site-packages\scipy\setup.py", line 7, in configuration config.add_subpackage('integrate') File "C:\Python24\Lib\site-packages\numpy\distutils\misc_util.py", line 740, in add_subpackage caller_level = 2) File "C:\Python24\Lib\site-packages\numpy\distutils\misc_util.py", line 723, in get_subpackage caller_level = caller_level + 1) File "C:\Python24\Lib\site-packages\numpy\distutils\misc_util.py", line 670, in _get_configuration_from_setup_py config = setup_module.configuration(*args) File "C:\Python24\Lib\site-packages\scipy\integrate\setup.py", line 11, in configuration blas_opt = get_info('blas_opt',notfound_action=2) File "C:\Python24\Lib\site-packages\numpy\distutils\system_info.py", line 249, in get_info return cl().get_info(notfound_action) File "C:\Python24\Lib\site-packages\numpy\distutils\system_info.py", line 397, in get_info raise self.notfounderror,self.notfounderror.__doc__ numpy.distutils.system_info.NotFoundError: Some third-party program or library is not found. Did I miss something ? TIA, Pujo On 11/7/06, Robert Kern wrote: > > Pujo Aji wrote: > > Hello, > > > > I try to run setup.py install in my sandbox directory and create > > enabled_packages.txt. I got the following messages: > > Do not run setup.py install from the sandbox directory. Just create > Lib/sandbox/enabled_packages.txt and then build/install scipy as a whole. > > -- > Robert Kern > > "I have come to believe that the whole world is an enigma, a harmless > enigma > that is made terrible by our own mad attempt to interpret it as though it > had > an underlying truth." > -- Umberto Eco > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > -------------- next part -------------- An HTML attachment was scrubbed... URL: From robert.kern at gmail.com Mon Nov 20 20:05:31 2006 From: robert.kern at gmail.com (Robert Kern) Date: Mon, 20 Nov 2006 19:05:31 -0600 Subject: [SciPy-user] setup sandbox xplt fail In-Reply-To: References: <454FE641.8080503@gmail.com> Message-ID: <456250DB.70209@gmail.com> Pujo Aji wrote: > Hello Robert, > > I use windows xp and try the following method: > 1. Create enabled_packages.txt in directory c:\python24\Lib\sandbox\ > And use scipy-0.4.9.win32-py2.4.exe to reinstall scipy > > It still can not recognize scipy.xplt That's right, it's now scipy.sandbox.xplt . -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From robert.kern at gmail.com Mon Nov 20 20:08:25 2006 From: robert.kern at gmail.com (Robert Kern) Date: Mon, 20 Nov 2006 19:08:25 -0600 Subject: [SciPy-user] setup sandbox xplt fail In-Reply-To: References: <454FE641.8080503@gmail.com> Message-ID: <45625189.7020508@gmail.com> Pujo Aji wrote: > Hello Robert, > > I use windows xp and try the following method: > 1. Create enabled_packages.txt in directory c:\python24\Lib\sandbox\ > And use scipy-0.4.9.win32-py2.4.exe to reinstall scipy Of course, you also have other problems. 1. If you rebuild scipy from source, using the old binary installer won't install your rebuilt scipy. 2. You need to build or download the libraries that scipy depends on in order to build it. Namely, you need ATLAS. See here for instructions and links. http://scipy.org/Installing_SciPy/Windows -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From chris at edc.com.au Mon Nov 20 21:02:38 2006 From: chris at edc.com.au (Chris Bartley) Date: Tue, 21 Nov 2006 10:02:38 +0800 Subject: [SciPy-user] What is missing in scipy to be a top notch environment for signal processing In-Reply-To: Message-ID: <001401c70d11$1f1407c0$3811a8c0@Guru> > From: David Cournapeau > > I was wondering how many people here are using numpy/scipy for signal processing, > and what are their impression compared to eg matlab ? > The point is not to do a matlab vs scipy, but more to spot weak points in scipy, > and to change the situation; neither do I want to criticize anything. The whole > point is really to improve scipy. David, I use scipy for signal analysis of engineering vibration measurements. Although I understand it is not strictly speaking part of scipy, the single, main, thing that stops the other guys here using it is the speed of plotting large time series datasets (100k-400k data points). Matlab plotting is incredibly quick! Matplotlib is great for many things, but seems to suffer for large datasets, especially where the signal covers a lot of the plot canvas (ie a thick, noisy line, not a thin line). The other feature we use a lot is the matlab 'decimate', which I understand is not currently built into scipy, although I do have code for a port of this function from Octave. Otherwise, for our everyday purposes we use: fft, filtering, detrending, specgram, matrix arithemetic. All freely available in scipy! :) Chris Bartley ******************************************************** Mechanical Engineer Engineering Dynamics Consultants 21 Riseley St Applecross WA 6153 +61 8 9316 3577 ******************************************************** -----Original Message----- From: scipy-user-bounces at scipy.org [mailto:scipy-user-bounces at scipy.org] On Behalf Of scipy-user-request at scipy.org Sent: Monday, 20 November 2006 2:00 AM To: scipy-user at scipy.org Subject: SciPy-user Digest, Vol 39, Issue 34 Send SciPy-user mailing list submissions to scipy-user at scipy.org To subscribe or unsubscribe via the World Wide Web, visit http://projects.scipy.org/mailman/listinfo/scipy-user or, via email, send a message with subject or body 'help' to scipy-user-request at scipy.org You can reach the person managing the list at scipy-user-owner at scipy.org When replying, please edit your Subject line so it is more specific than "Re: Contents of SciPy-user digest..." Today's Topics: 1. What is missing in scipy to be a top notch environment for signal processing (lpc and co) ? (David Cournapeau) 2. Re: Array documentation (Herman Berendsen) 3. physical constants module (Herman Berendsen) 4. Re: Unexpected behaviour of convolve2d and correlate2d (Gael Varoquaux) ---------------------------------------------------------------------- I've just finished my second big conversion of matlab -> python code (~5000 lines of matlab code), and I think there are some "holes" in scipy, which would be really useful to fill in. I believe they are general enough so I am not the only one missing them. Here are some functions I missed 1: linear prediction coefficients computation (the matlab lpc function). 2: more flexible autocorrelation method (ala xcorr in matlab). 3: good resampling function in time domain 4: functions capable of running the same algorithm on some strides of an array. More detailed: 1 requires a method to invert a Toeplitz matrix (durbin levinson) and a method for autocorrelation. 2 right now, I believe there is only time domain autocorrelation implementation, which is expensive for any size exceeding a few tens/hundreds samples in numpy. Also, it is not possible to select the lag required. In LPC coding for speech, we often need only a few lags of signals around a few hundreds samples; just computing what is needed would already give a 10 times fold speed increase at least for this kind of problems. For problems where the size of the signal and the number of coefficients is the same scale, a fft based autocorrelation would also be beneficial. 3 basically, we want an equivalent to upfirdn, which is using a polyphase implementation according to matlab doc + good filter design methods (which already exist in scipy AFAIK). 4 I am not sure about this one. A concrete example: if I want to compute the autocorrelation of some frames of a signal, the obvious thing is to use a loop. This is expensive. If I had a matrix which each column is a frame, and an autocorrelation function capable of running an algorithm on each column, this would be much faster. Incidentally, Matlab offers a function buffer, which builds a matrix which each column is a frame, with options for overlapping and border cases. The doc says "Y = BUFFER(X,N) partitions signal vector X into nonoverlapping data segments (frames) of length N. Each data frame occupies one column in the output matrix, resulting in a matrix with N rows." I don't know how, if at all possible, to generalize that to the numpy array. Now, because I don't want to look like a whiner, I have some code to solve partially or totally some of the points: - I have C code to compute Levinson Durbin, checked against matlab. It expects to have the autocorrelation as an contiguous array; as it is mono dimensional, adapt it to multiple stride would be trivial - I have C code to compute only one side, and a few lags of autocorrelation in time domain. This also expects contiguous array, and would be a bit more tricky to adapt. - I have code based on fftw to compute the autocorrelation using fft (can be adapted for cross correlation too). As I think this would be useful in scipy, I understand that it cannot use fftw. Which fft should I use in scipy C code ? - I would be interested in solving 3, and eventually 4, but I would need some advices from others, as I am not sure how to solve them API-wise. I don't know if this is of any interest for other, but I believe some of those functionalities to be a basic requirement for scipy to be used by people in signal processing. Cheers, David ------------------------------ Message: 2 Date: Sun, 19 Nov 2006 10:36:43 +0000 (UTC) From: Herman Berendsen Subject: Re: [SciPy-user] Array documentation To: scipy-user at scipy.org Message-ID: Content-Type: text/plain; charset=us-ascii Gael Varoquaux normalesup.org> writes: > > Very nice and very complete work. Did you do this be hand or did your > generate some part from docstrings. In the later case, would you > consider sharing the scripts used ? Thanks both respondents and those who sent me an email for the nice comments. Actually, the array documentation is not yet complete, as I do not have added examples for all methods and functions. More will follow, so please check-out in the future. I used the docstrings, but modified and extended by hand (programs never add anything original!). I use the public domain web editor Arachnophilia which keeps the layout of the html file simple and readable. Please also check my posted message (Nov 19) on a module physcon. Herman ------------------------------ Message: 3 Date: Sun, 19 Nov 2006 10:52:02 +0000 (UTC) From: Herman Berendsen Subject: [SciPy-user] physical constants module To: scipy-user at scipy.org Message-ID: Content-Type: text/plain; charset=us-ascii If you use physical constants (like Planck's constant h, gas constant R, etc.) with python, you may be interested to copy my module physcon.py from http://www.hjcb.nl/python/ It contains a library of physical constants (CODATA values in SI units, with accuracy) and it defines variables. For example, after 'import physcon as pc', pc.h will contain Planck's constant as a float. To see the contents, type help(). ------------------------------ Message: 4 Date: Sun, 19 Nov 2006 16:38:10 +0100 From: Gael Varoquaux Subject: Re: [SciPy-user] Unexpected behaviour of convolve2d and correlate2d To: SciPy Users List Message-ID: <20061119153810.GD6313 at clipper.ens.fr> Content-Type: text/plain; charset=iso-8859-1 Hi, I think you have uncovered a bug, this is taken from a ipython session (I didn't cheat): In [42]: signal.convolve2d(ones((4,4)), ones((1,15)), 'same', 'wrap') Out[42]: array([[ nan, 13. , 14. , 15. ], [ 15. , 15. , 15. , 15. ], [ 15. , 15. , 15. , 15. ], [ 15. , 15892918649396384. , 15892918649396384. , 15892918649396384. ]]) In [43]: signal.convolve2d(ones((4,4)), ones((1,15)), 'same', 'wrap') Out[43]: array([[ nan, 13. , 14. , 15. ], [ 15. , 15. , 15. , 15. ], [ 15. , 15. , 15. , 15. ], [ 15. , 14. , 13. , 12. ]]) In [44]: signal.convolve2d(ones((4,4)), ones((1,15)), 'same', 'wrap') Out[44]: array([[ nan, 13. , 14. , 15. ], [ 15. , 15. , 15. , 15. ], [ 15. , 15. , 15. , 15. ], [ 15. , 14. , 13. , 12. ]]) In [45]: signal.convolve2d(ones((4,4)), ones((1,15)), 'same', 'wrap') Out[45]: array([[ nan, 13. , 14. , 15. ], [ 15. , 15. , 15. , 15. ], [ 15. , 15. , 15. , 15. ], [ 15. , 14. , 13. , 12. ]]) In [46]: signal.convolve2d(ones((4,4)), ones((1,15)), 'same', 'wrap') Out[46]: array([[ 12., 13., 14., 15.], [ 15., 15., 15., 15.], [ 15., 15., 15., 15.], [ 15., 14., 13., 12.]]) Could someone more qualified than me look into this ? Scipy version is 0.5.1 (ubuntu breezy), and numpy 1.0rc1 Ga??l ------------------------------ _______________________________________________ SciPy-user mailing list SciPy-user at scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user End of SciPy-user Digest, Vol 39, Issue 34 ****************************************** From pajer at iname.com Mon Nov 20 22:24:15 2006 From: pajer at iname.com (Gary) Date: Mon, 20 Nov 2006 22:24:15 -0500 Subject: [SciPy-user] Windows build help In-Reply-To: References: <1161613941.550194.204870@e3g2000cwe.googlegroups.com> <1163711343.870829.110030@h48g2000cwc.googlegroups.com> <1163720268.611923.3180@e3g2000cwe.googlegroups.com> <455E0496.4020703@bryant.edu> <17758.58083.69027.862918@prpc.aero.iitb.ac.in> <20061118104853.GB3639@clipper.ens.fr> <455EF051.1010900@ar.media.kyoto-u.ac.jp> <20061118114509.GD3639@clipper.ens.fr> <455EF487.9020904@ar.media.kyoto-u.ac.jp> <45614CEA.5020402@ar.media.kyoto-u.ac.jp> Message-ID: <4562715F.1000909@iname.com> I'm trying to build the latest svn version on WinXP so that I can have a compatible up to date set {numpy, scipy, mpl} I'm using the instructions on scipy.org. I've got MinGW gcc 3.4.5 and g77 3.4.5 (do I need anything else from MinGW?) , and the atlas prebuilt libraries. I've modified site.cfg, and also set ATLAS = \correct\path Twice near the top of the build it tells me that Atlas (http://math....) libraries can't be found, but a few lines later it tells me under "lapack_info:" that it has FOUND: libraries = ['lapack', 'cblas']. But a raft of errors start during the compilation of odepack (I think) with lots of messages like undefined reference to 'daxpy_' and many others. Any suggestions? thanks, -gary From pwang at enthought.com Mon Nov 20 22:32:01 2006 From: pwang at enthought.com (Peter Wang) Date: Mon, 20 Nov 2006 21:32:01 -0600 Subject: [SciPy-user] What is missing in scipy to be a top notch environment for signal processing In-Reply-To: <001401c70d11$1f1407c0$3811a8c0@Guru> References: <001401c70d11$1f1407c0$3811a8c0@Guru> Message-ID: <01E1105C-AB1E-4DE1-839C-CA0A17E1738E@enthought.com> On Nov 20, 2006, at 8:02 PM, Chris Bartley wrote: > Although I understand it is not strictly speaking part of scipy, > the single, > main, thing that stops the other guys here using it is the speed of > plotting > large time series datasets (100k-400k data points). Matlab plotting is > incredibly quick! Matplotlib is great for many things, but seems to > suffer > for large datasets, especially where the signal covers a lot of the > plot > canvas (ie a thick, noisy line, not a thin line). Chris, Have you looked at chaco? It works well with large data sets. 100k points is no problem at all, and it's sluggish but minimally usable at 1mil points. Take a look at chaco2/examples/bigdata.py. We use image-spacing caching so that interactions which don't modify the data can be drawn very quickly (press "z" to bring up the zoom box, for example), and we also clip out data which is outside the view area so as you zoom in, rendering speed is improved. The docstring at the top of bigdata.py tells you the different interactions you can try out. If you're interested, one thing you can try is changing line 69 to: plot.tools.append(PanTool(plot)) so that you can click and drag the plot around. I have the RangeTool in there by default so you can see that selection-type tools which draw overlays are very responsive. You can also play with simple_scatter.py; crank up the point count and see if it's responsive enough for your needs. (I did 400k just now and it seems OK.) -Peter From chris at edc.com.au Tue Nov 21 00:10:00 2006 From: chris at edc.com.au (Chris Bartley) Date: Tue, 21 Nov 2006 13:10:00 +0800 Subject: [SciPy-user] About alternatives to Matlab In-Reply-To: Message-ID: <001601c70d2b$4b75bab0$3811a8c0@Guru> Peter Wang wrote : > Haha... we actually have this *exact* thing implemented as a demo: > chaco2/examples/zoomed_plot/zoom_plot.py. Peter, I've tried to get this demo (zoom_plot.py) working. I've tried: 1. The latest Enthought Tool Suite (it doesn't appear to be included). 2. downloading the file from svn.enthought. I can download the file, but when I try to run it, it generates the error: Traceback (most recent call last): File "C:\Python24\Lib\site-packages\enthought\chaco2\examples\zoom_plot.py", line 16, in ? from grid_plot_factory import create_gridded_line_plot ImportError: No module named grid_plot_factory What am I missing? -Chris From robert.kern at gmail.com Tue Nov 21 00:15:39 2006 From: robert.kern at gmail.com (Robert Kern) Date: Mon, 20 Nov 2006 23:15:39 -0600 Subject: [SciPy-user] About alternatives to Matlab In-Reply-To: <001601c70d2b$4b75bab0$3811a8c0@Guru> References: <001601c70d2b$4b75bab0$3811a8c0@Guru> Message-ID: <45628B7B.6030800@gmail.com> Chris Bartley wrote: > Peter Wang wrote : >> Haha... we actually have this *exact* thing implemented as a demo: >> chaco2/examples/zoomed_plot/zoom_plot.py. > > Peter, I've tried to get this demo (zoom_plot.py) working. I've tried: > 1. The latest Enthought Tool Suite (it doesn't appear to be included). > 2. downloading the file from svn.enthought. I can download the file, but > when I try to run it, it generates the error: > Traceback (most recent call last): > File > "C:\Python24\Lib\site-packages\enthought\chaco2\examples\zoom_plot.py", line > 16, in ? > from grid_plot_factory import create_gridded_line_plot > ImportError: No module named grid_plot_factory > > What am I missing? That zoom_plot.py file should be in enthought/chaco2/examples/zoomed_plot/ along with grid_plot_factory.py . Get the whole SVN checkout, not just the one file. zoomed_plot]$ pwd /Users/rkern/svn/enthought-lib/enthought/chaco2/examples/zoomed_plot [zoomed_plot]$ ls __init__.py grid_plot_factory.py wav_to_numeric.py zoom_overlay.py zoom_plot.py -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From chris at edc.com.au Tue Nov 21 00:52:16 2006 From: chris at edc.com.au (Chris Bartley) Date: Tue, 21 Nov 2006 13:52:16 +0800 Subject: [SciPy-user] About alternatives to Matlab In-Reply-To: <45628B7B.6030800@gmail.com> Message-ID: <001701c70d31$331dfb70$3811a8c0@Guru> > That zoom_plot.py file should be in enthought/chaco2/examples/zoomed_plot/ > along with grid_plot_factory.py . Get the whole SVN checkout, not just the one file. > zoomed_plot]$ pwd > /Users/rkern/svn/enthought-lib/enthought/chaco2/examples/zoomed_plot > [zoomed_plot]$ ls > __init__.py grid_plot_factory.py wav_to_numeric.py zoom_overlay.py > zoom_plot.py > > -- > Robert Kern OK, that makes sense, and it works too. Thanks. Now the demo runs... But it simply opens an empty window (white background). The window is fully functional in terms of Windows - the standard menu in top left works, and it maximises & minimises. But no data, graphs, and no python errors... I am using windows xp - any ideas? I've checked, and the requested wav file (C:\Program Files\Windows NT\Pinball\SOUND1.WAV) exists. - Chris Bartley From pwang at enthought.com Tue Nov 21 00:56:05 2006 From: pwang at enthought.com (Peter Wang) Date: Mon, 20 Nov 2006 23:56:05 -0600 Subject: [SciPy-user] zoom_plot (was Re: About alternatives to Matlab) In-Reply-To: <001701c70d31$331dfb70$3811a8c0@Guru> References: <001701c70d31$331dfb70$3811a8c0@Guru> Message-ID: <97E1441B-358F-42C3-8046-746A4A24BA05@enthought.com> On Nov 20, 2006, at 11:52 PM, Chris Bartley wrote: > OK, that makes sense, and it works too. Thanks. Now the demo > runs... But it > simply opens an empty window (white background). The window is fully > functional in terms of Windows - the standard menu in top left > works, and it > maximises & minimises. But no data, graphs, and no python errors... > I am > using windows xp - any ideas? I've checked, and the requested wav file > (C:\Program Files\Windows NT\Pinball\SOUND1.WAV) exists. How very odd. Can you run simple_line.py or any of the others in the examples directory? Is there a chaco.log file with meaningful output in it? -peter From chris at edc.com.au Tue Nov 21 01:11:14 2006 From: chris at edc.com.au (Chris Bartley) Date: Tue, 21 Nov 2006 14:11:14 +0800 Subject: [SciPy-user] zoom_plot (was Re: About alternatives to Matlab) In-Reply-To: <97E1441B-358F-42C3-8046-746A4A24BA05@enthought.com> Message-ID: <001801c70d33$d9b290c0$3811a8c0@Guru> > > OK, that makes sense, and it works too. Thanks. Now the > demo runs... > > But it simply opens an empty window (white background). The > window is > > fully functional in terms of Windows - the standard menu in > top left > > works, and it maximises & minimises. But no data, graphs, and no > > python errors... > > I am > > using windows xp - any ideas? I've checked, and the > requested wav file > > (C:\Program Files\Windows NT\Pinball\SOUND1.WAV) exists. > > How very odd. Can you run simple_line.py or any of the > others in the examples directory? Is there a chaco.log file > with meaningful output in it? > -peter The following demos work: bar_plot, bigdata, colormapped_scatter, scatter_select, simple_line, simple_line2, simple_polar, simple_scatter. two_plots.py and save_plot.py produce a similar white window to zoom_plot. There is no text at all in the chaco.log file. To clarify my installation, the basic steps to get to where I am were: 1. Install Python 2.4.3 Enthought Edition. 2. Install Enthought Tool Suite (current edition) 3. Copy the zoom_plot directory from SVN to the C:\Python24\Lib\site-packages\enthought\chaco2\examples\zoomed_plot folder. 4. Run the zoom_plot.py file from IDLE editor, or by double clicking on the py file. - Chris From pwang at enthought.com Tue Nov 21 01:40:44 2006 From: pwang at enthought.com (Peter Wang) Date: Tue, 21 Nov 2006 00:40:44 -0600 Subject: [SciPy-user] zoom_plot (was Re: About alternatives to Matlab) In-Reply-To: <001801c70d33$d9b290c0$3811a8c0@Guru> References: <001801c70d33$d9b290c0$3811a8c0@Guru> Message-ID: On Nov 21, 2006, at 12:11 AM, Chris Bartley wrote: > The following demos work: bar_plot, bigdata, colormapped_scatter, > scatter_select, simple_line, simple_line2, simple_polar, > simple_scatter. > two_plots.py and save_plot.py produce a similar white window to > zoom_plot. > There is no text at all in the chaco.log file. Thanks for the info. I tried to reproduce your same setup on a fresh Parallels windows XP image: - installed python 2.4.3 enthought edition - downloaded and installed ETS (enthought-1.1.0 win32 py2.4. - grab zoomed_plot directory from https://svn.enthought.com/svn/ enthought/trunk/src/lib/enthought/chaco2/examples - put zoomed_plot directory into c:\python24\lib\site-packages \enthought\chaco2\examples Having done this, the two_plots example runs fine, as do the other demos. save_plot.py is using a deprecated class right now so it's probably a little broken anyways. I *am* able to run the zoom_plot.py example. I've not changed my PYTHONPATH or anything. > 4. Run the zoom_plot.py file from IDLE editor, or by double > clicking on the > py file. Have you tried running it from the command line, by doing "python zoom_plot.py"? I will keep thinking about what the problem might be... -Peter From chris at edc.com.au Tue Nov 21 02:32:19 2006 From: chris at edc.com.au (Chris Bartley) Date: Tue, 21 Nov 2006 15:32:19 +0800 Subject: [SciPy-user] zoom_plot In-Reply-To: Message-ID: <001901c70d3f$2d128e40$3811a8c0@Guru> > Have you tried running it from the command line, by doing > "python zoom_plot.py"? > > I will keep thinking about what the problem might be... > Peter I've tried that now, same thing. Thanks for trying. Hmmm - Chris Bartley From a.u.r.e.l.i.a.n at gmx.net Tue Nov 21 03:07:35 2006 From: a.u.r.e.l.i.a.n at gmx.net (Johannes Loehnert) Date: Tue, 21 Nov 2006 09:07:35 +0100 Subject: [SciPy-user] Plotting in matplotlib (was:What is missing in scipy to be a top notch environment for signal processing) In-Reply-To: <001401c70d11$1f1407c0$3811a8c0@Guru> References: <001401c70d11$1f1407c0$3811a8c0@Guru> Message-ID: <200611210907.35431.a.u.r.e.l.i.a.n@gmx.net> > I use scipy for signal analysis of engineering vibration measurements. > Although I understand it is not strictly speaking part of scipy, the > single, main, thing that stops the other guys here using it is the speed of > plotting large time series datasets (100k-400k data points). Matlab > plotting is incredibly quick! Matplotlib is great for many things, but > seems to suffer for large datasets, especially where the signal covers a > lot of the plot canvas (ie a thick, noisy line, not a thin line). If you want to plot your data as little dots (i.e. single pixels), there is a trick which works extremely well. Set up an integer array of reasonable size (say, 800x800) and put 1's at the appropriate place in the array using fancy indexing. Then plot the whole array via imshow(). Of course you can make it more sophisticated, e.g. use an NxNx3 array representing RGB values. I wrote a nice class for this which also supports blending several pixels over each other and anti-aliasing pixels (slower), if you like I can post it here. Johannes From chris at edc.com.au Tue Nov 21 03:35:15 2006 From: chris at edc.com.au (Chris Bartley) Date: Tue, 21 Nov 2006 16:35:15 +0800 Subject: [SciPy-user] Plotting in matplotlib (was:What is missing inscipy to be a top notch environment for signal processing) In-Reply-To: <200611210907.35431.a.u.r.e.l.i.a.n@gmx.net> Message-ID: <002101c70d47$f80d0370$3811a8c0@Guru> > If you want to plot your data as little dots (i.e. single > pixels), there is a trick which works extremely well. Set up > an integer array of reasonable size (say, 800x800) and put > 1's at the appropriate place in the array using fancy > indexing. Then plot the whole array via imshow(). > > Of course you can make it more sophisticated, e.g. use an > NxNx3 array representing RGB values. I wrote a nice class for > this which also supports blending several pixels over each > other and anti-aliasing pixels (slower), if you like I can > post it here. > > Johannes > _______________________________________________ Johannes, Thanks for that idea. I would like to see that class of yours... Chris From joris at ster.kuleuven.ac.be Tue Nov 21 03:52:13 2006 From: joris at ster.kuleuven.ac.be (Joris De Ridder) Date: Tue, 21 Nov 2006 09:52:13 +0100 Subject: [SciPy-user] Installing scipy with fftw in non-standard location Message-ID: <200611210952.13638.joris@ster.kuleuven.ac.be> Hi, I have FFTW installed in a non-standard location. How can I make scipy find the FFTW libs? I tried: [fftw] library_dirs = /software/fftw-2.1.5/lib/ fftw_libs = fftw, rfftw in my site.cfg, but scipy nevertheless didn't find FFTW during build. Any pointers? Cheers, Joris Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm From a.u.r.e.l.i.a.n at gmx.net Tue Nov 21 04:16:45 2006 From: a.u.r.e.l.i.a.n at gmx.net (Johannes Loehnert) Date: Tue, 21 Nov 2006 10:16:45 +0100 Subject: [SciPy-user] Plotting in matplotlib (was:What is missing inscipy to be a top notch environment for signal processing) In-Reply-To: <002101c70d47$f80d0370$3811a8c0@Guru> References: <002101c70d47$f80d0370$3811a8c0@Guru> Message-ID: <200611211016.45436.a.u.r.e.l.i.a.n@gmx.net> Hi, > Thanks for that idea. I would like to see that class of yours... Here it is. :-) It is not really well tested (it is merely a side-product of my work), but documentation and common sense should be sufficient to fix errors. In particular, Canvas.plot_interpolate might need fixing -- I don't use it since it is 4x slower than Canvas.plot. usage example: from pylab import * from image_plotter import Canvas, MODE_AVG # instantiate: plotter = Canvas(800, 600, mode=MODE_AVG) plotter.limits((0, 2*pi, -1, 1)) # plot some data (supply yourself) plotter.plot(x, y, (128,0,0)) # last tuple is color # show imshow(plotter.image(), interpolation='nearest') plotter.save('test.bmp') Best regards, Johannes -------------- next part -------------- A non-text attachment was scrubbed... Name: image_plotter.py Type: application/x-python Size: 5865 bytes Desc: not available URL: From a.u.r.e.l.i.a.n at gmx.net Tue Nov 21 04:28:22 2006 From: a.u.r.e.l.i.a.n at gmx.net (Johannes Loehnert) Date: Tue, 21 Nov 2006 10:28:22 +0100 Subject: [SciPy-user] Plotting in matplotlib (was:What is missing inscipy to be a top notch environment for signal processing) In-Reply-To: <200611211016.45436.a.u.r.e.l.i.a.n@gmx.net> References: <002101c70d47$f80d0370$3811a8c0@Guru> <200611211016.45436.a.u.r.e.l.i.a.n@gmx.net> Message-ID: <200611211028.22260.a.u.r.e.l.i.a.n@gmx.net> Hi again, legal notice now that I released it in the wild... Feel free to use the code for anything you can think of. Credit me as long as substantial parts of my code remain: Johannes Loehnert, a.u.r.e.l.i.a.n at gmx.net. Please mark where you made changes. -- Johannes From pearu at cens.ioc.ee Tue Nov 21 04:55:27 2006 From: pearu at cens.ioc.ee (pearu at cens.ioc.ee) Date: Tue, 21 Nov 2006 11:55:27 +0200 (EET) Subject: [SciPy-user] An Invitation to Get Involved in Python Advocacy (fwd) Message-ID: ---------- Forwarded message ---------- Date: Mon, 13 Nov 2006 06:45:06 -0600 From: Jeff Rush Reply-To: python-list at python.org To: python-announce-list at python.org, python-list at python.org, Marketing-Python , advocacy at python.org Subject: An Invitation to Get Involved in Python Advocacy I'd like to extend an invitation to those who would like to get involved in advocating the use of Python. In August, the PSF hired me, for a 6-mo contract, to coordinate the Python advocacy effort. Since then I've been working to make the next PyCon one of the best conferences yet, and putting in place the infrastructure of a newcomer portal (http://advocacy.python.org) focused on drawing in those people who don't know much about Python but have developed an interest for various reasons. The portal also has an entry point (http://advocacy.python.org/getinvolved) to organize the materials and activities of those already in the Python community who want to get involved. I've also established a new mailing list on which to discuss advocacy, replacing the list, and a blog.(http://python-advocacy.blogspot.com) for keeping the Python community up-to-date about advocacy goings on. The blog is aggregated into the official Planet Python (but I can't seem to reach the coordinator of the *unofficial* Planet Python). A bit about the newcomer portal to place it in context; the portal is designed to help someone who has just become aware of Python decide if the language is right for them. It seeks to quickly direct visitors to the information they want, and bring to their attention how diverse and vibrant the support for Python is. The audience is not only programmers but also journalists, project managers, scientists/engineers, recruiters and educators. Different audiences come at Python with different needs and often need different explanations. And some are indeed programmers, but using other languages, who wonder how Python compares to what they are using now. For the newcomer portal we have a need for content writers to focus on specific problem domains, for the various subcommunities to provide technology roadmaps and representative samples of source code that would entice someone to check them out. As one example, the SciPy/NumPy group could write about what makes their software attractive to the scientific community and provide one-page sources that illustrates certain common operations, to show off the clarify and expressiveness of Python. I've found plenty of material on the SciPy website that I'm weaving into the newcomer portal. The portal is not designed to replace what we have at www.python.org but to complement it, and to serve as an organizing point for the extensive content already on www.python.org and elsewhere. The portal also specifically supports dynamic content, relational database storage of information and easy plug-in of new components to add new features. Such features will eventually include, among other things, a searchable roster of user groups, a registry of speakers and trainers and a catalog of books about Python, each with RSS feeds where appropriate. And for the curious, the portal is written using the Zope 3 component system, building on the underlying Twisted subsystem for internal background scheduling and hooked to a PostgreSQL database. The site makes use of Zope 3 viewlets to provide pluggable display elements, reStructured text documents for a clean separation between content and infrastructure, and Nabu for synchronization of document collections into the indexing engine and persisting of the reST DOMs to enable content manipulation at presentation time according to what is to be viewed (biblio data, abstracts, content). The portal is located on the python.org servers and all software and content are checked into svn.python.org. In closing, I am greatly honored by the trust of the foundation members in me and hope to serve the community well. As coordinator, I invite others to get involved and will strive to provide an assistive environment within which everyone can be productive. The primary discussion area is the new mailing list which can be joined at: http://mail.python.org/mailman/listinfo/advocacy and a list of what is needed is at: http://advocacy.python.org/getinvolved I am also maintaining a list of accomplishments and near-term To-Do's for myself at: http://wiki.python.org/moin/PythonAdvocacyCoordinator Jeff Rush Python Advocacy Coordinator -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations.html From stefan at sun.ac.za Tue Nov 21 04:51:38 2006 From: stefan at sun.ac.za (Stefan van der Walt) Date: Tue, 21 Nov 2006 11:51:38 +0200 Subject: [SciPy-user] Installing scipy with fftw in non-standard location In-Reply-To: <200611210952.13638.joris@ster.kuleuven.ac.be> References: <200611210952.13638.joris@ster.kuleuven.ac.be> Message-ID: <20061121095138.GY26581@mentat.za.net> On Tue, Nov 21, 2006 at 09:52:13AM +0100, Joris De Ridder wrote: > Hi, > > I have FFTW installed in a non-standard location. How can I make scipy > find the FFTW libs? I tried: > > [fftw] > library_dirs = /software/fftw-2.1.5/lib/ > fftw_libs = fftw, rfftw > > in my site.cfg, but scipy nevertheless didn't find FFTW during build. > Any pointers? I havn't done this before, but since everyone else is asleep now I may just as well take a shot: [fftw2] library_dirs = /software/fftw-2.1.5/lib include_dirs = /software/fftw-2.1.5/include fftw_libs = fftw2 Cheers St?fan From H.J.C.Berendsen at rug.nl Tue Nov 21 08:53:41 2006 From: H.J.C.Berendsen at rug.nl (Herman Berendsen) Date: Tue, 21 Nov 2006 13:53:41 +0000 (UTC) Subject: [SciPy-user] physical constants module References: <6f54c160611191441w76abfa89k66e46660ef977717@mail.gmail.com> Message-ID: wegwerp gmail.com> writes: > did you see the codata.py and constants.py modules which are located > in the scipy sandbox? No I didn't, sorry. > For some reason I am not able to download your version, so I cannot > check the differences between your version and mine. This should now work. I wasn't aware of the fact that my server does not allow export of .py files. I changed the file extension to .txt (which it is, anyway) and now there is no problem accessing the file. http://www.hjcb/python/physcon.txt Herman From meesters at uni-mainz.de Tue Nov 21 09:02:37 2006 From: meesters at uni-mainz.de (Christian Meesters) Date: Tue, 21 Nov 2006 15:02:37 +0100 Subject: [SciPy-user] physical constants module In-Reply-To: References: <6f54c160611191441w76abfa89k66e46660ef977717@mail.gmail.com> Message-ID: <200611211502.37876.meesters@uni-mainz.de> > This should now work. I wasn't aware of the fact that my server does not > allow export of .py files. I changed the file extension to .txt (which it > is, anyway) and now there is no problem accessing the file. > http://www.hjcb/python/physcon.txt Sorry to correct you, but you probably meant: http://www.hjcb.nl/python/physcon.txt Thanks for the great web page! Christian From H.J.C.Berendsen at rug.nl Tue Nov 21 09:04:53 2006 From: H.J.C.Berendsen at rug.nl (Herman Berendsen) Date: Tue, 21 Nov 2006 14:04:53 +0000 (UTC) Subject: [SciPy-user] physical constants module References: <6f54c160611191441w76abfa89k66e46660ef977717@mail.gmail.com> Message-ID: Sorry, error in the URL of my previous answer: Corrected: http://www.hjcb.nl/python/physcon.txt Herman From joris at ster.kuleuven.ac.be Tue Nov 21 09:31:55 2006 From: joris at ster.kuleuven.ac.be (Joris De Ridder) Date: Tue, 21 Nov 2006 15:31:55 +0100 Subject: [SciPy-user] Installing scipy with fftw in non-standard location In-Reply-To: <20061121095138.GY26581@mentat.za.net> References: <200611210952.13638.joris@ster.kuleuven.ac.be> <20061121095138.GY26581@mentat.za.net> Message-ID: <200611211531.55730.joris@ster.kuleuven.ac.be> Thanks, Stefan, for your answer. I'm afraid, though, it didn't solve the problem. Following your example, I tried a few more examples/combinations but the setup script always states that fft_opt_info: fftw3_info: libraries fftw3 not found in /software/Python-2.5/lib libraries fftw3 not found in /usr/local/lib libraries fftw3 not found in /usr/lib fftw3 not found NOT AVAILABLE fftw2_info: libraries rfftw,fftw not found in /software/Python-2.5/lib libraries rfftw,fftw not found in /usr/local/lib libraries rfftw,fftw not found in /usr/lib fftw2 not found NOT AVAILABLE dfftw_info: libraries drfftw,dfftw not found in /software/Python-2.5/lib libraries drfftw,dfftw not found in /usr/local/lib libraries drfftw,dfftw not found in /usr/lib dfftw not found NOT AVAILABLE djbfft_info: NOT AVAILABLE NOT AVAILABLE Apparently, it ignored my pointer to the FFTW lib/include directories. As you perhaps guessed, I am trying to build Python2.5 + Atlas + Lapack + Numpy 1.0 + FFTW + scipy on a Suse Linux machine without root password. Hence my non-standard directories. I got everything else working, only FFTW seems to fail. Any other help is still much appreciated! Cheers, Joris On Tuesday 21 November 2006 10:51, Stefan van der Walt wrote: [Sv]: On Tue, Nov 21, 2006 at 09:52:13AM +0100, Joris De Ridder wrote: [Sv]: > Hi, [Sv]: > [Sv]: > I have FFTW installed in a non-standard location. How can I make scipy [Sv]: > find the FFTW libs? I tried: [Sv]: > [Sv]: > [fftw] [Sv]: > library_dirs = /software/fftw-2.1.5/lib/ [Sv]: > fftw_libs = fftw, rfftw [Sv]: > [Sv]: > in my site.cfg, but scipy nevertheless didn't find FFTW during build. [Sv]: > Any pointers? [Sv]: [Sv]: I havn't done this before, but since everyone else is asleep now I may [Sv]: just as well take a shot: [Sv]: [Sv]: [fftw2] [Sv]: library_dirs = /software/fftw-2.1.5/lib [Sv]: include_dirs = /software/fftw-2.1.5/include [Sv]: fftw_libs = fftw2 [Sv]: [Sv]: Cheers [Sv]: St?fan [Sv]: _______________________________________________ [Sv]: SciPy-user mailing list [Sv]: SciPy-user at scipy.org [Sv]: http://projects.scipy.org/mailman/listinfo/scipy-user Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm From agn at noc.soton.ac.uk Tue Nov 21 09:46:57 2006 From: agn at noc.soton.ac.uk (George Nurser) Date: Tue, 21 Nov 2006 14:46:57 +0000 Subject: [SciPy-user] Installing scipy with fftw in non-standard location In-Reply-To: <200611211531.55730.joris@ster.kuleuven.ac.be> References: <200611210952.13638.joris@ster.kuleuven.ac.be> <20061121095138.GY26581@mentat.za.net> <200611211531.55730.joris@ster.kuleuven.ac.be> Message-ID: <443A11F6-DADE-4CF7-B9F0-5A7663D970BE@noc.soton.ac.uk> On 21 Nov 2006, at 14:31, Joris De Ridder wrote: > > Thanks, Stefan, for your answer. I'm afraid, though, it didn't > solve the problem. > Following your example, I tried a few more examples/combinations > but the setup > script always states that > > fft_opt_info: > fftw3_info: > libraries fftw3 not found in /software/Python-2.5/lib > libraries fftw3 not found in /usr/local/lib > libraries fftw3 not found in /usr/lib > fftw3 not found > NOT AVAILABLE > > fftw2_info: > libraries rfftw,fftw not found in /software/Python-2.5/lib > libraries rfftw,fftw not found in /usr/local/lib > libraries rfftw,fftw not found in /usr/lib > fftw2 not found > NOT AVAILABLE > > dfftw_info: > libraries drfftw,dfftw not found in /software/Python-2.5/lib > libraries drfftw,dfftw not found in /usr/local/lib > libraries drfftw,dfftw not found in /usr/lib > dfftw not found > NOT AVAILABLE > > djbfft_info: > NOT AVAILABLE > > NOT AVAILABLE > > > Apparently, it ignored my pointer to the FFTW lib/include directories. > > As you perhaps guessed, I am trying to build > Python2.5 + Atlas + Lapack + Numpy 1.0 + FFTW + scipy > on a Suse Linux machine without root password. Hence my non- > standard directories. > I got everything else working, only FFTW seems to fail. > > Any other help is still much appreciated! > > Cheers, > Joris I resorted to setting the environmental variable FFTW to the fftw directory; that is to the directory holding the include and lib fftw subdirectories. This does seem to work --George. From aisaac at american.edu Tue Nov 21 10:42:58 2006 From: aisaac at american.edu (Alan G Isaac) Date: Tue, 21 Nov 2006 10:42:58 -0500 Subject: [SciPy-user] What is missing in scipy to be a top notch environment for signal processing In-Reply-To: <001401c70d11$1f1407c0$3811a8c0@Guru> References: <001401c70d11$1f1407c0$3811a8c0@Guru> Message-ID: On Tue, 21 Nov 2006, Chris Bartley apparently wrote: > The other feature we use a lot is the matlab 'decimate', > which I understand is not currently built into scipy, > although I do have code for a port of this function from > Octave. Is it something more than a slice? (E.g., http://sourcecode.atnf.csiro.au/repos/asap/trunk/python/asapplotter.py just uses a slice.) Cheers, Alan Isaac From joris at ster.kuleuven.ac.be Tue Nov 21 10:55:07 2006 From: joris at ster.kuleuven.ac.be (Joris De Ridder) Date: Tue, 21 Nov 2006 16:55:07 +0100 Subject: [SciPy-user] Installing scipy with fftw in non-standard location In-Reply-To: <443A11F6-DADE-4CF7-B9F0-5A7663D970BE@noc.soton.ac.uk> References: <200611210952.13638.joris@ster.kuleuven.ac.be> <200611211531.55730.joris@ster.kuleuven.ac.be> <443A11F6-DADE-4CF7-B9F0-5A7663D970BE@noc.soton.ac.uk> Message-ID: <200611211655.07489.joris@ster.kuleuven.ac.be> Thanks, George. This seemed to solve the problem of finding the libraries: fftw2_info: libraries rfftw,fftw not found in /software/fftw-2.1.5/ libraries rfftw,fftw not found in /software/fftw-2.1.5/include FOUND: libraries = ['rfftw', 'fftw'] library_dirs = ['/software/fftw-2.1.5/lib'] define_macros = [('SCIPY_FFTW_H', None)] include_dirs = ['/software/fftw-2.1.5/include'] I'm not sure that they're really included though. I guess (nowhere documented) that I should be importing the FFTW functionality by >>> from scipy.fftw import * but there is no such (sub)module, only the standard fftpack module. Hence my doubts... Thanks anyway, Joris On Tuesday 21 November 2006 15:46, George Nurser wrote: [GN]: [GN]: On 21 Nov 2006, at 14:31, Joris De Ridder wrote: [GN]: [GN]: > [GN]: > Thanks, Stefan, for your answer. I'm afraid, though, it didn't [GN]: > solve the problem. [GN]: > Following your example, I tried a few more examples/combinations [GN]: > but the setup [GN]: > script always states that [GN]: > [GN]: > fft_opt_info: [GN]: > fftw3_info: [GN]: > libraries fftw3 not found in /software/Python-2.5/lib [GN]: > libraries fftw3 not found in /usr/local/lib [GN]: > libraries fftw3 not found in /usr/lib [GN]: > fftw3 not found [GN]: > NOT AVAILABLE [GN]: > [GN]: > fftw2_info: [GN]: > libraries rfftw,fftw not found in /software/Python-2.5/lib [GN]: > libraries rfftw,fftw not found in /usr/local/lib [GN]: > libraries rfftw,fftw not found in /usr/lib [GN]: > fftw2 not found [GN]: > NOT AVAILABLE [GN]: > [GN]: > dfftw_info: [GN]: > libraries drfftw,dfftw not found in /software/Python-2.5/lib [GN]: > libraries drfftw,dfftw not found in /usr/local/lib [GN]: > libraries drfftw,dfftw not found in /usr/lib [GN]: > dfftw not found [GN]: > NOT AVAILABLE [GN]: > [GN]: > djbfft_info: [GN]: > NOT AVAILABLE [GN]: > [GN]: > NOT AVAILABLE [GN]: > [GN]: > [GN]: > Apparently, it ignored my pointer to the FFTW lib/include directories. [GN]: > [GN]: > As you perhaps guessed, I am trying to build [GN]: > Python2.5 + Atlas + Lapack + Numpy 1.0 + FFTW + scipy [GN]: > on a Suse Linux machine without root password. Hence my non- [GN]: > standard directories. [GN]: > I got everything else working, only FFTW seems to fail. [GN]: > [GN]: > Any other help is still much appreciated! [GN]: > [GN]: > Cheers, [GN]: > Joris [GN]: [GN]: I resorted to setting the environmental variable FFTW to the fftw [GN]: directory; that is to the directory holding the include and lib fftw [GN]: subdirectories. [GN]: [GN]: This does seem to work [GN]: [GN]: --George. [GN]: [GN]: [GN]: [GN]: _______________________________________________ [GN]: SciPy-user mailing list [GN]: SciPy-user at scipy.org [GN]: http://projects.scipy.org/mailman/listinfo/scipy-user [GN]: Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm From agn at noc.soton.ac.uk Tue Nov 21 11:20:37 2006 From: agn at noc.soton.ac.uk (George Nurser) Date: Tue, 21 Nov 2006 16:20:37 +0000 Subject: [SciPy-user] Installing scipy with fftw in non-standard location In-Reply-To: <200611211655.07489.joris@ster.kuleuven.ac.be> References: <200611210952.13638.joris@ster.kuleuven.ac.be> <200611211531.55730.joris@ster.kuleuven.ac.be> <443A11F6-DADE-4CF7-B9F0-5A7663D970BE@noc.soton.ac.uk> <200611211655.07489.joris@ster.kuleuven.ac.be> Message-ID: <7987C399-63AF-43BF-ADCD-019E65D85BF0@noc.soton.ac.uk> On 21 Nov 2006, at 15:55, Joris De Ridder wrote: > > Thanks, George. This seemed to solve the problem of finding the > libraries: > > fftw2_info: > libraries rfftw,fftw not found in /software/fftw-2.1.5/ > libraries rfftw,fftw not found in /software/fftw-2.1.5/include > FOUND: > libraries = ['rfftw', 'fftw'] > library_dirs = ['/software/fftw-2.1.5/lib'] > define_macros = [('SCIPY_FFTW_H', None)] > include_dirs = ['/software/fftw-2.1.5/include'] > > I'm not sure that they're really included though. I guess (nowhere > documented) > that I should be importing the FFTW functionality by > >>>> from scipy.fftw import * > > but there is no such (sub)module, only the standard fftpack module. > Hence my doubts... Joris, It seems to build a shared library _fftpack.so in the fftpack directory of scipy. This _fftpack.so is linked to the fftw2 libraries. E.g. [128]nohow@/noc/users/agn/ext/Linux/lib64/python2.3/site-packages/ scipy/fftpack> ldd _fftpack.so librfftw.so.2 => /noc/users/agn/ext/Linux/fftw2/lib/ librfftw.so.2 (0x0000002a95662000) libfftw.so.2 => /noc/users/agn/ext/Linux/fftw2/lib/ libfftw.so.2 (0x0000002a95795000) libg2c.so.0 => /usr/local/lib64/libg2c.so.0 (0x0000002a958ce000) etc.... so just calling fftpack might be using fftw. hope it works! George. From nwagner at iam.uni-stuttgart.de Tue Nov 21 11:25:04 2006 From: nwagner at iam.uni-stuttgart.de (Nils Wagner) Date: Tue, 21 Nov 2006 17:25:04 +0100 Subject: [SciPy-user] Installing scipy with fftw in non-standard location In-Reply-To: <200611211655.07489.joris@ster.kuleuven.ac.be> References: <200611210952.13638.joris@ster.kuleuven.ac.be> <200611211531.55730.joris@ster.kuleuven.ac.be> <443A11F6-DADE-4CF7-B9F0-5A7663D970BE@noc.soton.ac.uk> <200611211655.07489.joris@ster.kuleuven.ac.be> Message-ID: On Tue, 21 Nov 2006 16:55:07 +0100 Joris De Ridder wrote: > > Thanks, George. This seemed to solve the problem of >finding the libraries: > > fftw2_info: > libraries rfftw,fftw not found in /software/fftw-2.1.5/ > libraries rfftw,fftw not found in >/software/fftw-2.1.5/include > FOUND: > libraries = ['rfftw', 'fftw'] > library_dirs = ['/software/fftw-2.1.5/lib'] > define_macros = [('SCIPY_FFTW_H', None)] > include_dirs = ['/software/fftw-2.1.5/include'] > > I'm not sure that they're really included though. I >guess (nowhere documented) > that I should be importing the FFTW functionality by > >>>> from scipy.fftw import * > > but there is no such (sub)module, only the standard >fftpack module. Hence my doubts... > > Thanks anyway, > Joris > > > > > > On Tuesday 21 November 2006 15:46, George Nurser wrote: > [GN]: > [GN]: On 21 Nov 2006, at 14:31, Joris De Ridder wrote: > [GN]: > [GN]: > > [GN]: > Thanks, Stefan, for your answer. I'm afraid, >though, it didn't > [GN]: > solve the problem. > [GN]: > Following your example, I tried a few more >examples/combinations > [GN]: > but the setup > [GN]: > script always states that > [GN]: > > [GN]: > fft_opt_info: > [GN]: > fftw3_info: > [GN]: > libraries fftw3 not found in >/software/Python-2.5/lib > [GN]: > libraries fftw3 not found in /usr/local/lib > [GN]: > libraries fftw3 not found in /usr/lib > [GN]: > fftw3 not found > [GN]: > NOT AVAILABLE > [GN]: > > [GN]: > fftw2_info: > [GN]: > libraries rfftw,fftw not found in >/software/Python-2.5/lib > [GN]: > libraries rfftw,fftw not found in >/usr/local/lib > [GN]: > libraries rfftw,fftw not found in /usr/lib > [GN]: > fftw2 not found > [GN]: > NOT AVAILABLE > [GN]: > > [GN]: > dfftw_info: > [GN]: > libraries drfftw,dfftw not found in >/software/Python-2.5/lib > [GN]: > libraries drfftw,dfftw not found in >/usr/local/lib > [GN]: > libraries drfftw,dfftw not found in /usr/lib > [GN]: > dfftw not found > [GN]: > NOT AVAILABLE > [GN]: > > [GN]: > djbfft_info: > [GN]: > NOT AVAILABLE > [GN]: > > [GN]: > NOT AVAILABLE > [GN]: > > [GN]: > > [GN]: > Apparently, it ignored my pointer to the FFTW >lib/include directories. > [GN]: > > [GN]: > As you perhaps guessed, I am trying to build > [GN]: > Python2.5 + Atlas + Lapack + Numpy 1.0 + FFTW >+ scipy > [GN]: > on a Suse Linux machine without root password. >Hence my non- > [GN]: > standard directories. > [GN]: > I got everything else working, only FFTW seems >to fail. > [GN]: > > [GN]: > Any other help is still much appreciated! > [GN]: > > [GN]: > Cheers, > [GN]: > Joris > [GN]: > [GN]: I resorted to setting the environmental variable >FFTW to the fftw > [GN]: directory; that is to the directory holding the >include and lib fftw > [GN]: subdirectories. > [GN]: > [GN]: This does seem to work > [GN]: > [GN]: --George. > [GN]: > [GN]: > [GN]: > [GN]: _______________________________________________ > [GN]: SciPy-user mailing list > [GN]: SciPy-user at scipy.org > [GN]: >http://projects.scipy.org/mailman/listinfo/scipy-user > [GN]: > > Disclaimer: >http://www.kuleuven.be/cwis/email_disclaimer.htm > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user There is also an active ticket http://projects.scipy.org/scipy/numpy/ticket/73 concerning site.cfg. Nils From stefan at sun.ac.za Tue Nov 21 11:52:32 2006 From: stefan at sun.ac.za (Stefan van der Walt) Date: Tue, 21 Nov 2006 18:52:32 +0200 Subject: [SciPy-user] Installing scipy with fftw in non-standard location In-Reply-To: <200611211655.07489.joris@ster.kuleuven.ac.be> References: <200611210952.13638.joris@ster.kuleuven.ac.be> <200611211531.55730.joris@ster.kuleuven.ac.be> <443A11F6-DADE-4CF7-B9F0-5A7663D970BE@noc.soton.ac.uk> <200611211655.07489.joris@ster.kuleuven.ac.be> Message-ID: <20061121165231.GA9751@mentat.za.net> On Tue, Nov 21, 2006 at 04:55:07PM +0100, Joris De Ridder wrote: > > Thanks, George. This seemed to solve the problem of finding the libraries: > > fftw2_info: > libraries rfftw,fftw not found in /software/fftw-2.1.5/ > libraries rfftw,fftw not found in /software/fftw-2.1.5/include > FOUND: > libraries = ['rfftw', 'fftw'] > library_dirs = ['/software/fftw-2.1.5/lib'] > define_macros = [('SCIPY_FFTW_H', None)] > include_dirs = ['/software/fftw-2.1.5/include'] > > I'm not sure that they're really included though. I guess (nowhere documented) > that I should be importing the FFTW functionality by > > >>> from scipy.fftw import * > > but there is no such (sub)module, only the standard fftpack module. Hence my doubts... Run nm _fftpack.so | grep fftw and see if there are any fftw symbols. Without: 000084c0 b caches_drfftw 00008400 b caches_zfftw U fftw_destroy_plan U fftw_execute U fftw_free U fftw_malloc U fftw_plan_dft_1d U fftw_plan_many_dft U fftw_plan_r2r_1d 00002b20 t get_cache_id_zfftw 000084a0 b last_cache_id_drfftw 000083e4 b last_cache_id_zfftw 000084a4 b nof_in_cache_drfftw 000083e0 b nof_in_cache_zfftw With: ... very very long list. Cheers St?fan From robert.kern at gmail.com Tue Nov 21 13:00:13 2006 From: robert.kern at gmail.com (Robert Kern) Date: Tue, 21 Nov 2006 12:00:13 -0600 Subject: [SciPy-user] Installing scipy with fftw in non-standard location In-Reply-To: <200611211655.07489.joris@ster.kuleuven.ac.be> References: <200611210952.13638.joris@ster.kuleuven.ac.be> <200611211531.55730.joris@ster.kuleuven.ac.be> <443A11F6-DADE-4CF7-B9F0-5A7663D970BE@noc.soton.ac.uk> <200611211655.07489.joris@ster.kuleuven.ac.be> Message-ID: <45633EAD.5010701@gmail.com> Joris De Ridder wrote: > I'm not sure that they're really included though. I guess (nowhere documented) > that I should be importing the FFTW functionality by > >>>> from scipy.fftw import * > > but there is no such (sub)module, only the standard fftpack module. Hence my doubts... Despite the name, scipy.fftpack is where all of our FFT functionality goes, not just that provided by the FORTRAN FFTPACK. scipy.fftpack.fft() and friends will dispatch to the "best available" library (as near as we can determine). -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From pajer at iname.com Tue Nov 21 18:30:28 2006 From: pajer at iname.com (Gary) Date: Tue, 21 Nov 2006 18:30:28 -0500 Subject: [SciPy-user] Windows build help In-Reply-To: <4562715F.1000909@iname.com> References: <1161613941.550194.204870@e3g2000cwe.googlegroups.com> <1163711343.870829.110030@h48g2000cwc.googlegroups.com> <1163720268.611923.3180@e3g2000cwe.googlegroups.com> <455E0496.4020703@bryant.edu> <17758.58083.69027.862918@prpc.aero.iitb.ac.in> <20061118104853.GB3639@clipper.ens.fr> <455EF051.1010900@ar.media.kyoto-u.ac.jp> <20061118114509.GD3639@clipper.ens.fr> <455EF487.9020904@ar.media.kyoto-u.ac.jp> <45614CEA.5020402@ar.media.kyoto-u.ac.jp> <4562715F.1000909@iname.com> Message-ID: <45638C14.4060302@iname.com> Gary wrote: > I'm trying to build the latest svn version on WinXP so that I can have a > compatible up to date set {numpy, scipy, mpl} > > I'm using the instructions on scipy.org. I've got MinGW gcc 3.4.5 and > g77 3.4.5 (do I need anything else from MinGW?) , and the atlas prebuilt > libraries. I've modified site.cfg, and also set ATLAS = \correct\path > > Twice near the top of the build it tells me that Atlas (http://math....) > libraries can't be found, but a few lines later it tells me under > "lapack_info:" that it has FOUND: libraries = ['lapack', 'cblas']. > > But a raft of errors start during the compilation of odepack (I think) > with lots of messages like > undefined reference to 'daxpy_' > and many others. > Still hacking at this. Here's where the errors start: (the precompiled atlas is in C:\MinGW\lib\atlas) running build_ext customize Mingw32CCompiler customize Mingw32CCompiler using build_ext customize GnuFCompiler customize GnuFCompiler customize GnuFCompiler using build_ext building 'scipy.integrate._odepack' extension compiling C sources C compiler: gcc -mno-cygwin -O2 -Wall compile options: '-DNO_ATLAS_INFO=1 -Ic:\python24\lib\site-packages\numpy\core\i nclude -Ic:\python24\include -Ic:\python24\PC -c' c:\MinGW\bin\g77.exe -g -Wall -mno-cygwin -shared build\temp.win32-2.4\Release\l ib\integrate\_odepackmodule.o -Lc:\MinGW\lib\atlas -Lc:\MinGW\lib -Lc:\MinGW\lib \gcc\mingw32\3.4.5 -Lc:\python24\libs -Lc:\python24\PCBuild -Lbuild\temp.win32-2 .4 -lodepack -llinpack_lite -lmach -lcblas -lpython24 -lg2c -lgcc -lmsvcr71 -o b uild\lib.win32-2.4\scipy\integrate\_odepack.pyd build\temp.win32-2.4/libodepack.a(vode.o)(.text+0xd4a): In function `dvode_': C:/Documents and Settings/Gary/My Documents/python/scipy/svn_scipy/Lib/integrate /odepack/vode.f:1484: undefined reference to `dcopy_' etc. > Any suggestions? > thanks, > -gary > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > > From robert.kern at gmail.com Tue Nov 21 18:37:45 2006 From: robert.kern at gmail.com (Robert Kern) Date: Tue, 21 Nov 2006 17:37:45 -0600 Subject: [SciPy-user] Windows build help In-Reply-To: <45638C14.4060302@iname.com> References: <1161613941.550194.204870@e3g2000cwe.googlegroups.com> <1163711343.870829.110030@h48g2000cwc.googlegroups.com> <1163720268.611923.3180@e3g2000cwe.googlegroups.com> <455E0496.4020703@bryant.edu> <17758.58083.69027.862918@prpc.aero.iitb.ac.in> <20061118104853.GB3639@clipper.ens.fr> <455EF051.1010900@ar.media.kyoto-u.ac.jp> <20061118114509.GD3639@clipper.ens.fr> <455EF487.9020904@ar.media.kyoto-u.ac.jp> <45614CEA.5020402@ar.media.kyoto-u.ac.jp> <4562715F.1000909@iname.com> <45638C14.4060302@iname.com> Message-ID: <45638DC9.5@gmail.com> Gary wrote: > Gary wrote: >> I'm trying to build the latest svn version on WinXP so that I can have a >> compatible up to date set {numpy, scipy, mpl} >> >> I'm using the instructions on scipy.org. I've got MinGW gcc 3.4.5 and >> g77 3.4.5 (do I need anything else from MinGW?) , and the atlas prebuilt >> libraries. I've modified site.cfg, and also set ATLAS = \correct\path >> >> Twice near the top of the build it tells me that Atlas (http://math....) >> libraries can't be found, but a few lines later it tells me under >> "lapack_info:" that it has FOUND: libraries = ['lapack', 'cblas']. >> >> But a raft of errors start during the compilation of odepack (I think) >> with lots of messages like >> undefined reference to 'daxpy_' >> and many others. >> > Still hacking at this. > Here's where the errors start: > (the precompiled atlas is in C:\MinGW\lib\atlas) It's not picking up all of the libraries, then. Exactly what files do you have in C:\MinGW\lib\atlas ? -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From pajer at iname.com Tue Nov 21 18:52:43 2006 From: pajer at iname.com (Gary) Date: Tue, 21 Nov 2006 18:52:43 -0500 Subject: [SciPy-user] Windows build help In-Reply-To: <45638DC9.5@gmail.com> References: <1161613941.550194.204870@e3g2000cwe.googlegroups.com> <1163711343.870829.110030@h48g2000cwc.googlegroups.com> <1163720268.611923.3180@e3g2000cwe.googlegroups.com> <455E0496.4020703@bryant.edu> <17758.58083.69027.862918@prpc.aero.iitb.ac.in> <20061118104853.GB3639@clipper.ens.fr> <455EF051.1010900@ar.media.kyoto-u.ac.jp> <20061118114509.GD3639@clipper.ens.fr> <455EF487.9020904@ar.media.kyoto-u.ac.jp> <45614CEA.5020402@ar.media.kyoto-u.ac.jp> <4562715F.1000909@iname.com> <45638C14.4060302@iname.com> <45638DC9.5@gmail.com> Message-ID: <4563914B.6040609@iname.com> Robert Kern wrote: > Gary wrote: >> Gary wrote: >>> I'm trying to build the latest svn version on WinXP so that I can have a >>> compatible up to date set {numpy, scipy, mpl} >>> >>> I'm using the instructions on scipy.org. I've got MinGW gcc 3.4.5 and >>> g77 3.4.5 (do I need anything else from MinGW?) , and the atlas prebuilt >>> libraries. I've modified site.cfg, and also set ATLAS = \correct\path >>> >>> Twice near the top of the build it tells me that Atlas (http://math....) >>> libraries can't be found, but a few lines later it tells me under >>> "lapack_info:" that it has FOUND: libraries = ['lapack', 'cblas']. >>> >>> But a raft of errors start during the compilation of odepack (I think) >>> with lots of messages like >>> undefined reference to 'daxpy_' >>> and many others. >>> >> Still hacking at this. >> Here's where the errors start: >> (the precompiled atlas is in C:\MinGW\lib\atlas) > > It's not picking up all of the libraries, then. Exactly what files do you have > in C:\MinGW\lib\atlas ? (The two "Make"s comes from trying different versions of the library. Same result either way.) Directory of C:\MinGW\lib\atlas 11/20/2006 09:41 PM . 11/20/2006 09:41 PM .. 04/11/2004 08:05 PM 6,795,178 libatlas.a 04/11/2004 07:59 PM 227,300 libcblas.a 04/11/2004 08:06 PM 218,844 libf77blas.a 04/11/2004 08:42 PM 5,671,110 liblapack.a 04/12/2004 05:12 PM 6,389 Make.WinNT_P4SSE2 04/12/2004 05:17 PM 6,363 Make.WinNT_PIII From robert.kern at gmail.com Tue Nov 21 19:00:00 2006 From: robert.kern at gmail.com (Robert Kern) Date: Tue, 21 Nov 2006 18:00:00 -0600 Subject: [SciPy-user] Windows build help In-Reply-To: <4563914B.6040609@iname.com> References: <1161613941.550194.204870@e3g2000cwe.googlegroups.com> <1163711343.870829.110030@h48g2000cwc.googlegroups.com> <1163720268.611923.3180@e3g2000cwe.googlegroups.com> <455E0496.4020703@bryant.edu> <17758.58083.69027.862918@prpc.aero.iitb.ac.in> <20061118104853.GB3639@clipper.ens.fr> <455EF051.1010900@ar.media.kyoto-u.ac.jp> <20061118114509.GD3639@clipper.ens.fr> <455EF487.9020904@ar.media.kyoto-u.ac.jp> <45614CEA.5020402@ar.media.kyoto-u.ac.jp> <4562715F.1000909@iname.com> <45638C14.4060302@iname.com> <45638DC9.5@gmail.com> <4563914B.6040609@iname.com> Message-ID: <45639300.5090100@gmail.com> Gary wrote: > (The two "Make"s comes from trying different versions of the library. > Same result either way.) > Directory of C:\MinGW\lib\atlas > > 11/20/2006 09:41 PM . > 11/20/2006 09:41 PM .. > 04/11/2004 08:05 PM 6,795,178 libatlas.a > 04/11/2004 07:59 PM 227,300 libcblas.a > 04/11/2004 08:06 PM 218,844 libf77blas.a > 04/11/2004 08:42 PM 5,671,110 liblapack.a > 04/12/2004 05:12 PM 6,389 Make.WinNT_P4SSE2 > 04/12/2004 05:17 PM 6,363 Make.WinNT_PIII Try adding this to your site.cfg file (if you don't have, go ahead and create one with the following contents; put it next to scipy's setup.py): [lapack_opt] library_dirs=c:/MinGW/lib/atlas libraries=lapack,f77blas,cblas,atlas [blas_opt] library_dirs=c:/MinGW/lib/atlas libraries=f77blas,cblas,atlas -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From pajer at iname.com Tue Nov 21 19:13:42 2006 From: pajer at iname.com (Gary) Date: Tue, 21 Nov 2006 19:13:42 -0500 Subject: [SciPy-user] Windows build help In-Reply-To: <45639300.5090100@gmail.com> References: <1161613941.550194.204870@e3g2000cwe.googlegroups.com> <1163711343.870829.110030@h48g2000cwc.googlegroups.com> <1163720268.611923.3180@e3g2000cwe.googlegroups.com> <455E0496.4020703@bryant.edu> <17758.58083.69027.862918@prpc.aero.iitb.ac.in> <20061118104853.GB3639@clipper.ens.fr> <455EF051.1010900@ar.media.kyoto-u.ac.jp> <20061118114509.GD3639@clipper.ens.fr> <455EF487.9020904@ar.media.kyoto-u.ac.jp> <45614CEA.5020402@ar.media.kyoto-u.ac.jp> <4562715F.1000909@iname.com> <45638C14.4060302@iname.com> <45638DC9.5@gmail.com> <4563914B.6040609@iname.com> <45639300.5090100@gmail.com> Message-ID: <45639636.1010800@iname.com> Robert Kern wrote: > Gary wrote: > >> (The two "Make"s comes from trying different versions of the library. >> Same result either way.) >> Directory of C:\MinGW\lib\atlas >> >> 11/20/2006 09:41 PM . >> 11/20/2006 09:41 PM .. >> 04/11/2004 08:05 PM 6,795,178 libatlas.a >> 04/11/2004 07:59 PM 227,300 libcblas.a >> 04/11/2004 08:06 PM 218,844 libf77blas.a >> 04/11/2004 08:42 PM 5,671,110 liblapack.a >> 04/12/2004 05:12 PM 6,389 Make.WinNT_P4SSE2 >> 04/12/2004 05:17 PM 6,363 Make.WinNT_PIII >> > > Try adding this to your site.cfg file (if you don't have, go ahead and create > one with the following contents; put it next to scipy's setup.py): > > [lapack_opt] > library_dirs=c:/MinGW/lib/atlas > libraries=lapack,f77blas,cblas,atlas > > [blas_opt] > library_dirs=c:/MinGW/lib/atlas > libraries=f77blas,cblas,atlas > > No luck. It must be something silly. Here's my complete site.cfg, fwiw [atlas] library_dirs = c:\MinGW\lib\atlas atlas_libs = lapack, blas, cblas, atlas [blas] library_dirs = c:\MinGW\lib\atlas blas_libs = cblas [lapack] library_dirs = c:\MinGW\lib\atlas lapack_libs = lapack [lapack_opt] library_dirs=c:/MinGW/lib/atlas libraries=lapack,f77blas,cblas,atlas [blas_opt] library_dirs=c:/MinGW/lib/atlas libraries=f77blas,cblas,atlas [amd] library_dirs = include_dirs = amd_libs = amd [umfpack] library_dirs = include_dirs = umfpack_libs = umfpack From robert.kern at gmail.com Tue Nov 21 19:43:39 2006 From: robert.kern at gmail.com (Robert Kern) Date: Tue, 21 Nov 2006 18:43:39 -0600 Subject: [SciPy-user] Windows build help In-Reply-To: <45639636.1010800@iname.com> References: <1161613941.550194.204870@e3g2000cwe.googlegroups.com> <1163711343.870829.110030@h48g2000cwc.googlegroups.com> <1163720268.611923.3180@e3g2000cwe.googlegroups.com> <455E0496.4020703@bryant.edu> <17758.58083.69027.862918@prpc.aero.iitb.ac.in> <20061118104853.GB3639@clipper.ens.fr> <455EF051.1010900@ar.media.kyoto-u.ac.jp> <20061118114509.GD3639@clipper.ens.fr> <455EF487.9020904@ar.media.kyoto-u.ac.jp> <45614CEA.5020402@ar.media.kyoto-u.ac.jp> <4562715F.1000909@iname.com> <45638C14.4060302@iname.com> <45638DC9.5@gmail.com> <4563914B.6040609@iname.com> <45639300.5090100@gmail.com> <45639636.1010800@iname.com> Message-ID: <45639D3B.10501@gmail.com> Gary wrote: > No luck. It must be something silly. > > Here's my complete site.cfg, fwiw > > [atlas] > library_dirs = c:\MinGW\lib\atlas > atlas_libs = lapack, blas, cblas, atlas > > [blas] > library_dirs = c:\MinGW\lib\atlas > blas_libs = cblas > > [lapack] > library_dirs = c:\MinGW\lib\atlas > lapack_libs = lapack > > [lapack_opt] > library_dirs=c:/MinGW/lib/atlas > libraries=lapack,f77blas,cblas,atlas > > [blas_opt] > library_dirs=c:/MinGW/lib/atlas > libraries=f77blas,cblas,atlas Just use the last two. Don't use the first three, too. They're redundant and also incorrect. If that doesn't work, please post the output of "python setup.py config". -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From pajer at iname.com Tue Nov 21 19:53:33 2006 From: pajer at iname.com (Gary) Date: Tue, 21 Nov 2006 19:53:33 -0500 Subject: [SciPy-user] Windows build help In-Reply-To: <45639D3B.10501@gmail.com> References: <1161613941.550194.204870@e3g2000cwe.googlegroups.com> <1163711343.870829.110030@h48g2000cwc.googlegroups.com> <1163720268.611923.3180@e3g2000cwe.googlegroups.com> <455E0496.4020703@bryant.edu> <17758.58083.69027.862918@prpc.aero.iitb.ac.in> <20061118104853.GB3639@clipper.ens.fr> <455EF051.1010900@ar.media.kyoto-u.ac.jp> <20061118114509.GD3639@clipper.ens.fr> <455EF487.9020904@ar.media.kyoto-u.ac.jp> <45614CEA.5020402@ar.media.kyoto-u.ac.jp> <4562715F.1000909@iname.com> <45638C14.4060302@iname.com> <45638DC9.5@gmail.com> <4563914B.6040609@iname.com> <45639300.5090100@gmail.com> <45639636.1010800@iname.com> <45639D3B.10501@gmail.com> Message-ID: <45639F8D.8000002@iname.com> Robert Kern wrote: > Gary wrote: > >> No luck. It must be something silly. >> >> Here's my complete site.cfg, fwiw >> >> [atlas] >> library_dirs = c:\MinGW\lib\atlas >> atlas_libs = lapack, blas, cblas, atlas >> >> [blas] >> library_dirs = c:\MinGW\lib\atlas >> blas_libs = cblas >> >> [lapack] >> library_dirs = c:\MinGW\lib\atlas >> lapack_libs = lapack >> >> [lapack_opt] >> library_dirs=c:/MinGW/lib/atlas >> libraries=lapack,f77blas,cblas,atlas >> >> [blas_opt] >> library_dirs=c:/MinGW/lib/atlas >> libraries=f77blas,cblas,atlas > > Just use the last two. Don't use the first three, too. They're redundant and > also incorrect. If that doesn't work, please post the output of "python setup.py > config". That made it quit faster: C:\Documents and Settings\Gary\My Documents\python\scipy\svn_scipy>python setup. py config mkl_info: libraries mkl,vml,guide not found in c:\python24\lib libraries mkl,vml,guide not found in C:\ libraries mkl,vml,guide not found in c:\python24\libs NOT AVAILABLE fftw3_info: libraries fftw3 not found in c:\python24\lib libraries fftw3 not found in C:\ libraries fftw3 not found in c:\python24\libs fftw3 not found NOT AVAILABLE fftw2_info: libraries rfftw,fftw not found in c:\python24\lib libraries rfftw,fftw not found in C:\ libraries rfftw,fftw not found in c:\python24\libs fftw2 not found NOT AVAILABLE dfftw_info: libraries drfftw,dfftw not found in c:\python24\lib libraries drfftw,dfftw not found in C:\ libraries drfftw,dfftw not found in c:\python24\libs dfftw not found NOT AVAILABLE djbfft_info: NOT AVAILABLE blas_opt_info: blas_mkl_info: libraries mkl,vml,guide not found in c:\python24\lib libraries mkl,vml,guide not found in C:\ libraries mkl,vml,guide not found in c:\python24\libs NOT AVAILABLE atlas_blas_threads_info: Setting PTATLAS=ATLAS libraries lapack,blas,cblas,atlas not found in C:\MinGW\lib\atlas libraries lapack,blas,cblas,atlas not found in c:\MinGW\lib\atlas libraries lapack,blas,cblas,atlas not found in c:\python24\lib libraries lapack,blas,cblas,atlas not found in C:\ libraries lapack,blas,cblas,atlas not found in c:\python24\libs NOT AVAILABLE atlas_blas_info: libraries lapack,blas,cblas,atlas not found in C:\MinGW\lib\atlas libraries lapack,blas,cblas,atlas not found in c:\MinGW\lib\atlas libraries lapack,blas,cblas,atlas not found in c:\python24\lib libraries lapack,blas,cblas,atlas not found in C:\ libraries lapack,blas,cblas,atlas not found in c:\python24\libs NOT AVAILABLE c:\python24\lib\site-packages\numpy\distutils\system_info.py:1301: UserWarning: Atlas (http://math-atlas.sourceforge.net/) libraries not found. Directories to search for the libraries can be specified in the numpy/distutils/site.cfg file (section [atlas]) or by setting the ATLAS environment variable. warnings.warn(AtlasNotFoundError.__doc__) blas_info: libraries blas not found in c:\python24\lib libraries blas not found in C:\ libraries blas not found in c:\python24\libs NOT AVAILABLE c:\python24\lib\site-packages\numpy\distutils\system_info.py:1310: UserWarning: Blas (http://www.netlib.org/blas/) libraries not found. Directories to search for the libraries can be specified in the numpy/distutils/site.cfg file (section [blas]) or by setting the BLAS environment variable. warnings.warn(BlasNotFoundError.__doc__) blas_src_info: NOT AVAILABLE c:\python24\lib\site-packages\numpy\distutils\system_info.py:1313: UserWarning: Blas (http://www.netlib.org/blas/) sources not found. Directories to search for the sources can be specified in the numpy/distutils/site.cfg file (section [blas_src]) or by setting the BLAS_SRC environment variable. warnings.warn(BlasSrcNotFoundError.__doc__) Traceback (most recent call last): File "setup.py", line 55, in ? setup_package() File "setup.py", line 47, in setup_package configuration=configuration ) File "C:\Python24\Lib\site-packages\numpy\distutils\core.py", line 144, in set up config = configuration() File "setup.py", line 19, in configuration config.add_subpackage('Lib') File "C:\Python24\Lib\site-packages\numpy\distutils\misc_util.py", line 765, i n add_subpackage caller_level = 2) File "C:\Python24\Lib\site-packages\numpy\distutils\misc_util.py", line 748, i n get_subpackage caller_level = caller_level + 1) File "C:\Python24\Lib\site-packages\numpy\distutils\misc_util.py", line 695, i n _get_configuration_from_setup_py config = setup_module.configuration(*args) File ".\Lib\setup.py", line 7, in configuration config.add_subpackage('integrate') File "C:\Python24\Lib\site-packages\numpy\distutils\misc_util.py", line 765, i n add_subpackage caller_level = 2) File "C:\Python24\Lib\site-packages\numpy\distutils\misc_util.py", line 748, i n get_subpackage caller_level = caller_level + 1) File "C:\Python24\Lib\site-packages\numpy\distutils\misc_util.py", line 695, i n _get_configuration_from_setup_py config = setup_module.configuration(*args) File "Lib\integrate\setup.py", line 11, in configuration blas_opt = get_info('blas_opt',notfound_action=2) File "C:\Python24\Lib\site-packages\numpy\distutils\system_info.py", line 256, in get_info return cl().get_info(notfound_action) File "C:\Python24\Lib\site-packages\numpy\distutils\system_info.py", line 403, in get_info raise self.notfounderror,self.notfounderror.__doc__ numpy.distutils.system_info.NotFoundError: Some third-party program or library i s not found. From david at ar.media.kyoto-u.ac.jp Tue Nov 21 20:13:59 2006 From: david at ar.media.kyoto-u.ac.jp (David Cournapeau) Date: Wed, 22 Nov 2006 10:13:59 +0900 Subject: [SciPy-user] What is missing in scipy to be a top notch environment for signal processing In-Reply-To: References: <001401c70d11$1f1407c0$3811a8c0@Guru> Message-ID: <4563A457.70404@ar.media.kyoto-u.ac.jp> Alan G Isaac wrote: > On Tue, 21 Nov 2006, Chris Bartley apparently wrote: >> The other feature we use a lot is the matlab 'decimate', >> which I understand is not currently built into scipy, >> although I do have code for a port of this function from >> Octave. > > Is it something more than a slice? (E.g., > http://sourcecode.atnf.csiro.au/repos/asap/trunk/python/asapplotter.py > just uses a slice.) Yes; it is a resampler (that is there is filtering). To code one similar to matlab would be fairly easy, as matlab implementation uses a Chebychev filter, which is available in scipy. Also, for audio signals, pysamplerate (http://www.ar.media.kyoto-u.ac.jp/members/david/softwares/pysamplerate/), which is my wrapper to SRC (http://www.mega-nerd.com/SRC/) gives really good results for audio signals (from 20 dB to around 100 dB of SNR depending on the type of resampler) at reasonable speeds, cheers, David From ahoover at eecs.berkeley.edu Tue Nov 21 21:34:01 2006 From: ahoover at eecs.berkeley.edu (Aaron Hoover) Date: Tue, 21 Nov 2006 18:34:01 -0800 Subject: [SciPy-user] Finding clustered vectors Message-ID: Hi all, I've got a question maybe some of you can help me with. I have two images, one of which is a planar translation of the other, so I know it contains some of the same "features" (using this loosely) as the first image. I have some different approaches matching features and using those results to calculate candidate 2D shift vectors for each 2 image sequence. Most of the time, those vectors aren't all the same due to noise, imperfect matching, features leaving the frame, etc. However there are usually at least a few whose dx and dy values are very close, while the others are somewhat noisy and relatively randomly distributed. My question is, what's the best way to get those values in that cluster? I've tried some very simple statistical methods, but because of outliers and things, simply comparing to the mean and/or variance hasn't worked too well. Basically, if I *know* there's going to be a cluster of at least 2 vectors with nearly the same values how can I easily extract those values (or the mean of those values)? Thanks, Aaron From david.huard at gmail.com Tue Nov 21 22:17:04 2006 From: david.huard at gmail.com (David Huard) Date: Tue, 21 Nov 2006 22:17:04 -0500 Subject: [SciPy-user] Finding clustered vectors In-Reply-To: References: Message-ID: <91cf711d0611211917u5fc4aa38t2a38b082b168861b@mail.gmail.com> Aaron, You could try using functions from scipy.cluster. The kmeans algorithm may be what you are looking for. However, I'm not sure how well this will work if you have very small clusters (two values is not much to work with). You could also build an empirical cdf of the shifts, and find the region where the cdf makes a abrupt step. Regards, David 2006/11/21, Aaron Hoover : > > Hi all, > > I've got a question maybe some of you can help me with. I have two > images, one of which is a planar translation of the other, so I know > it contains some of the same "features" (using this loosely) as the > first image. I have some different approaches matching features and > using those results to calculate candidate 2D shift vectors for each > 2 image sequence. Most of the time, those vectors aren't all the same > due to noise, imperfect matching, features leaving the frame, etc. > However there are usually at least a few whose dx and dy values are > very close, while the others are somewhat noisy and relatively > randomly distributed. > > My question is, what's the best way to get those values in that > cluster? I've tried some very simple statistical methods, but because > of outliers and things, simply comparing to the mean and/or variance > hasn't worked too well. Basically, if I *know* there's going to be a > cluster of at least 2 vectors with nearly the same values how can I > easily extract those values (or the mean of those values)? > > Thanks, > Aaron > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists.steve at arachnedesign.net Tue Nov 21 22:24:42 2006 From: lists.steve at arachnedesign.net (Steve Lianoglou) Date: Tue, 21 Nov 2006 22:24:42 -0500 Subject: [SciPy-user] ANOVA test (?) Message-ID: <146C9F10-0AD4-449E-A447-54C1A6055B53@arachnedesign.net> Hi all, I was looking in the archives to see if scipy has an ANOVA implementation. There are some older emails that indicate there was a scipy.stats.anova method, but all traces of that seem to be gone. Am I missing something? Thanks, -steve From robert.kern at gmail.com Tue Nov 21 22:45:46 2006 From: robert.kern at gmail.com (Robert Kern) Date: Tue, 21 Nov 2006 21:45:46 -0600 Subject: [SciPy-user] ANOVA test (?) In-Reply-To: <146C9F10-0AD4-449E-A447-54C1A6055B53@arachnedesign.net> References: <146C9F10-0AD4-449E-A447-54C1A6055B53@arachnedesign.net> Message-ID: <4563C7EA.8010308@gmail.com> Steve Lianoglou wrote: > Hi all, > > I was looking in the archives to see if scipy has an ANOVA > implementation. There are some older emails that indicate there was a > scipy.stats.anova method, but all traces of that seem to be gone. > > Am I missing something? It is now in the sandbox: http://projects.scipy.org/scipy/scipy/browser/trunk/Lib/sandbox/stats The original author, Gary Strangman, removed it from his stats.py module (where we originally got it from) because he wasn't comfortable with its implementation. It worked for what he originally wrote it for, but the way it is currently written, it's very difficult to demonstrate that it is correct. It won't be returning to scipy.stats in any similar form; it will have to be pretty much entirely rewritten. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From stefan at sun.ac.za Wed Nov 22 05:23:56 2006 From: stefan at sun.ac.za (Stefan van der Walt) Date: Wed, 22 Nov 2006 12:23:56 +0200 Subject: [SciPy-user] Finding clustered vectors In-Reply-To: References: Message-ID: <20061122102356.GB9751@mentat.za.net> Hi Aaron On Tue, Nov 21, 2006 at 06:34:01PM -0800, Aaron Hoover wrote: > I've got a question maybe some of you can help me with. I have two > images, one of which is a planar translation of the other, so I know > it contains some of the same "features" (using this loosely) as the > first image. I have some different approaches matching features and > using those results to calculate candidate 2D shift vectors for each > 2 image sequence. Most of the time, those vectors aren't all the same > due to noise, imperfect matching, features leaving the frame, etc. > However there are usually at least a few whose dx and dy values are > very close, while the others are somewhat noisy and relatively > randomly distributed. Not a direct answer to your question, but maybe relevant to your problem. I have written wrappers around Birchfield's KLT tracker, and a module to read in SIFT and SURF feature files. I use these features to estimate similarity transformations. When you have a bunch of features like this, and want to estimate the transformation, it is essential to make use of outlier rejection, otherwise those values skew the whole fit. Currently, I use a very simplistic method: a) Estimate the transformation b) Transform the points, and measure the distances between source and target positions. c) Calculate the mean and variance of the distances. Reject point-pairs with distances larger than variance. d) Estimate the transformation again. I'd like to take a look at RANSAC and all the other sample consensus methods out there still. If you want to play around with any of the code, let me know and I'll share my repository online. Cheers St?fan From nwagner at iam.uni-stuttgart.de Wed Nov 22 08:08:03 2006 From: nwagner at iam.uni-stuttgart.de (Nils Wagner) Date: Wed, 22 Nov 2006 14:08:03 +0100 Subject: [SciPy-user] io.mmwrite Message-ID: <45644BB3.1080208@iam.uni-stuttgart.de> Hi all, is there a way to store an identity matrix as a general/full matrix via mmwrite ? I mean I would like to neglect the symmetrie for some other reason. Nils From joris at ster.kuleuven.ac.be Wed Nov 22 08:29:52 2006 From: joris at ster.kuleuven.ac.be (Joris De Ridder) Date: Wed, 22 Nov 2006 14:29:52 +0100 Subject: [SciPy-user] Installing scipy with fftw in non-standard location In-Reply-To: <20061121165231.GA9751@mentat.za.net> References: <200611210952.13638.joris@ster.kuleuven.ac.be> <200611211655.07489.joris@ster.kuleuven.ac.be> <20061121165231.GA9751@mentat.za.net> Message-ID: <200611221429.52259.joris@ster.kuleuven.ac.be> Aha! Now it's clear for me! Thanks! Joris On Tuesday 21 November 2006 17:52, Stefan van der Walt wrote: [Sv]: Run [Sv]: [Sv]: nm _fftpack.so | grep fftw [Sv]: [Sv]: and see if there are any fftw symbols. On Tuesday 21 November 2006 19:00, Robert Kern wrote: [RK]: Despite the name, scipy.fftpack is where all of our FFT functionality goes, not [RK]: just that provided by the FORTRAN FFTPACK. scipy.fftpack.fft() and friends will [RK]: dispatch to the "best available" library (as near as we can determine). Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm From Robin.K.Friedrich at usa-spaceops.com Wed Nov 22 09:11:56 2006 From: Robin.K.Friedrich at usa-spaceops.com (Friedrich, Robin K) Date: Wed, 22 Nov 2006 08:11:56 -0600 Subject: [SciPy-user] numpy linking issue Message-ID: I'm trying to build Numpy from source on a Red Hat Enterprise Linux 3 system. But it doesn't seem to be linking the way I need it to. I have a scratch built ATLAS installation (libatlas.a libcblas.a libf77blas.a liblapack.a etc.) in our CM location (not /usr/lib) that I want to link with. Importing numpy throws an exception from lapack_lite for an undefined symbol. Regardless of whatever problem the /usr/lib/liblapack.so might have I chose via site.cfg to use the ATLAS libraries. The configtest.c seems to have picked it up and was OK with it. Why does the main numpy lapack_lite not use the same libs? Is there some way of forcing these libs to be picked up in preference to /usr/lib stuff? Thanks! -Robin ============================== Python 2.5 (r25:51908, Oct 17 2006, 11:07:50) [GCC 3.2.3 20030502 (Red Hat Linux 3.2.3-53)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import numpy Traceback (most recent call last): File "", line 1, in File "/ips/fd/sw/csw/oss/lib/python2.5/site-packages/numpy/__init__.py", line 40, in import linalg File "/ips/fd/sw/csw/oss/lib/python2.5/site-packages/numpy/linalg/__init__.py", line 4, in from linalg import * File "/ips/fd/sw/csw/oss/lib/python2.5/site-packages/numpy/linalg/linalg.py", line 25, in from numpy.linalg import lapack_lite ImportError: /usr/lib/libblas.so.3: undefined symbol: e_wsfe >>> =========================== ldd -r lapack_lite.so liblapack.so.3 => /usr/lib/liblapack.so.3 (0x00965000) libblas.so.3 => /usr/lib/libblas.so.3 (0x005cf000) libpthread.so.0 => /lib/tls/libpthread.so.0 (0x00575000) libc.so.6 => /lib/tls/libc.so.6 (0x00111000) libm.so.6 => /lib/tls/libm.so.6 (0x0024a000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00541000) undefined symbol: e_wsfe (/usr/lib/libblas.so.3) undefined symbol: z_abs (/usr/lib/libblas.so.3) undefined symbol: do_fio (/usr/lib/libblas.so.3) undefined symbol: s_stop (/usr/lib/libblas.so.3) undefined symbol: c_abs (/usr/lib/libblas.so.3) undefined symbol: s_wsfe (/usr/lib/libblas.so.3) undefined symbol: e_wsfe (/usr/lib/liblapack.so.3) undefined symbol: z_abs (/usr/lib/liblapack.so.3) undefined symbol: c_sqrt (/usr/lib/liblapack.so.3) undefined symbol: s_cmp (/usr/lib/liblapack.so.3) undefined symbol: z_exp (/usr/lib/liblapack.so.3) undefined symbol: c_exp (/usr/lib/liblapack.so.3) undefined symbol: etime_ (/usr/lib/liblapack.so.3) undefined symbol: do_fio (/usr/lib/liblapack.so.3) undefined symbol: z_sqrt (/usr/lib/liblapack.so.3) undefined symbol: s_cat (/usr/lib/liblapack.so.3) undefined symbol: s_stop (/usr/lib/liblapack.so.3) undefined symbol: c_abs (/usr/lib/liblapack.so.3) undefined symbol: s_wsfe (/usr/lib/liblapack.so.3) undefined symbol: s_copy (/usr/lib/liblapack.so.3) undefined symbol: PyExc_RuntimeError (./lapack_lite.so) undefined symbol: PyExc_ImportError (./lapack_lite.so) undefined symbol: PyCObject_Type (./lapack_lite.so) undefined symbol: PyDict_SetItemString (./lapack_lite.so) undefined symbol: Py_BuildValue (./lapack_lite.so) undefined symbol: PyErr_SetString (./lapack_lite.so) undefined symbol: Py_InitModule4 (./lapack_lite.so) undefined symbol: PyObject_GetAttrString (./lapack_lite.so) undefined symbol: PyImport_ImportModule (./lapack_lite.so) undefined symbol: PyCObject_AsVoidPtr (./lapack_lite.so) undefined symbol: PyModule_GetDict (./lapack_lite.so) undefined symbol: PyErr_Format (./lapack_lite.so) undefined symbol: PyType_IsSubtype (./lapack_lite.so) undefined symbol: PyErr_Print (./lapack_lite.so) undefined symbol: PyArg_ParseTuple (./lapack_lite.so) undefined symbol: PyErr_NewException (./lapack_lite.so) ============================= gcc: _configtest.c gcc -pthread _configtest.o -L/ips/fd/cm/cmg/rel/csw/oss/lib/ATLAS/ -llapack -lcblas -lf77blas -latlas -o _configtest ATLAS version 3.6.0 built by bloom on Tue Aug 9 18:36:17 CDT 2005: UNAME : Linux fdx-401 2.4.21-20.0.1.EL #1 Wed Nov 24 20:45:03 EST 2004 i686 i686 i386 GNU/Linux INSTFLG : MMDEF : /ips/fd/cm/cmg/bld/csw/oss/atlas3_6/ATLAS/CONFIG/ARCHS/P4SSE2/gcc/gemm ARCHDEF : /ips/fd/cm/cmg/bld/csw/oss/atlas3_6/ATLAS/CONFIG/ARCHS/P4SSE2/gcc/misc F2CDEFS : -DAdd__ -DStringSunStyle CACHEEDGE: 1048576 F77 : /usr/bin/g77, version GNU Fortran (GCC 3.2.3 20030502 (Red Hat Linux 3.2.3-42)) 3.2.3 20030502 (Red Hat Linux 3.2.3-42) F77FLAGS : -fomit-frame-pointer -O CC : /usr/bin/gcc, version gcc (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-42) CC FLAGS : -fomit-frame-pointer -O3 -funroll-all-loops MCC : /usr/bin/gcc, version gcc (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-42) MCCFLAGS : -fomit-frame-pointer -O success! ============================== ldd -r /usr/lib/libblas.so.3 libm.so.6 => /lib/tls/libm.so.6 (0x00178000) libc.so.6 => /lib/tls/libc.so.6 (0x001b1000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00958000) undefined symbol: e_wsfe (/usr/lib/libblas.so.3) undefined symbol: z_abs (/usr/lib/libblas.so.3) undefined symbol: do_fio (/usr/lib/libblas.so.3) undefined symbol: s_stop (/usr/lib/libblas.so.3) undefined symbol: c_abs (/usr/lib/libblas.so.3) undefined symbol: s_wsfe (/usr/lib/libblas.so.3) -------------- next part -------------- An HTML attachment was scrubbed... URL: From pajer at iname.com Wed Nov 22 10:24:18 2006 From: pajer at iname.com (Gary) Date: Wed, 22 Nov 2006 10:24:18 -0500 Subject: [SciPy-user] numpy linking issue In-Reply-To: References: Message-ID: <45646BA2.2030609@iname.com> Friedrich, Robin K wrote: > > I'm trying to build Numpy from source on a Red Hat Enterprise Linux 3 > system. But it doesn't seem to be linking the way I need it to. I have a > scratch built ATLAS installation (libatlas.a libcblas.a libf77blas.a > liblapack.a etc.) in our CM location (not /usr/lib) that I want to link > with. Importing numpy throws an exception from lapack_lite for an > undefined symbol. Regardless of whatever problem the > /usr/lib/liblapack.so might have I chose via site.cfg to use the ATLAS > libraries. The configtest.c seems to have picked it up and was OK with > it. Why does the main numpy lapack_lite not use the same libs? > Is there some way of forcing these libs to be picked up in preference to > /usr/lib stuff? > Thanks! > -Robin > Your problem seems similar (?) to the problem I'm having. See yesterday's thread "Windows build help". config reports that the libraries are found, but when the compiler needs them, it complains about undefined symbols. Different symbols in my case, btw. -gary > > > ============================== > Python 2.5 (r25:51908, Oct 17 2006, 11:07:50) > [GCC 3.2.3 20030502 (Red Hat Linux 3.2.3-53)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import numpy > Traceback (most recent call last): > File "", line 1, in > File > "/ips/fd/sw/csw/oss/lib/python2.5/site-packages/numpy/__init__.py", line > 40, in > import linalg > File > "/ips/fd/sw/csw/oss/lib/python2.5/site-packages/numpy/linalg/__init__.py", > line 4, in > from linalg import * > File > "/ips/fd/sw/csw/oss/lib/python2.5/site-packages/numpy/linalg/linalg.py", > line 25, in > from numpy.linalg import lapack_lite > ImportError: /usr/lib/libblas.so.3: undefined symbol: e_wsfe > >>> > > =========================== > ldd -r lapack_lite.so > liblapack.so.3 => /usr/lib/liblapack.so.3 (0x00965000) > libblas.so.3 => /usr/lib/libblas.so.3 (0x005cf000) > libpthread.so.0 => /lib/tls/libpthread.so.0 (0x00575000) > libc.so.6 => /lib/tls/libc.so.6 (0x00111000) > libm.so.6 => /lib/tls/libm.so.6 (0x0024a000) > /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00541000) > undefined symbol: e_wsfe (/usr/lib/libblas.so.3) > undefined symbol: z_abs (/usr/lib/libblas.so.3) > undefined symbol: do_fio (/usr/lib/libblas.so.3) > undefined symbol: s_stop (/usr/lib/libblas.so.3) > undefined symbol: c_abs (/usr/lib/libblas.so.3) > undefined symbol: s_wsfe (/usr/lib/libblas.so.3) > undefined symbol: e_wsfe (/usr/lib/liblapack.so.3) > undefined symbol: z_abs (/usr/lib/liblapack.so.3) > undefined symbol: c_sqrt (/usr/lib/liblapack.so.3) > undefined symbol: s_cmp (/usr/lib/liblapack.so.3) > undefined symbol: z_exp (/usr/lib/liblapack.so.3) > undefined symbol: c_exp (/usr/lib/liblapack.so.3) > undefined symbol: etime_ (/usr/lib/liblapack.so.3) > undefined symbol: do_fio (/usr/lib/liblapack.so.3) > undefined symbol: z_sqrt (/usr/lib/liblapack.so.3) > undefined symbol: s_cat (/usr/lib/liblapack.so.3) > undefined symbol: s_stop (/usr/lib/liblapack.so.3) > undefined symbol: c_abs (/usr/lib/liblapack.so.3) > undefined symbol: s_wsfe (/usr/lib/liblapack.so.3) > undefined symbol: s_copy (/usr/lib/liblapack.so.3) > undefined symbol: PyExc_RuntimeError (./lapack_lite.so) > undefined symbol: PyExc_ImportError (./lapack_lite.so) > undefined symbol: PyCObject_Type (./lapack_lite.so) > undefined symbol: PyDict_SetItemString (./lapack_lite.so) > undefined symbol: Py_BuildValue (./lapack_lite.so) > undefined symbol: PyErr_SetString (./lapack_lite.so) > undefined symbol: Py_InitModule4 (./lapack_lite.so) > undefined symbol: PyObject_GetAttrString (./lapack_lite.so) > undefined symbol: PyImport_ImportModule (./lapack_lite.so) > undefined symbol: PyCObject_AsVoidPtr (./lapack_lite.so) > undefined symbol: PyModule_GetDict (./lapack_lite.so) > undefined symbol: PyErr_Format (./lapack_lite.so) > undefined symbol: PyType_IsSubtype (./lapack_lite.so) > undefined symbol: PyErr_Print (./lapack_lite.so) > undefined symbol: PyArg_ParseTuple (./lapack_lite.so) > undefined symbol: PyErr_NewException (./lapack_lite.so) > > ============================= > gcc: _configtest.c > gcc -pthread _configtest.o -L/ips/fd/cm/cmg/rel/csw/oss/lib/ATLAS/ > -llapack -lcblas -lf77blas -latlas -o _configtest > ATLAS version 3.6.0 built by bloom on Tue Aug 9 18:36:17 CDT 2005: > UNAME : Linux fdx-401 2.4.21-20.0.1.EL #1 Wed Nov 24 20:45:03 EST > 2004 i686 i686 i386 GNU/Linux > INSTFLG : > MMDEF : > /ips/fd/cm/cmg/bld/csw/oss/atlas3_6/ATLAS/CONFIG/ARCHS/P4SSE2/gcc/gemm > ARCHDEF : > /ips/fd/cm/cmg/bld/csw/oss/atlas3_6/ATLAS/CONFIG/ARCHS/P4SSE2/gcc/misc > F2CDEFS : -DAdd__ -DStringSunStyle > CACHEEDGE: 1048576 > F77 : /usr/bin/g77, version GNU Fortran (GCC 3.2.3 20030502 (Red > Hat Linux 3.2.3-42)) 3.2.3 20030502 (Red Hat Linux 3.2.3-42) > F77FLAGS : -fomit-frame-pointer -O > CC : /usr/bin/gcc, version gcc (GCC) 3.2.3 20030502 (Red Hat > Linux 3.2.3-42) > CC FLAGS : -fomit-frame-pointer -O3 -funroll-all-loops > MCC : /usr/bin/gcc, version gcc (GCC) 3.2.3 20030502 (Red Hat > Linux 3.2.3-42) > MCCFLAGS : -fomit-frame-pointer -O > success! > > > ============================== > ldd -r /usr/lib/libblas.so.3 > libm.so.6 => /lib/tls/libm.so.6 (0x00178000) > libc.so.6 => /lib/tls/libc.so.6 (0x001b1000) > /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00958000) > undefined symbol: e_wsfe (/usr/lib/libblas.so.3) > undefined symbol: z_abs (/usr/lib/libblas.so.3) > undefined symbol: do_fio (/usr/lib/libblas.so.3) > undefined symbol: s_stop (/usr/lib/libblas.so.3) > undefined symbol: c_abs (/usr/lib/libblas.so.3) > undefined symbol: s_wsfe (/usr/lib/libblas.so.3) > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > From chris at edc.com.au Wed Nov 22 23:03:11 2006 From: chris at edc.com.au (Chris Bartley) Date: Thu, 23 Nov 2006 12:03:11 +0800 Subject: [SciPy-user] Decimate function (was: What is missing in scipy to be a top notch environment for signal processing) In-Reply-To: <4563A457.70404@ar.media.kyoto-u.ac.jp> Message-ID: <001701c70eb4$4b07e820$3811a8c0@Guru> > > > > Is it something more than a slice? (E.g., > > > http://sourcecode.atnf.csiro.au/repos/asap/trunk/python/asapplotter.py > > just uses a slice.) > Yes; it is a resampler (that is there is filtering). To code > one similar to matlab would be fairly easy, as matlab > implementation uses a Chebychev filter, which is available in scipy. That's true. FYI there is a python version of decimate already at http://www.bigbold.com/snippets/posts/show/1209. My comment is that it isn't built into the scipy library at the moment. - Chris From meesters at uni-mainz.de Thu Nov 23 05:21:24 2006 From: meesters at uni-mainz.de (Christian Meesters) Date: Thu, 23 Nov 2006 11:21:24 +0100 Subject: [SciPy-user] question to spline interpolation Message-ID: <200611231121.25208.meesters@uni-mainz.de> Hoi, Perhaps a dump question, but I can't find a solution: I have a smooth, continous 1D curve, represented in an numpy array, wich I want to interpolate. The data in y start from zero and should an on zero. My script (pseudocode): from scipy import interpolate x_new = arange(0, x_max, x_max/110) #x being the data points of the abscissa #x_max is the maximum value in x #curve interpolation with cubic spline tck = interpolate.splrep(x, y, s=0) #no additional smoothing wanted So far so good, but when I calculate the according to x_new with y_inter = interpolate.splev(x_new, tck, der=0) y_inter starts from zero but doen't end on zero, it always is a little more or less. The spline's order is k=3. Any hint how I can force the interpolated curve back to zero at x_max? (Hope my problem description was clear ...) TIA Christian From meesters at uni-mainz.de Thu Nov 23 05:24:05 2006 From: meesters at uni-mainz.de (Christian Meesters) Date: Thu, 23 Nov 2006 11:24:05 +0100 Subject: [SciPy-user] question to spline interpolation In-Reply-To: <200611231121.25208.meesters@uni-mainz.de> References: <200611231121.25208.meesters@uni-mainz.de> Message-ID: <200611231124.05926.meesters@uni-mainz.de> On Thursday 23 November 2006 11:21, Christian Meesters wrote: > The data in y start from zero and should an on zero. Please read: ... should end on zero. From kxroberto at googlemail.com Thu Nov 23 08:10:50 2006 From: kxroberto at googlemail.com (Robert) Date: Thu, 23 Nov 2006 14:10:50 +0100 Subject: [SciPy-user] fast exponential/kalman filter with numpy/scipy ? Message-ID: how can I compute a exponential/kalman filter/exponential moving average fast without python looping? - Robert From kxroberto at googlemail.com Thu Nov 23 08:26:42 2006 From: kxroberto at googlemail.com (Robert) Date: Thu, 23 Nov 2006 14:26:42 +0100 Subject: [SciPy-user] Finding clustered vectors In-Reply-To: References: Message-ID: Aaron Hoover wrote: > Hi all, > > I've got a question maybe some of you can help me with. I have two > images, one of which is a planar translation of the other, so I know > it contains some of the same "features" (using this loosely) as the > first image. I have some different approaches matching features and > using those results to calculate candidate 2D shift vectors for each > 2 image sequence. Most of the time, those vectors aren't all the same > due to noise, imperfect matching, features leaving the frame, etc. > However there are usually at least a few whose dx and dy values are > very close, while the others are somewhat noisy and relatively > randomly distributed. > > My question is, what's the best way to get those values in that > cluster? I've tried some very simple statistical methods, but because > of outliers and things, simply comparing to the mean and/or variance > hasn't worked too well. Basically, if I *know* there's going to be a > cluster of at least 2 vectors with nearly the same values how can I > easily extract those values (or the mean of those values)? > There are complex cluster algs. But your problem seems to be very small compared to the amount of beforehand computation. Thus maybe just do this simple O(2) alg: * walk each point * collect(sum of e.g. (1/(distance+CONST)) vs. each other point,p) * sort points regarding the sum * take the mean of the last 3 or last 20% point or so... Robert From kxroberto at googlemail.com Thu Nov 23 08:30:22 2006 From: kxroberto at googlemail.com (Robert) Date: Thu, 23 Nov 2006 14:30:22 +0100 Subject: [SciPy-user] fast exponential/kalman filter with numpy/scipy ? In-Reply-To: References: Message-ID: Robert wrote: > how can I compute a exponential/kalman filter/exponential moving average fast without python looping? - Robert (simplemost case with iso time steps; its just about the fast execution of w=v*alpha+w_last*(1-alpha) without looping From kxroberto at googlemail.com Thu Nov 23 08:54:08 2006 From: kxroberto at googlemail.com (Robert) Date: Thu, 23 Nov 2006 14:54:08 +0100 Subject: [SciPy-user] replacing numpy.inf in an array fast with 0.0 ? Message-ID: I have a big array which contains some inf/nan's and want to replace them with 0.0 . How to do? - robert From nwagner at iam.uni-stuttgart.de Thu Nov 23 09:03:21 2006 From: nwagner at iam.uni-stuttgart.de (Nils Wagner) Date: Thu, 23 Nov 2006 15:03:21 +0100 Subject: [SciPy-user] replacing numpy.inf in an array fast with 0.0 ? In-Reply-To: References: Message-ID: <4565AA29.20609@iam.uni-stuttgart.de> Robert wrote: > I have a big array which contains some inf/nan's and want to replace them with 0.0 . How to do? - robert > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > from scipy import * z = random.rand(10) z[4] = nan z[-1] = inf print z z[where(isinf(z))]=0.0 z[where(isnan(z))]=0.0 print z Maybe there is a more efficient way. Nils From wegwerp at gmail.com Thu Nov 23 10:43:30 2006 From: wegwerp at gmail.com (wegwerp) Date: Thu, 23 Nov 2006 16:43:30 +0100 Subject: [SciPy-user] replacing numpy.inf in an array fast with 0.0 ? In-Reply-To: <4565AA29.20609@iam.uni-stuttgart.de> References: <4565AA29.20609@iam.uni-stuttgart.de> Message-ID: <6f54c160611230743n63d2fc8ame2c78645ad756200@mail.gmail.com> > z[where(isinf(z))]=0.0 > z[where(isnan(z))]=0.0 > print z > > Maybe there is a more efficient way. I am a beginner with numpy myself too, but I am used to do this in Matlab by using boolean arrays to index an array. If the same trick works in scipy/numpy you should be able to do z[isinf(z)] = 0.0 z[isnan(z)] = 0.0 saving you the call to where. Cheers, Bas From kxroberto at googlemail.com Thu Nov 23 11:47:27 2006 From: kxroberto at googlemail.com (Robert) Date: Thu, 23 Nov 2006 17:47:27 +0100 Subject: [SciPy-user] replacing numpy.inf in an array fast with 0.0 ? In-Reply-To: <6f54c160611230743n63d2fc8ame2c78645ad756200@mail.gmail.com> References: <4565AA29.20609@iam.uni-stuttgart.de> <6f54c160611230743n63d2fc8ame2c78645ad756200@mail.gmail.com> Message-ID: wegwerp wrote: >> z[where(isinf(z))]=0.0 >> z[where(isnan(z))]=0.0 >> print z >> >> Maybe there is a more efficient way. > > I am a beginner with numpy myself too, but I am used to do this in > Matlab by using boolean arrays to index an array. If the same trick > works in scipy/numpy you should be able to do > > z[isinf(z)] = 0.0 > z[isnan(z)] = 0.0 > > saving you the call to where. infact. its magic short :-) From peridot.faceted at gmail.com Thu Nov 23 14:23:32 2006 From: peridot.faceted at gmail.com (A. M. Archibald) Date: Thu, 23 Nov 2006 14:23:32 -0500 Subject: [SciPy-user] question to spline interpolation In-Reply-To: <200611231121.25208.meesters@uni-mainz.de> References: <200611231121.25208.meesters@uni-mainz.de> Message-ID: On 23/11/06, Christian Meesters wrote: > Hoi, > > Perhaps a dump question, but I can't find a solution: > I have a smooth, continous 1D curve, represented in an numpy array, wich I > want to interpolate. The data in y start from zero and should an on zero. Just add a zero value at the end, so that you have points (x_min,0) and (x_max,0) in your array. If you want the *derivative* to be zero too it'll take more cleverness. A. M. Archibald From robert.kern at gmail.com Thu Nov 23 15:19:50 2006 From: robert.kern at gmail.com (Robert Kern) Date: Thu, 23 Nov 2006 14:19:50 -0600 Subject: [SciPy-user] question to spline interpolation In-Reply-To: <200611231121.25208.meesters@uni-mainz.de> References: <200611231121.25208.meesters@uni-mainz.de> Message-ID: <45660266.3070305@gmail.com> Christian Meesters wrote: > Hoi, > > Perhaps a dump question, but I can't find a solution: > I have a smooth, continous 1D curve, represented in an numpy array, wich I > want to interpolate. The data in y start from zero and should an on zero. > > My script (pseudocode): > > from scipy import interpolate > > x_new = arange(0, x_max, x_max/110) > #x being the data points of the abscissa > #x_max is the maximum value in x By the way, you will almost certainly want to use linspace instead: x_new = linspace(0.0, x_max, 110) Depending on your data, that may or may not be the cause of the problem. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From david at ar.media.kyoto-u.ac.jp Fri Nov 24 02:24:41 2006 From: david at ar.media.kyoto-u.ac.jp (David Cournapeau) Date: Fri, 24 Nov 2006 16:24:41 +0900 Subject: [SciPy-user] what's the meaning of scipy.signal.lfilter for rank >2 Message-ID: <45669E39.2080803@ar.media.kyoto-u.ac.jp> Hi, I was wondering what's the meaning of the function lfilter when the input has a rank > 2. - the documentation says that lfilter applies a 1d filter to the input x - the documentation also says that the filter is applied to each subarray along the axis argument. If x has a rank > 2, should the function fail ? For now, I have segfaults when trying to use arrays of rank > 2, and I wanted to be sure about the expected behaviour before submitting a report, cheers, David From meesters at uni-mainz.de Fri Nov 24 09:16:28 2006 From: meesters at uni-mainz.de (Christian Meesters) Date: Fri, 24 Nov 2006 15:16:28 +0100 Subject: [SciPy-user] question to spline interpolation In-Reply-To: References: <200611231121.25208.meesters@uni-mainz.de> Message-ID: <200611241516.28355.meesters@uni-mainz.de> On Thursday 23 November 2006 20:23, A. M. Archibald wrote: > > Perhaps a dump question, but I can't find a solution: > > I have a smooth, continous 1D curve, represented in an numpy array, wich > > I want to interpolate. The data in y start from zero and should an on > > zero. > > Just add a zero value at the end, so that you have points (x_min,0) > and (x_max,0) in your array. If you want the *derivative* to be zero > too it'll take more cleverness. > > A. M. Archibald Stupid me! The problem were my calculations before the interpolation - not with the interpolation itself. Anyway, now that I finally found the bug, I have hope that it won't be too hard to smash it. And thanks, Robert, for the hint to linspace. Christian From soylent67 at tbaytel.net Fri Nov 24 09:59:56 2006 From: soylent67 at tbaytel.net (Richard Johns) Date: Fri, 24 Nov 2006 14:59:56 +0000 (UTC) Subject: [SciPy-user] physical constants module References: Message-ID: Herman Berendsen rug.nl> writes: > > If you use physical constants (like Planck's constant h, gas constant R, etc.) > with python, you may be interested to copy my module physcon.py from > http://www.hjcb.nl/python/ It contains a library of physical constants (CODATA > values in SI units, with accuracy) and it defines variables. For example, after > 'import physcon as pc', pc.h will contain Planck's constant as a float. To see > the contents, type help(). > Thanks for this. I have found it to be quite useful. There is a small error in the value for the permittivity of free space: -'eps_0',1.e-7/(4*pi*cloc*cloc) should be +'eps_0',1.e7/(4*pi*cloc*cloc) Richard From david.strozzi at gmail.com Fri Nov 24 18:16:24 2006 From: david.strozzi at gmail.com (David Strozzi) Date: Fri, 24 Nov 2006 23:16:24 +0000 (UTC) Subject: [SciPy-user] =?utf-8?q?Installing_scipy_on_x86=5F64_opensuse_10?= =?utf-8?q?=2E1_system?= Message-ID: Hi, I see there's been some recurring pain with 64-bit systems, so please bear with me if this is redundant. I have an x86-64 system (AMD athlon) with opensuse 10.1. I've compiled python 2.5 and numpy 1.0 (final release) manually, and they work fine. scipy 0.5.1 hasn't been so easy. In particular, it seems the install script can't find a slew of libraries, which I have installed the opensuse packages for (blas, fftw, and so on). The lock appears to be that the libs are installed in lib64 dirs, like /usr/lib64, but scipy's only looking in non-64 dirs like /usr/lib. What is the key? Thanks, David From ckkart at hoc.net Fri Nov 24 19:27:12 2006 From: ckkart at hoc.net (Christian Kristukat) Date: Sat, 25 Nov 2006 09:27:12 +0900 Subject: [SciPy-user] Installing scipy on x86_64 opensuse 10.1 system In-Reply-To: References: Message-ID: <45678DE0.5020507@hoc.net> David Strozzi wrote: > Hi, > > I see there's been some recurring pain with 64-bit systems, so please bear with > me if this is redundant. > > I have an x86-64 system (AMD athlon) with opensuse 10.1. I've compiled python > 2.5 and numpy 1.0 (final release) manually, and they work fine. scipy 0.5.1 > hasn't been so easy. > > In particular, it seems the install script can't find a slew of libraries, which > I have installed the opensuse packages for (blas, fftw, and so on). The lock > appears to be that the libs are installed in lib64 dirs, like /usr/lib64, but > scipy's only looking in non-64 dirs like /usr/lib. What is the key? I guess you have modified site.cfg to your needs? I can't help you any further with that problem but maybe save you from running into the next one: don't use SuSE blas/lapack libraries. They are buggy. You have to build them on your own. Christian From robert.kern at gmail.com Fri Nov 24 19:39:07 2006 From: robert.kern at gmail.com (Robert Kern) Date: Fri, 24 Nov 2006 18:39:07 -0600 Subject: [SciPy-user] Installing scipy on x86_64 opensuse 10.1 system In-Reply-To: References: Message-ID: <456790AB.1050300@gmail.com> David Strozzi wrote: > Hi, > > I see there's been some recurring pain with 64-bit systems, so please bear with > me if this is redundant. > > I have an x86-64 system (AMD athlon) with opensuse 10.1. I've compiled python > 2.5 and numpy 1.0 (final release) manually, and they work fine. scipy 0.5.1 > hasn't been so easy. > > In particular, it seems the install script can't find a slew of libraries, which > I have installed the opensuse packages for (blas, fftw, and so on). The lock > appears to be that the libs are installed in lib64 dirs, like /usr/lib64, but > scipy's only looking in non-64 dirs like /usr/lib. What is the key? Create a file called site.cfg next to scipy's setup.py with contents something like the following: [DEFAULT] library_dirs = /usr/lib:/usr/local/lib:/usr/lib64 include_dirs = /usr/include:/usr/local/include -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From david.strozzi at gmail.com Fri Nov 24 21:23:56 2006 From: david.strozzi at gmail.com (David Strozzi) Date: Sat, 25 Nov 2006 02:23:56 +0000 (UTC) Subject: [SciPy-user] =?utf-8?q?Installing_scipy_on_x86=5F64_opensuse_10?= =?utf-8?q?=2E1_system?= References: <45678DE0.5020507@hoc.net> Message-ID: Christian Kristukat hoc.net> writes: > I guess you have modified site.cfg to your needs? I can't help you any further > with that problem but maybe save you from running into the next one: don't use > SuSE blas/lapack libraries. They are buggy. You have to build them on your own. > > Christian > Hi, Thanks. I made a site.cfg file based on the next email in this thread. Scipy now builds and installs! However, as you warned, I can't import scipy due to a symbols error in lapack (I have the suse version). I'll have to build it myself... >From digging around a little, it seems the problem is that different Fortran compilers use different names for their output routines, and thus leads to undefined symbols when you mix code compiled w/ different compilers. I have the most recent opensuse blas and lapack's (build 940). Is there a way the opensuse people can compile their libraries to get around this? Or, if I compile scipy with the same compiler as opensuse uses for blas, will that fix things? I love computers... From H.J.C.Berendsen at rug.nl Sat Nov 25 10:42:29 2006 From: H.J.C.Berendsen at rug.nl (Herman Berendsen) Date: Sat, 25 Nov 2006 15:42:29 +0000 (UTC) Subject: [SciPy-user] physical constants module References: Message-ID: Richard Johns tbaytel.net> writes: > There is a small error in the value for the permittivity of free space: > -'eps_0',1.e-7/(4*pi*cloc*cloc) > should be > +'eps_0',1.e7/(4*pi*cloc*cloc) > Richard Thanks for the correction. You are quite right (the error is not small!). I corrected the file http://www.hjcb.nl/python/physcon.txt Herman From ryanlists at gmail.com Sat Nov 25 13:03:40 2006 From: ryanlists at gmail.com (Ryan Krauss) Date: Sat, 25 Nov 2006 12:03:40 -0600 Subject: [SciPy-user] dual core scipy in windows (signal.lsim2) Message-ID: I am running a python script that is taking 10-15 seconds to run a signal.lsim2 command (the number of steps I am asking for is fairly high). I am fairly certain that lsim2 is mainly using ode routines in FORTRAN. I am running this script on windows right now and noticed that when I look at the task manager performance indicator, python is using only 50% of my cpu. I think this is because it is using only one core of my dual core processor. Is there an easy way to take better advantage of dual core processors with scipy in Windows? Is the situation much different in Linux (Ubuntu)? Thanks, Ryan From gael.varoquaux at normalesup.org Sat Nov 25 17:38:22 2006 From: gael.varoquaux at normalesup.org (Gael Varoquaux) Date: Sat, 25 Nov 2006 23:38:22 +0100 Subject: [SciPy-user] dual core scipy in windows (signal.lsim2) In-Reply-To: References: Message-ID: <20061125223822.GA24690@clipper.ens.fr> This is due to ain intrinsic limitation of python (the way it is currently programmed). The python interpretor is not a multithreaded program. Two python instruction cannot execute in the same time. This is garantied by something known as the "global interpretor lock". C code called by python can release the GIL and let the python interpretor run other threads in parallel, but when the c call finishes the GIL rules again. Workaround involve using different instances of the python interpretor and doing some message passing between. The next version of ipython will use this technic, but it is clearly not part of normal python's feature. Ga?l On Sat, Nov 25, 2006 at 12:03:40PM -0600, Ryan Krauss wrote: > I am running a python script that is taking 10-15 seconds to run a > signal.lsim2 command (the number of steps I am asking for is fairly > high). I am fairly certain that lsim2 is mainly using ode routines in > FORTRAN. I am running this script on windows right now and noticed > that when I look at the task manager performance indicator, python is > using only 50% of my cpu. I think this is because it is using only > one core of my dual core processor. Is there an easy way to take > better advantage of dual core processors with scipy in Windows? Is > the situation much different in Linux (Ubuntu)? > Thanks, > Ryan > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user From peridot.faceted at gmail.com Sat Nov 25 18:32:55 2006 From: peridot.faceted at gmail.com (A. M. Archibald) Date: Sat, 25 Nov 2006 18:32:55 -0500 Subject: [SciPy-user] dual core scipy in windows (signal.lsim2) In-Reply-To: References: Message-ID: On 25/11/06, Ryan Krauss wrote: > I am running a python script that is taking 10-15 seconds to run a > signal.lsim2 command (the number of steps I am asking for is fairly > high). I am fairly certain that lsim2 is mainly using ode routines in > FORTRAN. I am running this script on windows right now and noticed > that when I look at the task manager performance indicator, python is > using only 50% of my cpu. I think this is because it is using only > one core of my dual core processor. Is there an easy way to take > better advantage of dual core processors with scipy in Windows? Is > the situation much different in Linux (Ubuntu)? On most hardware that offers parallel processing (such as dual-core machines), programs need to be explicitly written to take advantage of multiple processors. Normally if you write a program as a series of instructions to be executed one after the other (that is, the normal way) they will happen one after the other on one of the processors. Essentially, you need to tell the machine "it's okay to do these two things at once". There are various techniques for taking advantage of multiple processors, including running several programs at once, using python's threads to do several tasks at once, or using MPI to spread the computing work over several machines. But all of them require some special programming on your part to take advantage of the second core your machine has. If the only slow operation in your program is a single call to lsim2, you probably can't. But if, for example, you wanted to call it a hundred times with a hundred different inputs, you could quite happily use python's threads to run two (or more) at once. A. M. Archibald From peridot.faceted at gmail.com Sat Nov 25 18:36:17 2006 From: peridot.faceted at gmail.com (A. M. Archibald) Date: Sat, 25 Nov 2006 18:36:17 -0500 Subject: [SciPy-user] dual core scipy in windows (signal.lsim2) In-Reply-To: <20061125223822.GA24690@clipper.ens.fr> References: <20061125223822.GA24690@clipper.ens.fr> Message-ID: On 25/11/06, Gael Varoquaux wrote: > This is due to ain intrinsic limitation of python (the way it is > currently programmed). The python interpretor is not a multithreaded > program. Two python instruction cannot execute in the same time. This is > garantied by something known as the "global interpretor lock". C code > called by python can release the GIL and let the python interpretor run > other threads in parallel, but when the c call finishes the GIL rules > again. Workaround involve using different instances of the python > interpretor and doing some message passing between. The next version of > ipython will use this technic, but it is clearly not part of normal > python's feature. Speaking from experience, the global interpreter lock need not be an obstacle to using python's threads to parallelize CPU-intensive code, particularly numeric code. It is perfectly possible to get two threads churning away using all the CPU time on both of two processors without any special tricks. Only certain applications are affected by the global interpreter lock. A. M. Archibald From meesters at uni-mainz.de Sun Nov 26 11:28:35 2006 From: meesters at uni-mainz.de (Christian Meesters) Date: Sun, 26 Nov 2006 17:28:35 +0100 Subject: [SciPy-user] Installing scipy on x86_64 opensuse 10.1 system In-Reply-To: References: <45678DE0.5020507@hoc.net> Message-ID: <200611261728.35774.meesters@uni-mainz.de> > >From digging around a little, it seems the problem is that different > > Fortran > > compilers use different names for their output routines, and thus leads to > > undefined symbols when you mix code compiled w/ different compilers. I > have the > > most recent opensuse blas and lapack's (build 940). > > Is there a way the opensuse people can compile their libraries to get > around > > this? Or, if I compile scipy with the same compiler as opensuse uses for > blas, > > will that fix things? > No idea, but I used the instructions from this blog: http://pong.tamu.edu/tiki/tiki-view_blog_post.php?blogId=6&postId=97 to build scipy on my SuSE (still 10.0, but AMD 64 as well) and I found the compiler settings / flags recommended at http://www.scipy.org/Installing_SciPy/BuildingGeneral most helpful (I'm using g77 btw.). HTH Christian From pajer at iname.com Sun Nov 26 21:01:02 2006 From: pajer at iname.com (Gary) Date: Sun, 26 Nov 2006 21:01:02 -0500 Subject: [SciPy-user] Windows build help In-Reply-To: <45639F8D.8000002@iname.com> References: <1161613941.550194.204870@e3g2000cwe.googlegroups.com> <1163711343.870829.110030@h48g2000cwc.googlegroups.com> <1163720268.611923.3180@e3g2000cwe.googlegroups.com> <455E0496.4020703@bryant.edu> <17758.58083.69027.862918@prpc.aero.iitb.ac.in> <20061118104853.GB3639@clipper.ens.fr> <455EF051.1010900@ar.media.kyoto-u.ac.jp> <20061118114509.GD3639@clipper.ens.fr> <455EF487.9020904@ar.media.kyoto-u.ac.jp> <45614CEA.5020402@ar.media.kyoto-u.ac.jp> <4562715F.1000909@iname.com> <45638C14.4060302@iname.com> <45638DC9.5@gmail.com> <4563914B.6040609@iname.com> <45639300.5090100@gmail.com> <45639636.1010800@iname.com> <45639D3B.10501@gmail.com> <45639F8D.8000002@iname.com> Message-ID: <456A46DE.50903@iname.com> Gary wrote: > Robert Kern wrote: > >> Gary wrote: >> >> >>> No luck. It must be something silly. >>> >>> Here's my complete site.cfg, fwiw >>> >>> [atlas] >>> library_dirs = c:\MinGW\lib\atlas >>> atlas_libs = lapack, blas, cblas, atlas >>> Follow up: Yes, it was something silly. I changed my site.cfg to contain *only* the three lines above, and it was smooth sailing from there. I didn't read the instructions slowly enough, and I didn't understand that *too much* information would confuse the thing. Thanks to all who replied, esp Robert, -gary >>> [blas] >>> library_dirs = c:\MinGW\lib\atlas >>> blas_libs = cblas >>> >>> [lapack] >>> library_dirs = c:\MinGW\lib\atlas >>> lapack_libs = lapack >>> >>> [lapack_opt] >>> library_dirs=c:/MinGW/lib/atlas >>> libraries=lapack,f77blas,cblas,atlas >>> >>> [blas_opt] >>> library_dirs=c:/MinGW/lib/atlas >>> libraries=f77blas,cblas,atlas >>> >> Just use the last two. Don't use the first three, too. They're redundant and >> also incorrect. If that doesn't work, please post the output of "python setup.py >> config". >> > That made it quit faster: > > C:\Documents and Settings\Gary\My > Documents\python\scipy\svn_scipy>python setup. > py config > mkl_info: > libraries mkl,vml,guide not found in c:\python24\lib > libraries mkl,vml,guide not found in C:\ > libraries mkl,vml,guide not found in c:\python24\libs > NOT AVAILABLE > > fftw3_info: > libraries fftw3 not found in c:\python24\lib > libraries fftw3 not found in C:\ > libraries fftw3 not found in c:\python24\libs > fftw3 not found > NOT AVAILABLE > > fftw2_info: > libraries rfftw,fftw not found in c:\python24\lib > libraries rfftw,fftw not found in C:\ > libraries rfftw,fftw not found in c:\python24\libs > fftw2 not found > NOT AVAILABLE > > dfftw_info: > libraries drfftw,dfftw not found in c:\python24\lib > libraries drfftw,dfftw not found in C:\ > libraries drfftw,dfftw not found in c:\python24\libs > dfftw not found > NOT AVAILABLE > > djbfft_info: > NOT AVAILABLE > > blas_opt_info: > blas_mkl_info: > libraries mkl,vml,guide not found in c:\python24\lib > libraries mkl,vml,guide not found in C:\ > libraries mkl,vml,guide not found in c:\python24\libs > NOT AVAILABLE > > atlas_blas_threads_info: > Setting PTATLAS=ATLAS > libraries lapack,blas,cblas,atlas not found in C:\MinGW\lib\atlas > libraries lapack,blas,cblas,atlas not found in c:\MinGW\lib\atlas > libraries lapack,blas,cblas,atlas not found in c:\python24\lib > libraries lapack,blas,cblas,atlas not found in C:\ > libraries lapack,blas,cblas,atlas not found in c:\python24\libs > NOT AVAILABLE > > atlas_blas_info: > libraries lapack,blas,cblas,atlas not found in C:\MinGW\lib\atlas > libraries lapack,blas,cblas,atlas not found in c:\MinGW\lib\atlas > libraries lapack,blas,cblas,atlas not found in c:\python24\lib > libraries lapack,blas,cblas,atlas not found in C:\ > libraries lapack,blas,cblas,atlas not found in c:\python24\libs > NOT AVAILABLE > > c:\python24\lib\site-packages\numpy\distutils\system_info.py:1301: > UserWarning: > > Atlas (http://math-atlas.sourceforge.net/) libraries not found. > Directories to search for the libraries can be specified in the > numpy/distutils/site.cfg file (section [atlas]) or by setting > the ATLAS environment variable. > warnings.warn(AtlasNotFoundError.__doc__) > blas_info: > libraries blas not found in c:\python24\lib > libraries blas not found in C:\ > libraries blas not found in c:\python24\libs > NOT AVAILABLE > > c:\python24\lib\site-packages\numpy\distutils\system_info.py:1310: > UserWarning: > > Blas (http://www.netlib.org/blas/) libraries not found. > Directories to search for the libraries can be specified in the > numpy/distutils/site.cfg file (section [blas]) or by setting > the BLAS environment variable. > warnings.warn(BlasNotFoundError.__doc__) > blas_src_info: > NOT AVAILABLE > > c:\python24\lib\site-packages\numpy\distutils\system_info.py:1313: > UserWarning: > > Blas (http://www.netlib.org/blas/) sources not found. > Directories to search for the sources can be specified in the > numpy/distutils/site.cfg file (section [blas_src]) or by setting > the BLAS_SRC environment variable. > warnings.warn(BlasSrcNotFoundError.__doc__) > Traceback (most recent call last): > File "setup.py", line 55, in ? > setup_package() > File "setup.py", line 47, in setup_package > configuration=configuration ) > File "C:\Python24\Lib\site-packages\numpy\distutils\core.py", line > 144, in set > up > config = configuration() > File "setup.py", line 19, in configuration > config.add_subpackage('Lib') > File "C:\Python24\Lib\site-packages\numpy\distutils\misc_util.py", > line 765, i > n add_subpackage > caller_level = 2) > File "C:\Python24\Lib\site-packages\numpy\distutils\misc_util.py", > line 748, i > n get_subpackage > caller_level = caller_level + 1) > File "C:\Python24\Lib\site-packages\numpy\distutils\misc_util.py", > line 695, i > n _get_configuration_from_setup_py > config = setup_module.configuration(*args) > File ".\Lib\setup.py", line 7, in configuration > config.add_subpackage('integrate') > File "C:\Python24\Lib\site-packages\numpy\distutils\misc_util.py", > line 765, i > n add_subpackage > caller_level = 2) > File "C:\Python24\Lib\site-packages\numpy\distutils\misc_util.py", > line 748, i > n get_subpackage > caller_level = caller_level + 1) > File "C:\Python24\Lib\site-packages\numpy\distutils\misc_util.py", > line 695, i > n _get_configuration_from_setup_py > config = setup_module.configuration(*args) > File "Lib\integrate\setup.py", line 11, in configuration > blas_opt = get_info('blas_opt',notfound_action=2) > File "C:\Python24\Lib\site-packages\numpy\distutils\system_info.py", > line 256, > in get_info > return cl().get_info(notfound_action) > File "C:\Python24\Lib\site-packages\numpy\distutils\system_info.py", > line 403, > in get_info > raise self.notfounderror,self.notfounderror.__doc__ > numpy.distutils.system_info.NotFoundError: Some third-party program or > library i > s not found. > > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > > From hollowspook at gmail.com Sun Nov 26 23:32:02 2006 From: hollowspook at gmail.com (hollowspook at gmail.com) Date: Mon, 27 Nov 2006 12:32:02 +0800 Subject: [SciPy-user] problems about printing sparse matrix and setting coo_matrix Message-ID: <456A6A42.4000902@gmail.com> Hi, there The following is my problems. --------------------------------------------------------------------------------------------------- >>> from numpy import * >>> from scipy import * >>> Y = sparse.coo_matrix(None, (3, 3), dtype=complex) >>> Y.getmaxprint() 50 >>> Y.setdiag([1,2,3]) Traceback (most recent call last): File "", line 1, in ? File "D:\PROGRA~1\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 426, in setdiag self[i, i+k] = v File "D:\PROGRA~1\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 237, in __getattr__ raise AttributeError, attr + " not found" AttributeError: __setitem__ not found >>> ----------------------------------------------------------------------------------------------------- question1: Why 50 is displayed in shell question2: why Y.setdiag is wrong? However if Y is a csr_matrix. Y.setdiag is ok. BTW I use enhanced python version Thanks in advance Sam From hollowspook at gmail.com Mon Nov 27 07:31:17 2006 From: hollowspook at gmail.com (Zhang Sam) Date: Mon, 27 Nov 2006 20:31:17 +0800 Subject: [SciPy-user] what different between array([ 1., 2., 3.]) and array([[ 1., 2., 3.]]) Message-ID: Hi, there I am a newer here. I just used numpy and scipy for a while. I am confused about the 1-D array. The code is as follows: --------------------------------------------------------------------------------------------------- >>> x=array([1 ,2.,3]) >>> x array([ 1., 2., 3.]) >>> x.shape (3,) >>> x[0,:] Traceback (most recent call last): File "", line 1, in ? IndexError: too many indices >>> x.shape = 1,3 >>> x array([[ 1., 2., 3.]]) >>> x[0,:] array([ 1., 2., 3.]) ----------------------------------------------------------------------------------------------------- Typing x=array([1 ,2.,3]) will generate array([ 1., 2., 3.]). Since this is a array variable, It should be indexd by list. However x[0,:] is wrong. I must force its shape to (1,3), then x[0,:] will return a array. Both x (before and after) is array class. Why the indexing method exist difference. What's difference between them? If there is explaination in some document already, a link to it is ok. Please do me a favour. Thanks in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sodomau at postech.ac.kr Mon Nov 27 07:53:06 2006 From: sodomau at postech.ac.kr (Sunghyun Cho) Date: Mon, 27 Nov 2006 20:53:06 +0800 Subject: [SciPy-user] what different between array([ 1., 2., 3.]) and array([[ 1., 2., 3.]]) In-Reply-To: References: Message-ID: <5143a98b0611270453t552693fbo2f3fadd100e1c00b@mail.gmail.com> Hi The array that you generated first is a "1-D" array. It means you should use only one index to retrieve a value in the array. If you want to access the first element of the array, you can do it in the way below. ' print x[0] ' And after assigning (1,3) into x.shape, it changed to a 2-D array. So you can use two indices. 'x[0,:]' in your code means that you want to access whole elements of the first row(the 1st dimension of a 2D array) of x. 2006/11/27, Zhang Sam : > > Hi, there > > I am a newer here. I just used numpy and scipy for a while. > I am confused about the 1-D array. > > The code is as follows: > > --------------------------------------------------------------------------------------------------- > >>> x=array([1 ,2.,3]) > >>> x > array([ 1., 2., 3.]) > >>> x.shape > (3,) > >>> x[0,:] > Traceback (most recent call last): > File "", line 1, in ? > IndexError: too many indices > >>> x.shape = 1,3 > >>> x > array([[ 1., 2., 3.]]) > >>> x[0,:] > array([ 1., 2., 3.]) > > ----------------------------------------------------------------------------------------------------- > > Typing x=array([1 ,2.,3]) will generate array([ 1., 2., 3.]). Since > this is a array variable, It should be indexd by list. However x[0,:] is > wrong. > I must force its shape to (1,3), then x[0,:] will return a array. > > Both x (before and after) is array class. Why the indexing method exist > difference. > What's difference between them? > > If there is explaination in some document already, a link to it is ok. > Please do me a favour. > > > Thanks in advance. > > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > > > -- Sunghyun Cho sodomau at postech.ac.kr http://sodomau.plus.or.kr Computer Graphics Lab. POSTECH -------------- next part -------------- An HTML attachment was scrubbed... URL: From kxroberto at googlemail.com Mon Nov 27 14:27:46 2006 From: kxroberto at googlemail.com (Robert) Date: Mon, 27 Nov 2006 20:27:46 +0100 Subject: [SciPy-user] dual core scipy in windows (signal.lsim2) In-Reply-To: References: Message-ID: A. M. Archibald wrote: > On 25/11/06, Ryan Krauss wrote: >> I am running a python script that is taking 10-15 seconds to run a >> signal.lsim2 command (the number of steps I am asking for is fairly >> high). I am fairly certain that lsim2 is mainly using ode routines in >> FORTRAN. I am running this script on windows right now and noticed >> that when I look at the task manager performance indicator, python is >> using only 50% of my cpu. I think this is because it is using only >> one core of my dual core processor. Is there an easy way to take >> better advantage of dual core processors with scipy in Windows? Is >> the situation much different in Linux (Ubuntu)? > > On most hardware that offers parallel processing (such as dual-core > machines), programs need to be explicitly written to take advantage of > multiple processors. Normally if you write a program as a series of > instructions to be executed one after the other (that is, the normal > way) they will happen one after the other on one of the processors. > Essentially, you need to tell the machine "it's okay to do these two > things at once". > > There are various techniques for taking advantage of multiple > processors, including running several programs at once, using python's > threads to do several tasks at once, or using MPI to spread the > computing work over several machines. But all of them require some > special programming on your part to take advantage of the second core > your machine has. > > If the only slow operation in your program is a single call to lsim2, > you probably can't. But if, for example, you wanted to call it a > hundred times with a hundred different inputs, you could quite happily > use python's threads to run two (or more) at once. > Only few numpy/scipy funcs release the GIL (a thread state switch is expensive). Does lsim2 really do so ? From hollowspook at gmail.com Mon Nov 27 20:48:34 2006 From: hollowspook at gmail.com (Zhang Sam) Date: Tue, 28 Nov 2006 09:48:34 +0800 Subject: [SciPy-user] what different between array([ 1., 2., 3.]) Message-ID: Hi, That is a the operation of 1-D array and 2-D array is different. A 1-D array is more like list type. -------------------------- >>> from numpy import * >>> a= array([1,2,3]) >>> a[:] array([1, 2, 3]) >>> a[0:1] array([1]) >>> ----------------------------- Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From robert.kern at gmail.com Mon Nov 27 20:53:52 2006 From: robert.kern at gmail.com (Robert Kern) Date: Mon, 27 Nov 2006 19:53:52 -0600 Subject: [SciPy-user] what different between array([ 1., 2., 3.]) In-Reply-To: References: Message-ID: <456B96B0.30604@gmail.com> Zhang Sam wrote: > Hi, > > That is a the operation of 1-D array and 2-D array is different. A 1-D > array is more like list type. > > -------------------------- >>>> from numpy import * >>>> a= array([1,2,3]) >>>> a[:] > array([1, 2, 3]) >>>> a[0:1] > array([1]) >>>> > ----------------------------- Can you try to restate your question? I don't understand what you are trying to ask. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From hollowspook at gmail.com Mon Nov 27 22:25:12 2006 From: hollowspook at gmail.com (hollowspook at gmail.com) Date: Tue, 28 Nov 2006 11:25:12 +0800 Subject: [SciPy-user] what different between array([ 1., 2., 3.]) Message-ID: <456BAC18.6030709@gmail.com> Hi, I just think about another silimar problem. The code is here: ------------------------------------- >>> a = array(range(10)) >>> a array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) >>> a[4,6] Traceback (most recent call last): File "", line 1, in ? IndexError: invalid index >>> a.shape = 1,10 >>> a array([[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]]) >>> a[0,[4,6]] array([4, 6]) >>> a[:,[4,6]] array([[4, 6]]) ------------------------------------------- If I only want to index No 4 and No 6 in a 1-D array a. Using a[4,6] is obviously wrong. Under this situation, do I have to shape it to a 2-D 1-by-10 array as shown above? Then use a[0,[4,6]] to index them? From pgmdevlist at gmail.com Mon Nov 27 22:32:27 2006 From: pgmdevlist at gmail.com (Pierre GM) Date: Mon, 27 Nov 2006 22:32:27 -0500 Subject: [SciPy-user] =?iso-8859-1?q?what_different_between_array=28=5B_1?= =?iso-8859-1?q?=2E=2C_2=2E=2C_=093=2E=5D_=29?= In-Reply-To: <456BAC18.6030709@gmail.com> References: <456BAC18.6030709@gmail.com> Message-ID: <200611272232.28018.pgmdevlist@gmail.com> On Monday 27 November 2006 22:25, hollowspook at gmail.com wrote: > array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) > > >>> a[4,6] You try to access a 1D array along two dimensions: that doesn't work. If you want multiple indices along one dimension, use a list: >>> a[ [4,6] ] array([4, 6]) BTW, that's the quickest way to get the edges of your 1D array: >>>a[[0,-1]] array([0,9]) From ryanlists at gmail.com Mon Nov 27 23:36:16 2006 From: ryanlists at gmail.com (Ryan Krauss) Date: Mon, 27 Nov 2006 22:36:16 -0600 Subject: [SciPy-user] problem with lsim Message-ID: I am having a problem with signal.lsim. Here is a script that recreates my problem: from scipy import * from pylab import plot t=arange(0,10,0.01) u=ones(shape(t)) sys=signal.lti([1.0],[1.0,1.0]) out=signal.lsim(sys,u,t) plot(out[0],out[1]) Here is the error message: I:\lsim_test.py 5 u=ones(shape(t)) 6 sys=signal.lti([1.0],[1.0,1.0]) ----> 7 out=signal.lsim(sys,u,t) 8 plot(out[0],out[1]) 9 c:\python24\lib\site-packages\scipy\signal\ltisys.py in lsim(system, U, T, X0, i nterp) 403 vt = transpose(v) 404 vti = linalg.inv(vt) --> 405 GT = dot(dot(vti,diag(numpy.exp(dt*lam))),vt).astype(xout.dtype.char ) 406 ATm1 = linalg.inv(AT) 407 ATm2 = dot(ATm1,ATm1) C:\Python24\Lib\site-packages\numpy\lib\twodim_base.py in diag(v, k) 66 i = arange(0,n+k) 67 fi = i+(i-k)*n ---> 68 res.flat[fi] = v 69 return res 70 elif len(s)==2: TypeError: can't convert complex to float; use abs(z) WARNING: Failure executing file: My script is also attached if someone wants to run it. How do I fix this? Thanks, Ryan -------------- next part -------------- from scipy import * from pylab import plot t=arange(0,10,0.01) u=ones(shape(t)) sys=signal.lti([1.0],[1.0,1.0]) out=signal.lsim(sys,u,t) plot(out[0],out[1]) From nwagner at iam.uni-stuttgart.de Tue Nov 28 10:11:15 2006 From: nwagner at iam.uni-stuttgart.de (Nils Wagner) Date: Tue, 28 Nov 2006 16:11:15 +0100 Subject: [SciPy-user] Trouble with linsolve Message-ID: <456C5193.3040702@iam.uni-stuttgart.de> Hi all, I would like to solve K_dyn x = f, where K_dyn is a sparse matrix. UMFPACK is not installed and I am using the latest svn version. >>> K_dyn <71987x71987 sparse matrix of type '' with 3083884 stored elements (space for 3083884) in Compressed Sparse Column format> >>> f <71987x1 sparse matrix of type '' with 52 stored elements (space for 52) in Compressed Sparse Column format> >>> x = spsolve(K_dyn, f) Traceback (most recent call last): File "", line 1, in ? File "/usr/local/lib64/python2.4/site-packages/scipy/linsolve/linsolve.py", line 75, in spsolve b = asarray(b, dtype=data.dtype) File "/usr/local/lib64/python2.4/site-packages/numpy/core/numeric.py", line 132, in asarray return array(a, dtype, copy=False, order=order) ValueError: setting an array element with a sequence. Is this a bug ? Nils From nwagner at iam.uni-stuttgart.de Tue Nov 28 10:42:33 2006 From: nwagner at iam.uni-stuttgart.de (Nils Wagner) Date: Tue, 28 Nov 2006 16:42:33 +0100 Subject: [SciPy-user] Trouble with linsolve In-Reply-To: <456C5193.3040702@iam.uni-stuttgart.de> References: <456C5193.3040702@iam.uni-stuttgart.de> Message-ID: <456C58E9.2030902@iam.uni-stuttgart.de> Nils Wagner wrote: > Hi all, > > I would like to solve > > K_dyn x = f, > > where K_dyn is a sparse matrix. UMFPACK is not installed and I am using > the latest svn version. > > >>>> K_dyn >>>> > <71987x71987 sparse matrix of type '' > with 3083884 stored elements (space for 3083884) > in Compressed Sparse Column format> > >>>> f >>>> > <71987x1 sparse matrix of type '' > with 52 stored elements (space for 52) > in Compressed Sparse Column format> > >>>> x = spsolve(K_dyn, f) >>>> > Traceback (most recent call last): > File "", line 1, in ? > File > "/usr/local/lib64/python2.4/site-packages/scipy/linsolve/linsolve.py", > line 75, in spsolve > b = asarray(b, dtype=data.dtype) > File "/usr/local/lib64/python2.4/site-packages/numpy/core/numeric.py", > line 132, in asarray > return array(a, dtype, copy=False, order=order) > ValueError: setting an array element with a sequence. > > Is this a bug ? > > Nils > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > With UMFPACK V4.4 I get x = spsolve(K_dyn, f) File "/usr/lib64/python2.4/site-packages/scipy/linsolve/linsolve.py", line 65, in spsolve return umf.linsolve( umfpack.UMFPACK_A, mat, b, autoTranspose = True ) File "/usr/lib64/python2.4/site-packages/scipy/linsolve/umfpack/umfpack.py", line 566, in linsolve sol = self.solve( sys, mtx, rhs, autoTranspose ) File "/usr/lib64/python2.4/site-packages/scipy/linsolve/umfpack/umfpack.py", line 508, in solve self._numeric, self.control, self.info ) File "/usr/lib64/python2.4/site-packages/scipy/linsolve/umfpack/_umfpack.py", line 214, in umfpack_di_solve return __umfpack.umfpack_di_solve(*args) TypeError: not an array >>> K_dyn <71987x71987 sparse matrix of type '' with 3083884 stored elements (space for 3083884) in Compressed Sparse Column format> >>> f <71987x1 sparse matrix of type '' with 52 stored elements (space for 52) in Compressed Sparse Column format> >>> shape(f) (71987, 1) >>> shape(K_dyn) (71987, 71987) >>> type(f) >>> type(K_dyn) Any pointer would be appreciated. Nils Numpy version 1.0.1.dev3462 Scipy version 0.5.2.dev2334 amd_info: libraries = ['amd'] library_dirs = ['/usr/local/src/UMFPACKv4.4/AMD/Lib'] define_macros = [('SCIPY_AMD_H', None)] swig_opts = ['-I/usr/local/src/UMFPACKv4.4/AMD/Include'] include_dirs = ['/usr/local/src/UMFPACKv4.4/AMD/Include'] umfpack_info: libraries = ['umfpack', 'amd'] library_dirs = ['/usr/local/src/UMFPACKv4.4/UMFPACK/Lib', '/usr/local/src/UMFPACKv4.4/AMD/Lib'] define_macros = [('SCIPY_UMFPACK_H', None), ('SCIPY_AMD_H', None)] swig_opts = ['-I/usr/local/src/UMFPACKv4.4/UMFPACK/Include', '-I/usr/local/src/UMFPACKv4.4/AMD/Include'] include_dirs = ['/usr/local/src/UMFPACKv4.4/UMFPACK/Include', '/usr/local/src/UMFPACKv4.4/AMD/Include'] From wbaxter at gmail.com Tue Nov 28 11:12:58 2006 From: wbaxter at gmail.com (Bill Baxter) Date: Wed, 29 Nov 2006 01:12:58 +0900 Subject: [SciPy-user] Trouble with linsolve In-Reply-To: <456C58E9.2030902@iam.uni-stuttgart.de> References: <456C5193.3040702@iam.uni-stuttgart.de> <456C58E9.2030902@iam.uni-stuttgart.de> Message-ID: Just a guess, but I think the problem is just that usually when people solve sparse equations the matrix is sparse, but the RHS vector is dense. I don't know if UMFPACK or SuperLU can actually handle a sparse RHS vector, but if they can, then it sounds like a SciPy bug. I guess it should work if you convert your 'f' to a dense array before making the calls to the solver. Regards, --bb From ryanlists at gmail.com Tue Nov 28 11:32:20 2006 From: ryanlists at gmail.com (Ryan Krauss) Date: Tue, 28 Nov 2006 10:32:20 -0600 Subject: [SciPy-user] problem with lsim In-Reply-To: References: Message-ID: For what it's worth, this code runs fine on a Ubuntu machine running numpy rc1 and a Windows machine running numpy 1.0b5. The machine that has the problem is running Windows and numpy rc2. All are running scipy 0.5.1. Ryan On 11/27/06, Ryan Krauss wrote: > I am having a problem with signal.lsim. Here is a script that > recreates my problem: > > from scipy import * > from pylab import plot > > t=arange(0,10,0.01) > u=ones(shape(t)) > sys=signal.lti([1.0],[1.0,1.0]) > out=signal.lsim(sys,u,t) > plot(out[0],out[1]) > > Here is the error message: > I:\lsim_test.py > 5 u=ones(shape(t)) > 6 sys=signal.lti([1.0],[1.0,1.0]) > ----> 7 out=signal.lsim(sys,u,t) > 8 plot(out[0],out[1]) > 9 > > c:\python24\lib\site-packages\scipy\signal\ltisys.py in lsim(system, U, T, X0, i > nterp) > 403 vt = transpose(v) > 404 vti = linalg.inv(vt) > --> 405 GT = dot(dot(vti,diag(numpy.exp(dt*lam))),vt).astype(xout.dtype.char > ) > 406 ATm1 = linalg.inv(AT) > 407 ATm2 = dot(ATm1,ATm1) > > C:\Python24\Lib\site-packages\numpy\lib\twodim_base.py in diag(v, k) > 66 i = arange(0,n+k) > 67 fi = i+(i-k)*n > ---> 68 res.flat[fi] = v > 69 return res > 70 elif len(s)==2: > > TypeError: can't convert complex to float; use abs(z) > WARNING: Failure executing file: > > My script is also attached if someone wants to run it. > > How do I fix this? > > Thanks, > > Ryan > > > From nwagner at iam.uni-stuttgart.de Tue Nov 28 11:31:35 2006 From: nwagner at iam.uni-stuttgart.de (Nils Wagner) Date: Tue, 28 Nov 2006 17:31:35 +0100 Subject: [SciPy-user] Trouble with linsolve In-Reply-To: References: <456C5193.3040702@iam.uni-stuttgart.de> <456C58E9.2030902@iam.uni-stuttgart.de> Message-ID: <456C6467.5070106@iam.uni-stuttgart.de> Bill Baxter wrote: > Just a guess, but I think the problem is just that usually when people > solve sparse equations the matrix is sparse, but the RHS vector is > dense. I don't know if UMFPACK or SuperLU can actually handle a > sparse RHS vector, but if they can, then it sounds like a SciPy bug. > > I guess it should work if you convert your 'f' to a dense array before > making the calls to the solver. > > Regards, > --bb > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > Hi Bill, Thank you very much for your hint. f = f.todense() resolved this problem. However ** On entry to dgssv, parameter number 7 had an illegal value AFAIK dgssv is a part of SuperLU, but what is the meaning of parameter number 7 ? Nils From nwagner at iam.uni-stuttgart.de Tue Nov 28 11:53:04 2006 From: nwagner at iam.uni-stuttgart.de (Nils Wagner) Date: Tue, 28 Nov 2006 17:53:04 +0100 Subject: [SciPy-user] Trouble with linsolve In-Reply-To: References: <456C5193.3040702@iam.uni-stuttgart.de> <456C58E9.2030902@iam.uni-stuttgart.de> Message-ID: <456C6970.5000405@iam.uni-stuttgart.de> Bill Baxter wrote: > Just a guess, but I think the problem is just that usually when people > solve sparse equations the matrix is sparse, but the RHS vector is > dense. I don't know if UMFPACK or SuperLU can actually handle a > sparse RHS vector, but if they can, then it sounds like a SciPy bug. > > I guess it should work if you convert your 'f' to a dense array before > making the calls to the solver. > > Regards, > --bb > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > With UMFPACK 4.4 and a dense RHS I get x = spsolve(K_dyn, f) File "/usr/lib64/python2.4/site-packages/scipy/linsolve/linsolve.py", line 65, in spsolve return umf.linsolve( umfpack.UMFPACK_A, mat, b, autoTranspose = True ) File "/usr/lib64/python2.4/site-packages/scipy/linsolve/umfpack/umfpack.py", line 566, in linsolve sol = self.solve( sys, mtx, rhs, autoTranspose ) File "/usr/lib64/python2.4/site-packages/scipy/linsolve/umfpack/umfpack.py", line 508, in solve self._numeric, self.control, self.info ) File "/usr/lib64/python2.4/site-packages/scipy/linsolve/umfpack/_umfpack.py", line 214, in umfpack_di_solve return __umfpack.umfpack_di_solve(*args) ValueError: object too deep for desired array >>> K_dyn <71987x71987 sparse matrix of type '' with 3083884 stored elements (space for 3083884) in Compressed Sparse Column format> Any idea ? Nils From cimrman3 at ntc.zcu.cz Wed Nov 29 04:29:11 2006 From: cimrman3 at ntc.zcu.cz (Robert Cimrman) Date: Wed, 29 Nov 2006 10:29:11 +0100 Subject: [SciPy-user] Trouble with linsolve In-Reply-To: <456C6970.5000405@iam.uni-stuttgart.de> References: <456C5193.3040702@iam.uni-stuttgart.de> <456C58E9.2030902@iam.uni-stuttgart.de> <456C6970.5000405@iam.uni-stuttgart.de> Message-ID: <456D52E7.2040400@ntc.zcu.cz> Nils Wagner wrote: > With UMFPACK 4.4 and a dense RHS I get > > x = spsolve(K_dyn, f) > File "/usr/lib64/python2.4/site-packages/scipy/linsolve/linsolve.py", > line 65, in spsolve > return umf.linsolve( umfpack.UMFPACK_A, mat, b, autoTranspose = True ) > File > "/usr/lib64/python2.4/site-packages/scipy/linsolve/umfpack/umfpack.py", > line 566, in linsolve > sol = self.solve( sys, mtx, rhs, autoTranspose ) > File > "/usr/lib64/python2.4/site-packages/scipy/linsolve/umfpack/umfpack.py", > line 508, in solve > self._numeric, self.control, self.info ) > File > "/usr/lib64/python2.4/site-packages/scipy/linsolve/umfpack/_umfpack.py", > line 214, in umfpack_di_solve > return __umfpack.umfpack_di_solve(*args) > ValueError: object too deep for desired array >>>> K_dyn > <71987x71987 sparse matrix of type '' > with 3083884 stored elements (space for 3083884) > in Compressed Sparse Column format> > > Any idea ? I use umfpack on a 32 bit system regularly without problems, so it may be a 64-bit issue. I have yet to set up a 64-bit installation of scipy to test it, though, so I cannot tell you more immediately. Did you also check your inputs to spsolve? r. From nwagner at iam.uni-stuttgart.de Wed Nov 29 04:38:02 2006 From: nwagner at iam.uni-stuttgart.de (Nils Wagner) Date: Wed, 29 Nov 2006 10:38:02 +0100 Subject: [SciPy-user] Trouble with linsolve In-Reply-To: <456D52E7.2040400@ntc.zcu.cz> References: <456C5193.3040702@iam.uni-stuttgart.de> <456C58E9.2030902@iam.uni-stuttgart.de> <456C6970.5000405@iam.uni-stuttgart.de> <456D52E7.2040400@ntc.zcu.cz> Message-ID: <456D54FA.7040707@iam.uni-stuttgart.de> Robert Cimrman wrote: > Nils Wagner wrote: > >> With UMFPACK 4.4 and a dense RHS I get >> >> x = spsolve(K_dyn, f) >> File "/usr/lib64/python2.4/site-packages/scipy/linsolve/linsolve.py", >> line 65, in spsolve >> return umf.linsolve( umfpack.UMFPACK_A, mat, b, autoTranspose = True ) >> File >> "/usr/lib64/python2.4/site-packages/scipy/linsolve/umfpack/umfpack.py", >> line 566, in linsolve >> sol = self.solve( sys, mtx, rhs, autoTranspose ) >> File >> "/usr/lib64/python2.4/site-packages/scipy/linsolve/umfpack/umfpack.py", >> line 508, in solve >> self._numeric, self.control, self.info ) >> File >> "/usr/lib64/python2.4/site-packages/scipy/linsolve/umfpack/_umfpack.py", >> line 214, in umfpack_di_solve >> return __umfpack.umfpack_di_solve(*args) >> ValueError: object too deep for desired array >> >>>>> K_dyn >>>>> >> <71987x71987 sparse matrix of type '' >> with 3083884 stored elements (space for 3083884) >> in Compressed Sparse Column format> >> >> Any idea ? >> > > I use umfpack on a 32 bit system regularly without problems, so it may > be a 64-bit issue. I have yet to set up a 64-bit installation of scipy > to test it, though, so I cannot tell you more immediately. > > Did you also check your inputs to spsolve? > > r. > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > Robert, Just now I have filed two tickets. I hope someone can reproduce my results. http://projects.scipy.org/scipy/scipy/ticket/318 http://projects.scipy.org/scipy/scipy/ticket/319 I have tried SuperLU on 32 and 64 bit machines - the segfault persists. I have installed UMFPACK on a 64 bit machine. Any pointer would be appreciated. Thanks in advance. Nils From cimrman3 at ntc.zcu.cz Wed Nov 29 04:47:35 2006 From: cimrman3 at ntc.zcu.cz (Robert Cimrman) Date: Wed, 29 Nov 2006 10:47:35 +0100 Subject: [SciPy-user] Trouble with linsolve In-Reply-To: <456D54FA.7040707@iam.uni-stuttgart.de> References: <456C5193.3040702@iam.uni-stuttgart.de> <456C58E9.2030902@iam.uni-stuttgart.de> <456C6970.5000405@iam.uni-stuttgart.de> <456D52E7.2040400@ntc.zcu.cz> <456D54FA.7040707@iam.uni-stuttgart.de> Message-ID: <456D5737.90902@ntc.zcu.cz> Nils Wagner wrote: > Robert Cimrman wrote: >> Nils Wagner wrote: >> >>> With UMFPACK 4.4 and a dense RHS I get >>> >>> x = spsolve(K_dyn, f) >>> File "/usr/lib64/python2.4/site-packages/scipy/linsolve/linsolve.py", >>> line 65, in spsolve >>> return umf.linsolve( umfpack.UMFPACK_A, mat, b, autoTranspose = True ) >>> File >>> "/usr/lib64/python2.4/site-packages/scipy/linsolve/umfpack/umfpack.py", >>> line 566, in linsolve >>> sol = self.solve( sys, mtx, rhs, autoTranspose ) >>> File >>> "/usr/lib64/python2.4/site-packages/scipy/linsolve/umfpack/umfpack.py", >>> line 508, in solve >>> self._numeric, self.control, self.info ) >>> File >>> "/usr/lib64/python2.4/site-packages/scipy/linsolve/umfpack/_umfpack.py", >>> line 214, in umfpack_di_solve >>> return __umfpack.umfpack_di_solve(*args) >>> ValueError: object too deep for desired array >>> >>>>>> K_dyn >>>>>> >>> <71987x71987 sparse matrix of type '' >>> with 3083884 stored elements (space for 3083884) >>> in Compressed Sparse Column format> >>> >>> Any idea ? >>> >> I use umfpack on a 32 bit system regularly without problems, so it may >> be a 64-bit issue. I have yet to set up a 64-bit installation of scipy >> to test it, though, so I cannot tell you more immediately. >> >> Did you also check your inputs to spsolve? >> >> r. >> _______________________________________________ >> SciPy-user mailing list >> SciPy-user at scipy.org >> http://projects.scipy.org/mailman/listinfo/scipy-user >> > Robert, > > Just now I have filed two tickets. I hope someone can reproduce my results. > > http://projects.scipy.org/scipy/scipy/ticket/318 > http://projects.scipy.org/scipy/scipy/ticket/319 > > I have tried SuperLU on 32 and 64 bit machines - the segfault persists. > I have installed UMFPACK on a 64 bit machine. > > Any pointer would be appreciated. > > Thanks in advance. Nils, it was easy :) Both tickets can be resolved by: b = io.mmread('sherman2_rhs1.mtx').squeeze() in your test scripts. The rhs vector must be 1d array... I will update linsolve to do it automatically, but for now just squeeze the extra dimensions. cheers, r. From nwagner at iam.uni-stuttgart.de Wed Nov 29 04:54:54 2006 From: nwagner at iam.uni-stuttgart.de (Nils Wagner) Date: Wed, 29 Nov 2006 10:54:54 +0100 Subject: [SciPy-user] Trouble with linsolve In-Reply-To: <456D5737.90902@ntc.zcu.cz> References: <456C5193.3040702@iam.uni-stuttgart.de> <456C58E9.2030902@iam.uni-stuttgart.de> <456C6970.5000405@iam.uni-stuttgart.de> <456D52E7.2040400@ntc.zcu.cz> <456D54FA.7040707@iam.uni-stuttgart.de> <456D5737.90902@ntc.zcu.cz> Message-ID: <456D58EE.4070209@iam.uni-stuttgart.de> Robert Cimrman wrote: > Nils Wagner wrote: > >> Robert Cimrman wrote: >> >>> Nils Wagner wrote: >>> >>> >>>> With UMFPACK 4.4 and a dense RHS I get >>>> >>>> x = spsolve(K_dyn, f) >>>> File "/usr/lib64/python2.4/site-packages/scipy/linsolve/linsolve.py", >>>> line 65, in spsolve >>>> return umf.linsolve( umfpack.UMFPACK_A, mat, b, autoTranspose = True ) >>>> File >>>> "/usr/lib64/python2.4/site-packages/scipy/linsolve/umfpack/umfpack.py", >>>> line 566, in linsolve >>>> sol = self.solve( sys, mtx, rhs, autoTranspose ) >>>> File >>>> "/usr/lib64/python2.4/site-packages/scipy/linsolve/umfpack/umfpack.py", >>>> line 508, in solve >>>> self._numeric, self.control, self.info ) >>>> File >>>> "/usr/lib64/python2.4/site-packages/scipy/linsolve/umfpack/_umfpack.py", >>>> line 214, in umfpack_di_solve >>>> return __umfpack.umfpack_di_solve(*args) >>>> ValueError: object too deep for desired array >>>> >>>> >>>>>>> K_dyn >>>>>>> >>>>>>> >>>> <71987x71987 sparse matrix of type '' >>>> with 3083884 stored elements (space for 3083884) >>>> in Compressed Sparse Column format> >>>> >>>> Any idea ? >>>> >>>> >>> I use umfpack on a 32 bit system regularly without problems, so it may >>> be a 64-bit issue. I have yet to set up a 64-bit installation of scipy >>> to test it, though, so I cannot tell you more immediately. >>> >>> Did you also check your inputs to spsolve? >>> >>> r. >>> _______________________________________________ >>> SciPy-user mailing list >>> SciPy-user at scipy.org >>> http://projects.scipy.org/mailman/listinfo/scipy-user >>> >>> >> Robert, >> >> Just now I have filed two tickets. I hope someone can reproduce my results. >> >> http://projects.scipy.org/scipy/scipy/ticket/318 >> http://projects.scipy.org/scipy/scipy/ticket/319 >> >> I have tried SuperLU on 32 and 64 bit machines - the segfault persists. >> I have installed UMFPACK on a 64 bit machine. >> >> Any pointer would be appreciated. >> >> Thanks in advance. >> > > Nils, it was easy :) Both tickets can be resolved by: > > b = io.mmread('sherman2_rhs1.mtx').squeeze() > > in your test scripts. The rhs vector must be 1d array... > > I will update linsolve to do it automatically, but for now just squeeze > the extra dimensions. > > cheers, > r. > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > > Robert, Thank you very much for your hint ! It works fine on 64 bit. Please can you also add a docstring for spsolve. Cheers, Nils From nwagner at iam.uni-stuttgart.de Wed Nov 29 05:06:55 2006 From: nwagner at iam.uni-stuttgart.de (Nils Wagner) Date: Wed, 29 Nov 2006 11:06:55 +0100 Subject: [SciPy-user] Trouble with linsolve In-Reply-To: <456D5737.90902@ntc.zcu.cz> References: <456C5193.3040702@iam.uni-stuttgart.de> <456C58E9.2030902@iam.uni-stuttgart.de> <456C6970.5000405@iam.uni-stuttgart.de> <456D52E7.2040400@ntc.zcu.cz> <456D54FA.7040707@iam.uni-stuttgart.de> <456D5737.90902@ntc.zcu.cz> Message-ID: <456D5BBF.40008@iam.uni-stuttgart.de> Robert Cimrman wrote: > Nils Wagner wrote: > >> Robert Cimrman wrote: >> >>> Nils Wagner wrote: >>> >>> >>>> With UMFPACK 4.4 and a dense RHS I get >>>> >>>> x = spsolve(K_dyn, f) >>>> File "/usr/lib64/python2.4/site-packages/scipy/linsolve/linsolve.py", >>>> line 65, in spsolve >>>> return umf.linsolve( umfpack.UMFPACK_A, mat, b, autoTranspose = True ) >>>> File >>>> "/usr/lib64/python2.4/site-packages/scipy/linsolve/umfpack/umfpack.py", >>>> line 566, in linsolve >>>> sol = self.solve( sys, mtx, rhs, autoTranspose ) >>>> File >>>> "/usr/lib64/python2.4/site-packages/scipy/linsolve/umfpack/umfpack.py", >>>> line 508, in solve >>>> self._numeric, self.control, self.info ) >>>> File >>>> "/usr/lib64/python2.4/site-packages/scipy/linsolve/umfpack/_umfpack.py", >>>> line 214, in umfpack_di_solve >>>> return __umfpack.umfpack_di_solve(*args) >>>> ValueError: object too deep for desired array >>>> >>>> >>>>>>> K_dyn >>>>>>> >>>>>>> >>>> <71987x71987 sparse matrix of type '' >>>> with 3083884 stored elements (space for 3083884) >>>> in Compressed Sparse Column format> >>>> >>>> Any idea ? >>>> >>>> >>> I use umfpack on a 32 bit system regularly without problems, so it may >>> be a 64-bit issue. I have yet to set up a 64-bit installation of scipy >>> to test it, though, so I cannot tell you more immediately. >>> >>> Did you also check your inputs to spsolve? >>> >>> r. >>> _______________________________________________ >>> SciPy-user mailing list >>> SciPy-user at scipy.org >>> http://projects.scipy.org/mailman/listinfo/scipy-user >>> >>> >> Robert, >> >> Just now I have filed two tickets. I hope someone can reproduce my results. >> >> http://projects.scipy.org/scipy/scipy/ticket/318 >> http://projects.scipy.org/scipy/scipy/ticket/319 >> >> I have tried SuperLU on 32 and 64 bit machines - the segfault persists. >> I have installed UMFPACK on a 64 bit machine. >> >> Any pointer would be appreciated. >> >> Thanks in advance. >> > > Nils, it was easy :) Both tickets can be resolved by: > > b = io.mmread('sherman2_rhs1.mtx').squeeze() > > in your test scripts. The rhs vector must be 1d array... > > I will update linsolve to do it automatically, but for now just squeeze > the extra dimensions. > > cheers, > r. > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > BTW, is there a way to store the result in a file using io.mmwrite ? >>> io.mmwrite('sol',x) Traceback (most recent call last): File "", line 1, in ? File "/usr/lib64/python2.4/site-packages/scipy/io/mmio.py", line 244, in mmwrite raise ValueError, 'expected matrix' ValueError: expected matrix Nils From R.Springuel at umit.maine.edu Wed Nov 29 11:28:02 2006 From: R.Springuel at umit.maine.edu (R. Padraic Springuel) Date: Wed, 29 Nov 2006 11:28:02 -0500 Subject: [SciPy-user] Windows Binary Problem Message-ID: <456DB512.60201@umit.maine.edu> I noticed this past weekend that the windows binary installer for scipy wasn't built against the most recent version of numpy. As a result, one can't use scipy with it. Does anyone have a more recent version of the scipy windows installer that was built against the latest version of numpy? --- R. Padraic Springuel From pajer at iname.com Wed Nov 29 11:56:12 2006 From: pajer at iname.com (Gary) Date: Wed, 29 Nov 2006 11:56:12 -0500 Subject: [SciPy-user] Windows Binary Problem In-Reply-To: <456DB512.60201@umit.maine.edu> References: <456DB512.60201@umit.maine.edu> Message-ID: <456DBBAC.6040201@iname.com> R. Padraic Springuel wrote: > I noticed this past weekend that the windows binary installer for scipy > wasn't built against the most recent version of numpy. As a result, one > can't use scipy with it. Does anyone have a more recent version of the > scipy windows installer that was built against the latest version of numpy? > > --- > R. Padraic Springuel > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > > One doesn't want to bother the developers too much, but this seems like a reasonable request. In the meantime, I have a matched pair (numpy/scipy) of Windows installers that I built the day before yesterday from the then-current svn. I'm happy to make them available. I remember that there is a website somewhere that allows for this kind of thing: short term distribution of a large file. Anyone know what I'm talking about? -gary From pajer at iname.com Wed Nov 29 12:39:41 2006 From: pajer at iname.com (Gary) Date: Wed, 29 Nov 2006 12:39:41 -0500 Subject: [SciPy-user] Windows Binary Problem In-Reply-To: <456DBBAC.6040201@iname.com> References: <456DB512.60201@umit.maine.edu> <456DBBAC.6040201@iname.com> Message-ID: <456DC5DD.9070907@iname.com> Gary wrote: > R. Padraic Springuel wrote: > >> I noticed this past weekend that the windows binary installer for scipy >> wasn't built against the most recent version of numpy. As a result, one >> can't use scipy with it. Does anyone have a more recent version of the >> scipy windows installer that was built against the latest version of numpy? >> >> --- >> R. Padraic Springuel >> __________________________ I'm about to put up my builds on a temporary file-transfer site. Stay tuned. Use at your own risk! -Gary >> _____________________ >> SciPy-user mailing list >> SciPy-user at scipy.org >> http://projects.scipy.org/mailman/listinfo/scipy-user >> >> >> > One doesn't want to bother the developers too much, but this seems like > a reasonable request. > In the meantime, I have a matched pair (numpy/scipy) of Windows > installers that I built the day before yesterday from the then-current > svn. I'm happy to make them available. > > I remember that there is a website somewhere that allows for this kind > of thing: short term distribution of a large file. Anyone know what > I'm talking about? > > -gary > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > > From pajer at iname.com Wed Nov 29 12:46:00 2006 From: pajer at iname.com (dropload) Date: Wed, 29 Nov 2006 12:46:00 -0500 Subject: [SciPy-user] pajer@iname.com has sent you a file. Message-ID: A file named "scipy-0.5.2.dev2331.win32-py2.4.exe" has been placed in a temporary location for you by Gary Pajer (pajer at iname.com). If you trust this person and wish to accept this file, click or paste this link into your browser: http://www.dropload.com/redeem.php?t=7980cc4ec0ed367c2fe33ed8e8ac05ff Gary has attached a note: Scipy for Windows (python 2.4.3) You have 7 days to pick up this file. After 7 days it will be deleted. You can only download the file once, so be sure and save it to your computer rather than playing or running it from the browser. If you don't know who Gary is, simply ignore this message and the file will be erased. -=-=-=-=-=-=-=-=-=- Dropload stuff for free, http://www.dropload.com From pajer at iname.com Wed Nov 29 12:39:16 2006 From: pajer at iname.com (dropload) Date: Wed, 29 Nov 2006 12:39:16 -0500 Subject: [SciPy-user] pajer@iname.com has sent you a file. Message-ID: A file named "numpy-1.0.1.dev3460.win32-py2.4.exe" has been placed in a temporary location for you by Gary Pajer (pajer at iname.com). If you trust this person and wish to accept this file, click or paste this link into your browser: http://www.dropload.com/redeem.php?t=d853f7d3b440245f9e7032b6efb1a9b2 Gary has attached a note: Numpy You have 7 days to pick up this file. After 7 days it will be deleted. You can only download the file once, so be sure and save it to your computer rather than playing or running it from the browser. If you don't know who Gary is, simply ignore this message and the file will be erased. -=-=-=-=-=-=-=-=-=- Dropload stuff for free, http://www.dropload.com From pajer at iname.com Wed Nov 29 16:00:51 2006 From: pajer at iname.com (Gary) Date: Wed, 29 Nov 2006 16:00:51 -0500 Subject: [SciPy-user] pajer@iname.com has sent you a file. In-Reply-To: References: Message-ID: <456DF503.7050105@iname.com> dropload wrote: > A file named "scipy-0.5.2.dev2331.win32-py2.4.exe" has been placed in a temporary location for you by Gary Pajer It seems dropload only allows one download, and that's been taken. I didn't know that would happen If anyone knows of a site without that restriction, I'll post there. Until then, you can e-mail me and I'll "dropload" it to you individually (unless I get swamped with requests) -Gary > (pajer at iname.com). If you trust this person and wish to accept this file, click or paste this link into your browser: > > http://www.dropload.com/redeem.php?t=7980cc4ec0ed367c2fe33ed8e8ac05ff > > Gary has attached a note: > Scipy for Windows > (python 2.4.3) > > You have 7 days to pick up this file. After 7 days it will be deleted. You can only download the file once, so be sure and save it to your computer rather than playing or running it from the browser. > > If you don't know who Gary is, simply ignore this message and the file will be erased. > > > -=-=-=-=-=-=-=-=-=- > Dropload stuff for free, http://www.dropload.com > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > > From robert.kern at gmail.com Wed Nov 29 16:04:14 2006 From: robert.kern at gmail.com (Robert Kern) Date: Wed, 29 Nov 2006 15:04:14 -0600 Subject: [SciPy-user] pajer@iname.com has sent you a file. In-Reply-To: <456DF503.7050105@iname.com> References: <456DF503.7050105@iname.com> Message-ID: <456DF5CE.9020501@gmail.com> Gary wrote: > dropload wrote: >> A file named "scipy-0.5.2.dev2331.win32-py2.4.exe" has been placed in a temporary location for you by Gary Pajer > > It seems dropload only allows one download, and that's been taken. I > didn't know that would happen > > If anyone knows of a site without that restriction, I'll post there. > Until then, you can e-mail me and I'll "dropload" it to you individually > (unless I get swamped with requests) dropload it to me, and I'll put it on scipy.org somewhere. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From joshuafr at gmail.com Wed Nov 29 18:18:15 2006 From: joshuafr at gmail.com (Joshua Petterson) Date: Thu, 30 Nov 2006 00:18:15 +0100 Subject: [SciPy-user] nan? Message-ID: hello, my question is maybe trivial, but what is the utility of numpy.NAN? In [60]: nan==nan Out[60]: False In [61]: a=ma.masked_object((1,2,nan),nan) In [62]: a Out[62]: array([ 1. 2. nan]) In [63]: b=array([(1,2,3),(4,5,nan)]) In [64]: b.max() Out[64]: 5.0 In [65]: b.mean() Out[65]: nan thanks From ryanlists at gmail.com Wed Nov 29 18:18:29 2006 From: ryanlists at gmail.com (Ryan Krauss) Date: Wed, 29 Nov 2006 17:18:29 -0600 Subject: [SciPy-user] umfpack and building scipy from source Message-ID: I am trying to build scipy/numpy from source on Windows XP. I do not have umfpack installed. When I build scipy I get this warning: C:\Python24\lib\site-packages\numpy\distutils\system_info.py:401: UserWarning: UMFPACK sparse solver (http://www.cise.ufl.edu/research/sparse/umfpack/) not found. Directories to search for the libraries can be specified in the numpy/distutils/site.cfg file (section [umfpack]) or by setting the UMFPACK environment variable. warnings.warn(self.notfounderror.__doc__) numpy.test() runs without problems. The output of scipy.test() is slightly scary: scipy.test() RuntimeError: module compiled against version 1000002 of C-API but this version of numpy is 1000009 RuntimeError: module compiled against version 1000002 of C-API but this version of numpy is 1000009 RuntimeError: module compiled against version 1000002 of C-API but this version of numpy is 1000009 RuntimeError: module compiled against version 1000002 of C-API but this version of numpy is 1000009 RuntimeError: module compiled against version 1000002 of C-API but this version of numpy is 1000009 RuntimeError: module compiled against version 1000002 of C-API but this version of numpy is 1000009 RuntimeError: module compiled against version 1000002 of C-API but this version of numpy is 1000009 RuntimeError: module compiled against version 1000002 of C-API but this version of numpy is 1000009 RuntimeError: module compiled against version 1000002 of C-API but this version of numpy is 1000009 RuntimeError: module compiled against version 1000002 of C-API but this version of numpy is 1000009 RuntimeError: module compiled against version 1000002 of C-API but this version of numpy is 1000009 RuntimeError: module compiled against version 1000002 of C-API but this version of numpy is 1000009 RuntimeError: module compiled against version 1000002 of C-API but this version of numpy is 1000009 RuntimeError: module compiled against version 1000002 of C-API but this version of numpy is 1000009 Found 397 tests for scipy.ndimage RuntimeError: module compiled against version 1000002 of C-API but this version of numpy is 1000009 Warning: FAILURE importing tests for C:\Python24\Lib\site-packages\scipy\linsolve\_superlu.py:2: ImportError: numpy.core.multiarray failed to import (in ?) Warning: FAILURE importing tests for C:\Python24\Lib\site-packages\scipy\optimize\minpack.py:6: AttributeError: 'module' object has no attribute 'error' (in ?) RuntimeError: module compiled against version 1000002 of C-API but this version of numpy is 1000009 Warning: FAILURE importing tests for C:\Python24\Lib\site-packages\scipy\linsolve\_superlu.py:3: ImportError: numpy.core.multiarray failed to import (in ?) RuntimeError: module compiled against version 1000002 of C-API but this version of numpy is 1000009 Warning: FAILURE importing tests for C:\Python24\Lib\site-packages\scipy\linsolve\_superlu.py:4: ImportError: numpy.core.multiarray failed to import (in ?) Found 95 tests for scipy.sparse Found 0 tests for __main__ .............................................................................................................................................................................................................................................................................................................................................................................................................EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE...E.EE.......EEE..EE.EE.E.EEEEEEEE.EEE.E.E.E ====================================================================== ERROR: check_eye (scipy.tests.test_sparse.test_construct_utils) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 626, in check_eye a = speye(2, 3 ) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 2833, in speye return spdiags(diags, k, n, m) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 2811, in spdiags diagfunc = eval('sparsetools.'+_transtabl[mtype]+'diatocsc') File "", line 0, in ? AttributeError: 'module' object has no attribute 'ddiatocsc' ====================================================================== ERROR: check_identity (scipy.tests.test_sparse.test_construct_utils) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 621, in check_identity a = spidentity(3) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 2823, in spidentity return spdiags( diags, 0, n, n ) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 2811, in spdiags diagfunc = eval('sparsetools.'+_transtabl[mtype]+'diatocsc') File "", line 0, in ? AttributeError: 'module' object has no attribute 'ddiatocsc' ====================================================================== ERROR: check_add (scipy.tests.test_sparse.test_csc) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: Check whether adding a dense matrix to a sparse matrix works ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: Check whether the copy=True and copy=False keywords work ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: check_elmul (scipy.tests.test_sparse.test_csc) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: check_getelement (scipy.tests.test_sparse.test_csc) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: check_large (scipy.tests.test_sparse.test_csc) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: check_matmat (scipy.tests.test_sparse.test_csc) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: check_matvec (scipy.tests.test_sparse.test_csc) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: Does the matrix's mean(,axis=0) method work? ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: check_rmatvec (scipy.tests.test_sparse.test_csc) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: check_setelement (scipy.tests.test_sparse.test_csc) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: Test whether the lu_solve command segfaults, as reported by Nils ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: Does the matrix's sum(,axis=0) method work? ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: check_toarray (scipy.tests.test_sparse.test_csc) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: check_tocoo (scipy.tests.test_sparse.test_csc) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: check_tocsc (scipy.tests.test_sparse.test_csc) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: check_tocsr (scipy.tests.test_sparse.test_csc) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: check_todense (scipy.tests.test_sparse.test_csc) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: check_transpose (scipy.tests.test_sparse.test_csc) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: Test for new slice functionality (EJS) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: check_constructor1 (scipy.tests.test_sparse.test_csc) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: check_constructor2 (scipy.tests.test_sparse.test_csc) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: check_constructor3 (scipy.tests.test_sparse.test_csc) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: Test manipulating empty matrices. Fails in SciPy SVN <= r1768 ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: check_add (scipy.tests.test_sparse.test_csr) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1076, in __init__ ocsc = csc_matrix(transpose(s)) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: Check whether adding a dense matrix to a sparse matrix works ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1076, in __init__ ocsc = csc_matrix(transpose(s)) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: Check whether the copy=True and copy=False keywords work ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1076, in __init__ ocsc = csc_matrix(transpose(s)) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: check_elmul (scipy.tests.test_sparse.test_csr) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1076, in __init__ ocsc = csc_matrix(transpose(s)) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: check_getelement (scipy.tests.test_sparse.test_csr) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1076, in __init__ ocsc = csc_matrix(transpose(s)) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: check_large (scipy.tests.test_sparse.test_csr) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1076, in __init__ ocsc = csc_matrix(transpose(s)) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: check_matmat (scipy.tests.test_sparse.test_csr) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1076, in __init__ ocsc = csc_matrix(transpose(s)) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: check_matvec (scipy.tests.test_sparse.test_csr) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1076, in __init__ ocsc = csc_matrix(transpose(s)) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: Does the matrix's mean(,axis=0) method work? ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1076, in __init__ ocsc = csc_matrix(transpose(s)) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: check_rmatvec (scipy.tests.test_sparse.test_csr) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1076, in __init__ ocsc = csc_matrix(transpose(s)) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: check_setelement (scipy.tests.test_sparse.test_csr) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1076, in __init__ ocsc = csc_matrix(transpose(s)) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: Test whether the lu_solve command segfaults, as reported by Nils ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1076, in __init__ ocsc = csc_matrix(transpose(s)) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: Does the matrix's sum(,axis=0) method work? ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1076, in __init__ ocsc = csc_matrix(transpose(s)) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: check_toarray (scipy.tests.test_sparse.test_csr) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1076, in __init__ ocsc = csc_matrix(transpose(s)) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: check_tocoo (scipy.tests.test_sparse.test_csr) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1076, in __init__ ocsc = csc_matrix(transpose(s)) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: check_tocsc (scipy.tests.test_sparse.test_csr) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1076, in __init__ ocsc = csc_matrix(transpose(s)) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: check_tocsr (scipy.tests.test_sparse.test_csr) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1076, in __init__ ocsc = csc_matrix(transpose(s)) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: check_todense (scipy.tests.test_sparse.test_csr) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1076, in __init__ ocsc = csc_matrix(transpose(s)) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: check_transpose (scipy.tests.test_sparse.test_csr) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1076, in __init__ ocsc = csc_matrix(transpose(s)) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: Test for new slice functionality (EJS) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1076, in __init__ ocsc = csc_matrix(transpose(s)) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: check_constructor1 (scipy.tests.test_sparse.test_csr) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1076, in __init__ ocsc = csc_matrix(transpose(s)) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: check_constructor2 (scipy.tests.test_sparse.test_csr) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1076, in __init__ ocsc = csc_matrix(transpose(s)) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: check_constructor3 (scipy.tests.test_sparse.test_csr) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1076, in __init__ ocsc = csc_matrix(transpose(s)) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: Test manipulating empty matrices. Fails in SciPy SVN <= r1768 ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 33, in setUp self.datsp = self.spmatrix(self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1076, in __init__ ocsc = csc_matrix(transpose(s)) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 481, in __init__ func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc') AttributeError: 'module' object has no attribute 'dfulltocsc' ====================================================================== ERROR: check_elmul (scipy.tests.test_sparse.test_dok) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 100, in check_elmul c = a ** b File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 213, in __pow__ return csc ** other File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 735, in __pow__ func = getattr(sparsetools, _transtabl[dtypechar]+'cscmul') AttributeError: 'module' object has no attribute 'dcscmul' ====================================================================== ERROR: check_large (scipy.tests.test_sparse.test_dok) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 216, in check_large csc2 = csr.tocsc() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1573, in tocsc return self.tocoo().tocsc() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1568, in tocoo func = getattr(sparsetools, self.ftype+"csctocoo") AttributeError: 'module' object has no attribute 'dcsctocoo' ====================================================================== ERROR: check_matmat (scipy.tests.test_sparse.test_dok) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 140, in check_matmat assert_array_almost_equal((asp*bsp).todense(), a*b) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1984, in __mul__ return self.dot(other) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 312, in dot result = self.matmat(other) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 324, in matmat return csc.matmat(other) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 868, in matmat func = getattr(sparsetools, ftype+'cscmucsc') AttributeError: 'module' object has no attribute 'dcscmucsc' ====================================================================== ERROR: check_tocoo (scipy.tests.test_sparse.test_dok) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 185, in check_tocoo a = self.datsp.tocoo() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 366, in tocoo return csc.tocoo() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1011, in tocoo func = getattr(sparsetools, self.ftype+"csctocoo") AttributeError: 'module' object has no attribute 'dcsctocoo' ====================================================================== ERROR: check_tocsc (scipy.tests.test_sparse.test_dok) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 190, in check_tocsc assert_array_almost_equal(a.todense(), self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 358, in todense return asmatrix(self.toarray()) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1019, in toarray func = getattr(sparsetools, self.ftype+'csctofull') AttributeError: 'module' object has no attribute 'dcsctofull' ====================================================================== ERROR: check_tocsr (scipy.tests.test_sparse.test_dok) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 197, in check_tocsr assert_array_almost_equal(a.todense(), self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 358, in todense return asmatrix(self.toarray()) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1576, in toarray func = getattr(sparsetools, self.ftype+'csctofull') AttributeError: 'module' object has no attribute 'dcsctofull' ====================================================================== ERROR: Test provided by Andrew Straw. Fails in SciPy <= r1477. ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 503, in check_convert assert_array_equal( csc.toarray()[:,n-1], zeros(m,) ) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1019, in toarray func = getattr(sparsetools, self.ftype+'csctofull') AttributeError: 'module' object has no attribute 'dcsctofull' ====================================================================== ERROR: check_mult (scipy.tests.test_sparse.test_dok) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 472, in check_mult D = A*A.T File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1984, in __mul__ return self.dot(other) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 312, in dot result = self.matmat(other) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 324, in matmat return csc.matmat(other) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 868, in matmat func = getattr(sparsetools, ftype+'cscmucsc') AttributeError: 'module' object has no attribute 'dcscmucsc' ====================================================================== ERROR: check_add (scipy.tests.test_sparse.test_lil) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 93, in check_add c = a + b File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 179, in __add__ csc = self.tocsc() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 2679, in tocsc return self.tocsr(nzmax).tocsc() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1573, in tocsc return self.tocoo().tocsc() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1568, in tocoo func = getattr(sparsetools, self.ftype+"csctocoo") AttributeError: 'module' object has no attribute 'dcsctocoo' ====================================================================== ERROR: Check whether adding a dense matrix to a sparse matrix works ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 232, in check_add_dense sum1 = self.dat + self.datsp File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 183, in __radd__ csc = self.tocsc() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 2679, in tocsc return self.tocsr(nzmax).tocsc() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1573, in tocsc return self.tocoo().tocsc() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1568, in tocoo func = getattr(sparsetools, self.ftype+"csctocoo") AttributeError: 'module' object has no attribute 'dcsctocoo' ====================================================================== ERROR: check_elmul (scipy.tests.test_sparse.test_lil) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 100, in check_elmul c = a ** b File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 212, in __pow__ csc = self.tocsc() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 2679, in tocsc return self.tocsr(nzmax).tocsc() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1573, in tocsc return self.tocoo().tocsc() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1568, in tocoo func = getattr(sparsetools, self.ftype+"csctocoo") AttributeError: 'module' object has no attribute 'dcsctocoo' ====================================================================== ERROR: check_large (scipy.tests.test_sparse.test_lil) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 216, in check_large csc2 = csr.tocsc() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1573, in tocsc return self.tocoo().tocsc() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1568, in tocoo func = getattr(sparsetools, self.ftype+"csctocoo") AttributeError: 'module' object has no attribute 'dcsctocoo' ====================================================================== ERROR: check_matmat (scipy.tests.test_sparse.test_lil) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 140, in check_matmat assert_array_almost_equal((asp*bsp).todense(), a*b) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 2625, in __mul__ return self.dot(other) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 312, in dot result = self.matmat(other) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 323, in matmat csc = self.tocsc() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 2679, in tocsc return self.tocsr(nzmax).tocsc() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1573, in tocsc return self.tocoo().tocsc() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1568, in tocoo func = getattr(sparsetools, self.ftype+"csctocoo") AttributeError: 'module' object has no attribute 'dcsctocoo' ====================================================================== ERROR: check_matvec (scipy.tests.test_sparse.test_lil) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 112, in check_matvec assert_array_almost_equal(M * col, M.todense() * col) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 2625, in __mul__ return self.dot(other) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 309, in dot result = self.matvec(other) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 330, in matvec csc = self.tocsc() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 2679, in tocsc return self.tocsr(nzmax).tocsc() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1573, in tocsc return self.tocoo().tocsc() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1568, in tocoo func = getattr(sparsetools, self.ftype+"csctocoo") AttributeError: 'module' object has no attribute 'dcsctocoo' ====================================================================== ERROR: Does the matrix's mean(,axis=0) method work? ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 52, in check_mean assert_array_equal(self.dat.mean(), self.datsp.mean()) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 413, in mean return self.sum(None) * 1.0 / (self.shape[0]*self.shape[1]) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 396, in sum return (o0 * (self * o1)).A.squeeze() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 2625, in __mul__ return self.dot(other) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 309, in dot result = self.matvec(other) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 330, in matvec csc = self.tocsc() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 2679, in tocsc return self.tocsr(nzmax).tocsc() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1573, in tocsc return self.tocoo().tocsc() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1568, in tocoo func = getattr(sparsetools, self.ftype+"csctocoo") AttributeError: 'module' object has no attribute 'dcsctocoo' ====================================================================== ERROR: check_rmatvec (scipy.tests.test_sparse.test_lil) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 105, in check_rmatvec assert_array_almost_equal([1,2,3,4]*M, dot([1,2,3,4], M.toarray())) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 2640, in __rmul__ return spmatrix.__rmul__(self, other) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 216, in __rmul__ csc = self.tocsc() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 2679, in tocsc return self.tocsr(nzmax).tocsc() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1573, in tocsc return self.tocoo().tocsc() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1568, in tocoo func = getattr(sparsetools, self.ftype+"csctocoo") AttributeError: 'module' object has no attribute 'dcsctocoo' ====================================================================== ERROR: check_setelement (scipy.tests.test_sparse.test_lil) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 83, in check_setelement a = self.datsp - self.datsp File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 187, in __sub__ neg_other = -other File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 220, in __neg__ csc = self.tocsc() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 2679, in tocsc return self.tocsr(nzmax).tocsc() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1573, in tocsc return self.tocoo().tocsc() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1568, in tocoo func = getattr(sparsetools, self.ftype+"csctocoo") AttributeError: 'module' object has no attribute 'dcsctocoo' ====================================================================== ERROR: Test whether the lu_solve command segfaults, as reported by Nils ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 270, in check_solve B = A.tocsc() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 2679, in tocsc return self.tocsr(nzmax).tocsc() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1573, in tocsc return self.tocoo().tocsc() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1568, in tocoo func = getattr(sparsetools, self.ftype+"csctocoo") AttributeError: 'module' object has no attribute 'zcsctocoo' ====================================================================== ERROR: Does the matrix's sum(,axis=0) method work? ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 44, in check_sum assert_array_equal(self.dat.sum(), self.datsp.sum()) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 396, in sum return (o0 * (self * o1)).A.squeeze() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 2625, in __mul__ return self.dot(other) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 309, in dot result = self.matvec(other) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 330, in matvec csc = self.tocsc() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 2679, in tocsc return self.tocsr(nzmax).tocsc() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1573, in tocsc return self.tocoo().tocsc() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1568, in tocoo func = getattr(sparsetools, self.ftype+"csctocoo") AttributeError: 'module' object has no attribute 'dcsctocoo' ====================================================================== ERROR: check_tocoo (scipy.tests.test_sparse.test_lil) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 185, in check_tocoo a = self.datsp.tocoo() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 365, in tocoo csc = self.tocsc() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 2679, in tocsc return self.tocsr(nzmax).tocsc() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1573, in tocsc return self.tocoo().tocsc() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1568, in tocoo func = getattr(sparsetools, self.ftype+"csctocoo") AttributeError: 'module' object has no attribute 'dcsctocoo' ====================================================================== ERROR: check_tocsc (scipy.tests.test_sparse.test_lil) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 189, in check_tocsc a = self.datsp.tocsc() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 2679, in tocsc return self.tocsr(nzmax).tocsc() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1573, in tocsc return self.tocoo().tocsc() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1568, in tocoo func = getattr(sparsetools, self.ftype+"csctocoo") AttributeError: 'module' object has no attribute 'dcsctocoo' ====================================================================== ERROR: check_tocsr (scipy.tests.test_sparse.test_lil) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 197, in check_tocsr assert_array_almost_equal(a.todense(), self.dat) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 358, in todense return asmatrix(self.toarray()) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1576, in toarray func = getattr(sparsetools, self.ftype+'csctofull') AttributeError: 'module' object has no attribute 'dcsctofull' ====================================================================== ERROR: check_transpose (scipy.tests.test_sparse.test_lil) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 202, in check_transpose assert_array_equal(a.todense(), b) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 358, in todense return asmatrix(self.toarray()) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1019, in toarray func = getattr(sparsetools, self.ftype+'csctofull') AttributeError: 'module' object has no attribute 'dcsctofull' ====================================================================== ERROR: Tests whether a lil_matrix can be constructed from a ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 616, in check_lil_from_csr assert_array_equal(C.A, D.A) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 225, in __getattr__ return self.toarray() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1576, in toarray func = getattr(sparsetools, self.ftype+'csctofull') AttributeError: 'module' object has no attribute 'dcsctofull' ====================================================================== ERROR: check_mult (scipy.tests.test_sparse.test_lil) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", line 586, in check_mult assert_array_equal(A * A.T, (B * B.T).todense()) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 2625, in __mul__ return self.dot(other) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 312, in dot result = self.matmat(other) File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 323, in matmat csc = self.tocsc() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 2679, in tocsc return self.tocsr(nzmax).tocsc() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1573, in tocsc return self.tocoo().tocsc() File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line 1568, in tocoo func = getattr(sparsetools, self.ftype+"csctocoo") AttributeError: 'module' object has no attribute 'dcsctocoo' ---------------------------------------------------------------------- Ran 492 tests in 0.985s FAILED (errors=75) What have I done wrong? I did not try to build Atlas/Blas/Lapack from source but just down loaded the precomipled versions into C:\BlasLapackLibs. My scipy and numpy svn folders are not on my PATH or my PYTHONPATH. I had some trouble getting numpy's setup.py to find the atlas, lapack, blas libs until I set an ATLAS environment variable. Oh, and the example site.cfg mentions libamd.a as well as umfpack. Do I need the amd lib? I am running an amd processor under windows (Athlon X2). Thanks, Ryan From robert.kern at gmail.com Wed Nov 29 18:59:47 2006 From: robert.kern at gmail.com (Robert Kern) Date: Wed, 29 Nov 2006 17:59:47 -0600 Subject: [SciPy-user] nan? In-Reply-To: References: Message-ID: <456E1EF3.7060009@gmail.com> Joshua Petterson wrote: > hello, > my question is maybe trivial, but what is the utility of numpy.NAN? It's a special kind of floating point number defined by the IEEE-754 floating point specification. It means that it is "Not a Number". It comes out of certain floating point operations (e.g. inf/inf) to specify that the operation actually has indeterminate value or that the operation is invalid. The alternative is to raise an exception every time such an operation occurs. With arrays, that kind of behavior is often undesirable since it means that all of your expensive calculations stop even though only one element was bad. Returning NaNs for those values might allow the programmer to inspect the results and locate the problem (if indeed it is a problem). Of course, sometimes you want an exception to be raised to stop execution. You can control this behavior with numpy.seterr(). One of the quirks of NaNs is that they are defined to not equal anything, including themselves. You can use numpy.isnan() to locate NaNs. In some systems, NaNs are used as a way to represent missing data (people often have strong opinions about this, both for and against; I'd advise searching the archives of this list for discussions about masked arrays instead of opening that argument again). You can find more information about NaNs and other tricky bits of floating point from the classic paper "What Every Computer Scientist Should Know About Floating-Point Arithmetic": http://docs-pdf.sun.com/800-7895/800-7895.pdf -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From mkuemmel at eso.org Thu Nov 30 02:14:08 2006 From: mkuemmel at eso.org (Martin Kuemmel) Date: Thu, 30 Nov 2006 08:14:08 +0100 Subject: [SciPy-user] What about 'None'? Comment about nan... Message-ID: <456E84C0.2020403@eso.org> Hi, this question may (as well) be trivial for some of us, but bothers me for some time. It is: >>> gaga = numpy.array([1.0,2.0,None]) >>> gaga array([1.0, 2.0, None], dtype=object) The type of the array is 'object'. Is there a way to have 'None' in a numerical array type? Any trick, idea or recipe? About nan: It is great that 'numpy.NAN' exists, but the handbook says nothing about it. Are there more glorious, but hidden constants or functions or methods? Cheers, Martin -- +----------------------------------------------------------------------+ | Martin Kuemmel E-mail: mkuemmel at eso.org | | Space Telescope European Co-ordinating Facility | | European Southern Observatory Room: ESO-IPP L125 | | Karl-Schwarzschild-Strasse 2 Phone: +49 89 32006-817 | | D-85748 Garching FAX: +49 89 32006-703 | | Germany WWW: http://www.stecf.org/~mkuemmel/ | | __o | | _ \<._ | +_(_)/_(_)_____________________________________________________________+ From robert.kern at gmail.com Thu Nov 30 02:29:30 2006 From: robert.kern at gmail.com (Robert Kern) Date: Thu, 30 Nov 2006 01:29:30 -0600 Subject: [SciPy-user] What about 'None'? Comment about nan... In-Reply-To: <456E84C0.2020403@eso.org> References: <456E84C0.2020403@eso.org> Message-ID: <456E885A.2020301@gmail.com> Martin Kuemmel wrote: > Hi, > > this question may (as well) be trivial for some of us, but bothers > me for some time. It is: > > >>> gaga = numpy.array([1.0,2.0,None]) > >>> gaga > array([1.0, 2.0, None], dtype=object) > > The type of the array is 'object'. Is there a way to have 'None' > in a numerical array type? Any trick, idea or recipe? Nope. Can't be done. > About nan: It is great that 'numpy.NAN' exists, but the handbook > says nothing about it. Are there more glorious, but > hidden constants or functions or methods? If they're actually "hidden", then they are hidden for a reason (i.e., they are distinctly inglorious). However, there are probably still some more constants functions, and methods undocumented in the _Guide to NumPy_. There is only a finite amount of time available. If you would like to contribute your own finite time, the Wiki on scipy.org has several useful places where you can contribute such information. One such is the Numpy Example List. Oh look! It has a section on nans: http://www.scipy.org/Numpy_Example_List#head-9a99475ede19768c7dff190af504c9cf1275c2cc -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From peridot.faceted at gmail.com Thu Nov 30 02:43:55 2006 From: peridot.faceted at gmail.com (A. M. Archibald) Date: Thu, 30 Nov 2006 02:43:55 -0500 Subject: [SciPy-user] What about 'None'? Comment about nan... In-Reply-To: <456E84C0.2020403@eso.org> References: <456E84C0.2020403@eso.org> Message-ID: On 30/11/06, Martin Kuemmel wrote: > Hi, > > this question may (as well) be trivial for some of us, but bothers > me for some time. It is: > > >>> gaga = numpy.array([1.0,2.0,None]) > >>> gaga > array([1.0, 2.0, None], dtype=object) > > The type of the array is 'object'. Is there a way to have 'None' > in a numerical array type? Any trick, idea or recipe? The short answer is no. Since numerical arrays by definition contain only a single data type (and can therefore reduce the burden of type tagging, dynamic allocation, and so on) they can't contain anything but numbers. If you want to use "None" to mark places there is no data, "MaskedArray"s are what you want; they also include appropriate propagation of masked (i.e., no-data) entries through calculations. Alternatively, you could use NaNs to signify "no data"; this may not be a good idea as on some hardware (pentium M but not opteron, for example) they are slower. (There are other pros and cons to using NaNs, but I think the list is sick of me going on about them.) > About nan: It is great that 'numpy.NAN' exists, but the handbook > says nothing about it. Are there more glorious, but > hidden constants or functions or methods? The documentation does have its lacunae, but this one has a more plausible excuse than usual. NaN is not an invention of numpy but of the IEEE floating-point standard. It is a normal (well, all right, abnormal but accepted) floating-point number, supported by most platforms (it is represented by one of many otherwise-invalid bit patterns for floating-point numbers). Which is why you can put it in floating-point arrays (but not integer arrays). There are also positive and negative infinities, positive and negative zero, and "denormalized" numbers (almost too small to represent, they lose accuracy gradually as they get smaller). This bestiary is actually designed to reduce the confusion induced by floating-point programs by causing them to behave more gracefully when given extreme inputs (whether it succeeds is a matter of opinion). A. M. Archibald From joshuafr at gmail.com Thu Nov 30 03:55:08 2006 From: joshuafr at gmail.com (Joshua Petterson) Date: Thu, 30 Nov 2006 09:55:08 +0100 Subject: [SciPy-user] nan? In-Reply-To: <456E1EF3.7060009@gmail.com> References: <456E1EF3.7060009@gmail.com> Message-ID: Hi Robert, thanks for these precisions. I don't want to start a troll in this m-l, but why numpy doesn't understand nan and masked_values together? And a mix of them doen't work: |~|[40]>ma.masked_values([1,2,nan],nan).mean() Out [40]:array(nan) |~|[41]>ma.masked_object([1,2,nan],nan).mean() Out [41]:array(nan) Then, if I have missing values in my datas, what can I do? I cannot compute on nan, and numpy.ma doesn't recognize it. I could use isnan to find them, but what's that?: |~|[48]>a=[1,2,nan] |~|[49]>b=ma.array(a,mask=isnan(a)) |~|[50]>b Out [50]: array(data = [ 1.00000000e+00 2.00000000e+00 1.00000000e+20], mask = [False False True], fill_value=1e+20) nan becomes 1e+20!!! Good precision :-) 2006/11/30, Robert Kern : > Joshua Petterson wrote: > > hello, > > my question is maybe trivial, but what is the utility of numpy.NAN? > > It's a special kind of floating point number defined by the IEEE-754 floating > point specification. It means that it is "Not a Number". It comes out of certain > floating point operations (e.g. inf/inf) to specify that the operation actually > has indeterminate value or that the operation is invalid. > > The alternative is to raise an exception every time such an operation occurs. > With arrays, that kind of behavior is often undesirable since it means that all > of your expensive calculations stop even though only one element was bad. > Returning NaNs for those values might allow the programmer to inspect the > results and locate the problem (if indeed it is a problem). Of course, sometimes > you want an exception to be raised to stop execution. You can control this > behavior with numpy.seterr(). > > One of the quirks of NaNs is that they are defined to not equal anything, > including themselves. You can use numpy.isnan() to locate NaNs. In some systems, > NaNs are used as a way to represent missing data (people often have strong > opinions about this, both for and against; I'd advise searching the archives of > this list for discussions about masked arrays instead of opening that argument > again). > > You can find more information about NaNs and other tricky bits of floating point > from the classic paper "What Every Computer Scientist Should Know About > Floating-Point Arithmetic": > > http://docs-pdf.sun.com/800-7895/800-7895.pdf > > -- > Robert Kern > > "I have come to believe that the whole world is an enigma, a harmless enigma > that is made terrible by our own mad attempt to interpret it as though it had > an underlying truth." > -- Umberto Eco > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > From robert.kern at gmail.com Thu Nov 30 04:08:24 2006 From: robert.kern at gmail.com (Robert Kern) Date: Thu, 30 Nov 2006 03:08:24 -0600 Subject: [SciPy-user] nan? In-Reply-To: References: <456E1EF3.7060009@gmail.com> Message-ID: <456E9F88.2040701@gmail.com> Joshua Petterson wrote: > Hi Robert, > thanks for these precisions. I don't want to start a troll in this > m-l, but why numpy doesn't understand nan and masked_values together? > And a mix of them doen't work: > |~|[40]>ma.masked_values([1,2,nan],nan).mean() > Out [40]:array(nan) > |~|[41]>ma.masked_object([1,2,nan],nan).mean() > Out [41]:array(nan) That would be the "nan != nan" feature of the little buggers at work. > Then, if I have missing values in my datas, what can I do? I cannot > compute on nan, and numpy.ma doesn't recognize it. I could use isnan > to find them, but what's that?: > |~|[48]>a=[1,2,nan] > |~|[49]>b=ma.array(a,mask=isnan(a)) > |~|[50]>b > Out [50]: > array(data = > [ 1.00000000e+00 2.00000000e+00 1.00000000e+20], > mask = > [False False True], > fill_value=1e+20) > > nan becomes 1e+20!!! Good precision :-) That's the default fill value. Don't worry about it. Change it back to nan if you like using the fill_value keyword argument. It only affects display and any users of the .filled() method (which will probably demand some other specific fill value depending on the application). -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From cimrman3 at ntc.zcu.cz Thu Nov 30 04:58:29 2006 From: cimrman3 at ntc.zcu.cz (Robert Cimrman) Date: Thu, 30 Nov 2006 10:58:29 +0100 Subject: [SciPy-user] umfpack and building scipy from source In-Reply-To: References: Message-ID: <456EAB45.3070500@ntc.zcu.cz> Ryan Krauss wrote: > I am trying to build scipy/numpy from source on Windows XP. I do not > have umfpack installed. When I build scipy I get this warning: > > C:\Python24\lib\site-packages\numpy\distutils\system_info.py:401: UserWarning: > UMFPACK sparse solver (http://www.cise.ufl.edu/research/sparse/umfpack/) > not found. Directories to search for the libraries can be specified in the > numpy/distutils/site.cfg file (section [umfpack]) or by setting > the UMFPACK environment variable. > warnings.warn(self.notfounderror.__doc__) > > numpy.test() runs without problems. The output of scipy.test() is > slightly scary: > > scipy.test() > RuntimeError: module compiled against version 1000002 of C-API but > this version of numpy is 1000009 > RuntimeError: module compiled against version 1000002 of C-API but > this version of numpy is 1000009 > RuntimeError: module compiled against version 1000002 of C-API but > this version of numpy is 1000009 > RuntimeError: module compiled against version 1000002 of C-API but > this version of numpy is 1000009 > RuntimeError: module compiled against version 1000002 of C-API but > this version of numpy is 1000009 > RuntimeError: module compiled against version 1000002 of C-API but > this version of numpy is 1000009 > RuntimeError: module compiled against version 1000002 of C-API but > this version of numpy is 1000009 > RuntimeError: module compiled against version 1000002 of C-API but > this version of numpy is 1000009 > RuntimeError: module compiled against version 1000002 of C-API but > this version of numpy is 1000009 > RuntimeError: module compiled against version 1000002 of C-API but > this version of numpy is 1000009 > RuntimeError: module compiled against version 1000002 of C-API but > this version of numpy is 1000009 > RuntimeError: module compiled against version 1000002 of C-API but > this version of numpy is 1000009 > RuntimeError: module compiled against version 1000002 of C-API but > this version of numpy is 1000009 > RuntimeError: module compiled against version 1000002 of C-API but > this version of numpy is 1000009 > Found 397 tests for scipy.ndimage > RuntimeError: module compiled against version 1000002 of C-API but > this version of numpy is 1000009 > Warning: FAILURE importing tests for from '...ckages\\scipy\\sparse\\sparse.pyc'> > C:\Python24\Lib\site-packages\scipy\linsolve\_superlu.py:2: > ImportError: numpy.core.multiarray failed to import (in ?) > Warning: FAILURE importing tests for from '...es\\scipy\\optimize\\optimize.pyc'> > C:\Python24\Lib\site-packages\scipy\optimize\minpack.py:6: > AttributeError: 'module' object has no attribute 'error' (in ?) > RuntimeError: module compiled against version 1000002 of C-API but > this version of numpy is 1000009 > Warning: FAILURE importing tests for 'scipy.linsolve.umfpack.umfpack' from > '...y\\linsolve\\umfpack\\umfpack.pyc'> > C:\Python24\Lib\site-packages\scipy\linsolve\_superlu.py:3: > ImportError: numpy.core.multiarray failed to import (in ?) > RuntimeError: module compiled against version 1000002 of C-API but > this version of numpy is 1000009 > Warning: FAILURE importing tests for from '...\\linsolve\\umfpack\\__init__.pyc'> > C:\Python24\Lib\site-packages\scipy\linsolve\_superlu.py:4: > ImportError: numpy.core.multiarray failed to import (in ?) > Found 95 tests for scipy.sparse > Found 0 tests for __main__ > .............................................................................................................................................................................................................................................................................................................................................................................................................EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE...E.EE.......EEE..EE.EE.E.EEEEEEEE.EEE.E.E.E > ====================================================================== > ERROR: check_eye (scipy.tests.test_sparse.test_construct_utils) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", > line 626, in check_eye > a = speye(2, 3 ) > File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line > 2833, in speye > return spdiags(diags, k, n, m) > File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line > 2811, in spdiags > diagfunc = eval('sparsetools.'+_transtabl[mtype]+'diatocsc') > File "", line 0, in ? > AttributeError: 'module' object has no attribute 'ddiatocsc' > > .... > > What have I done wrong? I did not try to build Atlas/Blas/Lapack from > source but just down loaded the precomipled versions into > C:\BlasLapackLibs. My scipy and numpy svn folders are not on my PATH > or my PYTHONPATH. I had some trouble getting numpy's setup.py to find > the atlas, lapack, blas libs until I set an ATLAS environment > variable. Ryan, it seems you try to run scipy with different version of numpy than it was compiled with. did you try removing existing installation and rebuilding all sources? Anyway missing umfpack would not cause all those errors. > Oh, and the example site.cfg mentions libamd.a as well as umfpack. Do > I need the amd lib? I am running an amd processor under windows > (Athlon X2). libamd.a has nothing to do with the amd processors - it it a library (a part of umfpack-related package) for ordering a sparse matrix prior to Cholesky factorization (http://www.cise.ufl.edu/research/sparse/amd/) and you do not need it if you do not use umfpack. r. From james.anderson at icr.ac.uk Thu Nov 30 09:42:20 2006 From: james.anderson at icr.ac.uk (James Anderson) Date: Thu, 30 Nov 2006 14:42:20 +0000 Subject: [SciPy-user] scipy.special.erf randomly returns NANs on OSX In-Reply-To: <5C11CE0A-1607-4849-81E8-E07FF19581BD@icr.ac.uk> References: <5C11CE0A-1607-4849-81E8-E07FF19581BD@icr.ac.uk> Message-ID: On Jan 23, 2006, at 04:32, David M. Cooke wrote: > Robert Kern gmail.com> writes: > > Evan Monroig wrote: > >> Hi, > >> > >> I have this strange problem that the special erf function > returns NANs > >> when the input is an array: > > > >> scipy is 0.4.4.1526, numpy is 0.9.3.1836, I am running on Mac OS X > >> with MacPython 2.4.1 > >> > >> Can anyone reproduce the problem? > > > > Actually, on OS X, /usr/include/math.h defines an erf() function > that is > > probably getting picked up instead of Cephes's version. Bad Apple! > > Hmm, we've seen this type of problem before, with round(). Cephes > really should use a namespace (cephes_erf() instead of plain erf(), > for instance). > > The least-intrusive patch would be a header with things like > #define erf cephes_erf > then when linking the cephes version will be pulled in. > > I've also just noticed that we're using an older version of Cephes > (release 2.3, Jan. 1995) compared with one on netlib (release 2.9, > Nov. 2000). > > I'll have a look at making a header, and then updating to the latest. I dug this out of the archives from January '06; I'm still getting the same behaviour with python 2.4.3, compiled to Mac OS 10.4.5 with gcc 4.0.1 using scipy 0.5.2.dev2095. I came at it a different way and first discovered that erf(48.0083465504) gives nan. I'm going to tackle David Cooke's suggestion above and was wondering which file the "#define erf cephes_erf" header ought to go in? Also, if anyone knows the current status of this issue, I'd appreciate hearing about that, too. -J From hollowspook at gmail.com Thu Nov 30 09:47:02 2006 From: hollowspook at gmail.com (Zhang Sam) Date: Thu, 30 Nov 2006 22:47:02 +0800 Subject: [SciPy-user] how to copy several rows/columns to a sparse matrix? Message-ID: Hi, there I want to use sparse matrix with scipy. But I can't copy several rows/columns to a coo_matrix at the same time. The codes is as follows: ------------------------------------------------------------------------------------------------------------------------------------------ >>> from numpy import * >>> from scipy import * >>> a=sparse.coo_matrix((array([1,2,3]),[[0,1,2],[0,1,2]]), (3,3)) >>> a <3x3 sparse matrix of type '' with 3 stored elements in COOrdinate format> >>> print a (0, 0) 1.0 (1, 1) 2.0 (2, 2) 3.0 >>> b = array([[1,2,3],[4,5,6]]) >>> b array([[1, 2, 3], [4, 5, 6]]) >>> a[[0,1],:] = b Traceback (most recent call last): File "", line 1, in ? File "D:\Python24\lib\site-packages\scipy\sparse\sparse.py", line 237, in __getattr__ raise AttributeError, attr + " not found" AttributeError: __setitem__ not found ----------------------------------------------------------------------------------------------------------------------------------------------- Maybe it is not very clear. I also show a same type operation however with numpy arrays. --------------------------------------------------------------------------------------------- >>> a = arange(8) >>> a.shape = 2,4 >>> a array([[0, 1, 2, 3], [4, 5, 6, 7]]) >>> b = array([4,4,4,4]) >>> b.shape=2,2 >>> b array([[4, 4], [4, 4]]) >>> a[:,[1,2]]=b >>> a array([[0, 4, 4, 3], [4, 4, 4, 7]]) --------------------------------------------------------------------------------------------- Why this happens? Does sparse matrix defined in scipy need different operation? Thanks in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: From joshuafr at gmail.com Thu Nov 30 10:01:44 2006 From: joshuafr at gmail.com (Joshua Petterson) Date: Thu, 30 Nov 2006 16:01:44 +0100 Subject: [SciPy-user] nan? In-Reply-To: <456E9F88.2040701@gmail.com> References: <456E1EF3.7060009@gmail.com> <456E9F88.2040701@gmail.com> Message-ID: About ma, I have sometimes this message from scipy.stats (on the first runs): /usr/lib/python2.4/site-packages/numpy/core/ma.py:604: UserWarning: Cannot automatically convert masked array to numeric because data is masked in one or more locations. It not breaks results, but why this warning (I use 1.e-20 as fill_value)? 2006/11/30, Robert Kern : > Joshua Petterson wrote: > > Hi Robert, > > thanks for these precisions. I don't want to start a troll in this > > m-l, but why numpy doesn't understand nan and masked_values together? > > And a mix of them doen't work: > > |~|[40]>ma.masked_values([1,2,nan],nan).mean() > > Out [40]:array(nan) > > |~|[41]>ma.masked_object([1,2,nan],nan).mean() > > Out [41]:array(nan) > > That would be the "nan != nan" feature of the little buggers at work. > > > Then, if I have missing values in my datas, what can I do? I cannot > > compute on nan, and numpy.ma doesn't recognize it. I could use isnan > > to find them, but what's that?: > > |~|[48]>a=[1,2,nan] > > |~|[49]>b=ma.array(a,mask=isnan(a)) > > |~|[50]>b > > Out [50]: > > array(data = > > [ 1.00000000e+00 2.00000000e+00 1.00000000e+20], > > mask = > > [False False True], > > fill_value=1e+20) > > > > nan becomes 1e+20!!! Good precision :-) > > That's the default fill value. Don't worry about it. Change it back to nan if > you like using the fill_value keyword argument. It only affects display and any > users of the .filled() method (which will probably demand some other specific > fill value depending on the application). > > -- > Robert Kern > > "I have come to believe that the whole world is an enigma, a harmless enigma > that is made terrible by our own mad attempt to interpret it as though it had > an underlying truth." > -- Umberto Eco > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > From lev at columbia.edu Thu Nov 30 10:07:02 2006 From: lev at columbia.edu (Lev Givon) Date: Thu, 30 Nov 2006 10:07:02 -0500 Subject: [SciPy-user] pajer@iname.com has sent you a file. In-Reply-To: <456DF503.7050105@iname.com> References: <456DF503.7050105@iname.com> Message-ID: <20061130150702.GD22154@localhost.cc.columbia.edu> Received from Gary on Wed, Nov 29, 2006 at 04:00:51PM EST: > dropload wrote: > > A file named "scipy-0.5.2.dev2331.win32-py2.4.exe" has been placed in a temporary location for you by Gary Pajer > > It seems dropload only allows one download, and that's been taken. I > didn't know that would happen > > If anyone knows of a site without that restriction, I'll post there. > Until then, you can e-mail me and I'll "dropload" it to you individually > (unless I get swamped with requests) > > -Gary http://sdf.lonestar.org allows one to set up a free shell account and web site with an 80 Mb total quota. Extra disk space on the servers is available for a modest fee. L.G. From ryanlists at gmail.com Thu Nov 30 14:07:13 2006 From: ryanlists at gmail.com (Ryan Krauss) Date: Thu, 30 Nov 2006 13:07:13 -0600 Subject: [SciPy-user] umfpack and building scipy from source In-Reply-To: <456EAB45.3070500@ntc.zcu.cz> References: <456EAB45.3070500@ntc.zcu.cz> Message-ID: I may have had the misfortune of checking out of svn last night while numpy and scipy were out of sync. I re-did my svn checkout just now and numpy didn't change, but scipy went from version 2339 to 2342. I now get fewer errors. I also did a python setup.py clean for each before rebuilding and deleted site-packages/numpy and /scipy before rebuilding. I am still getting an error from scipy.test that it is built against a different version of the API (see below). Is this detrimental? Thanks, Ryan >>> scipy.test() RuntimeError: module compiled against version 1000002 of C-API but this version of numpy is 1000009 RuntimeError: module compiled against version 1000002 of C-API but this version of numpy is 1000009 RuntimeError: module compiled against version 1000002 of C-API but this version of numpy is 1000009 RuntimeError: module compiled against version 1000002 of C-API but this version of numpy is 1000009 RuntimeError: module compiled against version 1000002 of C-API but this version of numpy is 1000009 RuntimeError: module compiled against version 1000002 of C-API but this version of numpy is 1000009 RuntimeError: module compiled against version 1000002 of C-API but this version of numpy is 1000009 RuntimeError: module compiled against version 1000002 of C-API but this version of numpy is 1000009 Warning: FAILURE importing tests for C:\Python24\Lib\site-packages\scipy\linsolve\_superlu.py:3: ImportError: numpy.c ore.multiarray failed to import (in ?) Found 128 tests for scipy.linalg.fblas Found 397 tests for scipy.ndimage Found 53 tests for scipy.linalg.decomp RuntimeError: module compiled against version 1000002 of C-API but this version of numpy is 1000009 Warning: FAILURE importing tests for C:\Python24\Lib\site-packages\scipy\linsolve\_superlu.py:4: ImportError: numpy.c ore.multiarray failed to import (in ?) Found 20 tests for scipy.fftpack.pseudo_diffs Warning: FAILURE importing tests for C:\Python24\Lib\site-packages\scipy\optimize\minpack.py:6: AttributeError: 'modu le' object has no attribute 'error' (in ?) Found 4 tests for scipy.linalg.lapack Found 18 tests for scipy.fftpack.basic Warning: FAILURE importing tests for C:\Python24\Lib\site-packages\scipy\linsolve\umfpack\tests\test_umfpack.py:17: A ttributeError: 'module' object has no attribute 'umfpack' (in ?) Found 42 tests for scipy.lib.lapack Found 128 tests for scipy.lib.blas.fblas Found 7 tests for scipy.linalg.matfuncs Found 41 tests for scipy.linalg.basic Found 16 tests for scipy.lib.blas Found 14 tests for scipy.linalg.blas Found 95 tests for scipy.sparse Found 4 tests for scipy.fftpack.helper Found 0 tests for __main__ ...caxpy:n=4 ..caxpy:n=3 ....ccopy:n=4 ..ccopy:n=3 .............cscal:n=4 ....cswap:n=4 ..cswap:n=3 .....daxpy:n=4 ..daxpy:n=3 ....dcopy:n=4 ..dcopy:n=3 .............dscal:n=4 ....dswap:n=4 ..dswap:n=3 .....saxpy:n=4 ..saxpy:n=3 ....scopy:n=4 ..scopy:n=3 .............sscal:n=4 ....sswap:n=4 ..sswap:n=3 .....zaxpy:n=4 ..zaxpy:n=3 ....zcopy:n=4 ..zcopy:n=3 .............zscal:n=4 ....zswap:n=4 ..zswap:n=3 ................................................................................ ................................................................................ ................................................................................ ................................................................................ ................................................................................ ................................................................................ ...........................................................caxpy:n=4 ..caxpy:n=3 ....ccopy:n=4 ..ccopy:n=3 .............cscal:n=4 ....cswap:n=4 ..cswap:n=3 .....daxpy:n=4 ..daxpy:n=3 ....dcopy:n=4 ..dcopy:n=3 .............dscal:n=4 ....dswap:n=4 ..dswap:n=3 .....saxpy:n=4 ..saxpy:n=3 ....scopy:n=4 ..scopy:n=3 .............sscal:n=4 ....sswap:n=4 ..sswap:n=3 .....zaxpy:n=4 ..zaxpy:n=3 ....zcopy:n=4 ..zcopy:n=3 .............zscal:n=4 ....zswap:n=4 ..zswap:n=3 ...Result may be inaccurate, approximate err = 5.69043366261e-009 ...Result may be inaccurate, approximate err = 1.39218513881e-010 ................................................................................ ..Resizing... 16 17 24 Resizing... 20 7 35 Resizing... 23 7 47 Resizing... 24 25 58 Resizing... 28 7 68 Resizing... 28 27 73 .....Use minimum degree ordering on A'+A. ........................Use minimum degree ordering on A'+A. ...................Resizing... 16 17 24 Resizing... 20 7 35 Resizing... 23 7 47 Resizing... 24 25 58 Resizing... 28 7 68 Resizing... 28 27 73 .....Use minimum degree ordering on A'+A. .................Resizing... 16 17 24 Resizing... 20 7 35 Resizing... 23 7 47 Resizing... 24 25 58 Resizing... 28 7 68 Resizing... 28 27 73 .....Use minimum degree ordering on A'+A. ................ ---------------------------------------------------------------------- Ran 967 tests in 2.422s OK >>> On 11/30/06, Robert Cimrman wrote: > Ryan Krauss wrote: > > I am trying to build scipy/numpy from source on Windows XP. I do not > > have umfpack installed. When I build scipy I get this warning: > > > > C:\Python24\lib\site-packages\numpy\distutils\system_info.py:401: UserWarning: > > UMFPACK sparse solver (http://www.cise.ufl.edu/research/sparse/umfpack/) > > not found. Directories to search for the libraries can be specified in the > > numpy/distutils/site.cfg file (section [umfpack]) or by setting > > the UMFPACK environment variable. > > warnings.warn(self.notfounderror.__doc__) > > > > numpy.test() runs without problems. The output of scipy.test() is > > slightly scary: > > > > scipy.test() > > RuntimeError: module compiled against version 1000002 of C-API but > > this version of numpy is 1000009 > > RuntimeError: module compiled against version 1000002 of C-API but > > this version of numpy is 1000009 > > RuntimeError: module compiled against version 1000002 of C-API but > > this version of numpy is 1000009 > > RuntimeError: module compiled against version 1000002 of C-API but > > this version of numpy is 1000009 > > RuntimeError: module compiled against version 1000002 of C-API but > > this version of numpy is 1000009 > > RuntimeError: module compiled against version 1000002 of C-API but > > this version of numpy is 1000009 > > RuntimeError: module compiled against version 1000002 of C-API but > > this version of numpy is 1000009 > > RuntimeError: module compiled against version 1000002 of C-API but > > this version of numpy is 1000009 > > RuntimeError: module compiled against version 1000002 of C-API but > > this version of numpy is 1000009 > > RuntimeError: module compiled against version 1000002 of C-API but > > this version of numpy is 1000009 > > RuntimeError: module compiled against version 1000002 of C-API but > > this version of numpy is 1000009 > > RuntimeError: module compiled against version 1000002 of C-API but > > this version of numpy is 1000009 > > RuntimeError: module compiled against version 1000002 of C-API but > > this version of numpy is 1000009 > > RuntimeError: module compiled against version 1000002 of C-API but > > this version of numpy is 1000009 > > Found 397 tests for scipy.ndimage > > RuntimeError: module compiled against version 1000002 of C-API but > > this version of numpy is 1000009 > > Warning: FAILURE importing tests for > from '...ckages\\scipy\\sparse\\sparse.pyc'> > > C:\Python24\Lib\site-packages\scipy\linsolve\_superlu.py:2: > > ImportError: numpy.core.multiarray failed to import (in ?) > > Warning: FAILURE importing tests for > from '...es\\scipy\\optimize\\optimize.pyc'> > > C:\Python24\Lib\site-packages\scipy\optimize\minpack.py:6: > > AttributeError: 'module' object has no attribute 'error' (in ?) > > RuntimeError: module compiled against version 1000002 of C-API but > > this version of numpy is 1000009 > > Warning: FAILURE importing tests for > 'scipy.linsolve.umfpack.umfpack' from > > '...y\\linsolve\\umfpack\\umfpack.pyc'> > > C:\Python24\Lib\site-packages\scipy\linsolve\_superlu.py:3: > > ImportError: numpy.core.multiarray failed to import (in ?) > > RuntimeError: module compiled against version 1000002 of C-API but > > this version of numpy is 1000009 > > Warning: FAILURE importing tests for > from '...\\linsolve\\umfpack\\__init__.pyc'> > > C:\Python24\Lib\site-packages\scipy\linsolve\_superlu.py:4: > > ImportError: numpy.core.multiarray failed to import (in ?) > > Found 95 tests for scipy.sparse > > Found 0 tests for __main__ > > .............................................................................................................................................................................................................................................................................................................................................................................................................EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE...E.EE.......EEE..EE.EE.E.EEEEEEEE.EEE.E.E.E > > ====================================================================== > > ERROR: check_eye (scipy.tests.test_sparse.test_construct_utils) > > ---------------------------------------------------------------------- > > Traceback (most recent call last): > > File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", > > line 626, in check_eye > > a = speye(2, 3 ) > > File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line > > 2833, in speye > > return spdiags(diags, k, n, m) > > File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line > > 2811, in spdiags > > diagfunc = eval('sparsetools.'+_transtabl[mtype]+'diatocsc') > > File "", line 0, in ? > > AttributeError: 'module' object has no attribute 'ddiatocsc' > > > > .... > > > > What have I done wrong? I did not try to build Atlas/Blas/Lapack from > > source but just down loaded the precomipled versions into > > C:\BlasLapackLibs. My scipy and numpy svn folders are not on my PATH > > or my PYTHONPATH. I had some trouble getting numpy's setup.py to find > > the atlas, lapack, blas libs until I set an ATLAS environment > > variable. > > Ryan, > > it seems you try to run scipy with different version of numpy than it > was compiled with. did you try removing existing installation and > rebuilding all sources? > > Anyway missing umfpack would not cause all those errors. > > > Oh, and the example site.cfg mentions libamd.a as well as umfpack. Do > > I need the amd lib? I am running an amd processor under windows > > (Athlon X2). > > libamd.a has nothing to do with the amd processors - it it a library (a > part of umfpack-related package) for ordering a sparse matrix prior to > Cholesky factorization (http://www.cise.ufl.edu/research/sparse/amd/) > and you do not need it if you do not use umfpack. > > r. > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > From robert.kern at gmail.com Thu Nov 30 14:12:39 2006 From: robert.kern at gmail.com (Robert Kern) Date: Thu, 30 Nov 2006 13:12:39 -0600 Subject: [SciPy-user] umfpack and building scipy from source In-Reply-To: References: <456EAB45.3070500@ntc.zcu.cz> Message-ID: <456F2D27.5060007@gmail.com> Ryan Krauss wrote: > I may have had the misfortune of checking out of svn last night while > numpy and scipy were out of sync. No, you didn't. The C API did not change from 1000002 to 1000009 in that time. That happened a while ago. > I re-did my svn checkout just now > and numpy didn't change, but scipy went from version 2339 to 2342. I > now get fewer errors. I also did a python setup.py clean for each > before rebuilding and deleted site-packages/numpy and /scipy before > rebuilding. I am still getting an error from scipy.test that it is > built against a different version of the API (see below). Is this > detrimental? Yes. Try printing out numpy.__file__ and scipy.__file__ to make sure that you're importing the packages you think you are. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From ryanlists at gmail.com Thu Nov 30 14:13:08 2006 From: ryanlists at gmail.com (Ryan Krauss) Date: Thu, 30 Nov 2006 13:13:08 -0600 Subject: [SciPy-user] umfpack and building scipy from source In-Reply-To: References: <456EAB45.3070500@ntc.zcu.cz> Message-ID: I seem to have some basic funtionality, but when I run one of the recent scripts I was working on I get: In [5]: run project1.py 0.25 shafagh --------------------------------------------------------------------------- exceptions.RuntimeError Traceback (most recent call last) RuntimeError: module compiled against version 1000002 of C-API but this version of numpy is 1000009 --------------------------------------------------------------------------- exceptions.ImportError Traceback (most recent call last) E:\siue\mechatronics\extra_credit\project1\project1.py ----> 1 2 3 from scipy import * 4 from pylab import plot, figure, cla, show, clf, xlabel, ylabel, legend 5 6 from IPython.Debugger import Pdb 7 C:\Python24\Lib\site-packages\scipy\io\__init__.py 6 from info import __doc__ 7 ----> 8 from numpyio import packbits, unpackbits, bswap, fread, fwrite, \ 9 convert_objectarray 10 from mio import * ImportError: numpy.core.multiarray failed to import WARNING: Failure executing file: It seems the list is a bit quite lately. If there is lots of development work going on right now and I should just try this again in a few days/weeks, let me know. Everything works for me with rc1. I will revert for now. Ryan On 11/30/06, Ryan Krauss wrote: > I may have had the misfortune of checking out of svn last night while > numpy and scipy were out of sync. I re-did my svn checkout just now > and numpy didn't change, but scipy went from version 2339 to 2342. I > now get fewer errors. I also did a python setup.py clean for each > before rebuilding and deleted site-packages/numpy and /scipy before > rebuilding. I am still getting an error from scipy.test that it is > built against a different version of the API (see below). Is this > detrimental? > > Thanks, > > Ryan > > >>> scipy.test() > RuntimeError: module compiled against version 1000002 of C-API but this version > of numpy is 1000009 > RuntimeError: module compiled against version 1000002 of C-API but this version > of numpy is 1000009 > RuntimeError: module compiled against version 1000002 of C-API but this version > of numpy is 1000009 > RuntimeError: module compiled against version 1000002 of C-API but this version > of numpy is 1000009 > RuntimeError: module compiled against version 1000002 of C-API but this version > of numpy is 1000009 > RuntimeError: module compiled against version 1000002 of C-API but this version > of numpy is 1000009 > RuntimeError: module compiled against version 1000002 of C-API but this version > of numpy is 1000009 > RuntimeError: module compiled against version 1000002 of C-API but this version > of numpy is 1000009 > Warning: FAILURE importing tests for om '...y\\linsolve\\umfpack\\umfpack.pyc'> > C:\Python24\Lib\site-packages\scipy\linsolve\_superlu.py:3: ImportError: numpy.c > ore.multiarray failed to import (in ?) > Found 128 tests for scipy.linalg.fblas > Found 397 tests for scipy.ndimage > Found 53 tests for scipy.linalg.decomp > RuntimeError: module compiled against version 1000002 of C-API but this version > of numpy is 1000009 > Warning: FAILURE importing tests for es\\scipy\\sparse\\sparse.pyc'> > C:\Python24\Lib\site-packages\scipy\linsolve\_superlu.py:4: ImportError: numpy.c > ore.multiarray failed to import (in ?) > Found 20 tests for scipy.fftpack.pseudo_diffs > Warning: FAILURE importing tests for es\\scipy\\optimize\\optimize.pyc'> > C:\Python24\Lib\site-packages\scipy\optimize\minpack.py:6: AttributeError: 'modu > le' object has no attribute 'error' (in ?) > Found 4 tests for scipy.linalg.lapack > Found 18 tests for scipy.fftpack.basic > Warning: FAILURE importing tests for \linsolve\\umfpack\\__init__.pyc'> > C:\Python24\Lib\site-packages\scipy\linsolve\umfpack\tests\test_umfpack.py:17: A > ttributeError: 'module' object has no attribute 'umfpack' (in ?) > Found 42 tests for scipy.lib.lapack > Found 128 tests for scipy.lib.blas.fblas > Found 7 tests for scipy.linalg.matfuncs > Found 41 tests for scipy.linalg.basic > Found 16 tests for scipy.lib.blas > Found 14 tests for scipy.linalg.blas > Found 95 tests for scipy.sparse > Found 4 tests for scipy.fftpack.helper > Found 0 tests for __main__ > ...caxpy:n=4 > ..caxpy:n=3 > ....ccopy:n=4 > ..ccopy:n=3 > .............cscal:n=4 > ....cswap:n=4 > ..cswap:n=3 > .....daxpy:n=4 > ..daxpy:n=3 > ....dcopy:n=4 > ..dcopy:n=3 > .............dscal:n=4 > ....dswap:n=4 > ..dswap:n=3 > .....saxpy:n=4 > ..saxpy:n=3 > ....scopy:n=4 > ..scopy:n=3 > .............sscal:n=4 > ....sswap:n=4 > ..sswap:n=3 > .....zaxpy:n=4 > ..zaxpy:n=3 > ....zcopy:n=4 > ..zcopy:n=3 > .............zscal:n=4 > ....zswap:n=4 > ..zswap:n=3 > ................................................................................ > ................................................................................ > ................................................................................ > ................................................................................ > ................................................................................ > ................................................................................ > ...........................................................caxpy:n=4 > ..caxpy:n=3 > ....ccopy:n=4 > ..ccopy:n=3 > .............cscal:n=4 > ....cswap:n=4 > ..cswap:n=3 > .....daxpy:n=4 > ..daxpy:n=3 > ....dcopy:n=4 > ..dcopy:n=3 > .............dscal:n=4 > ....dswap:n=4 > ..dswap:n=3 > .....saxpy:n=4 > ..saxpy:n=3 > ....scopy:n=4 > ..scopy:n=3 > .............sscal:n=4 > ....sswap:n=4 > ..sswap:n=3 > .....zaxpy:n=4 > ..zaxpy:n=3 > ....zcopy:n=4 > ..zcopy:n=3 > .............zscal:n=4 > ....zswap:n=4 > ..zswap:n=3 > ...Result may be inaccurate, approximate err = 5.69043366261e-009 > ...Result may be inaccurate, approximate err = 1.39218513881e-010 > ................................................................................ > ..Resizing... 16 17 24 > Resizing... 20 7 35 > Resizing... 23 7 47 > Resizing... 24 25 58 > Resizing... 28 7 68 > Resizing... 28 27 73 > .....Use minimum degree ordering on A'+A. > ........................Use minimum degree ordering on A'+A. > ...................Resizing... 16 17 24 > Resizing... 20 7 35 > Resizing... 23 7 47 > Resizing... 24 25 58 > Resizing... 28 7 68 > Resizing... 28 27 73 > .....Use minimum degree ordering on A'+A. > .................Resizing... 16 17 24 > Resizing... 20 7 35 > Resizing... 23 7 47 > Resizing... 24 25 58 > Resizing... 28 7 68 > Resizing... 28 27 73 > .....Use minimum degree ordering on A'+A. > ................ > ---------------------------------------------------------------------- > Ran 967 tests in 2.422s > > OK > > >>> > > On 11/30/06, Robert Cimrman wrote: > > Ryan Krauss wrote: > > > I am trying to build scipy/numpy from source on Windows XP. I do not > > > have umfpack installed. When I build scipy I get this warning: > > > > > > C:\Python24\lib\site-packages\numpy\distutils\system_info.py:401: UserWarning: > > > UMFPACK sparse solver (http://www.cise.ufl.edu/research/sparse/umfpack/) > > > not found. Directories to search for the libraries can be specified in the > > > numpy/distutils/site.cfg file (section [umfpack]) or by setting > > > the UMFPACK environment variable. > > > warnings.warn(self.notfounderror.__doc__) > > > > > > numpy.test() runs without problems. The output of scipy.test() is > > > slightly scary: > > > > > > scipy.test() > > > RuntimeError: module compiled against version 1000002 of C-API but > > > this version of numpy is 1000009 > > > RuntimeError: module compiled against version 1000002 of C-API but > > > this version of numpy is 1000009 > > > RuntimeError: module compiled against version 1000002 of C-API but > > > this version of numpy is 1000009 > > > RuntimeError: module compiled against version 1000002 of C-API but > > > this version of numpy is 1000009 > > > RuntimeError: module compiled against version 1000002 of C-API but > > > this version of numpy is 1000009 > > > RuntimeError: module compiled against version 1000002 of C-API but > > > this version of numpy is 1000009 > > > RuntimeError: module compiled against version 1000002 of C-API but > > > this version of numpy is 1000009 > > > RuntimeError: module compiled against version 1000002 of C-API but > > > this version of numpy is 1000009 > > > RuntimeError: module compiled against version 1000002 of C-API but > > > this version of numpy is 1000009 > > > RuntimeError: module compiled against version 1000002 of C-API but > > > this version of numpy is 1000009 > > > RuntimeError: module compiled against version 1000002 of C-API but > > > this version of numpy is 1000009 > > > RuntimeError: module compiled against version 1000002 of C-API but > > > this version of numpy is 1000009 > > > RuntimeError: module compiled against version 1000002 of C-API but > > > this version of numpy is 1000009 > > > RuntimeError: module compiled against version 1000002 of C-API but > > > this version of numpy is 1000009 > > > Found 397 tests for scipy.ndimage > > > RuntimeError: module compiled against version 1000002 of C-API but > > > this version of numpy is 1000009 > > > Warning: FAILURE importing tests for > > from '...ckages\\scipy\\sparse\\sparse.pyc'> > > > C:\Python24\Lib\site-packages\scipy\linsolve\_superlu.py:2: > > > ImportError: numpy.core.multiarray failed to import (in ?) > > > Warning: FAILURE importing tests for > > from '...es\\scipy\\optimize\\optimize.pyc'> > > > C:\Python24\Lib\site-packages\scipy\optimize\minpack.py:6: > > > AttributeError: 'module' object has no attribute 'error' (in ?) > > > RuntimeError: module compiled against version 1000002 of C-API but > > > this version of numpy is 1000009 > > > Warning: FAILURE importing tests for > > 'scipy.linsolve.umfpack.umfpack' from > > > '...y\\linsolve\\umfpack\\umfpack.pyc'> > > > C:\Python24\Lib\site-packages\scipy\linsolve\_superlu.py:3: > > > ImportError: numpy.core.multiarray failed to import (in ?) > > > RuntimeError: module compiled against version 1000002 of C-API but > > > this version of numpy is 1000009 > > > Warning: FAILURE importing tests for > > from '...\\linsolve\\umfpack\\__init__.pyc'> > > > C:\Python24\Lib\site-packages\scipy\linsolve\_superlu.py:4: > > > ImportError: numpy.core.multiarray failed to import (in ?) > > > Found 95 tests for scipy.sparse > > > Found 0 tests for __main__ > > > .............................................................................................................................................................................................................................................................................................................................................................................................................EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE...E.EE.......EEE..EE.EE.E.EEEEEEEE.EEE.E.E.E > > > ====================================================================== > > > ERROR: check_eye (scipy.tests.test_sparse.test_construct_utils) > > > ---------------------------------------------------------------------- > > > Traceback (most recent call last): > > > File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py", > > > line 626, in check_eye > > > a = speye(2, 3 ) > > > File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line > > > 2833, in speye > > > return spdiags(diags, k, n, m) > > > File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line > > > 2811, in spdiags > > > diagfunc = eval('sparsetools.'+_transtabl[mtype]+'diatocsc') > > > File "", line 0, in ? > > > AttributeError: 'module' object has no attribute 'ddiatocsc' > > > > > > .... > > > > > > What have I done wrong? I did not try to build Atlas/Blas/Lapack from > > > source but just down loaded the precomipled versions into > > > C:\BlasLapackLibs. My scipy and numpy svn folders are not on my PATH > > > or my PYTHONPATH. I had some trouble getting numpy's setup.py to find > > > the atlas, lapack, blas libs until I set an ATLAS environment > > > variable. > > > > Ryan, > > > > it seems you try to run scipy with different version of numpy than it > > was compiled with. did you try removing existing installation and > > rebuilding all sources? > > > > Anyway missing umfpack would not cause all those errors. > > > > > Oh, and the example site.cfg mentions libamd.a as well as umfpack. Do > > > I need the amd lib? I am running an amd processor under windows > > > (Athlon X2). > > > > libamd.a has nothing to do with the amd processors - it it a library (a > > part of umfpack-related package) for ordering a sparse matrix prior to > > Cholesky factorization (http://www.cise.ufl.edu/research/sparse/amd/) > > and you do not need it if you do not use umfpack. > > > > r. > > _______________________________________________ > > SciPy-user mailing list > > SciPy-user at scipy.org > > http://projects.scipy.org/mailman/listinfo/scipy-user > > > From robert.kern at gmail.com Thu Nov 30 14:13:57 2006 From: robert.kern at gmail.com (Robert Kern) Date: Thu, 30 Nov 2006 13:13:57 -0600 Subject: [SciPy-user] umfpack and building scipy from source In-Reply-To: References: <456EAB45.3070500@ntc.zcu.cz> Message-ID: <456F2D75.6070609@gmail.com> Ryan Krauss wrote: > I may have had the misfortune of checking out of svn last night while > numpy and scipy were out of sync. I re-did my svn checkout just now > and numpy didn't change, but scipy went from version 2339 to 2342. I > now get fewer errors. I also did a python setup.py clean for each > before rebuilding and deleted site-packages/numpy and /scipy before > rebuilding. Actually, this is probably the problem. Don't rely on "python setup.py clean" to do the right thing. distutils sometimes misses things. Just delete build/ entirely. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From ryanlists at gmail.com Thu Nov 30 14:36:53 2006 From: ryanlists at gmail.com (Ryan Krauss) Date: Thu, 30 Nov 2006 13:36:53 -0600 Subject: [SciPy-user] umfpack and building scipy from source In-Reply-To: <456F2D75.6070609@gmail.com> References: <456EAB45.3070500@ntc.zcu.cz> <456F2D75.6070609@gmail.com> Message-ID: Following Robert Kern's advice I am getting very close. The API error is now gone. There is my current scipy.test() output. In [4]: scipy.test() Warning: FAILURE importing tests for C:\Python24\Lib\site-packages\scipy\linsolve\umfpack\tests\test_umfpack.py:17: A ttributeError: 'module' object has no attribute 'umfpack' (in ?) Found 4 tests for scipy.io.array_import Found 2 tests for scipy.maxentropy.maxentropy Found 1 tests for scipy.cluster.vq Found 397 tests for scipy.ndimage Found 98 tests for scipy.stats.stats Found 53 tests for scipy.linalg.decomp Found 3 tests for scipy.integrate.quadrature Found 95 tests for scipy.sparse.sparse Found 20 tests for scipy.fftpack.pseudo_diffs Found 6 tests for scipy.optimize.optimize Found 4 tests for scipy.signal.signaltools Found 128 tests for scipy.linalg.fblas Found 6 tests for scipy.interpolate.fitpack Found 6 tests for scipy.interpolate Found 10 tests for scipy.stats.morestats Found 4 tests for scipy.linalg.lapack Found 18 tests for scipy.fftpack.basic Found 4 tests for scipy.io.recaster Warning: FAILURE importing tests for C:\Python24\Lib\site-packages\scipy\linsolve\umfpack\tests\test_umfpack.py:17: A ttributeError: 'module' object has no attribute 'umfpack' (in ?) Found 4 tests for scipy.optimize.zeros Found 28 tests for scipy.io.mio Found 4 tests for scipy.fftpack.helper Found 41 tests for scipy.linalg.basic Found 358 tests for scipy.special.basic Found 10 tests for scipy.integrate.quadpack Found 7 tests for scipy.linalg.matfuncs Found 1 tests for scipy.integrate Found 42 tests for scipy.lib.lapack Found 12 tests for scipy.io.mmio Found 1 tests for scipy.optimize.cobyla Found 128 tests for scipy.lib.blas.fblas Found 16 tests for scipy.lib.blas Found 14 tests for scipy.linalg.blas Found 70 tests for scipy.stats.distributions Found 0 tests for __main__ Don't worry about a warning regarding the number of bytes read. Warning: 1000000 bytes requested, 20 bytes read. ................................................................................ ................................................................................ ................................................................................ ................................................................................ ................................................................................ ................................................................................ ...........................................................................Took 13 points. ...........Resizing... 16 17 24 Resizing... 20 7 35 Resizing... 23 7 47 Resizing... 24 25 58 Resizing... 28 7 68 Resizing... 28 27 73 .....Use minimum degree ordering on A'+A. ........................Use minimum degree ordering on A'+A. ...................Resizing... 16 17 24 Resizing... 20 7 35 Resizing... 23 7 47 Resizing... 24 25 58 Resizing... 28 7 68 Resizing... 28 27 73 .....Use minimum degree ordering on A'+A. .................Resizing... 16 17 24 Resizing... 20 7 35 Resizing... 23 7 47 Resizing... 24 25 58 Resizing... 28 7 68 Resizing... 28 27 73 .....Use minimum degree ordering on A'+A. .............................................caxpy:n=4 ..caxpy:n=3 ....ccopy:n=4 ..ccopy:n=3 .............cscal:n=4 ....cswap:n=4 ..cswap:n=3 .....daxpy:n=4 ..daxpy:n=3 ....dcopy:n=4 ..dcopy:n=3 .............dscal:n=4 ....dswap:n=4 ..dswap:n=3 .....saxpy:n=4 ..saxpy:n=3 ....scopy:n=4 ..scopy:n=3 .............sscal:n=4 ....sswap:n=4 ..sswap:n=3 .....zaxpy:n=4 ..zaxpy:n=3 ....zcopy:n=4 ..zcopy:n=3 .............zscal:n=4 ....zswap:n=4 ..zswap:n=3 ..c:\python24\lib\site-packages\scipy\interpolate\fitpack2.py:457: 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) ..............Ties preclude use of exact statistic. ..Ties preclude use of exact statistic. ...............................E................................................ ................................................................................ ................................................................................ ................................................................................ ................................................................................ ..............................................................................Re sult may be inaccurate, approximate err = 3.64830903151e-009 ...Result may be inaccurate, approximate err = 1.39218513881e-010 ...Residual: 1.05006950608e-007 ...........................................................caxpy:n=4 ..caxpy:n=3 ....ccopy:n=4 ..ccopy:n=3 .............cscal:n=4 ....cswap:n=4 ..cswap:n=3 .....daxpy:n=4 ..daxpy:n=3 ....dcopy:n=4 ..dcopy:n=3 .............dscal:n=4 ....dswap:n=4 ..dswap:n=3 .....saxpy:n=4 ..saxpy:n=3 ....scopy:n=4 ..scopy:n=3 .............sscal:n=4 ....sswap:n=4 ..sswap:n=3 .....zaxpy:n=4 ..zaxpy:n=3 ....zcopy:n=4 ..zcopy:n=3 .............zscal:n=4 ....zswap:n=4 ..zswap:n=3 ................................................................................ ...................... ====================================================================== ERROR: test_smallest_same_kind (scipy.io.tests.test_recaster.test_recaster) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python24\Lib\site-packages\scipy\io\tests\test_recaster.py", line 61, in test_smallest_same_kind assert C.dtype.type == req_type, \ AttributeError: 'NoneType' object has no attribute 'dtype' ---------------------------------------------------------------------- Ran 1595 tests in 3.344s FAILED (errors=1) Out[4]: What else should I try? Ryan On 11/30/06, Robert Kern wrote: > Ryan Krauss wrote: > > I may have had the misfortune of checking out of svn last night while > > numpy and scipy were out of sync. I re-did my svn checkout just now > > and numpy didn't change, but scipy went from version 2339 to 2342. I > > now get fewer errors. I also did a python setup.py clean for each > > before rebuilding and deleted site-packages/numpy and /scipy before > > rebuilding. > > Actually, this is probably the problem. Don't rely on "python setup.py clean" to > do the right thing. distutils sometimes misses things. Just delete build/ entirely. > > -- > Robert Kern > > "I have come to believe that the whole world is an enigma, a harmless enigma > that is made terrible by our own mad attempt to interpret it as though it had > an underlying truth." > -- Umberto Eco > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > From ryanlists at gmail.com Thu Nov 30 14:37:46 2006 From: ryanlists at gmail.com (Ryan Krauss) Date: Thu, 30 Nov 2006 13:37:46 -0600 Subject: [SciPy-user] umfpack and building scipy from source In-Reply-To: <456F2D27.5060007@gmail.com> References: <456EAB45.3070500@ntc.zcu.cz> <456F2D27.5060007@gmail.com> Message-ID: FYI: In [7]: numpy.__file__ Out[7]: 'c:\\python24\\lib\\site-packages\\numpy\\__init__.pyc' In [8]: scipy.__file__ Out[8]: 'c:\\python24\\lib\\site-packages\\scipy\\__init__.pyc' which makes sense. On 11/30/06, Robert Kern wrote: > Ryan Krauss wrote: > > I may have had the misfortune of checking out of svn last night while > > numpy and scipy were out of sync. > > No, you didn't. The C API did not change from 1000002 to 1000009 in that time. > That happened a while ago. > > > I re-did my svn checkout just now > > and numpy didn't change, but scipy went from version 2339 to 2342. I > > now get fewer errors. I also did a python setup.py clean for each > > before rebuilding and deleted site-packages/numpy and /scipy before > > rebuilding. I am still getting an error from scipy.test that it is > > built against a different version of the API (see below). Is this > > detrimental? > > Yes. Try printing out numpy.__file__ and scipy.__file__ to make sure that you're > importing the packages you think you are. > > -- > Robert Kern > > "I have come to believe that the whole world is an enigma, a harmless enigma > that is made terrible by our own mad attempt to interpret it as though it had > an underlying truth." > -- Umberto Eco > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > From ryanlists at gmail.com Thu Nov 30 16:06:18 2006 From: ryanlists at gmail.com (Ryan Krauss) Date: Thu, 30 Nov 2006 15:06:18 -0600 Subject: [SciPy-user] problem with lsim In-Reply-To: References: Message-ID: I was hoping that updating my versions would fix this problem, but after wrestling with building from source under windows (and mostly getting it working), I still get: In [2]: run lsim_test.py --------------------------------------------------------------------------- exceptions.TypeError Traceback (most recent call last) e:\lsim_test.py 5 u=ones(shape(t)) 6 sys=signal.lti([1.0],[1.0,1.0]) ----> 7 out=signal.lsim(sys,u,t) 8 plot(out[0],out[1]) 9 C:\Python24\Lib\site-packages\scipy\signal\ltisys.py in lsim(system, U, T, X0, i nterp) 400 vt = transpose(v) 401 vti = linalg.inv(vt) --> 402 GT = dot(dot(vti,diag(numpy.exp(dt*lam))),vt).astype(xout.dtype) 403 ATm1 = linalg.inv(AT) 404 ATm2 = dot(ATm1,ATm1) C:\Python24\Lib\site-packages\numpy\lib\twodim_base.py in diag(v, k) 66 i = arange(0,n+k) 67 fi = i+(i-k)*n ---> 68 res.flat[fi] = v 69 return res 70 elif len(s)==2: TypeError: can't convert complex to float; use abs(z) WARNING: Failure executing file: where the script contains: from scipy import * from pylab import plot t=arange(0,10,0.01) u=ones(shape(t)) sys=signal.lti([1.0],[1.0,1.0]) out=signal.lsim(sys,u,t) plot(out[0],out[1]) Ryan On 11/28/06, Ryan Krauss wrote: > For what it's worth, this code runs fine on a Ubuntu machine running > numpy rc1 and a Windows machine running numpy 1.0b5. The machine that > has the problem is running Windows and numpy rc2. All are running > scipy 0.5.1. > > Ryan > > On 11/27/06, Ryan Krauss wrote: > > I am having a problem with signal.lsim. Here is a script that > > recreates my problem: > > > > from scipy import * > > from pylab import plot > > > > t=arange(0,10,0.01) > > u=ones(shape(t)) > > sys=signal.lti([1.0],[1.0,1.0]) > > out=signal.lsim(sys,u,t) > > plot(out[0],out[1]) > > > > Here is the error message: > > I:\lsim_test.py > > 5 u=ones(shape(t)) > > 6 sys=signal.lti([1.0],[1.0,1.0]) > > ----> 7 out=signal.lsim(sys,u,t) > > 8 plot(out[0],out[1]) > > 9 > > > > c:\python24\lib\site-packages\scipy\signal\ltisys.py in lsim(system, U, T, X0, i > > nterp) > > 403 vt = transpose(v) > > 404 vti = linalg.inv(vt) > > --> 405 GT = dot(dot(vti,diag(numpy.exp(dt*lam))),vt).astype(xout.dtype.char > > ) > > 406 ATm1 = linalg.inv(AT) > > 407 ATm2 = dot(ATm1,ATm1) > > > > C:\Python24\Lib\site-packages\numpy\lib\twodim_base.py in diag(v, k) > > 66 i = arange(0,n+k) > > 67 fi = i+(i-k)*n > > ---> 68 res.flat[fi] = v > > 69 return res > > 70 elif len(s)==2: > > > > TypeError: can't convert complex to float; use abs(z) > > WARNING: Failure executing file: > > > > My script is also attached if someone wants to run it. > > > > How do I fix this? > > > > Thanks, > > > > Ryan > > > > > > > From davidlinke at tiscali.de Thu Nov 30 16:34:53 2006 From: davidlinke at tiscali.de (David Linke) Date: Thu, 30 Nov 2006 22:34:53 +0100 Subject: [SciPy-user] umfpack and building scipy from source In-Reply-To: References: <456EAB45.3070500@ntc.zcu.cz> <456F2D75.6070609@gmail.com> Message-ID: <456F4E7D.4020207@tiscali.de> Ryan Krauss wrote: > Following Robert Kern's advice I am getting very close. The API error > is now gone. > > There is my current scipy.test() output. > (...) > ====================================================================== > ERROR: test_smallest_same_kind (scipy.io.tests.test_recaster.test_recaster) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "C:\Python24\Lib\site-packages\scipy\io\tests\test_recaster.py", line 61, > in test_smallest_same_kind > assert C.dtype.type == req_type, \ > AttributeError: 'NoneType' object has no attribute 'dtype' > > ---------------------------------------------------------------------- > Ran 1595 tests in 3.344s > > FAILED (errors=1) > Out[4]: > > What else should I try? FYI: I get the same error (on windows). I looked into the svn-log and saw that recaster.py / test_recaster.py have been changed yesterday. Obviously they are still buggy. David