From Norbert.Klamann at klamann-software.de Thu May 1 11:32:39 2003 From: Norbert.Klamann at klamann-software.de (Norbert Klamann) Date: Thu, 01 May 2003 17:32:39 +0200 Subject: [SciPy-user] Q:ReadOnly Trait combined with other Trait Message-ID: <3EB15A37.20885.22C26B@localhost> Hello, all, at first I like to say that I like scipy and especially the traits concept very much. I think it is very elaborate and useful. At the moment I try to achieve that instances of certain classes can have traits which make an attribute 'write-once' _and_ assure that the value belongs to a certain class and I wonder how to do that. Example : I want to create Values with units and I want to make sure that certain classes of Values can only have Units of certain classes. Each value with unit can have its unit set once (for the time being). At the moment I have the following : import traits from fixedpoint import FixedPoint as fp def _1timeonlyFixedPoint( object, name, value ): if name in object.__dict__ : raise AssertionError return fp(value,12) class ValueUnit(traits.HasTraits) : __traits__ = { 'unit' : Unit, 'value' : traits.Trait(fp(0),_1timeonlyFixedPoint) } def __init__(self, unit = Unit(), value = 0): self.unit = unit self.value = fp(value) #some units exist, Currency is a subclass of Unit EUR = Currency(name = 'Euro') USD = Currency(name = 'US Dollar') # several kinds of ValueUnit exist, for example : class MoneyValue(ValueUnit): __traits__ = { 'unit' : Currency()} def __init__(self, unit = EUR, value = 0): ValueUnit.__init__(self,unit,value) Now the point : Because I am not able and willing to convert the value when I change the unit (Currency), I want to make 'unit' a write-once attribute. I know this can be done with the ReadOnly trait, but I don't know how to combine this with the already defined trait 'unit' . TraitComplex would result in ORing the both traits, I want them ANDed. I could work around the problem if I create subclasses like EURMoneyValue or USDMoneyValue, but I don't like this proliferation of classes. I hope that I made my point clear and thank you for listening ! mit freundlichen Gr??en / with kind regards Norbert Klamann Norbert.Klamann at klamann-software.de -- Klamann Software & Beratung GmbH Franz-Marc-Str.174 D-50374 Erftstadt From Josephmobut66 at latinmail.com Thu May 1 22:33:09 2003 From: Josephmobut66 at latinmail.com (Joseph Mobutu Sese-Seko) Date: Fri, 02 May 2003 04:33:09 +0200 Subject: [SciPy-user] CONFIDENTIAL Message-ID: <20030502033001.ECC833EB0D@www.scipy.com> Dear Sir/Madam, You may be surprise to receive this email since you do not know me. I am the son of the late president of Democratic Republic Of Zaire, President Mobutu Sese Seko, ( now The Republic Of Congo, under the leadership of the son of Mr. Laurent Kabila). I presume you are aware there is a financial dispute between my family ( THEMOBUTU ) and the present civilian Government. This is based on what they believe as bad and corrupt governance on my late father's part. May his soul rest in perfect peace. As you might have heard how a lot of my father's bank account in Switzerland and North America have been frozen. Following the above named reasons, I am soliciting for your humble and confidential assistance to take custody of THIRTY Million United States Dollars ( US$30,000,000.00 ), also to front for me in the areas of business you desire profitable. These funds have secretly been deposited into a confidential Security Company, where it can easily be withdrawn or paid to a recommended beneficiary. The funds will be released to you by the Security Company, based on my recommendations, on that note, you will be presented as my partner who will be fronting for me and my family in any subsequent ventures. Myself and my mother have decided to give 20% to you if you are able to help us claim this consignment. We have also decided to give you any money spent on phone calls or traveling expenses in the course of this transaction at the end of the transaction. Please, I need your entire support and co-operation for the success of this transaction, your utmost confidentiality and secrecy is highly required, due to my family's present predicament. I sincerely will appreciate your willingness to assist us as soon as possible. I am presently in the refugee camp here in the Netherlands under the united nations refugee camp in Netherlands and I can be reached on phone number +31.645.238.205 or E-mail me at josephmobutu48 at latinmail.com for more information on how we can proceed in this transaction. Please indicate your interest by sending your telephone and fax numbers or call me up at anytime. I sincerely will appreciate your acknowledgement as soon as possible. Warmest regards, Joseph Mobutu Sese-Seko From Jmobutu67 at rediffmail.com Fri May 2 16:15:36 2003 From: Jmobutu67 at rediffmail.com (Joseph Mobutu Sese-Seko) Date: Fri, 02 May 2003 22:15:36 +0200 Subject: [SciPy-user] CONFIDENTIAL Message-ID: <20030502211240.4D2353EB09@www.scipy.com> Dear Sir/Madam, You may be surprise to receive this email since you do not know me. I am the son of the late president of Democratic Republic Of Zaire, President Mobutu Sese Seko, ( now The Republic Of Congo, under the leadership of the son of Mr. Laurent Kabila). I presume you are aware there is a financial dispute between my family ( THEMOBUTU ) and the present civilian Government. This is based on what they believe as bad and corrupt governance on my late father's part. May his soul rest in perfect peace. As you might have heard how a lot of my father's bank account in Switzerland and North America have been frozen. Following the above named reasons, I am soliciting for your humble and confidential assistance to take custody of THIRTY Million United States Dollars ( US$30,000,000.00 ), also to front for me in the areas of business you desire profitable. These funds have secretly been deposited into a confidential Security Company, where it can easily be withdrawn or paid to a recommended beneficiary. The funds will be released to you by the Security Company, based on my recommendations, on that note, you will be presented as my partner who will be fronting for me and my family in any subsequent ventures. Myself and my mother have decided to give 20% to you if you are able to help us claim this consignment. We have also decided to give you any money spent on phone calls or traveling expenses in the course of this transaction at the end of the transaction. Please, I need your entire support and co-operation for the success of this transaction, your utmost confidentiality and secrecy is highly required, due to my family's present predicament. I sincerely will appreciate your willingness to assist us as soon as possible. I am presently in the refugee camp here in the Netherlands under the united nations refugee camp in Netherlands and I can be reached on phone number +31.645.238.205 or E-mail me at jmobutu12730 at rediffmail.com for more information on how we can proceed in this transaction. Please indicate your interest by sending your telephone and fax numbers or call me up at anytime. I sincerely will appreciate your acknowledgement as soon as possible. Warmest regards, Joseph Mobutu Sese-Seko From haase at msg.ucsf.edu Fri May 2 16:58:15 2003 From: haase at msg.ucsf.edu (Sebastian Haase) Date: Fri, 2 May 2003 13:58:15 -0700 Subject: [SciPy-user] using scipy.plt - wxPyDeadObjectError after closing window Message-ID: <00ff01c310ed$8d3f5f20$421ee6a9@rodan> Mark Bakker scipy-user at scipy.net Thu, 27 Feb 2003 10:39:23 -0500 wrote : >I am using scipy.plt from within PyShell and have 2 questions: >Why doesn't it work in IDLE? >After I close a window, I don't seem to be able to plot anything >anymore. Here is my error message when I try. Any thoughts? > > raise wxPyDeadObjectError( self.attrStr % self._name ) >wxPyDeadObjectError: The C++ part of the plot_frame object has been >deleted, attribute access no longer allowed. > >Thanks, >Mark Hi - I have the same problem - even though I am running plt from inside PyCrust (which is the wxWindows way of IDLE) (IDLE is tcl/tk (tkinter) which conflicts with wxPython - that's why scipy's plt doesn't like it) Am I (together with Mark) the only person who often (accidentally closes) the plot-window and then has to restart the whole session !? In other words: Is this an intrinsic wxPython problem or is that "just" a bug in scipy ? Regards - (and of course many thanks !! for scipy) Sebastian From Jmobutu300 at latinmail.com Sat May 3 09:54:12 2003 From: Jmobutu300 at latinmail.com (Joseph Mobutu Sese-Seko) Date: Sat, 03 May 2003 15:54:12 +0200 Subject: [SciPy-user] URGENT ASSISTANCE Message-ID: <20030503145134.173893EB09@www.scipy.com> Dear Sir/Madam, You may be surprise to receive this email since you do not know me. I am the son of the late president of Democratic Republic Of Zaire, President Mobutu Sese Seko, ( now The Republic Of Congo, under the leadership of the son of Mr. Laurent Kabila). I presume you are aware there is a financial dispute between my family ( THEMOBUTU ) and the present civilian Government. This is based on what they believe as bad and corrupt governance on my late father's part. May his soul rest in perfect peace. As you might have heard how a lot of my father's bank account in Switzerland and North America have been frozen. Following the above named reasons, I am soliciting for your humble and confidential assistance to take custody of THIRTY Million United States Dollars ( US$30,000,000.00 ), also to front for me in the areas of business you desire profitable. These funds have secretly been deposited into a confidential Security Company, where it can easily be withdrawn or paid to a recommended beneficiary. The funds will be released to you by the Security Company, based on my recommendations, on that note, you will be presented as my partner who will be fronting for me and my family in any subsequent ventures. Myself and my mother have decided to give 20% to you if you are able to help us claim this consignment. We have also decided to give you any money spent on phone calls or traveling expenses in the course of this transaction at the end of the transaction. Please, I need your entire support and co-operation for the success of this transaction, your utmost confidentiality and secrecy is highly required, due to my family's present predicament. I sincerely will appreciate your willingness to assist us as soon as possible. I am presently in the refugee camp here in the Netherlands under the united nations refugee camp in Netherlands and I can be reached on phone number +31.645.238.205 or E-mail me at josephmobutu48 at latinmail.com for more information on how we can proceed in this transaction. Please indicate your interest by sending your telephone and fax numbers or call me up at anytime. I sincerely will appreciate your acknowledgement as soon as possible. Warmest regards, Joseph Mobutu Sese-Seko From agn at soc.soton.ac.uk Sun May 4 07:16:15 2003 From: agn at soc.soton.ac.uk (agn at soc.soton.ac.uk) Date: Sun, 4 May 2003 12:16:15 +0100 Subject: [SciPy-user] failing installation of sciPy on OSX Message-ID: <1052046975.3eb4f67fe6f95@webmail.soc.soton.ac.uk> I'm having problems in installing sciPy on OSX. Just installed MacPython 2.3b2 (using Jack Jansen's binary installer) & NumPy 23 (manually) over Andrew Straw's 'kitchen sink' binary installer for MacPython 2.3a, pygames etc... Also, ATLAS, LAPACK, FFTW etc.. Used latest CVS source for scipy, following on from an email of Andrew's I saw somewhere. When I do python setup.py install I get: ### Big Endian detected #### Traceback (most recent call last): File "setup.py", line 111, in ? setup_package() File "setup.py", line 90, in setup_package config_list += map(get_separate_package_config,separate_packages) File "setup.py", line 74, in get_separate_package_config return get_package_config(name,'') File "setup.py", line 68, in get_package_config config = mod.configuration(parent) File "Lib_chaco/freetype/setup_freetype.py", line 21, in configuration mod = build_ft._ft_ext_module() File "/Users/agn/Desktop/scipy/Lib_chaco/freetype/src/build_ft.py", line 75, in _ft_ext_module [mod.customize.add_extra_link_arg(x) for x in extra_link_args] AttributeError: custom_info instance has no attribute 'add_extra_link_arg' An earlier CVS source didn't have this problem, and got to the stage of searching for ATLAS and FFTW etc... Regards. George Nurser From agn at soc.soton.ac.uk Sun May 4 07:12:34 2003 From: agn at soc.soton.ac.uk (George Nurser) Date: Sun, 4 May 2003 12:12:34 +0100 Subject: [SciPy-user] failing installation of sciPy on OSX Message-ID: <4E85ABDF-7E21-11D7-B310-0030656C917A@soc.soton.ac.uk> I'm having problems in installing sciPy on OSX. Just installed MacPython 2.3b2 (using Jack Jansen's binary installer) & NumPy 23 (manually) over Andrew Straw's 'kitchen sink' binary installer for MacPython 2.3a, pygames etc... Also, ATLAS, LAPACK, FFTW etc.. Used latest CVS source for scipy, following on from an email of Andrew's I saw somewhere. When I do python setup.py install I get: ### Big Endian detected #### Traceback (most recent call last): File "setup.py", line 111, in ? setup_package() File "setup.py", line 90, in setup_package config_list += map(get_separate_package_config,separate_packages) File "setup.py", line 74, in get_separate_package_config return get_package_config(name,'') File "setup.py", line 68, in get_package_config config = mod.configuration(parent) File "Lib_chaco/freetype/setup_freetype.py", line 21, in configuration mod = build_ft._ft_ext_module() File "/Users/agn/Desktop/scipy/Lib_chaco/freetype/src/build_ft.py", line 75, in _ft_ext_module [mod.customize.add_extra_link_arg(x) for x in extra_link_args] AttributeError: custom_info instance has no attribute 'add_extra_link_arg' An earlier CVS source didn't have this problem, and got to the stage of searching for ATLAS and FFTW etc... Regards. George Nurser From perry at stsci.edu Mon May 5 13:26:48 2003 From: perry at stsci.edu (Perry Greenfield) Date: Mon, 5 May 2003 13:26:48 -0400 Subject: [SciPy-user] [numarray issue] nonzero? Comments on new name solicited In-Reply-To: <018701c31324$7c7293e0$421ee6a9@rodan> Message-ID: [In the next week or so I am going to be raising some issues regarding the next numarray release, 0.6. By the way, we keep the version number less than 1.0 because we still hold out the possiblity of changing some interface issues (generally it has been in the direction of making numarray more compatible with Numeric). The following raises one of these interface issues. numarray has a more general approach to the nonzero function than does Numeric. It is able to return multiple index arrays for multidimensional arrays (where as nonzero only works for 1-d arrays). In the interest of giving a more generic interface for the function, numarray always returns the index array(s) as part of a tuple, even if the argument to nonzero is 1-D and there is only one resulting index array. However, this is a problem for Numeric old code that uses nonzero and expects an array instead of a tuple. The sensible thing to do is to retain compatibilty with the Numeric nonzero (and likewise only support 1-d arrays). So we need a new name for our new nonzero function. To tell you the truth, I always felt that nonzero was a terrible name anyway and much preferred the name that IDL used for that function, namely "where". Alas, "where" is already used for another purpose in Numeric. But to illustrate, which is clearer? x[nonzero(x > 0.)] = 0. or x[where(x > 0.)] = 0 So, we considered some other alternatives, in particular nz wheretrue but our favorite is: "at". For example: x[at(x > 0.)] = 0. This has the benefit of being short and having a fairly clear meaning. Short is important since it will keep expressions of arrays using index arrays short and more readable. True, this is more likely to conflict with existing user variable or function names, but if one is simply trying to use existing files, then there is no problem since they won't need the "at" function since its functionality was not previously available. Any objections to using "at"? Any better suggestions. Of course, these changes will break existing numarray code that use the nonzero function. Perry Greenfield From pearu at cens.ioc.ee Mon May 5 16:25:09 2003 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Mon, 5 May 2003 23:25:09 +0300 (EEST) Subject: [SciPy-user] [numarray issue] nonzero? Comments on new name solicited In-Reply-To: Message-ID: On Mon, 5 May 2003, Perry Greenfield wrote: > Any objections to using "at"? Any better suggestions. For me 'wheretrue' sounds most accurate but I agree, it's longish. Its short form 'where' is less accurate (because of its general meaning) but not too confusing. At first, 'at' confused me a little... until I figured out its long version 'trueat'. Hmm, I have always assumed that 'nonzero(x)' means elementwise 'not not x' (like Python __nonzero__ is equivalent to 'not not') and therefore never felt the need to use it. But now I see I was wrong! So, 'nonzero' sounded and still sounds misleading for me. For 'nz' I am -1 because 'nz' can often be a suitable variable name. In summary, I would like 'trueat' the most and 'nonzero' the least. 'where' and 'at' (in that order) are somewhere in between. Pearu From fperez at colorado.edu Mon May 5 19:03:33 2003 From: fperez at colorado.edu (Fernando Perez) Date: Mon, 05 May 2003 17:03:33 -0600 Subject: [SciPy-user] callbacks in weave Message-ID: <3EB6EDC5.9040302@colorado.edu> Hi all, I wonder if it's possible to call-back into python from weave-inlined code snippets. The included tutorial makes a passing mention of callable objects, but with no details. I tried the code below but failed to make much progress. Any help would be greatly appreciated. (For reference, I'm using a fairly recent CVS snapshot, from a week or two ago). Thanks in advance, Cheers, f. # Code snippet below: from weave import inline def foo(x,y): print "In Python's foo:" print 'x',x print 'y',y def cfoo(x,y): code = """ printf("Attemtping to call back foo() from C...\\n"); foo(x,y); printf("Done.\\n"); """ inline(code,"foo x y".split() ) x=99 y="Hello" print "Pure python..." foo(x,y) print "Via weave..." cfoo(x,y) From eric at enthought.com Tue May 6 01:12:10 2003 From: eric at enthought.com (Eric Jones) Date: Tue, 6 May 2003 00:12:10 -0500 (CDT) Subject: [SciPy-user] callbacks in weave Message-ID: <20030506051210.98DE41050@www.enthought.com> Close. You have to build an argument tuple, and the use the function object's call() method. The following should do the trick: from weave import inline def foo(x,y): print "In Python's foo:" print 'x',x print 'y',y def cfoo(x,y): code = """ printf("Attemtping to call back foo() from C...\\n"); py::tuple foo_args(2); foo_args[0] = x; foo_args[1] = y; foo.call(foo_args); printf("Done.\\n"); """ inline(code,"foo x y".split() ) eric Fernando Perez wrote .. > Hi all, > > I wonder if it's possible to call-back into python from weave-inlined code > snippets. The included tutorial makes a passing mention of callable objects, > but with no details. I tried the code below but failed to make much progress. > Any help would be greatly appreciated. (For reference, I'm using a fairly > recent CVS snapshot, from a week or two ago). > > Thanks in advance, > > Cheers, > > f. > > > # Code snippet below: > > from weave import inline > > def foo(x,y): > print "In Python's foo:" > print 'x',x > print 'y',y > > def cfoo(x,y): > code = """ > printf("Attemtping to call back foo() from C...\\n"); > foo(x,y); > printf("Done.\\n"); > """ > inline(code,"foo x y".split() ) > > x=99 > y="Hello" > > print "Pure python..." > foo(x,y) > print "Via weave..." > cfoo(x,y) > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From bryan.cole at teraview.co.uk Tue May 6 06:05:23 2003 From: bryan.cole at teraview.co.uk (bryan cole) Date: 06 May 2003 11:05:23 +0100 Subject: [SciPy-user] using scipy.plt - wxPyDeadObjectError after closing window In-Reply-To: <00ff01c310ed$8d3f5f20$421ee6a9@rodan> References: <00ff01c310ed$8d3f5f20$421ee6a9@rodan> Message-ID: <1052215523.12046.60.camel@bryan.teraviewhq.local> I can reproduce this problem: using pycrust, plt plot-windows are destroyed (at the C++ level) when you close the window. I normally use IPython + gui_thread as my interactive environment; with this combination, closing the plot-window leaves it hidden ready for re-use the next time plt.plot() is called. The Destroy-on-Close is wxPython's default behaviour but this can easily be overhidden. I've added a couple of lines to "scipy/plt/wxplt.py" (on linux) to intercept the Close-event and "hide" the window instead of destroying it. After this, things work as desired using pycrust ... but ... I'm worried that my quick hack is leaving a loads of un-destroyed windows lurking inside the interpreter. Having said that, I've been unable to find evidence for this. I don't know enough about the internals of plt and gui_thread to know if my hack is "safe" (in particular, I've not tested it on Win32). Maybe the scipy developers can comment. I've attach the modified wxplt.py file, for people to play with (just rename your old wxplt.py file and install this in it's place). Bryan On Fri, 2003-05-02 at 21:58, Sebastian Haase wrote: > Mark Bakker scipy-user at scipy.net > Thu, 27 Feb 2003 10:39:23 -0500 > > wrote : > >I am using scipy.plt from within PyShell and have 2 questions: > >Why doesn't it work in IDLE? > >After I close a window, I don't seem to be able to plot anything > >anymore. Here is my error message when I try. Any thoughts? > > > > > raise wxPyDeadObjectError( self.attrStr % self._name ) > >wxPyDeadObjectError: The C++ part of the plot_frame object has been > >deleted, attribute access no longer allowed. > > > >Thanks, > >Mark > > Hi - > I have the same problem - even though I am running plt from inside PyCrust > (which is the wxWindows way of IDLE) > (IDLE is tcl/tk (tkinter) which conflicts with wxPython - that's why scipy's > plt doesn't like it) > > Am I (together with Mark) the only person who often (accidentally closes) > the plot-window and then has to restart the whole session !? > In other words: Is this an intrinsic wxPython problem or is that "just" a > bug in scipy ? > > Regards - (and of course many thanks !! for scipy) > Sebastian > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user -- Bryan Cole Teraview Ltd., 302-304 Cambridge Science Park, Milton Road, Cambridge CB4 0WG, United Kingdom. tel: +44 (1223) 435380 / 435386 (direct-dial) fax: +44 (1223) 435382 -------------- next part -------------- A non-text attachment was scrubbed... Name: wxplt.py Type: text/x-python Size: 34909 bytes Desc: not available URL: From fperez at colorado.edu Tue May 6 11:03:53 2003 From: fperez at colorado.edu (Fernando Perez) Date: Tue, 06 May 2003 09:03:53 -0600 Subject: [SciPy-user] callbacks in weave In-Reply-To: <20030506051210.98DE41050@www.enthought.com> References: <20030506051210.98DE41050@www.enthought.com> Message-ID: <3EB7CED9.6060807@colorado.edu> Eric Jones wrote: > Close. You have to build an argument tuple, and the use the function > object's call() method. The following should do the trick: ... Thanks a lot, Eric. This was for 'real' research work, but I'll include the example in my upcoming talk about IPython/weave/mayavi at the Front Range Pythoneers meeting. Best, Fernando. From fperez at colorado.edu Tue May 6 11:46:24 2003 From: fperez at colorado.edu (Fernando Perez) Date: Tue, 06 May 2003 09:46:24 -0600 Subject: [SciPy-user] Weave callbacks with return values - an example Message-ID: <3EB7D8D0.60700@colorado.edu> This is just a followup on my previous message, not a question. After Eric's reply, I needed my callback functions to return a value, and it turned out to be very simple to modify the code for that. I don't know how many people use weave, but for the benefit of those who do (and for google's archive in case future users need this), here's the example code. Cheers, f. #!/usr/bin/env python from weave import inline def foo(x,y): print "In Python's foo:" print 'x',x print 'y',y return x def cfoo(x,y): code = """ printf("Attemtping to call back foo() from C...\\n"); py::tuple foo_args(2); py::object z; // This will hold the return value of foo() foo_args[0] = x; foo_args[1] = y; z = foo.call(foo_args); printf("Exiting C code.\\n"); return_val = z; """ return inline(code,"foo x y".split() ) x=99 y="Hello" print "Pure python..." z=foo(x,y) print "foo returned:",z print "\nVia weave..." z=cfoo(x,y) print "cfoo returned:",z From Kasper.Souren at ircam.fr Tue May 6 13:09:02 2003 From: Kasper.Souren at ircam.fr (Kasper Souren) Date: Tue, 6 May 2003 19:09:02 +0200 Subject: [SciPy-user] Weave callbacks with return values - an example In-Reply-To: <3EB7D8D0.60700@colorado.edu> References: <3EB7D8D0.60700@colorado.edu> Message-ID: <200305061909.02986.Kasper.Souren@ircam.fr> > I don't know how many people use weave, but for the benefit of those who do > (and for google's archive in case future users need this), here's the > example code. For this reason it would be nice to have a SciPyWiki. I have been using wxPython for a little while now, and I think in this little while I have been greatly helped by its Wiki. bye, Kasper From fperez at colorado.edu Tue May 6 13:50:11 2003 From: fperez at colorado.edu (Fernando Perez) Date: Tue, 06 May 2003 11:50:11 -0600 Subject: [SciPy-user] Another weave question Message-ID: <3EB7F5D3.70506@colorado.edu> Hi all, I have again most of my old weave test examples working again (my cookbook for using weave), except for the one below. It used Py::Float before and worked fine, but now I can't find the magic incantation after the recent changes in the weave codebase. I searched the supplied weave examples and didn't find anything that could help me, so here I am again. If anyone is using weave, I'll be happy to share my examples file which has a bunch of small cases useful for different scenarios. In two weeks I'll give a talk about IPython, weave and MayaVi at the FrontRange Pythoneers meeting, I'll share the slides from that here when they are ready. URL: http://www.fr.co.us.pythoneers.org thanks in advance, Fernando. #----------------------------------------------------------------------------- # Here we return a list from the C code. This is probably *much* slower than # the python version, it's meant as an illustration and not as production # code. def cross_productC(a,b): """Cross product of two 3-d vectors. """ # py::tuple or py::list work equally well in this case. code = \ """ py::list cross(3); cross[0] = py::float (a(1)*b(2)-a(2)*b(1)); cross[1] = py::float (a(2)*b(0)-a(0)*b(2)); cross[2] = py::float (a(0)*b(1)-a(1)*b(0)); return_val = cross; """ return array(weave.inline(code,['a','b'], type_converters = converters.blitz)) From dmorrill at enthought.com Tue May 6 14:50:58 2003 From: dmorrill at enthought.com (David C. Morrill) Date: Tue, 6 May 2003 13:50:58 -0500 Subject: [SciPy-user] Traits: Problem with my first example. References: <3EA140B9.2070706@netscape.net> Message-ID: <001d01c31400$6e6871c0$6501a8c0@Dave> Paddy: Sorry for not seeing this sooner, I mainly monitor the scipy-chaco mailing list. I tried you sample program, and it seems OK, but fails for me also. I suspect that somewhere along the line a bug or incompatibility was introduced in the traits code. I'll look into it. Also, the file the results are saved in is a standard Python pickle, not a text file. As it stands, the file is not intended to be edited by humans, although this could be changed... Dave Morrill ----- Original Message ----- From: "Donald 'Paddy' McCarthy" To: Sent: Saturday, April 19, 2003 7:27 AM Subject: [SciPy-user] Traits: Problem with my first example. > Hi, > I have just found out about traits and tried out the following example: > > ############ > from traits import * > > class Person ( HasTraits ): > __traits__ = { > 'name': '', > 'age': 9, > 'weight': 0.0 > } > > bill = Person() > > #bill.configure_traits( filename = None, edit = 1, traits = None ) > bill.configure_traits( filename = 'xx.save', edit = 1 ) > bill.edit_traits() > ############# > > > When run (Windows XP, wxwindows), the gui pops up as expected, but when > I save my changes the program exits with the following error: > > C:\Documents and Settings\Paddy\My Documents>python -V > Python 2.2.2 > > C:\Documents and Settings\Paddy\My Documents>python traitScript1.py > 09:22:58: Debug: c:\projects\wx\src\msw\app.cpp(439): 'UnregisterClass(canvas)' > failed with error 0x00000584 (class still has open windows.). > > Can you tell me what I am doing wrong? > > Also, the file of trait values generated is not editable text, is their > a reason for this? > > Thanks., Paddy. > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From eric at enthought.com Tue May 6 14:53:06 2003 From: eric at enthought.com (eric jones) Date: Tue, 6 May 2003 13:53:06 -0500 Subject: [SciPy-user] Another weave question In-Reply-To: <3EB7F5D3.70506@colorado.edu> Message-ID: <001101c31400$be01a440$8901a8c0@ERICDESKTOP> The following works. I also tried with the blitz converters, but got one of those confounding template tracbacks that it produces. Unfortunately, I don't have time to trace down that error right now. eric """Cross product of two 3-d vectors. """ from Numeric import * import weave # py::tuple or py::list work equally well in this case. def cross_product(a,b): code = \ """ py::list cross(3); cross[0] = a[1]*b[2]-a[2]*b[1]; cross[1] = a[2]*b[0]-a[0]*b[2]; cross[2] = a[0]*b[1]-a[1]*b[0]; return_val = cross; """ return array(weave.inline(code,['a','b'])) print cross_product(array((1.,2,3)),array((2.,3,4))) ---------------------------------------------- eric jones 515 Congress Ave www.enthought.com Suite 1614 512 536-1057 Austin, Tx 78701 > -----Original Message----- > From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net] On > Behalf Of Fernando Perez > Sent: Tuesday, May 06, 2003 11:50 AM > To: scipy-user at scipy.net > Subject: [SciPy-user] Another weave question > > Hi all, > > I have again most of my old weave test examples working again (my cookbook > for > using weave), except for the one below. It used Py::Float before and > worked > fine, but now I can't find the magic incantation after the recent changes > in > the weave codebase. I searched the supplied weave examples and didn't > find > anything that could help me, so here I am again. > > If anyone is using weave, I'll be happy to share my examples file which > has a > bunch of small cases useful for different scenarios. > > > In two weeks I'll give a talk about IPython, weave and MayaVi at the > FrontRange Pythoneers meeting, I'll share the slides from that here when > they > are ready. > > URL: http://www.fr.co.us.pythoneers.org > > > thanks in advance, > > Fernando. > > #----------------------------------------------------------------------- -- > ---- > # Here we return a list from the C code. This is probably *much* slower > than > # the python version, it's meant as an illustration and not as production > # code. > def cross_productC(a,b): > """Cross product of two 3-d vectors. > """ > # py::tuple or py::list work equally well in this case. > code = \ > """ > py::list cross(3); > > cross[0] = py::float (a(1)*b(2)-a(2)*b(1)); > cross[1] = py::float (a(2)*b(0)-a(0)*b(2)); > cross[2] = py::float (a(0)*b(1)-a(1)*b(0)); > return_val = cross; > """ > return array(weave.inline(code,['a','b'], > type_converters = converters.blitz)) > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From fperez at colorado.edu Tue May 6 15:03:35 2003 From: fperez at colorado.edu (Fernando Perez) Date: Tue, 06 May 2003 13:03:35 -0600 Subject: [SciPy-user] Another weave question In-Reply-To: <001101c31400$be01a440$8901a8c0@ERICDESKTOP> References: <001101c31400$be01a440$8901a8c0@ERICDESKTOP> Message-ID: <3EB80707.1000407@colorado.edu> eric jones wrote: > The following works. I also tried with the blitz converters, but got > one of those confounding template tracbacks that it produces. > Unfortunately, I don't have time to trace down that error right now. Well, funny that it works just fine for me. After removing the py::float stuff as per your suggestion, I end up with: def cross_productC(a,b): """Cross product of two 3-d vectors. """ # py::Tuple or py::List work equally well in this case. code = \ """ py::list cross(3); cross[0] = a(1)*b(2)-a(2)*b(1); cross[1] = a(2)*b(0)-a(0)*b(2); cross[2] = a(0)*b(1)-a(1)*b(0); return_val = cross; """ return array(inline(code,['a','b'], type_converters = converters.blitz)) This works perfectly for me. If it's a weave regression, I can see when I last updated CVS for you to see what happened. It turns out that, with all the changes you made recently to weave, it became a lot _easier_ to use than it used to be. A lot of the old py::THIS/THAT boilerplate which used to be necessary is gone, which is great news. It's just that my old code still had all that and I don't know enough about the details to know what must stay and what can go. Weave is amazing. It would be great if at some point in the future you guys can find the time to update the docs a bit, as I think documentation is its only weak spot. In the meantime (I know you're busy), I'm including here my examples file for others to use. It documents a bunch of usage cases in small snippets, making it easy to pick stuff from for real-life projects. Best regards, and thanks again, Fernando. -------------- next part -------------- A non-text attachment was scrubbed... Name: weave_examples.py Type: text/x-python Size: 11590 bytes Desc: not available URL: From joe at enthought.com Tue May 6 15:27:21 2003 From: joe at enthought.com (Joe Cooper) Date: Tue, 06 May 2003 14:27:21 -0500 Subject: [SciPy-user] Weave callbacks with return values - an example In-Reply-To: <200305061909.02986.Kasper.Souren@ircam.fr> References: <3EB7D8D0.60700@colorado.edu> <200305061909.02986.Kasper.Souren@ircam.fr> Message-ID: <3EB80C99.1040609@enthought.com> Kasper Souren wrote: >>I don't know how many people use weave, but for the benefit of those who do >>(and for google's archive in case future users need this), here's the >>example code. > > > For this reason it would be nice to have a SciPyWiki. > I have been using wxPython for a little while now, and I think in this little > while I have been greatly helped by its Wiki. I'll be installing a wiki for SciPy and iPython sometime this week. -- Joe Cooper From stan at stanheckman.com Tue May 6 20:06:51 2003 From: stan at stanheckman.com (Stan Heckman) Date: 06 May 2003 20:06:51 -0400 Subject: [SciPy-user] [numarray issue] nonzero? Comments on new name solicited In-Reply-To: References: Message-ID: <87n0hzy604.fsf@schedar.com> "Perry Greenfield" writes: > Any objections to using "at"? no, "at" reads reasonably well. > Any better suggestions. "suchthat"? -- Stan From baecker at physik.tu-dresden.de Wed May 7 02:55:22 2003 From: baecker at physik.tu-dresden.de (Arnd Baecker) Date: Wed, 7 May 2003 08:55:22 +0200 (CEST) Subject: [SciPy-user] odeint, rtol, atol Message-ID: Hi, there seems to be a mismatch between documentation and implementation in scipy.integrate.odeint. According to the doc "rtol and atol can be either vectors the same length as y or scalars." However, for me the scalar variant does not work such that both rtol and atol have be to vectors. Below is an example which shows this for the one-dimensional case. Arnd # ------------------------------------------------------------------------- from Numeric import * from scipy.integrate import odeint y0=1.0 def f(y,t): return exp(-0.01*y*t) atol=1e-6 rtol=1e-6 t=arange(0, 3.0, 0.1) #y=odeint(f, y0, t) # ok #y=odeint(f, y0, t,atol=atol*ones(1),rtol=rtol*ones(1)) # ok y=odeint(f, y0, t,atol=atol,rtol=rtol) # error (segfault) print y # ------------------------------------------------------------------------- From baecker at physik.tu-dresden.de Wed May 7 02:58:17 2003 From: baecker at physik.tu-dresden.de (Arnd Baecker) Date: Wed, 7 May 2003 08:58:17 +0200 (CEST) Subject: [SciPy-user] scipy.xplt questions Message-ID: Hi, I have the following questions concerning scipy.xplt 1.) scipy.xplt.mouse When using several windows, is there a way to find out in which of these a user did a mouse click ? (An example for this type of situation is at the end of this mail.) 2.) is there a way to position the windows on the screen ? (preferably independent of Linux/Windows, if that is possible at all) For example, for X Windows I failed to find anything related to Xresources definitions). Something like this would be useful when opening several windows and would like these to appear at predefined locations. Arnd ##################################################### from scipy.xplt import * window(0) plg(sin(arange(0.0,1.0,0.1))) window(1) plg(cos(arange(0.0,1.0,0.1))) m=mouse(-1,0,"right click ends") while(m[9]!=3): print m m=mouse(-1,0,"right click ends") From paddy3118 at netscape.net Wed May 7 03:33:18 2003 From: paddy3118 at netscape.net (Donald 'Paddy' McCarthy) Date: Wed, 07 May 2003 08:33:18 +0100 Subject: [SciPy-user] Traits: Problem with my first example. References: <3EA140B9.2070706@netscape.net> <001d01c31400$6e6871c0$6501a8c0@Dave> Message-ID: <3EB8B6BE.5020303@netscape.net> Thanks Dave. I only ask because I am looking into using traits as the main part of my GUI for an application that can be thought of as a large set of properties, irganised into hierarchical groups with interdependancies. The properties will be used to configure a chip, (what peripherals are allowed, configuraton for allowed peripherals etc). Part of the problem is that several engineers know how to configure their part of chip but may not want to use the GUI . It would just save me time I guessif you had a text format but I can adapt something like YAML or the config parser. Cheers, Paddy. dmorrill at enthought.com wrote: >Paddy: > >Sorry for not seeing this sooner, I mainly monitor the scipy-chaco mailing >list. > >I tried you sample program, and it seems OK, but fails for me also. I >suspect that somewhere along the line a bug or incompatibility was >introduced in the traits code. I'll look into it. > >Also, the file the results are saved in is a standard Python pickle, not a >text file. As it stands, the file is not intended to be edited by humans, >although this could be changed... > >Dave Morrill > >----- Original Message ----- >From: "Donald 'Paddy' McCarthy" >To: >Sent: Saturday, April 19, 2003 7:27 AM >Subject: [SciPy-user] Traits: Problem with my first example. > > > > >>Hi, >>I have just found out about traits and tried out the following example: >> >>############ >>from traits import * >> >>class Person ( HasTraits ): >> __traits__ = { >> 'name': '', >> 'age': 9, >> 'weight': 0.0 >> } >> >>bill = Person() >> >>#bill.configure_traits( filename = None, edit = 1, traits = None ) >>bill.configure_traits( filename = 'xx.save', edit = 1 ) >>bill.edit_traits() >>############# >> >> >>When run (Windows XP, wxwindows), the gui pops up as expected, but when >>I save my changes the program exits with the following error: >> >>C:\Documents and Settings\Paddy\My Documents>python -V >>Python 2.2.2 >> >>C:\Documents and Settings\Paddy\My Documents>python traitScript1.py >>09:22:58: Debug: c:\projects\wx\src\msw\app.cpp(439): >> >> >'UnregisterClass(canvas)' > > >>failed with error 0x00000584 (class still has open windows.). >> >>Can you tell me what I am doing wrong? >> >>Also, the file of trait values generated is not editable text, is their >>a reason for this? >> >>Thanks., Paddy. >> >> >>_______________________________________________ >>SciPy-user mailing list >>SciPy-user at scipy.net >>http://www.scipy.net/mailman/listinfo/scipy-user >> >> > >_______________________________________________ >SciPy-user mailing list >SciPy-user at scipy.net >http://www.scipy.net/mailman/listinfo/scipy-user > > -- Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop at Netscape! http://shopnow.netscape.com/ From alobo at ija.csic.es Wed May 7 03:52:52 2003 From: alobo at ija.csic.es (Agustin Lobo) Date: Wed, 7 May 2003 09:52:52 +0200 (MET DST) Subject: [SciPy-user] [numarray issue] nonzero? Comments on new name solicited In-Reply-To: <87n0hzy604.fsf@schedar.com> Message-ID: suchdat would make the programs much easier to read, very good idea. Agus Dr. Agustin Lobo Instituto de Ciencias de la Tierra (CSIC) Lluis Sole Sabaris s/n 08028 Barcelona SPAIN tel 34 93409 5410 fax 34 93411 0012 alobo at ija.csic.es On 6 May 2003, Stan Heckman wrote: > "Perry Greenfield" writes: > > > Any objections to using "at"? > > no, "at" reads reasonably well. > > > Any better suggestions. > > "suchthat"? > > -- > Stan > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From alobo at ija.csic.es Wed May 7 05:12:37 2003 From: alobo at ija.csic.es (Agustin Lobo) Date: Wed, 7 May 2003 11:12:37 +0200 (MET DST) Subject: [SciPy-user] [numarray issue] nonzero? Comments on new name solicited In-Reply-To: Message-ID: I meant "suchthat" (not "suchdat"), of course. The "spanglish" spelling would be confusing for others! Agus On Wed, 7 May 2003, Agustin Lobo wrote: > suchdat would make the programs much easier > to read, very good idea. > > Agus > > Dr. Agustin Lobo > Instituto de Ciencias de la Tierra (CSIC) > Lluis Sole Sabaris s/n > 08028 Barcelona SPAIN > tel 34 93409 5410 > fax 34 93411 0012 > alobo at ija.csic.es > > > On 6 May 2003, Stan Heckman wrote: > > > "Perry Greenfield" writes: > > > > > Any objections to using "at"? > > > > no, "at" reads reasonably well. > > > > > Any better suggestions. > > > > "suchthat"? > > > > -- > > Stan > > _______________________________________________ > > SciPy-user mailing list > > SciPy-user at scipy.net > > http://www.scipy.net/mailman/listinfo/scipy-user > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From pearu at cens.ioc.ee Wed May 7 07:37:05 2003 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Wed, 7 May 2003 14:37:05 +0300 (EEST) Subject: [SciPy-user] odeint, rtol, atol In-Reply-To: Message-ID: On Wed, 7 May 2003, Arnd Baecker wrote: > Hi, > > there seems to be a mismatch between documentation > and implementation in scipy.integrate.odeint. > According to the doc > "rtol and atol can be either vectors the same length as y or > scalars." > However, for me the scalar variant does not work > such that both rtol and atol have be to vectors. This was a bug and is now fixed in scipy CVS. Docs are correct, btw. Thanks, Pearu From dmorrill at enthought.com Wed May 7 12:42:05 2003 From: dmorrill at enthought.com (David C. Morrill) Date: Wed, 7 May 2003 11:42:05 -0500 Subject: [SciPy-user] Traits: Problem with my first example. References: <3EA140B9.2070706@netscape.net> <001d01c31400$6e6871c0$6501a8c0@Dave> <3EB8B6BE.5020303@netscape.net> Message-ID: <003901c314b7$97980940$6501a8c0@Dave> Paddy: Sounds interesting. Managing interdependencies seems like it might be a challenge. You probably will not want to use the 'configure_traits' interface for managing an object hierarchy that complex. Its probably more suitable for simpler objects with a smaller set of traits. You will probably want to use the 'edit_traits' method, which gives you a lot more control and flexibility. In that case, interfacing the objects/traits with a text-based mechanism like YAML or config parser should be fairly straightforward I would think... Dave Morrill ----- Original Message ----- From: "Donald 'Paddy' McCarthy" To: Sent: Wednesday, May 07, 2003 2:33 AM Subject: Re: [SciPy-user] Traits: Problem with my first example. > Thanks Dave. > I only ask because I am looking into using traits as the main part of my > GUI for an application that can be thought of as a large set of > properties, irganised into hierarchical groups with interdependancies. > The properties will be used to configure a chip, (what peripherals are > allowed, configuraton for allowed peripherals etc). > > Part of the problem is that several engineers know how to configure > their part of chip but may not want to use the GUI . It would just save > me time I guessif you had a text format but I can adapt something like > YAML or the config parser. > > Cheers, Paddy. From perry at stsci.edu Wed May 7 16:19:34 2003 From: perry at stsci.edu (Perry Greenfield) Date: Wed, 7 May 2003 16:19:34 -0400 Subject: [SciPy-user] [numarray issue] nonzero? Comments on new name solicited In-Reply-To: <87n0hzy604.fsf@schedar.com> Message-ID: Some one suggested that numarray ditch compatibility in this area and "do what's right". Namely he suggested that nonzero --> where where --> select I have to agree that these are far better names than the existing ones. But compatibilty is important. So what to do? Here's one suggestion; I'm curious what people think about this solution. Nothing prevents us from having a module that people would import for Numeric compatibilty and a different one that has somewhat different behavior. Before people start throwing rocks (when you finish reading you can throw them ;-) and say "didn't you say that customized versions of Numeric or numarray were a bad idea?" Yes I did. But I think some customizations are bad and perhaps some are acceptable. What I objected to was having array objects with different behavior Since array objects may be passed between modules that assume different behaviors, that will cause all sorts of problems (e.g., module A was written assuming array slices are views but is passed an array that produces a copy when sliced). But is there any harm when all that is different are module functions? These are unlikely to be passed from one module to another and thus the customization is localized to the user modules. Suppose that the Numeric-compatible version defines "where" and "nonzero" to have their current meanings and numarray uses "select", and "where" respectively. There is one case that could arise that might cause problems. About the only time a problem would occur is if someone did from numarray import * from B import * And in B.py from Numericcompatible import * in which case the numarray "where" is replaced by the Numeric "where" I don't know if this is a strong enough reason to support two different flavors, but what do people think of taking this approach? Are there any other module functions that would benefit from such changes in name or behavior (For example, the axis order issue)? Perry Greenfield From perry at stsci.edu Wed May 7 16:35:36 2003 From: perry at stsci.edu (Perry Greenfield) Date: Wed, 7 May 2003 16:35:36 -0400 Subject: [SciPy-user] [numarray] packaging and names In-Reply-To: Message-ID: There was general consensus that numarray should be organized as a package. We are about to start doing so. It does raise some issues (and opportunities) however. 1) What should the package be called? numarray is a possiblity, but we have an opportunity to take a different approach. For example if we could name the package "array" (unfortunately, we can't) then the following becomes possible (these are just examples, we haven't settled on any naming scheme yet). from array.numeric import * # instead of "from numarray import *" import array.fft import array.records # currently recarray Since array is not avaible (there is already an array module in the Python Standard Library) what are the alternatives? Here are some: num numarray arr arrays ndarray I've polled people locally and arrays and ndarray were the most popular, but there doesn't seem to be a clear winner. I tend toward arr somewhat because of the brevity but do realize it isn't terribly descriptive. The drawback of "arrays" is that it may be visually confused with array. 2) What to call the package components? Locally the favorites were numarray --> numeric recarray --> records chararray--> strings (but since we plan to implement PyObject arrays there is a possibilty of real Python string arrays) ndarray --> generic (or base) 3) Where to place 3rd party array extension modules (by that I mean all those not distributed with numarray)? Should they go in the package directory? I'd prefer that they go into a separate directory from the things that are part of the standard numarray distribution (a site-packages equivalent in the package?) 4) We would likely also include in the package numarray.py, recarray.py, chararray.py, ndarray.py so that if the package was added to the path, the current imports would continue to work. This is intended as a short-term measure (i.e., they are deprecated and will disappear at version 1.0, or earlier). We may also keep these files at the current nummarray interface so that some of the software we currently distribute does not need to change immediately to match the changes we have been talking about. We realize that these are big changes, but if we move to a package structure, we ought to think about what makes the most sense (and if it is any comfort, we suffer the consequences of change more than anyone else). Better now than later. Screams? Perry From paddy3118 at netscape.net Wed May 7 17:16:22 2003 From: paddy3118 at netscape.net (Donald 'Paddy' McCarthy) Date: Wed, 07 May 2003 22:16:22 +0100 Subject: [SciPy-user] Traits: Problem with my first example. References: <3EA140B9.2070706@netscape.net> <001d01c31400$6e6871c0$6501a8c0@Dave> <3EB8B6BE.5020303@netscape.net> <003901c314b7$97980940$6501a8c0@Dave> Message-ID: <3EB977A6.5060805@netscape.net> Oh, I'm not going to do anything flash for the interdependancies. The hard way would be to check the code of functions that express the interdependancies between traits and generate a datastructure so that you know that when X changes then you need to recompute y and z. Then you have to handle loops i.e the value of X depends on which in turn depends on x. The easy way is to recalculate *all* traits when one changes and keep note of if any trait changed in the re-evaluation. If a trait changed then recalculate again, for some iteration limit. - This is what I intend doing. Thanks for your interest. Paddy. dmorrill at enthought.com wrote: >Paddy: > >Sounds interesting. Managing interdependencies seems like it might be a >challenge. > >You probably will not want to use the 'configure_traits' interface for >managing an object hierarchy that complex. Its probably more suitable for >simpler objects with a smaller set of traits. You will probably want to use >the 'edit_traits' method, which gives you a lot more control and >flexibility. > >In that case, interfacing the objects/traits with a text-based mechanism >like YAML or config parser should be fairly straightforward I would think... > >Dave Morrill > >----- Original Message ----- >From: "Donald 'Paddy' McCarthy" >To: >Sent: Wednesday, May 07, 2003 2:33 AM >Subject: Re: [SciPy-user] Traits: Problem with my first example. > > > > >>Thanks Dave. >>I only ask because I am looking into using traits as the main part of my >>GUI for an application that can be thought of as a large set of >>properties, irganised into hierarchical groups with interdependancies. >>The properties will be used to configure a chip, (what peripherals are >>allowed, configuraton for allowed peripherals etc). >> >>Part of the problem is that several engineers know how to configure >>their part of chip but may not want to use the GUI . It would just save >>me time I guessif you had a text format but I can adapt something like >>YAML or the config parser. >> >>Cheers, Paddy. >> >> > >_______________________________________________ >SciPy-user mailing list >SciPy-user at scipy.net >http://www.scipy.net/mailman/listinfo/scipy-user > > -- Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop at Netscape! http://shopnow.netscape.com/ From mpeti_ka06 at redffmail.com Wed May 7 18:40:50 2003 From: mpeti_ka06 at redffmail.com (MPETI L.KABILA (Jnr)) Date: Thu, 08 May 2003 00:40:50 +0200 Subject: [SciPy-user] BUSINESS PROPOSAL Message-ID: <20030507233946.26B123EB09@www.scipy.com> Your contact was availed to me by the chamber of Commerce. It was given to me because of my diplomatic Status as I did not disclose the actual reasons for Which I sought your contact. But I was Assured that you are reputable and trustworthy if you Will be of assistance. I am Laurent Mpeti Kabila (Jnr) the second son of Late President LAURENT DESIRE KABILA the immediate Past president of the DEMOCRATIC REPUBLIC OF CONGO in Africa who was murdered by his opposition through his Personal bodyguards in his bedroom on Tuesday 16th January, 2001. I have the privilege of being mandated by my father colleagues To seek your immediate and urgent co-operation to receive into Your bank account the sum of US $10,000,000(ten million Dollars) And some thousands carats of Diamond. Presently, I am with the Nederland?s government seeking for political asylum. This money and treasures was lodged in a vault with a Security firm in the Nederland?s. SOURCES OF DIAMONDS AND FUND In August 2000, my father as a defense minister and president Has a meeting with his cabinet and army chief about the defense budget For 2000 to 2001 which was US $700m. So he directed one of his best Friend. Frederic Kibasa Maliba who was a minister of mines and a political party leader known as the Union Sacree de, I opposition radicale et ses allies (USORAL) to buy arms With US $200m on 5th January 2001; for him to finalized the arm s Deal, my father was murdered. f.K. Maliba (FKM) and I have Decided to keep the money with a foreigner after which he will use it To contest For the political election. In spite of all this we have resolved to Present your or your company for the firm to pay it into your Nominated account the above sum and diamonds. This transaction Should be finalized within seven (7) working days and for your Co-operation and partnership, we have unanimously agreed that you Will be entitled to 5.5% of the Money when successfully receives it in your account. The nature of your Business is not relevant to the successful execution of this Transaction what we require is your total co-operation and Commitment to ensure 100% risk-free transaction at both ends and to Protect the persons Involved in this transaction, strict confidence and utmost Secrecy is required even after the successful conclusion of this Transaction. If this Proposal is acceptable to you; kindly provide me with your personal Telephone and fax through my E-mail box for immediate Commencement of the transaction. All correspondence is for the attention of my counsel: I count on your honor to keep my secret, SECRET. Looking forward for your urgent reply Thanks. Best Regards MPETI L. KABILA (Jnr) From ShunTim.Luk at polyu.edu.hk Thu May 8 06:49:31 2003 From: ShunTim.Luk at polyu.edu.hk (LUK ShunTim) Date: Thu, 08 May 2003 18:49:31 +0800 Subject: Libraries in non-standard locations - Was: [Re: [SciPy-user] odeint, rtol, atol] In-Reply-To: References: Message-ID: <3EBA363B.30904@polyu.edu.hk> Pearu Peterson wrote: > On Wed, 7 May 2003, Arnd Baecker wrote: > > >>Hi, >> [snipped] > > This was a bug and is now fixed in scipy CVS. Docs are correct, btw. > > Thanks, > Pearu > I tried to re-build the integrate module from cvs on a W2K/mingw32 system and it appears that some BLAS subroutines are needed. I want to put it in some temporary location. So this is the question. What is the best practice to ask (the distutils) setup.py to search for libraries/include files in non-stardard locations? Regards, ST -- From baecker at physik.tu-dresden.de Thu May 8 09:26:01 2003 From: baecker at physik.tu-dresden.de (Arnd Baecker) Date: Thu, 8 May 2003 15:26:01 +0200 (CEST) Subject: [SciPy-user] special.erf underflow Message-ID: Hi, is there a way to prevent the error message in the following example In [32]: import scipy In [33]: scipy.special.erf(300) erfc underflow error Out[33]: 1.0 ((On the one hand it is nice to be informed about that - on the other hand the result -1.0 is just the one I would expect. Eg. for exp one just gets In [34]: scipy.special.exp(-10000) Out[34]: 0.0 Acutally for exp this is better than Numeric's exp which gives a math range error in this case: In [35]: Numeric.exp(-1000) OverflowError: math range error )) Arnd From james at hello.com Fri May 9 01:53:49 2003 From: james at hello.com (james at hello.com) Date: Fri, 9 May 2003 13:53:49 +0800 Subject: [SciPy-user] Italian-crafted Rolex - only $65 - $140!! Free SHIPPING ! ! Message-ID: <20030509064925.1938B3EB09@www.scipy.com> An HTML attachment was scrubbed... URL: From jmiller at stsci.edu Fri May 9 09:04:14 2003 From: jmiller at stsci.edu (Todd Miller) Date: 09 May 2003 09:04:14 -0400 Subject: [SciPy-user] [numarray] packaging and names In-Reply-To: <20030509124512.09C4229C097@botucatu.terra.com.br> References: <20030509124512.09C4229C097@botucatu.terra.com.br> Message-ID: <1052485454.1668.4.camel@halloween.stsci.edu> On Mon, 2001-12-31 at 21:13, Rodrigo Senra wrote: > On Wed, 7 May 2003 16:35:36 -0400 > "Perry Greenfield" wrote > about [SciPy-user] [numarray] packaging and names: > -------------------------------------------- > | > | 1) What should the package be called? numarray is a possiblity, > | but we have an opportunity to take a different approach. For > | example if we could name the package "array" (unfortunately, > | we can't) then the following becomes possible (these are just > | examples, we haven't settled on any naming scheme yet). > | ... > | I've polled people locally and arrays and ndarray were the most > | popular, but there doesn't seem to be a clear winner. I tend toward > | arr somewhat because of the brevity but do realize it isn't > | terribly descriptive. The drawback of "arrays" is that it may be > | visually confused with array. > > Why not Array ? > That's actually kind of a cool idea for UNIX, but probably a little confusing for new users who find "array" in the standard library, and also ambiguous on operating systems which ignore case. (On windows, if you typed "import Array", would you get Array or array? What about Mac OS-X?) > regards > Senra > > -- > Rodrigo Senra (ICQ 114477550) > MSc Computer Engineer rodsenra at gpr.com.br > GPr Sistemas Ltda http://www.gpr.com.br > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user -- Todd Miller jmiller at stsci.edu STSCI / ESS / SSB From nwagner at mecha.uni-stuttgart.de Fri May 9 10:09:05 2003 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Fri, 09 May 2003 16:09:05 +0200 Subject: [SciPy-user] From NASTRAN to scipy Message-ID: <3EBBB681.F225F4AB@mecha.uni-stuttgart.de> Hi all, I am looking for a scipy routine for reading NASTRAN (ASCII/binary) files ? Any hint would be appreciated Nils Relevant links http://www.sdtools.com/faq/FE06001.html http://www.mscsoftware.com/products/products_detail.cfm?S=74&PI=7&M=0 From rodsenra at gpr.com.br Fri May 9 11:31:40 2003 From: rodsenra at gpr.com.br (Rodrigo Senra) Date: Fri, 9 May 2003 12:31:40 -0300 Subject: [SciPy-user] [numarray] packaging and names In-Reply-To: <1052485454.1668.4.camel@halloween.stsci.edu> References: <20030509124512.09C4229C097@botucatu.terra.com.br> <1052485454.1668.4.camel@halloween.stsci.edu> Message-ID: <20030509152628.0DE4621EFA0@araci.terra.com.br> On 09 May 2003 09:04:14 -0400 Todd Miller wrote about Re: [SciPy-user] [numarray] packaging and names: -------------------------------------------- | On Mon, 2001-12-31 at 21:13, Rodrigo Senra wrote: | > On Wed, 7 May 2003 16:35:36 -0400 | > "Perry Greenfield" wrote | > about [SciPy-user] [numarray] packaging and names: | > -------------------------------------------- | > | | > | 1) What should the package be called? numarray is a possiblity, | > | but we have an opportunity to take a different approach. For | > | example if we could name the package "array" (unfortunately, | > | we can't) then the following becomes possible (these are just | > | examples, we haven't settled on any naming scheme yet). | > | ... | > | I've polled people locally and arrays and ndarray were the most | > | popular, but there doesn't seem to be a clear winner. I tend toward | > | arr somewhat because of the brevity but do realize it isn't | > | terribly descriptive. The drawback of "arrays" is that it may be | > | visually confused with array. | > | > Why not Array ? | > | | That's actually kind of a cool idea for UNIX, but probably a little | confusing for new users who find "array" in the standard library, and | also ambiguous on operating systems which ignore case. (On windows, if | you typed "import Array", would you get Array or array? Todd, AFAIK, Python will distinguish "import Array" from "import array" even on Windows platform, as long as the modules are placed in different directories in the module search path. It might not work in versions prior to Win98 though (I do not have a Win95 to test it to). I'm in the darkness about MAC-OS. regards, Senra -- Rodrigo Senra (ICQ 114477550) MSc Computer Engineer rodsenra at gpr.com.br GPr Sistemas Ltda http://www.gpr.com.br From falted at openlc.org Sat May 10 07:38:25 2003 From: falted at openlc.org (Francesc Alted) Date: Sat, 10 May 2003 13:38:25 +0200 Subject: [SciPy-user] PyTables 0.5 released Message-ID: <200305101338.25291.falted@openlc.org> Announcing PyTables 0.5 ----------------------- This is the second public beta release. On this release you will find a 20% of I/O speed improvement over the previous one (0.4), some bugs has been fixed and support for a couple of compression (LZO and UCL) libraries has been added, and... a long awaited Windows version is finally available!. More in detail: What's new ----------- - As a consequence of some twiking the write/read performance has been improved by a 20% overall. One particular case were performance has largely increased (0.5 is up to 6 times faster than 0.4) is when column elements are unidimensional arrays. This impressive speed-up is mainly because of the recent improvements in numarray 0.5 performance (good work, folks!). With that, the reading speed is reaching its theoretical maximum (at least when using the current data access schema). - When reading a Table object, and the user wants to fetch column elements which are unidimensional arrays, a copy of the array from the I/O buffer is delivered automatically to him, so that there is no need to make a call to .copy() method of the numarray arrays anymore. It think this is more comfortable for the user. - The compression was enabled by default in version 0.4, despite of what was stated in the documentation. Now, this has been corrected and compression is *disabled* by default. - Support for two new compression libraries: LZO and UCL (http://www.oberhumer.com/opensource/). These libraries are made by Markus F.X.J. Oberhumer, and they stand for allowing *very* fast decompression. Now, if your data is compressible, you can obtain better reading speed than if not using compression at all!. The improvement is still more noticeable if your are dealing with extremely large (and compressible) data sets. Read the online documentation for more info about that: http://pytables.sourceforge.net/html-doc/usersguide-html3.html#subsection3.4.1 - A couple of memory leaks has been isolated and fixed (it was hard, but I finally did it!). - A bug with column ordering of tables that happens in some special situations has been fixed (thanks to Stan Heckman for reporting this and suggesting the patch). - File class has now an 'isopen' attribute in order to check if a file is open or not. - Updated documentation, specially for giving advice about the use of the new compression libraries. See "Compression issues" subsection, (also on the web: http://pytables.sourceforge.net/html-doc/usersguide-html.html) - Added more unit tests (up to 218 now!) - PyTables has been tested against newest numarray 0.5 and it works just fine. It even works well with Python 2.3b1. - And last, but not least, a Windows version is available!. Thanks to Alan McIntyre for its porting!. There is even a binary ready for click and install. What it is ---------- In short, PyTables provides a powerful and very Pythonic interface to process and organize your table and array data on disk. Its goal is to enable the end user to manipulate easily scientific data tables and Numerical and numarray Python objects in a persistent hierarchical structure. The foundation of the underlying hierarchical data organization is the excellent HDF5 library (http://hdf.ncsa.uiuc.edu/HDF5). A table is defined as a collection of records whose values are stored in fixed-length fields. All records have the same structure and all values in each field have the same data type. The terms "fixed-length" and strict "data types" seems to be quite a strange requirement for an interpreted language like Python, but they serve a useful function if the goal is to save very large quantities of data (such as is generated by many scientific applications, for example) in an efficient manner that reduces demand on CPU time and I/O resources. Quite a bit effort has been invested to make browsing the hierarchical data structure a pleasant experience. PyTables implements just two (orthogonal) easy-to-use methods for browsing. What is HDF5? ------------- For those people who know nothing about HDF5, it is is a general purpose library and file format for storing scientific data made at NCSA. HDF5 can store two primary objects: datasets and groups. A dataset is essentially a multidimensional array of data elements, and a group is a structure for organizing objects in an HDF5 file. Using these two basic constructs, one can create and store almost any kind of scientific data structure, such as images, arrays of vectors, and structured and unstructured grids. You can also mix and match them in HDF5 files according to your needs. Platforms --------- I'm using Linux as the main development platform, but PyTables should be easy to compile/install on other UNIX machines. This package has also passed all the tests on a UltraSparc platform with Solaris 7 and Solaris 8. It also compiles and passes all the tests on a SGI Origin2000 with MIPS R12000 processors and running IRIX 6.5. With Windows, PyTables has been tested with Windows 2000 Professional SP1 and Windows XP, but it should also work with other flavors. An example? ----------- For online code examples, have a look at http://pytables.sourceforge.net/tut/tutorial1-1.html and http://pytables.sourceforge.net/tut/tutorial1-2.html Web site -------- Go to the PyTables web site for more details: http://pytables.sourceforge.net/ Share your experience --------------------- Let me know of any bugs, suggestions, gripes, kudos, etc. you may have. Have fun! -- Francesc Alted From promoters at selvacouters.com.br Sat May 10 09:15:27 2003 From: promoters at selvacouters.com.br (Marcos) Date: Sat, 10 May 2003 09:15:27 -0400 Subject: [SciPy-user] Dinheiro? Mulheres? Message-ID: <200305100914265.SM01932@selvacouters.com.br> Quer conquistar qualquer MULHER ou HOMEM? ou ta afim de faturar uma Grana? Acesse: http://www.cadernoteen.com/promo - e descubra. Clique aqui!!! -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: corpoperfeito.htm Type: application/octet-stream Size: 1867 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: feromonio.htm Type: application/octet-stream Size: 2298 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: venda.htm Type: application/octet-stream Size: 2294 bytes Desc: not available URL: From xxx at xxxx.com Sun May 11 17:06:15 2003 From: xxx at xxxx.com (xxx) Date: Mon, 12 May 2003 05:06:15 +0800 Subject: [SciPy-user] i have 100000000 emailaddress and emailsender soft(www.0755sz.com) Message-ID: <20030511220806.A59213EB09@www.scipy.com> An HTML attachment was scrubbed... URL: From nwagner at mecha.uni-stuttgart.de Mon May 12 08:42:08 2003 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Mon, 12 May 2003 14:42:08 +0200 Subject: [SciPy-user] Negative entries in matrices get lost by using io.read_array Message-ID: <3EBF96A0.29A22200@mecha.uni-stuttgart.de> Hi all, I have a problem with io:read_array Negative entries in matrices get lost by using io.read_array. This is llustrated by means of a short test program ioread.py. Any idea ? Nils -------------- next part -------------- 1.0 2.0 3.0 -1.0 2.0 2.0 3.0 0.0 3.0 4.0 4.0 1.0 4.0 5.0 6.0 7.0 -------------- next part -------------- from scipy import * file = open("test.mat") a = io.read_array(file) print a From nwagner at mecha.uni-stuttgart.de Mon May 12 12:07:03 2003 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Mon, 12 May 2003 18:07:03 +0200 Subject: [SciPy-user] Negative entries in matrices get lost by using io.read_array References: <3EBF96A0.29A22200@mecha.uni-stuttgart.de> Message-ID: <3EBFC6A7.F2DB623B@mecha.uni-stuttgart.de> Nils Wagner schrieb: > > Hi all, > > I have a problem with io:read_array > > Negative entries in matrices get lost by using io.read_array. > This is llustrated by means of a short test program > > ioread.py. > > Any idea ? > > Nils BTW, ScientificPython (http://starship.python.net/~hinsen/ScientificPython/) can handle such matrices very well. from Scientific.IO.ArrayIO import readArray a = readArray("test.mat") print a Nils > > ------------------------------------------------------------------------ > Name: test.mat > test.mat Type: Plain Text (text/plain) > Encoding: 7bit > > Name: ioread.py > ioread.py Type: Plain Text (text/plain) > Encoding: 7bit From falted at openlc.org Mon May 12 14:12:00 2003 From: falted at openlc.org (Francesc Alted) Date: Mon, 12 May 2003 20:12:00 +0200 Subject: [SciPy-user] PyTables 0.5.1 Message-ID: <200305122012.00407.falted@openlc.org> PyTables 0.5.1 -------------- This is a maintenance release of PyTables. Due to a problem with an specific optimization in PyTables 0.5, it does not work with numarray 0.4 (although it works just fine with numarray 0.5). Thanks to Marc Gehling for reporting that. Todd Miller has already warned me that this optimization was not safe, so I am *disabling* it in 0.5.1. The consequence is that the 20% of improvement during reading tables has almost evaporated to a rather small 4%, but that's life!. If you already have installed PyTables 0.5, I strongly suggest you to upgrade to 0.5.1, even if you are already using numarray 0.5. I will try to further investigate the problem, and, if a good solution is found, I will enable again the optimization in a future release. Another new thing you can find in 0.5.1 is that the use of "UInt64" data types has been removed (it has been replaced by the "Int64" type) of the tutorial chapters in User's Manual. I've done that because the numarray Windows version does not support such a type (due to MSVC compiler limitations). Now, the tutorial section should run fine in all the supported platforms (even Windows). My apologies for being a sinner and trying to optimize too soon ;-) Web site -------- Go to the PyTables web site for more details: http://pytables.sourceforge.net/ Share your experience --------------------- Let me know of any bugs, suggestions, gripes, kudos, etc. you may have. Have fun! -- Francesc Alted From xxx at xxxx.com Mon May 12 14:40:33 2003 From: xxx at xxxx.com (xxx) Date: Tue, 13 May 2003 02:40:33 +0800 Subject: [SciPy-user] i have 30000000 emailaddress and emailsender soft(www.0755sz.com) Message-ID: <20030512194241.6B9143EB09@www.scipy.com> An HTML attachment was scrubbed... URL: From imaginee1 at gmx.net Mon May 12 17:47:00 2003 From: imaginee1 at gmx.net (imaginee1 at gmx.net) Date: Mon, 12 May 2003 23:47:00 +0200 (MEST) Subject: [SciPy-user] Installing Scipy Message-ID: <4765.1052776020@www59.gmx.net> Hi everyone, I would like to install Scipy but so far, I haven't gotten anywhere. System specifications are on the bottom. Since I'm using debian linux I first tried the debian package which is for python2.1, but this was quite unstable and I want to use scipy under python2.2 . So here goes: Binary install: >>> from scipy.xplt import * Traceback (most recent call last): File "", line 1, in ? File "/home/martin/tmp/linux2/2.2/lib/python2.2/site-packages/scipy_base/ppimport.py", line 211, in __getattr__ File "/home/martin/tmp/linux2/2.2/lib/python2.2/site-packages/scipy_base/ppimport.py", line 183, in _ppimport_importer AssertionError: Source Compilation: signum:/usr/src/SciPy-0.2.0_alpha_196.4120# python setup.py install Traceback (most recent call last): File "setup.py", line 111, in ? setup_package() File "setup.py", line 90, in setup_package config_list += map(get_separate_package_config,separate_packages) File "setup.py", line 74, in get_separate_package_config return get_package_config(name,'') File "setup.py", line 67, in get_package_config mod = __import__('setup_'+os.path.basename(name)) ImportError: No module named setup_scipy_distutils CVS Compilation: signum:/usr/src/cvs/scipy# python setup.py install ### Little Endian detected #### Traceback (most recent call last): File "setup.py", line 111, in ? setup_package() File "setup.py", line 90, in setup_package config_list += map(get_separate_package_config,separate_packages) File "setup.py", line 74, in get_separate_package_config return get_package_config(name,'') File "setup.py", line 68, in get_package_config config = mod.configuration(parent) File "Lib_chaco/kiva/setup_kiva.py", line 60, in configuration config_list.append(get_package_config('agg','kiva')) File "Lib_chaco/kiva/setup_kiva.py", line 37, in get_package_config config = mod.configuration(parent) File "/usr/src/cvs/scipy/Lib_chaco/kiva/agg/setup_agg.py", line 15, in configuration mod = build_agg.kiva_ext_module() File "/usr/src/cvs/scipy/Lib_chaco/kiva/agg/src/build_agg.py", line 24, in kiva_ext_module mod = affine_matrix_weave.weave_wrappers(mod) File "/usr/src/cvs/scipy/Lib_chaco/kiva/agg/src/affine_matrix_weave.py", line 65, in weave_wrappers result = zeros(6,typecode=Float) TypeError: zeros() takes no keyword arguments GREAT! System specifications: # python -c 'import os,sys;print os.name,sys.platform' posix linux2 (Debian woody) # gcc -v Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs gcc version 2.95.4 20011002 (Debian prerelease) # g77 --version GNU Fortran 0.5.25 20010319 (prerelease) # python -c 'import sys;print sys.version' 2.2.1 (#1, Sep 7 2002, 14:34:30) # python -c 'import Numeric;print Numeric.__version__' 21.0 # f2py -v 2.32.225-1419 # python scipy_core/scipy_distutils/system_info.py atlas_info: FOUND: libraries = ['lapack', 'f77blas', 'cblas', 'atlas'] library_dirs = ['/usr/lib/3dnow/atlas', '/usr/lib/3dnow'] blas_info: NOT AVAILABLE blas_src_info: NOT AVAILABLE dfftw_info: NOT AVAILABLE dfftw_threads_info: NOT AVAILABLE djbfft_info: NOT AVAILABLE fftw_threads_info: NOT AVAILABLE lapack_info: NOT AVAILABLE lapack_src_info: NOT AVAILABLE sfftw_info: NOT AVAILABLE sfftw_threads_info: NOT AVAILABLE x11_info: FOUND: libraries = ['X11'] library_dirs = ['/usr/X11R6/lib'] include_dirs = ['/usr/X11R6/include'] # python scipy_core/scipy_distutils/command/build_flib.py Not found/available: Absoft Fortran compiler Not found/available: SGI Fortran compiler Not found/available: Forte Fortran compiler Not found/available: Sun Fortran compiler Not found/available: Intel Fortran compiler Not found/available: Itanium Fortran compiler Not found/available: NAG Fortran compiler Not found/available: Compaq Fortran compiler Not found/available: VAST Fortran compiler Not found/available: HP Fortran compiler Not found/available: F Fortran compiler Not found/available: Lahey Fortran compiler Gnu version='0.5.25' F77='g77' F77FLAGS=' -Wall -fno-second-underscore -fPIC ' F77OPT=' -O3 -funroll-loops ' LIBS='-lg2c-pic' Thanks for reading this, Nikolai -- +++ GMX - Mail, Messaging & more http://www.gmx.net +++ Bitte l?cheln! Fotogalerie online mit GMX ohne eigene Homepage! From oliphant.travis at ieee.org Mon May 12 21:00:03 2003 From: oliphant.travis at ieee.org (Travis Oliphant) Date: Mon, 12 May 2003 19:00:03 -0600 Subject: [SciPy-user] [numarray issue] nonzero? Comments on new name solicited References: Message-ID: <3EC04393.7080106@ieee.org> Perry Greenfield wrote: > Some one suggested that numarray ditch compatibility in this > area and "do what's right". Namely he suggested that > > nonzero --> where > where --> select I would be interested to hear what this proposed select command would do as there is already a select command in scipy that acts as an "expanded" form of Numeric's where command. Here is the docstring: >>> info(select) select(condlist, choicelist, default=0) Returns an array comprised from different elements of choicelist depending on the list of conditions. condlist is a list of condition arrays containing ones or zeros choicelist is a list of choice matrices (of the "same" size as the arrays in condlist). The result array has the "same" size as the arrays in choicelist. If condlist is [c0,...,cN-1] then choicelist must be of length N. The elements of the choicelist can then be represented as [v0,...,vN-1]. The default choice if none of the conditions are met is given as the default argument. The conditions are tested in order and the first one statisfied is used to select the choice. In other words, the elements of the output array are found from the following tree (notice the order of the conditions matters): if c0: v0 elif c1: v1 elif c2: v2 ... elif cN-1: vN-1 else: default Note, that one of the condition arrays must be large enough to handle the largest array in the choice list. From oliphant.travis at ieee.org Mon May 12 21:08:19 2003 From: oliphant.travis at ieee.org (Travis Oliphant) Date: Mon, 12 May 2003 19:08:19 -0600 Subject: [SciPy-user] special.erf underflow References: Message-ID: <3EC04583.6010203@ieee.org> Arnd Baecker wrote: > Hi, > > is there a way to prevent the error message in the > following example > > In [32]: import scipy > In [33]: scipy.special.erf(300) > > erfc underflow error > Out[33]: 1.0 Yes, there is. >>> info(scipy.special.errprint) errprint({flag}) sets or resets the error printing flag in cephesmodule returning the previous state. If no argument is given the current state of the flag is returned and no change occurs. so scipy.special.errprint(0) would turn off printing. From fperez at colorado.edu Mon May 12 21:20:29 2003 From: fperez at colorado.edu (Fernando Perez) Date: Mon, 12 May 2003 19:20:29 -0600 Subject: [SciPy-user] special.erf underflow In-Reply-To: <3EC04583.6010203@ieee.org> References: <3EC04583.6010203@ieee.org> Message-ID: <3EC0485D.3050908@colorado.edu> Travis Oliphant wrote: > > >>> info(scipy.special.errprint) > > errprint({flag}) sets or resets the error printing flag in cephesmodule > returning the previous state. If no argument is given the current state > of the flag is returned and no change occurs. > > so scipy.special.errprint(0) would turn off printing. Mmh, I wonder if this should be a top-level thing. It isn't really something specific to special functions, as any regular numerical function which can potentially under/overflow could benefit from this control. Does this make sense? Is it worth the refactoring effort? Cheers, f. From oliphant.travis at ieee.org Mon May 12 21:46:46 2003 From: oliphant.travis at ieee.org (Travis Oliphant) Date: Mon, 12 May 2003 19:46:46 -0600 Subject: [SciPy-user] special.erf underflow References: <3EC04583.6010203@ieee.org> <3EC0485D.3050908@colorado.edu> Message-ID: <3EC04E86.8070102@ieee.org> Fernando Perez wrote: > Travis Oliphant wrote: > >> >> >>> info(scipy.special.errprint) >> >> errprint({flag}) sets or resets the error printing flag in cephesmodule >> returning the previous state. If no argument is given the current >> state of the flag is returned and no change occurs. >> >> so scipy.special.errprint(0) would turn off printing. > > > Mmh, I wonder if this should be a top-level thing. It isn't really > something specific to special functions, as any regular numerical > function which can potentially under/overflow could benefit from this > control. Does this make sense? Is it worth the refactoring effort? > Well, it's use would have to be significantly rethought. I used this as a means of handling the error printing of the cephes package --- not numeric python as a whole. It is definitely worth thinking about and I'm very open to suggestions... -teo From xxxxx at xxx.com Mon May 12 23:55:28 2003 From: xxxxx at xxx.com (=?gb2312?q?=D1=EE=CF=C8=C9=FA_) Date: Tue, 13 May 2003 11:55:28 +0800 Subject: [SciPy-user] 30000000emailaddress and emailsender soft for you only 15$ Message-ID: <20030513043558.9285B3EB09@www.scipy.com> An HTML attachment was scrubbed... URL: From james at hello.com Tue May 13 02:01:27 2003 From: james at hello.com (james at hello.com) Date: Tue, 13 May 2003 14:01:27 +0800 Subject: [SciPy-user] Italian-crafted Rolex - only $65 - $140!! Free SHIPPING ! ! Message-ID: <20030513065812.4072B3EB09@www.scipy.com> An HTML attachment was scrubbed... URL: From pearu at cens.ioc.ee Tue May 13 04:32:35 2003 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Tue, 13 May 2003 11:32:35 +0300 (EEST) Subject: [SciPy-user] Installing Scipy In-Reply-To: <4765.1052776020@www59.gmx.net> Message-ID: On Mon, 12 May 2003 imaginee1 at gmx.net wrote: > I would like to install Scipy but so far, I haven't gotten anywhere. > System specifications are on the bottom. > Since I'm using debian linux I first tried the debian package > which is for python2.1, but this was quite unstable > and I want to use scipy under python2.2 . > > So here goes: > Binary install: > >>> from scipy.xplt import * ... > AssertionError: '/usr/lib/python2.2/site-packages/scipy/xplt/__init__.pyc'> Works here fine with CVS install. > Source Compilation: ... > ImportError: No module named setup_scipy_distutils This is a know problem. The recent scipy tar-ball is incomplete. As a fix, use CVS version of scipy. > CVS Compilation: > signum:/usr/src/cvs/scipy# python setup.py install > ### Little Endian detected #### ... > result = zeros(6,typecode=Float) > TypeError: zeros() takes no keyword arguments That's weird. zeros(6,typecode=Float) works fine with Numeric 22.0. I haven't checked weave with Numeric 21.x recently. Pearu From fperez at colorado.edu Tue May 13 05:06:23 2003 From: fperez at colorado.edu (Fernando Perez) Date: Tue, 13 May 2003 03:06:23 -0600 Subject: [SciPy-user] Syntax for assigning to a complex matrix via weave? Message-ID: <3EC0B58F.2080309@colorado.edu> Hi all, I'm trying to speed up via weave some code which uses complex matrices, and I can't seem to find the right form. I tried reading the blitz sources, but that didn't get me very far. Here's a simple example which should get me going for my 'real' problem, if someone can show me how to make this work: ########################################################################### from Numeric import * from weave import * def complex_test(): a = zeros((4,4),Complex) a[0,0] = 1+2j a[1,1] = 2+3.5j print 'Before\n',a code = \ """ std::cout << a(1,1) << std::endl; a(2,2).real = 3.0; // THIS DOESN'T WORK a(2,2).imag = 4.5; // THIS DOESN'T WORK """ inline(code,['a'],type_converters = converters.blitz) print 'After\n',a complex_test() ########################################################################### Along these lines, I'm also curious as to the possiblity of doing complex arithmetic and calling functions on the entries of a Numeric complex array. Are there proper complex exp, sin, etc. functions accessible from within weave? And is a(1,1)/a(2,2) properly executed as complex division if 'a' is complex? Thanks for any help, f. From prabhu at aero.iitm.ernet.in Tue May 13 15:34:46 2003 From: prabhu at aero.iitm.ernet.in (Prabhu Ramachandran) Date: Wed, 14 May 2003 01:04:46 +0530 Subject: [SciPy-user] [ANN] imv.py: 3D plots with MayaVi: Important bug fix. Message-ID: <16065.18646.21372.63787@monster.linux.in> Hi, This is to announce a newer version of imv.py that fixes a few important and pretty bad bugs. ChangeLog: May 7, 2003: Added support to use surf on an existing MayaVi window. May 8, 2003: Fixed bad bugs in sampler function. The broadcasting was wrong, the return value needed to be transposed and the y array also needed broadcasting in case the function did not depend on x. Thanks to Prof. Ramakrishna for bringing this to my attention. Essentially, surf based plots would have their X and Y's swapped since the array was not being transposed before being displayed. For symmetric functions this would not be an issue at all. There was also a problem when different sized x and y arrays were given. Finally the new version can create a plot on an existing window. I'm sorry that these errors crept up but I was not using the module enough to catch the error and the error was brought to my notice just this week. imv.py is available here: http://www.aero.iitm.ernet.in/~prabhu/software/mayavi.html here: http://www.ae.iitm.ac.in/~prabhu/software/mayavi.html or here: http://av.stanford.edu/~prabhu/software/mayavi.html About imv.py: imv.py is a module that lets you sample surfaces and arrays from the Python interpreter via convenient one line functions. It requires MayaVi (version 1.2) to be installed and running as a Python module i.e. the binary installs will not be able to use this. cheers, prabhu p.s. Sorry about the cross posting! From eric at enthought.com Wed May 14 12:02:56 2003 From: eric at enthought.com (eric jones) Date: Wed, 14 May 2003 11:02:56 -0500 Subject: [SciPy-user] Syntax for assigning to a complex matrix via weave? In-Reply-To: <3EC0B58F.2080309@colorado.edu> Message-ID: <004101c31a32$4fd98bd0$8901a8c0@ERICDESKTOP> ---------------------------------------------- eric jones 515 Congress Ave www.enthought.com Suite 1614 512 536-1057 Austin, Tx 78701 > -----Original Message----- > From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net] On > Behalf Of Fernando Perez > Sent: Tuesday, May 13, 2003 3:06 AM > To: scipy-user at scipy.net > Subject: [SciPy-user] Syntax for assigning to a complex matrix via weave? > > Hi all, > > I'm trying to speed up via weave some code which uses complex matrices, > and I > can't seem to find the right form. I tried reading the blitz sources, but > that didn't get me very far. > Weave uses std::complex under the covers for imaginary numbers. Looking at in your gcc include directory will give you some hints. > Here's a simple example which should get me going for my 'real' problem, > if someone can show me how to make this work: > > ######################################################################## ## > # > from Numeric import * > from weave import * > > def complex_test(): > a = zeros((4,4),Complex) > a[0,0] = 1+2j > a[1,1] = 2+3.5j > print 'Before\n',a > code = \ > """ > std::cout << a(1,1) << std::endl; > a(2,2).real = 3.0; // THIS DOESN'T WORK > a(2,2).imag = 4.5; // THIS DOESN'T WORK > """ > inline(code,['a'],type_converters = converters.blitz) > print 'After\n',a > > complex_test() > ######################################################################## ## > # For some reason, the C++ std::complex class doesn't allow you to set the real or imaginary part individually (at least that I can see). That seems odd... As a work around, the following should work: from Numeric import * from weave import * def complex_test(): a = zeros((4,4),Complex) a[0,0] = 1+2j a[1,1] = 2+3.5j print 'Before\n',a code = """ std::cout << a(1,1) << std::endl; // equivalent to your code a(2,2) = std::complex(3.0, a(2,2).imag()); a(2,2) = std::complex(a(2,2).real(),4.5); // faster, but maybe not what your code needs. //a(2,2) = std::complex(3.0,4.5); """ inline(code,['a'],type_converters = converters.blitz,verbose=2,compiler='gcc') print 'After\n',a complex_test() > > Along these lines, I'm also curious as to the possiblity of doing complex > arithmetic and calling functions on the entries of a Numeric complex > array. > Are there proper complex exp, sin, etc. functions accessible from within > weave? > > And is > > a(1,1)/a(2,2) > > properly executed as complex division if 'a' is complex? You should be fine here: def complex_test2(): a = zeros((4,4),Complex) a[0,0] = 1+2j a[1,1] = 2+3.5j code = """ std::cout << a(1,1) << std::endl; std::cout << sin(a(1,1)) << std::endl; std::cout << exp(a(1,1)) << std::endl; std::cout << a(0,0)/a(1,1) << std::endl; """ inline(code,['a'],type_converters = converters.blitz,verbose=2,compiler='gcc') complex_test2() output: (2,3.5) (15.0696,-6.88416) (-6.91953,-2.59196) (0.553846,0.0307692) All the standard math operation should work as well as the following functions (copied from ): // Transcendentals: template complex<_Tp> cos(const complex<_Tp>&); template complex<_Tp> cosh(const complex<_Tp>&); template complex<_Tp> exp(const complex<_Tp>&); template complex<_Tp> log(const complex<_Tp>&); template complex<_Tp> log10(const complex<_Tp>&); template complex<_Tp> pow(const complex<_Tp>&, int); template complex<_Tp> pow(const complex<_Tp>&, const _Tp&); template complex<_Tp> pow(const complex<_Tp>&, const complex<_Tp>&); template complex<_Tp> pow(const _Tp&, const complex<_Tp>&); template complex<_Tp> sin(const complex<_Tp>&); template complex<_Tp> sinh(const complex<_Tp>&); template complex<_Tp> sqrt(const complex<_Tp>&); template complex<_Tp> tan(const complex<_Tp>&); template complex<_Tp> tanh(const complex<_Tp>&); see ya, eric From fperez at colorado.edu Wed May 14 14:13:35 2003 From: fperez at colorado.edu (Fernando Perez) Date: Wed, 14 May 2003 12:13:35 -0600 Subject: [SciPy-user] Syntax for assigning to a complex matrix via weave? In-Reply-To: <004101c31a32$4fd98bd0$8901a8c0@ERICDESKTOP> References: <004101c31a32$4fd98bd0$8901a8c0@ERICDESKTOP> Message-ID: <3EC2874F.2020909@colorado.edu> eric jones wrote: > > For some reason, the C++ std::complex class doesn't allow you to set the > real or imaginary part individually (at least that I can see). That > seems odd... As a work around, the following should work: Great Eric, thanks a lot. After a lot of googling around (there's surprisingly little info about this on the web), I'd eventually found some info which pointed in the same direction. Some emails from David Abraham in the boost mailing list suggest that the std::complex implementation is severely brain-damaged. In particular, the following document is a good read: http://anubis.dkuug.dk/JTC1/SC22/WG21/docs/papers/2002/n1388.pdf I think you are correct in saying that there is no simple, clean way of accessing the real/imaginary parts of a complex number directly. The specification of std::complex in the C++ standard seems to have been set out by a committee of bureaucrats with zero scientific computing experience, because they made them damn-near useless for real work. The syntax is horribly heavy-handed (as your examples show), and things like a simple layout of the data in memory can't even be assumed! Anyway, thanks a lot for your answers. Now, at least within the unfortunate limitations of the C++ standard, I got my weave code working. This will be used in my talk next week at the Front Range Pythoneers meeting (plug :), and this particular example was based on code by Arnd Baecker for computing a quantum cat map. The timing results are interesting: In [14]: time_all() Timing tests executed with N=1000, kappa=0.3 Version Time To fast To Python ========================================= C++ typedef 0.44 1.00 54.53 C++ std 0.45 1.00 54.29 C++ Euler 0.46 1.03 52.90 C++ exp 0.62 1.41 38.68 C 1.18 2.66 20.53 Numeric 1.82 4.11 13.27 Pyrex 23.54 53.11 1.03 Python 24.18 54.53 1.00 I seriously think that the combination of tools provided by scipy (Numeric, libraries), a good plotting tool (gnuplot, grace, chaco later), a nice environment (ipython :), and in particular the power of f2py/weave for tackling easily bottlenecks, is quite a development in the way of doing scientific computing. Best regards, Fernando. From eric at enthought.com Wed May 14 14:38:26 2003 From: eric at enthought.com (eric jones) Date: Wed, 14 May 2003 13:38:26 -0500 Subject: [SciPy-user] Syntax for assigning to a complex matrix via weave? In-Reply-To: <3EC2874F.2020909@colorado.edu> Message-ID: <006901c31a48$04a92fb0$8901a8c0@ERICDESKTOP> >From the paper that discusses a superior complex implementation: """ This proposal is already implemented and used in the GNU Implementation of the C++ standard library. """ I guess we could simply use this implementation in weave. The only issue is that it is GPLed and so it can't just be dropped into the distrbution. A second option is just to overload the real() and imag() methods to return T& instead of T in a weave specific implementation of complex. Thoughts? Is it really worth breaking with the standard interface? eric ---------------------------------------------- eric jones 515 Congress Ave www.enthought.com Suite 1614 512 536-1057 Austin, Tx 78701 > -----Original Message----- > From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net] On > Behalf Of Fernando Perez > Sent: Wednesday, May 14, 2003 12:14 PM > To: scipy-user at scipy.net > Subject: Re: [SciPy-user] Syntax for assigning to a complex matrix via > weave? > > eric jones wrote: > > > > > For some reason, the C++ std::complex class doesn't allow you to set the > > real or imaginary part individually (at least that I can see). That > > seems odd... As a work around, the following should work: > > Great Eric, thanks a lot. After a lot of googling around (there's > surprisingly little info about this on the web), I'd eventually found some > info which pointed in the same direction. Some emails from David Abraham > in > the boost mailing list suggest that the std::complex implementation is > severely brain-damaged. In particular, the following document is a good > read: > > http://anubis.dkuug.dk/JTC1/SC22/WG21/docs/papers/2002/n1388.pdf > > I think you are correct in saying that there is no simple, clean way of > accessing the real/imaginary parts of a complex number directly. > > The specification of std::complex in the C++ standard seems to have been > set > out by a committee of bureaucrats with zero scientific computing > experience, > because they made them damn-near useless for real work. The syntax is > horribly heavy-handed (as your examples show), and things like a simple > layout > of the data in memory can't even be assumed! > > Anyway, thanks a lot for your answers. Now, at least within the > unfortunate > limitations of the C++ standard, I got my weave code working. This will > be > used in my talk next week at the Front Range Pythoneers meeting (plug :), > and > this particular example was based on code by Arnd Baecker for computing a > quantum cat map. The timing results are interesting: > > In [14]: time_all() > Timing tests executed with N=1000, kappa=0.3 > > Version Time To fast To Python > ========================================= > C++ typedef 0.44 1.00 54.53 > C++ std 0.45 1.00 54.29 > C++ Euler 0.46 1.03 52.90 > C++ exp 0.62 1.41 38.68 > C 1.18 2.66 20.53 > Numeric 1.82 4.11 13.27 > Pyrex 23.54 53.11 1.03 > Python 24.18 54.53 1.00 > > I seriously think that the combination of tools provided by scipy > (Numeric, > libraries), a good plotting tool (gnuplot, grace, chaco later), a nice > environment (ipython :), and in particular the power of f2py/weave for > tackling easily bottlenecks, is quite a development in the way of doing > scientific computing. > > > Best regards, > > Fernando. > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From imaginee1 at gmx.net Wed May 14 14:59:00 2003 From: imaginee1 at gmx.net (imaginee1 at gmx.net) Date: Wed, 14 May 2003 20:59:00 +0200 (MEST) Subject: [SciPy-user] Installing Scipy References: Message-ID: <21878.1052938740@www60.gmx.net> > On Mon, 12 May 2003 imaginee1 at gmx.net wrote: > > > I would like to install Scipy but so far, I haven't gotten anywhere. > > System specifications are on the bottom. > > Since I'm using debian linux I first tried the debian package > > which is for python2.1, but this was quite unstable > > and I want to use scipy under python2.2 . > > > > So here goes: > > Binary install: > > >>> from scipy.xplt import * > ... > > AssertionError: > '/usr/lib/python2.2/site-packages/scipy/xplt/__init__.pyc'> > > Works here fine with CVS install. > > > Source Compilation: > ... > > ImportError: No module named setup_scipy_distutils > > This is a know problem. The recent scipy tar-ball is incomplete. As a fix, > use CVS version of scipy. > > > CVS Compilation: > > signum:/usr/src/cvs/scipy# python setup.py install > > ### Little Endian detected #### > ... > > result = zeros(6,typecode=Float) > > TypeError: zeros() takes no keyword arguments > > That's weird. zeros(6,typecode=Float) works fine with Numeric 22.0. > I haven't checked weave with Numeric 21.x recently. Just for the sake of completeness: Numeric 21.x which is the only version natively available to Debian Woody doesn't work with the recent CVS. zeros(6,typecode=Float) translates to zeros(6,Float) in 21.x But if I change that there are other incompatabilities as well. With Numeric 22.x it does compile except that it seems that it has crashed my previous working VisualPython installation. :-( Cheers, Nikolai -- +++ GMX - Mail, Messaging & more http://www.gmx.net +++ Bitte l?cheln! Fotogalerie online mit GMX ohne eigene Homepage! From jdhunter at ace.bsd.uchicago.edu Wed May 14 15:28:13 2003 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Wed, 14 May 2003 14:28:13 -0500 Subject: [SciPy-user] ANN: matplotlib-0.2 matlab style plotting for python Message-ID: Announcing Matplotlib 0.2 matplotlib is a pure python plotting library designed to bring publication quality plotting to python with a syntax familiar to matlab users. Although the goal of publication quality is not yet attained, the library does produce high quality 2D plots. All of the plotting commands can be accessed either via a functional interface familiar to matlab users or an object oriented interface familiar to python users. http://matplotlib.sourceforge.net matplotlib requires python2.2, Numeric-22+ and pygtk-1.99.16, and should run anywhere those packages are available. It has been tested under linux and win32. The following matlab compatible plotting commands are provided: axes, axis, bar, close, errorbar, figure, gca, gcf, get, hist, plot, scatter, set, subplot, text, title, xlabel, ylabel What's new in 0.2 Font handling - Major improvements in font and text handling. matplotlib 0.1 drew all text in the same, non-configurable font. In 0.2, font name, size, weight, and angle, color, rotation, and more are easily configurable. See the text tutorial on the website Multiple figures -- Multiple figures supported with the figure command. See the Working with multiple figures and axes in the tutorial Interactive shell -- Interactive use from the python shell if you have pygtk compiled with threads. See Using matplotlib interactively. Saving figures- Ability to save figures in arbitrary resolution PNG or TIFF with a bug fix that caused saved figures to be corrupted by anything blocking the figure window. A GUI widget has been added to the figure toolbar to save figures and a new comand savefig has been added. Navigation - A new and hopefully improved navigation toolbar has been added that doesn't require a wheel mouse, but still works with one. See the Navigation tutorial. More examples and screenshots - New examples and screenshot illustrating the new text functionality, the new plot types, and new commands. See the examples subdirectory in the src distribution. Patches - A Patch class added for drawing patches (rectangles, polygons, circles). This supports three new plotting commands scatter, hist and bar, with more to come. New commands - New plotting commands bar, close, errorbar, figure, hist, text, scatter, savefig, ylabel. Matplotlib on sourceforge - matplotlib homepage moved to sourceforge with a (hopefully) more useful homepage. Documentation - Much better documentation and a tutorial. Refactoring - Substantial rewrite of class library. All text now handled by the AxisText class in text.py. Axis handling refactored into a dedicated class Axis defined in figure.py. From fperez at colorado.edu Wed May 14 16:09:24 2003 From: fperez at colorado.edu (Fernando Perez) Date: Wed, 14 May 2003 14:09:24 -0600 Subject: [SciPy-user] Syntax for assigning to a complex matrix via weave? In-Reply-To: <006901c31a48$04a92fb0$8901a8c0@ERICDESKTOP> References: <006901c31a48$04a92fb0$8901a8c0@ERICDESKTOP> Message-ID: <3EC2A274.8070502@colorado.edu> eric jones wrote: >>From the paper that discusses a superior complex implementation: > > """ > > This proposal is already implemented and used in the GNU > Implementation of the C++ standard library. > """ > > I guess we could simply use this implementation in weave. The only > issue is that it is GPLed and so it can't just be dropped into the > distrbution. A second option is just to overload the real() and imag() > methods to return T& instead of T in a weave specific implementation of > complex. Thoughts? Is it really worth breaking with the standard > interface? I'd say -0.5. Breaking standards is in most cases a road I'd rather not travel, if nothing else because of how it can cause subtle problems in the future. This seems to be under discussion by the C++ standards people, so it might be worth chiming in with a voice pushing for a sane solution in the standard itself. On the other hand, the current situation is ugly enough that having a sane syntax which allows one to simply do: complex_array(i,j,k).real() = something; complex_array(i,j,k).imag() = something_else; would definitely be nice (even better if the parens weren't necessary, but that's _really_ breaking the standard). I can't understand why they didn't settle on complex numbers being by default equivalent to struct { real; imag; }. This would address a large majority of the usage cases, enable interoperability with every Fortran/C code out there, and one could always write a PolarComplex class for the situations where a native polar representation is truly necessary. Oh well... Cheers, f. From vsko at yahoo.com Wed May 14 17:57:14 2003 From: vsko at yahoo.com (Vernon) Date: Wed, 14 May 2003 14:57:14 -0700 (PDT) Subject: [SciPy-user] unable to import scipy package Message-ID: <20030514215714.73279.qmail@web40909.mail.yahoo.com> Hi all. I just installed the scipy package 0.2.0 for win32. I am using activestate python 2.2.2 and have installed numeric 21 and numarray 0.4 The scipy installer completed its installation sucessfully. However when I type >>> from scipy import * I get the following errors noted below. Does anyone know what I am doing wrong. Thank you very much for your help. Traceback (most recent call last): File "Text3.py", line 1, in ? from scipy import * File "C:\Python22\Lib\site-packages\scipy\__init__.py", line 29, in ? from scipy_base import * File "C:\Python22\Lib\site-packages\scipy_base\__init__.py", line 124, in ? import limits File "C:\Python22\Lib\site-packages\scipy_base\limits.py", line 41, in ? float_epsilon = epsilon(Numeric.Float32) File "C:\Python22\Lib\site-packages\scipy_base\limits.py", line 26, in epsilon x = x * cast(.5) ArithmeticError: Integer overflow in multiply. __________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com From travis at enthought.com Wed May 14 18:16:54 2003 From: travis at enthought.com (Travis N. Vaught) Date: Wed, 14 May 2003 17:16:54 -0500 Subject: [SciPy-user] unable to import scipy package In-Reply-To: <20030514215714.73279.qmail@web40909.mail.yahoo.com> Message-ID: <007f01c31a66$8a7f22c0$0300a8c0@tvlaptop> If I remember correctly you need to upgrade your Numeric installation to at least 22.0 (a thread about this is here: http://scipy.net/pipermail/scipy-chaco/2002-December/000144.html ). This is related to the included chaco libraries. Travis > -----Original Message----- > From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net] On > Behalf Of Vernon > Sent: Wednesday, May 14, 2003 3:57 PM > To: scipy-user at scipy.net > Subject: [SciPy-user] unable to import scipy package > > Hi all. > > I just installed the scipy package 0.2.0 for win32. > I am using activestate python 2.2.2 and have installed numeric 21 and > numarray 0.4 > > The scipy installer completed its installation sucessfully. However > when I type > >>> from scipy import * > > I get the following errors noted below. Does anyone know what I am > doing wrong. > > Thank you very much for your help. > > > Traceback (most recent call last): > File "Text3.py", line 1, in ? > from scipy import * > File "C:\Python22\Lib\site-packages\scipy\__init__.py", line 29, in ? > from scipy_base import * > File "C:\Python22\Lib\site-packages\scipy_base\__init__.py", line > 124, in ? > import limits > File "C:\Python22\Lib\site-packages\scipy_base\limits.py", line 41, > in ? > float_epsilon = epsilon(Numeric.Float32) > File "C:\Python22\Lib\site-packages\scipy_base\limits.py", line 26, > in epsilon > x = x * cast(.5) > ArithmeticError: Integer overflow in multiply. > > __________________________________ > Do you Yahoo!? > The New Yahoo! Search - Faster. Easier. Bingo. > http://search.yahoo.com > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From vsko at yahoo.com Wed May 14 18:27:52 2003 From: vsko at yahoo.com (Vernon) Date: Wed, 14 May 2003 15:27:52 -0700 (PDT) Subject: [SciPy-user] RE: unable to import scipy Message-ID: <20030514222752.44679.qmail@web40908.mail.yahoo.com> With regards to my previous post: I was generating errors when trying to import scipy >>>from scipy import * At that time I was using scipy 0.2.0 and numeric 21. I just installed numeric 22, and now I am generating the same error. Thanks again for the help and I hope my problem helps other people with similar issues. __________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com From baecker at physik.tu-dresden.de Thu May 15 02:48:56 2003 From: baecker at physik.tu-dresden.de (Arnd Baecker) Date: Thu, 15 May 2003 08:48:56 +0200 (CEST) Subject: [SciPy-user] Installing Scipy In-Reply-To: <21878.1052938740@www60.gmx.net> References: <21878.1052938740@www60.gmx.net> Message-ID: On Wed, 14 May 2003 imaginee1 at gmx.net wrote: [...] > > I haven't checked weave with Numeric 21.x recently. > > Just for the sake of completeness: > Numeric 21.x which is the only version natively > available to Debian Woody doesn't work with > the recent CVS. > zeros(6,typecode=Float) translates to zeros(6,Float) in 21.x > But if I change that there are other incompatabilities > as well. > With Numeric 22.x it does compile > except that it seems that it has crashed my > previous working VisualPython installation. :-( Did you re-install VisualPython after installing Numeric 22.x ? I think the rule is to reinstall any module/Package which depends on Numeric after any changes to Numeric. More generally: I have never used the debian supplied version of python and just install everything (i.e. python, Numeric, ...) from the sources to some "private" place and add that to my PATH etc. ((Clearly, installing scipy under linux is substantially more work than doing a double-click install under windows ... actually this brings users from linux to windows ... ;-( )) Hope the above helps with VisualPython, Arnd From pearu at cens.ioc.ee Thu May 15 04:21:12 2003 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Thu, 15 May 2003 11:21:12 +0300 (EEST) Subject: [SciPy-user] Installing Scipy In-Reply-To: <21878.1052938740@www60.gmx.net> Message-ID: On Wed, 14 May 2003 imaginee1 at gmx.net wrote: > > > CVS Compilation: > > > signum:/usr/src/cvs/scipy# python setup.py install > > > ### Little Endian detected #### > > ... > > > result = zeros(6,typecode=Float) > > > TypeError: zeros() takes no keyword arguments > > > > That's weird. zeros(6,typecode=Float) works fine with Numeric 22.0. > > I haven't checked weave with Numeric 21.x recently. > > Just for the sake of completeness: > Numeric 21.x which is the only version natively > available to Debian Woody doesn't work with > the recent CVS. > zeros(6,typecode=Float) translates to zeros(6,Float) in 21.x This is now fixed in CVS. Scipy CVS builds with Numeric 21.0 and Python 2.1.3+ on Debian Woody. Pearu From nwagner at mecha.uni-stuttgart.de Thu May 15 04:21:14 2003 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Thu, 15 May 2003 10:21:14 +0200 Subject: [SciPy-user] io.write_array Message-ID: <3EC34DFA.B42A4492@mecha.uni-stuttgart.de> Hi all, I wonder, if I can write the output of w = linalg.eigvals(A+mu*S,B) for varying mu to a file.with the following structure Each row should be related to a fixed mu - the columns should represent the eigenvalues mu0 w[0] ... w[n] mu1 w[0] .. w[n] mum w[0] ... w[n] How can I do that with io.write_array ? Nils From Paul.Casteels at ua.ac.be Thu May 15 05:24:19 2003 From: Paul.Casteels at ua.ac.be (Paul Casteels) Date: Thu, 15 May 2003 11:24:19 +0200 (CEST) Subject: [SciPy-user] problem with plt Message-ID: This is my configuration : Z:\>python ActivePython 2.2.1 Build 222 (ActiveState Corp.) based on Python 2.2.1 (#34, Apr 15 2002, 09:51:39) [MSC 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import Numeric >>> Numeric.__version__ '23.0' >>> import wxPython >>> wxPython.__version__ '2.4.0.7' >>> import scipy >>> scipy.__version__ '0.2.0_alpha_196.4128' If I try : >>> import gui_thread >>> from scipy import plt >>> plt.plot((1,2,3)) I get a new window labeld Figure0 immediately followed by an Application error : The instruction at 0x00c0577b referenced memory at 0x00000000 the memory could not be read. Do I need to use other versions for wxPython or Numeric ? Best regards and thanks, Paul Casteels Paul.Casteels at ua.ac.be Tel: +32.3.8202455 Fax: +32.3.8202470 University of Antwerp Dpt.Physics Universiteitsplein 1 B-2610 Wilrijk Belgium From ShunTim.Luk at polyu.edu.hk Thu May 15 05:50:24 2003 From: ShunTim.Luk at polyu.edu.hk (LUK ShunTim) Date: Thu, 15 May 2003 17:50:24 +0800 Subject: [SciPy-user] problem with plt In-Reply-To: References: Message-ID: <3EC362E0.5020601@polyu.edu.hk> Paul Casteels wrote: > This is my configuration : > > Z:\>python > ActivePython 2.2.1 Build 222 (ActiveState Corp.) based on > Python 2.2.1 (#34, Apr 15 2002, 09:51:39) [MSC 32 bit (Intel)] on win32 > Type "help", "copyright", "credits" or "license" for more information. > >>>>import Numeric >>>>Numeric.__version__ > > '23.0' > >>>>import wxPython >>>>wxPython.__version__ > > '2.4.0.7' > >>>>import scipy >>>>scipy.__version__ > > '0.2.0_alpha_196.4128' > > If I try : > > >>>>import gui_thread >>>>from scipy import plt >>>>plt.plot((1,2,3)) > > > I get a new window labeld Figure0 immediately followed by an Application > error : > The instruction at 0x00c0577b referenced memory at 0x00000000 the memory > could not be read. > Do I need to use other versions for wxPython or Numeric ? > It appears that the plt module has to be run inside a wxwindows based python shell, such as pycrust which comes with scipy. And in pycrust, you don't need to import gui_thread. I can also report that it also crashed with ipython as the shell on W2K/python 2.2. I'd also be very grateful if some knowledgeable folk would explain more about this phenomenon so that I learn more. Regards, ST -- From baecker at physik.tu-dresden.de Thu May 15 06:35:41 2003 From: baecker at physik.tu-dresden.de (Arnd Baecker) Date: Thu, 15 May 2003 12:35:41 +0200 (CEST) Subject: [SciPy-user] special.erf underflow In-Reply-To: <3EC04583.6010203@ieee.org> References: <3EC04583.6010203@ieee.org> Message-ID: On Mon, 12 May 2003, Travis Oliphant wrote: [...] > Yes, there is. > > >>> info(scipy.special.errprint) > > errprint({flag}) sets or resets the error printing flag in cephesmodule > returning the previous state. If no argument is given the current state > of the flag is returned and no change occurs. > > so scipy.special.errprint(0) would turn off printing. Great - many thanks Travis! Of course I thought how I could have found this myself - I tried the following 1.) scipy.special? (i.e with IPython) 2.) help(scipy.special) With 1.) errprint does not show up. With 2.) one gets the same documentation as in 1.) + "PACKAGE CONTENTS" + "FUNCTIONS". Now, errprint is in the list of FUNCTIONS, however that list start with arange, array etc. (i.e. some of the Numeric routines), which makes it hard to find those routines which come from scipy.special - at least I stopped reading just there ;-(... ((Presumably there is a good reason that arange etc. appear)) In consequence I'd suggest to add some documentation on errprint (basically the one you get with help(scipy.special.errprint)) at the end of the documentation obtained via 1.), together with an example of the type print scipy.special(100) scipy.special.errprint(0) print scipy.special(100) (if there is sufficient +1 on this I will make a more concrete proposal on the text). Arnd From bryan.cole at teraview.co.uk Thu May 15 06:58:27 2003 From: bryan.cole at teraview.co.uk (bryan cole) Date: 15 May 2003 11:58:27 +0100 Subject: [SciPy-user] problem with plt In-Reply-To: References: Message-ID: <1052996307.7119.21.camel@bryan.teraviewhq.local> scipy.plt works fine for me with: wxGTK-2.4.0.2, Numeric-22.0, scipy-0.2.0_alpha_102.3553 Did you compile Scipy from source, or upgrade Numeric *after* compiling scipy with a previous Numeric version? I've had problems in the past with binary incompatabilities between scipy and Numeric. cleaning out the old versions and Recompiling everything from source usually fixes things (tedious I know). Provided the wxPython demo and/or pycrust work normally, then it's probably not a wxPython problem. N.B. scipy.plt works fine with gui_thread from ipython or stnadard python command (but Chaco doesn't). Ir also works from pycrust without gui_thread. Bryan On Thu, 2003-05-15 at 10:24, Paul Casteels wrote: > This is my configuration : > > Z:\>python > ActivePython 2.2.1 Build 222 (ActiveState Corp.) based on > Python 2.2.1 (#34, Apr 15 2002, 09:51:39) [MSC 32 bit (Intel)] on win32 > Type "help", "copyright", "credits" or "license" for more information. > >>> import Numeric > >>> Numeric.__version__ > '23.0' > >>> import wxPython > >>> wxPython.__version__ > '2.4.0.7' > >>> import scipy > >>> scipy.__version__ > '0.2.0_alpha_196.4128' > > If I try : > > >>> import gui_thread > >>> from scipy import plt > >>> plt.plot((1,2,3)) > > I get a new window labeld Figure0 immediately followed by an Application > error : > The instruction at 0x00c0577b referenced memory at 0x00000000 the memory > could not be read. > Do I need to use other versions for wxPython or Numeric ? > > Best regards and thanks, > > Paul Casteels Paul.Casteels at ua.ac.be Tel: +32.3.8202455 > Fax: +32.3.8202470 > University of Antwerp Dpt.Physics > Universiteitsplein 1 > B-2610 Wilrijk > Belgium > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user -- From jdhunter at ace.bsd.uchicago.edu Thu May 15 10:30:58 2003 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Thu, 15 May 2003 09:30:58 -0500 Subject: [SciPy-user] constrained optimization Message-ID: I need to do a bounded nonlinear minimization problem. I've been using scipy.optimize.leastsq, and apply artificial bounds by increasing the error when then params escape their bounds, but this isn't working well enough. I see that scipy.optimize.anneal has bounds, but am wondering if there are any bounded optimizers available for general nonlinear least squares, like a bounded Lev-Marq alogirithm. Thanks! John Hunter From imaginee1 at gmx.net Thu May 15 11:36:50 2003 From: imaginee1 at gmx.net (imaginee1 at gmx.net) Date: Thu, 15 May 2003 17:36:50 +0200 (MEST) Subject: [SciPy-user] Installing Scipy References: Message-ID: <9220.1053013010@www65.gmx.net> >> With Numeric 22.x it does compile >> except that it seems that it has crashed my >> previous working VisualPython installation. :-( > Did you re-install VisualPython after installing Numeric 22.x ? > I think the rule is to reinstall any module/Package which depends > on Numeric after any changes to Numeric. This was my mistake. "strace" shows that the NVidia drivers I use are causing random segmentation faults. So there is no connection to Python at all. > More generally: I have never used the debian supplied version > of python and just install > everything (i.e. python, Numeric, ...) from the sources > to some "private" place and add that to my PATH etc. > > ((Clearly, installing scipy under linux is substantially > more work than doing a double-click install under windows ... > actually this brings users from linux to windows ... ;-( )) IMHO "apt-get install xxx" is as easy as you can get, but also the price you pay when I comes to new software. Maybe next time I'll have a look at "stow". Nikolai -- +++ GMX - Mail, Messaging & more http://www.gmx.net +++ Bitte l?cheln! Fotogalerie online mit GMX ohne eigene Homepage! From oliphant.travis at ieee.org Thu May 15 11:38:07 2003 From: oliphant.travis at ieee.org (Travis Oliphant) Date: Thu, 15 May 2003 09:38:07 -0600 Subject: [SciPy-user] special.erf underflow References: <3EC04583.6010203@ieee.org> Message-ID: <3EC3B45F.7030906@ieee.org> Arnd Baecker wrote: > Great - many thanks Travis! > > Of course I thought how I could have found this myself - > I tried the following > 1.) scipy.special? (i.e with IPython) > 2.) help(scipy.special) > > With 1.) errprint does not show up. With 2.) one gets the same > documentation as in 1.) + "PACKAGE CONTENTS" + "FUNCTIONS". > Now, errprint is in the list of FUNCTIONS, however > that list start with arange, array etc. (i.e. some of the Numeric > routines), > which makes it hard to find those routines which > come from scipy.special - at least I stopped reading just there ;-(... > ((Presumably there is a good reason that arange etc. appear)) > > In consequence I'd suggest to add > some documentation on errprint (basically the one > you get with help(scipy.special.errprint)) > at the end of the documentation obtained via 1.), > together with an example of the type > print scipy.special(100) > scipy.special.errprint(0) > print scipy.special(100) > > (if there is sufficient +1 on this I will make a more concrete proposal > on the text). I doubt you will get many complaints for adding documentation. Thanks for your help. -teo From oliphant.travis at ieee.org Thu May 15 11:40:17 2003 From: oliphant.travis at ieee.org (Travis Oliphant) Date: Thu, 15 May 2003 09:40:17 -0600 Subject: [SciPy-user] constrained optimization References: Message-ID: <3EC3B4E1.6020305@ieee.org> John Hunter wrote: > I need to do a bounded nonlinear minimization problem. I've been > using scipy.optimize.leastsq, and apply artificial bounds by increasing > the error when then params escape their bounds, but this isn't working > well enough. > > I see that scipy.optimize.anneal has bounds, but am wondering if there > are any bounded optimizers available for general nonlinear least > squares, like a bounded Lev-Marq alogirithm. My brief investigations into this matter did not turn anything up that was open source. It would appear that bounded optimizers are a current research area and the good algorithms are somewhat closely guarded. It's been a while since I looked and I could very likely have missed some. It's an area we would definitely like to add to scipy. -teo From nwagner at mecha.uni-stuttgart.de Thu May 15 11:44:58 2003 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Thu, 15 May 2003 17:44:58 +0200 Subject: [SciPy-user] Iterative solution of systems of linear equations Message-ID: <3EC3B5FA.E5955597@mecha.uni-stuttgart.de> Hi all, I wonder if scipy will support iterative solvers like (CG, BiCG, BiCGstab, CGS, TFQMR, GMRES, etc) ? Nils From jdhunter at ace.bsd.uchicago.edu Thu May 15 12:42:59 2003 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Thu, 15 May 2003 11:42:59 -0500 Subject: [SciPy-user] constrained optimization In-Reply-To: <3EC3B4E1.6020305@ieee.org> (Travis Oliphant's message of "Thu, 15 May 2003 09:40:17 -0600") References: <3EC3B4E1.6020305@ieee.org> Message-ID: >>>>> "Travis" == Travis Oliphant writes: Travis> My brief investigations into this matter did not turn Travis> anything up that was open source. It would appear that Travis> bounded optimizers are a current research area and the Travis> good algorithms are somewhat closely guarded. Travis> It's been a while since I looked and I could very likely Travis> have missed some. It's an area we would definitely like Travis> to add to scipy. I've done some work on optsolve, the C++ optimization library, specifically the 'data modeling' extension, which supports bounded nonlinear least squares. I would like to extend some of optsolve to python, but although the library is open source and free (as in beer) for academic use, it is not free (as in speech), so I don't think such an extension would be suitable for inclusion in scipy. A shame. JDH From rossini at blindglobe.net Thu May 15 12:55:16 2003 From: rossini at blindglobe.net (A.J. Rossini) Date: Thu, 15 May 2003 09:55:16 -0700 Subject: [SciPy-user] constrained optimization In-Reply-To: <3EC3B4E1.6020305@ieee.org> (Travis Oliphant's message of "Thu, 15 May 2003 09:40:17 -0600") References: <3EC3B4E1.6020305@ieee.org> Message-ID: <87y918p2tn.fsf@jeeves.blindglobe.net> Travis Oliphant writes: > John Hunter wrote: >> I need to do a bounded nonlinear minimization problem. I've been >> using scipy.optimize.leastsq, and apply artificial bounds by increasing >> the error when then params escape their bounds, but this isn't working >> well enough. >> I see that scipy.optimize.anneal has bounds, but am wondering if >> there >> are any bounded optimizers available for general nonlinear least >> squares, like a bounded Lev-Marq alogirithm. > > My brief investigations into this matter did not turn anything up that > was open source. It would appear that bounded optimizers are a > current research area and the good algorithms are somewhat closely > guarded. One possibility might be Will Naylor's library (wnlib) which had one based on a conjugate gradient approach. I can't vouch (good/bad) on code quality/performance, though; would be interested in others experiences http://www.willnaylor.com/wnlib.html best, -tony -- A.J. Rossini rossini at u.washington.edu http://software.biostat.washington.edu/ Biostatistics, U Washington and Fred Hutchinson Cancer Research Center FHCRC:Tu: 206-667-7025 (fax=4812)|Voicemail is pretty sketchy/use Email UW : Th: 206-543-1044 (fax=3286)|Change last 4 digits of phone to FAX CONFIDENTIALITY NOTICE: This e-mail message and any attachments may be confidential and privileged. If you received this message in error, please destroy it and notify the sender. Thank you. From jdhunter at ace.bsd.uchicago.edu Thu May 15 14:24:12 2003 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Thu, 15 May 2003 13:24:12 -0500 Subject: [SciPy-user] constrained optimization In-Reply-To: <3EC3B4E1.6020305@ieee.org> (Travis Oliphant's message of "Thu, 15 May 2003 09:40:17 -0600") References: <3EC3B4E1.6020305@ieee.org> Message-ID: >>>>> "Travis" == Travis Oliphant writes: Travis> It's been a while since I looked and I could very likely Travis> have missed some. It's an area we would definitely like Travis> to add to scipy. I just spoke with one of the creators of optsolve, who I worked with when I worked on that library, and told her about the interest at scipy in a good optimizer library that could be extended to python, and expressed my regrets about their 'free for non-commercial use' license. She said this license was currently under negotiation, and I'm going to talk with them further about this possibility. What licensing terms does scipy require? If any you have any input for me about whether you think this would be a good inclusion for scipy if the license were right, give me some feedback and I'll pass it their way. http://www.techxhome.com/products/optsolve/ I would be willing to work on the python extension. They (Tech-X) are a very python friendly shop and would like to see optsolve extended to python. The drawback is that it is a heavy weight library and is probably too big for inclusion in scipy, though it would certainly still be useful as an add-on. John Hunter John Hunter From eric at enthought.com Thu May 15 14:35:07 2003 From: eric at enthought.com (eric jones) Date: Thu, 15 May 2003 13:35:07 -0500 Subject: [SciPy-user] problem with plt In-Reply-To: Message-ID: <00bc01c31b10$b8b62f80$8901a8c0@ERICDESKTOP> > > This is my configuration : > > Z:\>python > ActivePython 2.2.1 Build 222 (ActiveState Corp.) based on > Python 2.2.1 (#34, Apr 15 2002, 09:51:39) [MSC 32 bit (Intel)] on win32 > Type "help", "copyright", "credits" or "license" for more information. > >>> import Numeric > >>> Numeric.__version__ > '23.0' > >>> import wxPython > >>> wxPython.__version__ > '2.4.0.7' > >>> import scipy > >>> scipy.__version__ > '0.2.0_alpha_196.4128' > > If I try : > > >>> import gui_thread > >>> from scipy import plt > >>> plt.plot((1,2,3)) > gui_thread was changed within the last few months so that it does a little less magic. You must now do the following: >>> import gui_thread >>> gui_thread.start() >>> from scipy import plt >>> plt.plot((1,2,3)) This *should* work from the command line (it just did for me anyway on windows). I'm betting it works fine from ipython also. gui_thread is quite finicky, though, so your milage may vary. eric From oliphant at ee.byu.edu Thu May 15 15:14:15 2003 From: oliphant at ee.byu.edu (Travis E. Oliphant) Date: Thu, 15 May 2003 13:14:15 -0600 Subject: [SciPy-user] constrained optimization References: <3EC3B4E1.6020305@ieee.org> Message-ID: <3EC3E707.9040003@ee.byu.edu> John Hunter wrote: >>>>>>"Travis" == Travis Oliphant writes: >>>>>> >>>>>> > > Travis> It's been a while since I looked and I could very likely > Travis> have missed some. It's an area we would definitely like > Travis> to add to scipy. > >I just spoke with one of the creators of optsolve, who I worked with >when I worked on that library, and told her about the interest at >scipy in a good optimizer library that could be extended to python, >and expressed my regrets about their 'free for non-commercial use' >license. She said this license was currently under negotiation, and >I'm going to talk with them further about this possibility. What >licensing terms does scipy require? > >If any you have any input for me about whether you think this would be >a good inclusion for scipy if the license were right, give me some >feedback and I'll pass it their way. > Libraries in SciPy need an unrestrictive open source license (something like the Python license itself or the BSD license) but Eric can verify that. One thing we can also do is place the interface in SciPy but require the user to download the library separately as an add on (we do that with the PIL right now for example) It looks like we have quite a bit of these optimization tools in SciPy already, so I'm not sure what the benefits are. -Travis From eric at enthought.com Thu May 15 16:09:16 2003 From: eric at enthought.com (eric jones) Date: Thu, 15 May 2003 15:09:16 -0500 Subject: [SciPy-user] constrained optimization In-Reply-To: <3EC3E707.9040003@ee.byu.edu> Message-ID: <000401c31b1d$df7404f0$8901a8c0@ERICDESKTOP> > John Hunter wrote: > > >>>>>>"Travis" == Travis Oliphant writes: > >>>>>> > >>>>>> > > > > Travis> It's been a while since I looked and I could very likely > > Travis> have missed some. It's an area we would definitely like > > Travis> to add to scipy. > > > >I just spoke with one of the creators of optsolve, who I worked with > >when I worked on that library, and told her about the interest at > >scipy in a good optimizer library that could be extended to python, > >and expressed my regrets about their 'free for non-commercial use' > >license. She said this license was currently under negotiation, and > >I'm going to talk with them further about this possibility. What > >licensing terms does scipy require? > > > >If any you have any input for me about whether you think this would be > >a good inclusion for scipy if the license were right, give me some > >feedback and I'll pass it their way. Peter Stoltz is at Tech-X also. I've copied him on the mail to give him a heads up about the discussion. > Libraries in SciPy need an unrestrictive open source license (something > like the Python license itself or the BSD license) but Eric can verify > that. That is right. > > One thing we can also do is place the interface in SciPy but require the > user to download the library separately as an add on (we do that with > the PIL right now for example) PIL has a license that is compliant with SciPy. fftw is another package that we have optional support for that doesn't have a compatible license. The key here, though, is that there is a functional equivalent in fftpack. If fftw is used, SciPy doesn't loose any functionality, it is just a little slower. For something as important as a constrained multi-dimensional optimizer, the version we use needs to be a license compatible with SciPy (free for academic/commercial, no restrictions that additions must be contributed back to package). I'm really interested in getting a good version of one of these, but am willing to wait until we find one with a conforming license, or someone develops one for SciPy. See ya, eric From Paul.Casteels at ua.ac.be Fri May 16 02:56:45 2003 From: Paul.Casteels at ua.ac.be (Paul Casteels) Date: Fri, 16 May 2003 08:56:45 +0200 (CEST) Subject: [SciPy-user] problem with plt In-Reply-To: <00bc01c31b10$b8b62f80$8901a8c0@ERICDESKTOP> Message-ID: Eric, Yes, this works fine thanks. Both from a dos-box or from Activestate's PythonWin. Maybe the plotting tutorial could be updated with this ? It discourages new users (like me). Talking about tutorials : where can I find some information on the signal module ? Paul Casteels On Thu, 15 May 2003, eric jones wrote: > > > > This is my configuration : > > > > Z:\>python > > ActivePython 2.2.1 Build 222 (ActiveState Corp.) based on > > Python 2.2.1 (#34, Apr 15 2002, 09:51:39) [MSC 32 bit (Intel)] on > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> import Numeric > > >>> Numeric.__version__ > > '23.0' > > >>> import wxPython > > >>> wxPython.__version__ > > '2.4.0.7' > > >>> import scipy > > >>> scipy.__version__ > > '0.2.0_alpha_196.4128' > > > > If I try : > > > > >>> import gui_thread > > >>> from scipy import plt > > >>> plt.plot((1,2,3)) > > > > gui_thread was changed within the last few months so that it does a > little less magic. You must now do the following: > > >>> import gui_thread > >>> gui_thread.start() > >>> from scipy import plt > >>> plt.plot((1,2,3)) > > This *should* work from the command line (it just did for me anyway on > windows). I'm betting it works fine from ipython also. gui_thread is > quite finicky, though, so your milage may vary. > > eric > > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From nwagner at mecha.uni-stuttgart.de Fri May 16 03:05:44 2003 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Fri, 16 May 2003 09:05:44 +0200 Subject: [SciPy-user] AttributeError: 'ft_spec' module has no attribute 'EXC_WRAP' Message-ID: <3EC48DC8.3FB9974D@mecha.uni-stuttgart.de> This is the output of /usr/local/bin/python setup.py build wagner at lisa:~/cvs/scipy> /usr/local/bin/python setup.py build ### Little Endian detected #### Traceback (most recent call last): File "setup.py", line 111, in ? setup_package() File "setup.py", line 90, in setup_package config_list += map(get_separate_package_config,separate_packages) File "setup.py", line 74, in get_separate_package_config return get_package_config(name,'') File "setup.py", line 68, in get_package_config config = mod.configuration(parent) File "Lib_chaco/freetype/setup_freetype.py", line 23, in configuration mod = build_ft._ft_ext_module() File "/export/home/wagner/cvs/scipy/Lib_chaco/freetype/src/build_ft.py", line 22, in _ft_ext_module mod = library_weave.weave_wrappers(mod) File "/export/home/wagner/cvs/scipy/Lib_chaco/freetype/src/library_weave.py", line 23, in weave_wrappers ext_code = ft_spec.EXC_WRAP % ext_code AttributeError: 'ft_spec' module has no attribute 'EXC_WRAP' Nils From eric at enthought.com Fri May 16 03:20:47 2003 From: eric at enthought.com (eric jones) Date: Fri, 16 May 2003 02:20:47 -0500 Subject: [SciPy-user] AttributeError: 'ft_spec' module has no attribute 'EXC_WRAP' In-Reply-To: <3EC48DC8.3FB9974D@mecha.uni-stuttgart.de> Message-ID: <002301c31b7b$aef00a00$8901a8c0@ERICDESKTOP> EXEC_WRAP is in the scipy/Lib_chaco/freetype/src/ft_spec.py module, so I'm not sure what is going on here. Perhaps there is an old ft_spec.py file laying around. It used to live in scipy/Lib_chaco/freetype -- check there. eric ---------------------------------------------- eric jones 515 Congress Ave www.enthought.com Suite 1614 512 536-1057 Austin, Tx 78701 > -----Original Message----- > From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net] On > Behalf Of Nils Wagner > Sent: Friday, May 16, 2003 1:06 AM > To: scipy-user at scipy.net > Subject: [SciPy-user] AttributeError: 'ft_spec' module has no attribute > 'EXC_WRAP' > > > This is the output of /usr/local/bin/python setup.py build > > wagner at lisa:~/cvs/scipy> /usr/local/bin/python setup.py build > ### Little Endian detected #### > Traceback (most recent call last): > File "setup.py", line 111, in ? > setup_package() > File "setup.py", line 90, in setup_package > config_list += map(get_separate_package_config,separate_packages) > File "setup.py", line 74, in get_separate_package_config > return get_package_config(name,'') > File "setup.py", line 68, in get_package_config > config = mod.configuration(parent) > File "Lib_chaco/freetype/setup_freetype.py", line 23, in configuration > mod = build_ft._ft_ext_module() > File > "/export/home/wagner/cvs/scipy/Lib_chaco/freetype/src/build_ft.py", line > 22, in _ft_ext_module > mod = library_weave.weave_wrappers(mod) > File > "/export/home/wagner/cvs/scipy/Lib_chaco/freetype/src/library_weave.py", > line 23, in weave_wrappers > ext_code = ft_spec.EXC_WRAP % ext_code > AttributeError: 'ft_spec' module has no attribute 'EXC_WRAP' > > Nils > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From nwagner at mecha.uni-stuttgart.de Fri May 16 03:33:20 2003 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Fri, 16 May 2003 09:33:20 +0200 Subject: [SciPy-user] AttributeError: 'ft_spec' module has no attribute 'EXC_WRAP' References: <002301c31b7b$aef00a00$8901a8c0@ERICDESKTOP> Message-ID: <3EC49440.BAF33170@mecha.uni-stuttgart.de> eric jones schrieb: > > EXEC_WRAP is in the scipy/Lib_chaco/freetype/src/ft_spec.py module, so > I'm not sure what is going on here. > > Perhaps there is an old ft_spec.py file laying around. It used to live > in scipy/Lib_chaco/freetype -- check there. > > eric > ---------------------------------------------- > eric jones 515 Congress Ave > www.enthought.com Suite 1614 > 512 536-1057 Austin, Tx 78701 > > > -----Original Message----- > > From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net] > On > > Behalf Of Nils Wagner > > Sent: Friday, May 16, 2003 1:06 AM > > To: scipy-user at scipy.net > > Subject: [SciPy-user] AttributeError: 'ft_spec' module has no > attribute > > 'EXC_WRAP' > > > > > > This is the output of /usr/local/bin/python setup.py build > > > > wagner at lisa:~/cvs/scipy> /usr/local/bin/python setup.py build > > ### Little Endian detected #### > > Traceback (most recent call last): > > File "setup.py", line 111, in ? > > setup_package() > > File "setup.py", line 90, in setup_package > > config_list += map(get_separate_package_config,separate_packages) > > File "setup.py", line 74, in get_separate_package_config > > return get_package_config(name,'') > > File "setup.py", line 68, in get_package_config > > config = mod.configuration(parent) > > File "Lib_chaco/freetype/setup_freetype.py", line 23, in > configuration > > mod = build_ft._ft_ext_module() > > File > > "/export/home/wagner/cvs/scipy/Lib_chaco/freetype/src/build_ft.py", > line > > 22, in _ft_ext_module > > mod = library_weave.weave_wrappers(mod) > > File > > > "/export/home/wagner/cvs/scipy/Lib_chaco/freetype/src/library_weave.py", > > line 23, in weave_wrappers > > ext_code = ft_spec.EXC_WRAP % ext_code > > AttributeError: 'ft_spec' module has no attribute 'EXC_WRAP' > > > > Nils > > _______________________________________________ > > SciPy-user mailing list > > SciPy-user at scipy.net > > http://www.scipy.net/mailman/listinfo/scipy-user > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user This is the contents ls -l ~/cvs/scipy/Lib_chaco/f* insgesamt 96 drwxr-xr-x 2 wagner users 104 Mai 15 12:28 CVS -rw-r--r-- 1 wagner users 99 Mai 8 08:47 MANIFEST.in -rw-r--r-- 1 wagner users 293 Mai 8 08:47 __init__.py -rw-r--r-- 1 wagner users 27491 Apr 1 14:36 build_ft.pyc.ori drwxr-xr-x 3 wagner users 321 Mai 8 08:47 docs -rw-r--r-- 1 wagner users 6590 Mai 1 23:36 font_lookup.py -rw-r--r-- 1 wagner users 3106 Apr 20 10:05 font_shadow.py drwxr-xr-x 3 wagner users 297 Mai 8 08:47 fonts -rw-r--r-- 1 wagner users 8396 Apr 20 10:05 freetype.py drwxr-xr-x 5 wagner users 364 Mai 8 08:47 freetype2 -rw-r--r-- 1 wagner users 56 Apr 20 10:05 freetype_error.py -rw-r--r-- 1 wagner users 431 Apr 20 10:05 ft_constants.py -rw-r--r-- 1 wagner users 3702 Apr 1 14:36 ft_spec.pyc -rw-r--r-- 1 wagner users 3960 Apr 20 10:05 glyph_shadow.py -rw-r--r-- 1 wagner users 759 Apr 20 10:05 library.py -rw-r--r-- 1 wagner users 941 Apr 20 10:05 library_shadow.py -rw-r--r-- 1 wagner users 395 Apr 20 10:05 rendered_string.py -rwxr-xr-x 1 wagner users 1513 Mai 15 12:28 setup_freetype.py -rw-r--r-- 1 wagner users 1756 Mai 16 09:03 setup_freetype.pyc drwxr-xr-x 3 wagner users 429 Mai 16 09:03 src drwxr-xr-x 3 wagner users 86 Mai 8 08:47 tests Sorry, but I'm at loss what to do now ? Nils From eric at enthought.com Fri May 16 03:42:00 2003 From: eric at enthought.com (eric jones) Date: Fri, 16 May 2003 02:42:00 -0500 Subject: [SciPy-user] AttributeError: 'ft_spec' module has no attribute 'EXC_WRAP' In-Reply-To: <3EC49440.BAF33170@mecha.uni-stuttgart.de> Message-ID: <002401c31b7e$a5fbd5c0$8901a8c0@ERICDESKTOP> > > This is the contents > > ls -l ~/cvs/scipy/Lib_chaco/f* > > insgesamt 96 > drwxr-xr-x 2 wagner users 104 Mai 15 12:28 CVS > -rw-r--r-- 1 wagner users 99 Mai 8 08:47 MANIFEST.in > -rw-r--r-- 1 wagner users 293 Mai 8 08:47 __init__.py > -rw-r--r-- 1 wagner users 27491 Apr 1 14:36 build_ft.pyc.ori > drwxr-xr-x 3 wagner users 321 Mai 8 08:47 docs > -rw-r--r-- 1 wagner users 6590 Mai 1 23:36 font_lookup.py > -rw-r--r-- 1 wagner users 3106 Apr 20 10:05 font_shadow.py > drwxr-xr-x 3 wagner users 297 Mai 8 08:47 fonts > -rw-r--r-- 1 wagner users 8396 Apr 20 10:05 freetype.py > drwxr-xr-x 5 wagner users 364 Mai 8 08:47 freetype2 > -rw-r--r-- 1 wagner users 56 Apr 20 10:05 > freetype_error.py > -rw-r--r-- 1 wagner users 431 Apr 20 10:05 ft_constants.py > -rw-r--r-- 1 wagner users 3702 Apr 1 14:36 ft_spec.pyc ^^^^^^^^^^^ Here is the problem I think. An old pyc file is laying around. Delete ft_spec.pyc and hopefully things will work. eric From nwagner at mecha.uni-stuttgart.de Fri May 16 04:16:13 2003 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Fri, 16 May 2003 10:16:13 +0200 Subject: [SciPy-user] AttributeError: 'ft_spec' module has no attribute 'EXC_WRAP' References: <002401c31b7e$a5fbd5c0$8901a8c0@ERICDESKTOP> Message-ID: <3EC49E4D.6AD7DE8E@mecha.uni-stuttgart.de> eric jones schrieb: > > > > > This is the contents > > > > ls -l ~/cvs/scipy/Lib_chaco/f* > > > > insgesamt 96 > > drwxr-xr-x 2 wagner users 104 Mai 15 12:28 CVS > > -rw-r--r-- 1 wagner users 99 Mai 8 08:47 MANIFEST.in > > -rw-r--r-- 1 wagner users 293 Mai 8 08:47 __init__.py > > -rw-r--r-- 1 wagner users 27491 Apr 1 14:36 > build_ft.pyc.ori > > drwxr-xr-x 3 wagner users 321 Mai 8 08:47 docs > > -rw-r--r-- 1 wagner users 6590 Mai 1 23:36 font_lookup.py > > -rw-r--r-- 1 wagner users 3106 Apr 20 10:05 font_shadow.py > > drwxr-xr-x 3 wagner users 297 Mai 8 08:47 fonts > > -rw-r--r-- 1 wagner users 8396 Apr 20 10:05 freetype.py > > drwxr-xr-x 5 wagner users 364 Mai 8 08:47 freetype2 > > -rw-r--r-- 1 wagner users 56 Apr 20 10:05 > > freetype_error.py > > -rw-r--r-- 1 wagner users 431 Apr 20 10:05 > ft_constants.py > > -rw-r--r-- 1 wagner users 3702 Apr 1 14:36 ft_spec.pyc > > ^^^^^^^^^^^ > Here is the problem I think. An old pyc file is laying around. Delete > ft_spec.pyc and hopefully things will work. > > eric > Eric, It works fine. Thank you very much. Nils > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user rom joe at enthought.com Sun May 18 03:02:40 2003 Return-Path: Delivered-To: scipy-user at scipy.org Received: from www.enthought.com (cvs.enthought.com [66.106.86.197]) by www.scipy.com (Postfix) with ESMTP id 175E33EB09 for ; Sun, 18 May 2003 03:02:40 -0500 (CDT) Received: by www.enthought.com (Postfix, from userid 506) id 8920E1056; Sun, 18 May 2003 02:09:01 -0500 (CDT) From: joe at enthought.com To: scipy-user at scipy.org Cc: X-Originating-IP: 64.123.14.186 X-Mailer: Usermin 1.000 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="bound1053241741" Message-Id: <20030518070901.8920E1056 at www.enthought.com> Date: Sun, 18 May 2003 02:09:01 -0500 (CDT) Subject: [SciPy-user] Spam Filtering Installed Sender: scipy-user-admin at scipy.net Errors-To: scipy-user-admin at scipy.net X-BeenThere: scipy-user at scipy.net X-Mailman-Version: 2.0.10 Precedence: bulk Reply-To: scipy-user at scipy.net List-Help: List-Post: List-Subscribe: , List-Id: SciPy Users List List-Unsubscribe: , List-Archive: This is a multi-part message in MIME format. --bound1053241741 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit Hi all, I've just enabled SpamBayes spam filtering on the scipy-user mailing list. Hopefully, this will permit us to keep the list open to posts by non-subscribers while keeping spam to a minimum. If anyone receives any strange bounces from the list, let me know. They are not expected, but I never know just what a procmail recipe is going to do until it does it. Thanks. --bound1053241741-- rom joe at enthought.com Sun May 18 03:10:57 2003 Return-Path: Delivered-To: scipy-user at scipy.org Received: from www.enthought.com (cvs.enthought.com [66.106.86.197]) by www.scipy.com (Postfix) with ESMTP id 832F93EB09 for ; Sun, 18 May 2003 03:10:57 -0500 (CDT) Received: by www.enthought.com (Postfix, from userid 506) id D99C51056; Sun, 18 May 2003 02:17:18 -0500 (CDT) From: joe at enthought.com To: scipy-user at scipy.org Cc: X-Originating-IP: 64.123.14.186 X-Mailer: Usermin 1.000 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="bound1053242238" Message-Id: <20030518071718.D99C51056 at www.enthought.com> Date: Sun, 18 May 2003 02:17:18 -0500 (CDT) Subject: [SciPy-user] Oops...Forgive the previous broken email, testing again Sender: scipy-user-admin at scipy.net Errors-To: scipy-user-admin at scipy.net X-BeenThere: scipy-user at scipy.net X-Mailman-Version: 2.0.10 Precedence: bulk Reply-To: scipy-user at scipy.net List-Help: List-Post: List-Subscribe: , List-Id: SciPy Users List List-Unsubscribe: , List-Archive: This is a multi-part message in MIME format. --bound1053242238 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit Ok, procmail lockfiles are still a mystery to me. Hopefully things are working now. --bound1053242238-- From joe at enthought.com Sun May 18 04:19:58 2003 From: joe at enthought.com (Joe Cooper) Date: Sun, 18 May 2003 03:19:58 -0500 Subject: [SciPy-user] Once more with feeling Message-ID: <3EC7422E.3040206@enthought.com> Hi all, This time I think I've really got it working. Apologies for the previous two bungled emails (I had the wrong python2 package installed, how embarrassing). Thanks for your patience. -- Joe Cooper From eric at enthought.com Sun May 18 04:22:36 2003 From: eric at enthought.com (eric jones) Date: Sun, 18 May 2003 03:22:36 -0500 Subject: [SciPy-user] Once more with feeling In-Reply-To: <3EC7422E.3040206@enthought.com> Message-ID: <005701c31d16$a65266d0$8901a8c0@ERICDESKTOP> Hey Joe, So spambayes is going now? Can I re-enable anonymous posting without fear the spam will return? Thanks, eric ---------------------------------------------- eric jones 515 Congress Ave www.enthought.com Suite 1614 512 536-1057 Austin, Tx 78701 > -----Original Message----- > From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net] On > Behalf Of Joe Cooper > Sent: Sunday, May 18, 2003 2:20 AM > To: scipy-user at scipy.org > Subject: [SciPy-user] Once more with feeling > > Hi all, > > This time I think I've really got it working. Apologies for the > previous two bungled emails (I had the wrong python2 package installed, > how embarrassing). > > Thanks for your patience. > -- > Joe Cooper > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From joe at enthought.com Sun May 18 04:39:48 2003 From: joe at enthought.com (Joe Cooper) Date: Sun, 18 May 2003 03:39:48 -0500 Subject: [SciPy-user] Once more with feeling In-Reply-To: <005701c31d16$a65266d0$8901a8c0@ERICDESKTOP> References: <005701c31d16$a65266d0$8901a8c0@ERICDESKTOP> Message-ID: <3EC746D4.1010608@enthought.com> Yes. I've also enabled it for scipy-dev (testing that one now). eric jones wrote: > Hey Joe, > > So spambayes is going now? Can I re-enable anonymous posting without > fear the spam will return? > > Thanks, > eric > > ---------------------------------------------- > eric jones 515 Congress Ave > www.enthought.com Suite 1614 > 512 536-1057 Austin, Tx 78701 > > > >>-----Original Message----- >>From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net] > > On > >>Behalf Of Joe Cooper >>Sent: Sunday, May 18, 2003 2:20 AM >>To: scipy-user at scipy.org >>Subject: [SciPy-user] Once more with feeling >> >>Hi all, >> >>This time I think I've really got it working. Apologies for the >>previous two bungled emails (I had the wrong python2 package > > installed, > >>how embarrassing). >> >>Thanks for your patience. >>-- >>Joe Cooper >> >>_______________________________________________ >>SciPy-user mailing list >>SciPy-user at scipy.net >>http://www.scipy.net/mailman/listinfo/scipy-user > > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From eric at enthought.com Sun May 18 04:43:45 2003 From: eric at enthought.com (eric jones) Date: Sun, 18 May 2003 03:43:45 -0500 Subject: [SciPy-user] Once more with feeling In-Reply-To: <3EC746D4.1010608@enthought.com> Message-ID: <005801c31d19$9adcdee0$8901a8c0@ERICDESKTOP> Hey Joe, Very cool. Thanks. Where will the "suspect" messages get sent? I'm guessing someone needs to monitor this. Perhaps someone on the list would be willing to become the "spam monitor"? Volunteers? Thanks Joe, for getting this working. eric ---------------------------------------------- eric jones 515 Congress Ave www.enthought.com Suite 1614 512 536-1057 Austin, Tx 78701 > -----Original Message----- > From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net] On > Behalf Of Joe Cooper > Sent: Sunday, May 18, 2003 2:40 AM > To: scipy-user at scipy.net > Subject: Re: [SciPy-user] Once more with feeling > > Yes. I've also enabled it for scipy-dev (testing that one now). > > eric jones wrote: > > Hey Joe, > > > > So spambayes is going now? Can I re-enable anonymous posting without > > fear the spam will return? > > > > Thanks, > > eric > > > > ---------------------------------------------- > > eric jones 515 Congress Ave > > www.enthought.com Suite 1614 > > 512 536-1057 Austin, Tx 78701 > > > > > > > >>-----Original Message----- > >>From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net] > > > > On > > > >>Behalf Of Joe Cooper > >>Sent: Sunday, May 18, 2003 2:20 AM > >>To: scipy-user at scipy.org > >>Subject: [SciPy-user] Once more with feeling > >> > >>Hi all, > >> > >>This time I think I've really got it working. Apologies for the > >>previous two bungled emails (I had the wrong python2 package > > > > installed, > > > >>how embarrassing). > >> > >>Thanks for your patience. > >>-- > >>Joe Cooper > >> > >>_______________________________________________ > >>SciPy-user mailing list > >>SciPy-user at scipy.net > >>http://www.scipy.net/mailman/listinfo/scipy-user > > > > > > > > _______________________________________________ > > SciPy-user mailing list > > SciPy-user at scipy.net > > http://www.scipy.net/mailman/listinfo/scipy-user > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From joe at enthought.com Sun May 18 04:58:05 2003 From: joe at enthought.com (Joe Cooper) Date: Sun, 18 May 2003 03:58:05 -0500 Subject: [SciPy-user] Once more with feeling In-Reply-To: <005801c31d19$9adcdee0$8901a8c0@ERICDESKTOP> References: <005801c31d19$9adcdee0$8901a8c0@ERICDESKTOP> Message-ID: <3EC74B1D.2060901@enthought.com> No problem. The suspected spams are dumping into an mbox in the mailman/spam directory. I will be shocked if there are any false positives. I've seen 0 out of about 6000 messages (I'm on a lot of mailing lists) that I've received in the past 3 months using this database. There is about a 5% false negative rate so far, but I think it is quite tolerable. The database is being updated daily, and so it gets 'better' every day. It may not be precisely ideal for this particular set of emails, since it is based on my personal mailbox for the ham and the spams I get and a couple of spam collector mailboxes for the spam, but it seems to work well everywhere I've deployed it. Any that do get through will, of course, be added to the next days database. I can have have these mails bundled up into a single mailbox, and create a user just for viewing them (with POP3, IMAP, or Usermin for folks who don't care to download the dreck). eric jones wrote: > Hey Joe, > > Very cool. Thanks. Where will the "suspect" messages get sent? I'm > guessing someone needs to monitor this. > > Perhaps someone on the list would be willing to become the "spam > monitor"? Volunteers? > > Thanks Joe, for getting this working. > > eric -- Joe Cooper From baecker at physik.tu-dresden.de Mon May 19 11:06:12 2003 From: baecker at physik.tu-dresden.de (Arnd Baecker) Date: Mon, 19 May 2003 17:06:12 +0200 (CEST) Subject: [SciPy-user] special.erf underflow In-Reply-To: <3EC3B45F.7030906@ieee.org> References: <3EC3B45F.7030906@ieee.org> Message-ID: Hi, alright, here we go with a proposal for some text which I think would be good at the very end of what you get from scipy.info(scipy.special) """ Error handling: Some of the special function routines print an error message when for example an underflow occurs. To disable such messages use errprint(0). Example: print scipy.special.erf(100) scipy.special.errprint(0) print scipy.special.erf(100) """ Actually I think that the description of errprint (obtained with help(scipy.special.errprint)) """ errprint({flag}) sets or resets the error printing flag in cephesmodule returning the previous state. If no argument is given the current state of the flag is returned and no change occurs. """ might be easier to understand if replaced by """ errprint({flag}) sets the error printing flag for special functions (from the cephesmodule). The output is the previous state. With errprint(0) no error messages are shown; the default is errprint(1). If no argument is given the current state of the flag is returned and no change occurs. """ Hope this is of some use - More generally maybe the default behaviour (at least for scipy.special ?) should be changed to errprint(0) - but of course I have no idea about possible side effects ... Arnd P.S.: On Thu, 15 May 2003, Travis Oliphant wrote: > [...] > I doubt you will get many complaints for adding documentation. Thanks > for your help. Well, at some other occasion the maintainers were quite happy with their two-line summaries (and I was not ;-), so I thought I better ask before writing something up ;-) From baecker at physik.tu-dresden.de Mon May 19 11:18:01 2003 From: baecker at physik.tu-dresden.de (Arnd Baecker) Date: Mon, 19 May 2003 17:18:01 +0200 (CEST) Subject: [SciPy-user] band matrices in scipy? Message-ID: Hi, I tried to find out about the support for band matrices in scipy and was not successfull. I would be grateful about any advice concerning information on a) what routines are accessible from scipy for the determination of eigenvalues and eigenvectors of band matrices b) more importantly: how could I have found this myself? Below I attach how I tried to find out about this. Either I am doing something in the wrong way, or the documentation needs some work in this direction (if so, maybe I can contribute a few lines on this). Many thanks, Arnd Here is what I tried. Comments are with # In [1]: import scipy In [2]: scipy.info(scipy) # so linalg seems to be the right one to look further: scipy.info(scipy.linalg) # However, here I don't find anything which looks like # it can deal with band matrices # # However, a In [3]: help(scipy.linalg) # gives a bit more: PACKAGE CONTENTS __cvs_version__ __init__ _flinalg basic blas calc_lwork cblas clapack decomp fblas flapack flinalg interface_gen lapack linalg_version matfuncs setup_atlas_version setup_linalg # At this point I am basically lost within scipy (I also did not manage to figure out if get_lapack_funcs from scipy.linalg.lapack could help me ...) Now I found from the lapack documentation (on debian all this is under /usr/share/doc/lapack-doc/lug/node72.html when lapack-doc is installed; also the corresponding man pages are available) that SSBEV looks like the right routine (man SSBEV starts with: NAME SSBEV - compute all the eigenvalues and, optionally, eigenvectors of a real symmetric band matrix A SYNOPSIS SUBROUTINE SSBEV( JOBZ, UPLO, N, KD, AB, LDAB, W, Z, LDZ, WORK, INFO ) CHARACTER JOBZ, UPLO INTEGER INFO, KD, LDAB, LDZ, N REAL AB( LDAB, * ), W( * ), WORK( * ), Z( LDZ, * ) [...] ) However, now I finally failed: I could not find this routine in any of the scipy.linalg.lapack scipy.linalg.lapack.flapack scipy.linalg.lapack.clapack Any help is appreciated! From arnd.baecker at web.de Mon May 19 16:56:38 2003 From: arnd.baecker at web.de (Arnd Baecker) Date: Mon, 19 May 2003 22:56:38 +0200 (CEST) Subject: [SciPy-user] xplt, dynamic plots question Message-ID: Hi, concerning my question below it seems that everything boils down to the observation, that scipy.xplt.pause(1) does not work under Windows. It either crashes pythonwin (the interpreter window dissapears) or the "normal" python hangs, I was told. Personally I am not using windows, but many of our students do and until now we have been able to work around this problem... Background/Details: When doing a computation for several parameters I would like to plot the results for each parameter once they have been computed. A stripped down set of examples (without real computation ;-) is at the end of the email - if you are interested in the one with the failure go straight to dynamik3.py. For linux one solution is to use scipy.xplt.pause(1), see dynamik1.py below. Somehow scipy.xplt.pause(1) seems to act like a flush command for the present plot. A solution which works both under linux and windows (however doing a full redraw) uses xplt.fma, see dynamik2.py However, when trying to do this with a xplt.pli command it seems we cannot avoid the pause(1), see dynamik3.py. Is there a way to get this working under windows as well? Any suggestions are very welcome! Arnd P.S.: sorry for causing so much traffic with these questions, but as we do weekly exercises in the course we are giving they just come up quite frequently now ;-) ########################################## # dynamik1.py # # This one works on my machine under linux (debian) # in a nice dynamic way !! # (i.e. one xplt.plg is done after the other) from Numeric import * import scipy import scipy.xplt as xplt xplt.winkill() xplt.window() t=arange(0.0,0.5,0.1) mat=reshape(arange(100),(10,10)) xplt.limits(0,2000,0,2000) for i in arange(0,2000,1): mat[0,0]=i ew,ef=scipy.linalg.eig(mat) xplt.plg(ew.real,i*ones(len(ew)),type=0,marker=1,msize=2.0) xplt.pause(1) raw_input("enter") ########################################## # dynamik2.py # # This one also works with a dynamic plot # (with a bit of flickering ...) # Also works under windows (as no pause(1) is used). # Due to the redraw only the last set of points is # shown, but this can easily be repaired by storing # the previous points. # from Numeric import * import scipy import scipy.xplt as xplt xplt.winkill() xplt.window(wait=1) t=arange(0.0,0.5,0.1) mat=reshape(arange(100),(10,10)) xplt.limits(0,2000,0,2000) for i in arange(0,2000,1): mat[0,0]=i ew,ef=scipy.linalg.eig(mat) xplt.fma() xplt.plg(ew.real,i*ones(len(ew)),type=0,marker=1,msize=4.0) raw_input("enter") ########################################## # dynamik3.py # # Here we would like a second plot to show # continuously a plot of the matrix. # However, it is only shown at the very end # # Only the pause(1), which does not work under windows # will lead to the right result. from Numeric import * import scipy import scipy.xplt as xplt xplt.winkill() xplt.window(wait=1) t=arange(0.0,0.5,0.1) mat=reshape(arange(100),(10,10)) xplt.limits(0,2000,0,2000) for i in arange(0,2000,1): xplt.window(0) mat[0,0]=i ew,ef=scipy.linalg.eig(mat) xplt.fma() xplt.plg(ew.real,i*ones(len(ew)),type=0,marker=1,msize=4.0) xplt.window(1) xplt.pli(mat) #xplt.pause(1) # ONLY with this we get a dynamic pli(mat). raw_input("enter") From alnesbit at students.cs.mu.OZ.AU Tue May 20 13:32:58 2003 From: alnesbit at students.cs.mu.OZ.AU (Andrew Nesbit) Date: Wed, 21 May 2003 03:32:58 +1000 (EST) Subject: [SciPy-user] SciPy on Mac OS X Message-ID: Is anybody successfully using SciPy on a Mac OS X system? I'm currently up to the stage of trying to get LAPACK and ATLAS compiled, and it's turning out to be a fair amount of fuss. I'm doubtful it's even going to work and I don't want to waste too much time finding that out. Does anybody have any tips for getting SciPy built from source and working on my OS X system? In particular, it's the prerequisites that are causing most trouble at the moment. Thanks. Andrew. From lanceboyle at myrealbox.com Wed May 21 00:22:50 2003 From: lanceboyle at myrealbox.com (Lance Boyle) Date: Tue, 20 May 2003 21:22:50 -0700 Subject: [SciPy-user] Fwd: [Pythonmac-SIG] SciPy or ScientificPython Message-ID: I hope that the pythonmac folks don't mind my forwarding the following post, and that it's not superfluous. Jack Jansen has done enormous amounts of great work for Python on the Mac, and he (I think it's his work) has made a nifty Python package installer. He (and we) could benefit from a bit of help getting SciPy to install using his installer. I wonder if someone from this list would like to get in touch with him. Here is a bit of a thread from pythonmac list. Jerry Begin forwarded message: > From: Jack Jansen > Date: Tue May 20, 2003 02:33:31 America/Phoenix > To: "Lizardo H. C.M. Nunes" > Cc: pythonmac-sig at python.org > Subject: Re: [Pythonmac-SIG] SciPy or ScientificPython > > > On Tuesday, May 20, 2003, at 02:48 Europe/Amsterdam, Lizardo H. C.M. > Nunes wrote: > >> I much appreciated all the help with NumPy. It passed all tests fine >> and I think that it is working fine. >> >> Now I want to install modules for number crunching and I want to >> install SciPy. It requires ATLAS and LAPACK, which Apple provides. >> Any input from experienced who successfully built SciPy using Apple's >> veclib.framework is really welcome. > > If anyone succeeds in building and installing this for 2.3b1: please > let me know. There's been quite a bit of interest in SciPy on the > mailing list, so I would like to include it in the Package Manager. > But someone will need to hold my hand and provide me with fairly > detailed instructions: I don't have the time to really dig into this. > -- > Jack Jansen, , http://www.cwi.nl/~jack > If I can't dance I don't want to be part of your revolution -- Emma > Goldman > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > > From ariciputi at pito.com Wed May 21 04:09:25 2003 From: ariciputi at pito.com (Andrea Riciputi) Date: Wed, 21 May 2003 10:09:25 +0200 Subject: [SciPy-user] SciPy on Mac OS X In-Reply-To: Message-ID: <897BB43C-8B63-11D7-8A64-000393933E4E@pito.com> On Tuesday, May 20, 2003, at 19:32 Europe/Rome, Andrew Nesbit wrote: > Is anybody successfully using SciPy on a Mac OS X system? > > I'm currently up to the stage of trying to get LAPACK and ATLAS > compiled, and it's turning out to be a fair amount of fuss. I'm > doubtful it's even going to work and I don't want to waste too much > time finding that out. > > Does anybody have any tips for getting SciPy built from source and > working on my OS X system? In particular, it's the prerequisites that > are causing most trouble at the moment. > > Thanks. > > Andrew. Fink project has been created exactly to get Unix software on MacOSX without too much effort. Look at the following pages: Note that if you run OSX 10.2.x ATLAS is not required anymore. All the CBLAS routines and mostly all the LAPACK routine are provided by Apple. Look at: Cheers, Andrea. --- Andrea Riciputi "Science is like sex: sometimes something useful comes out, but that is not the reason we are doing it" -- (Richard Feynman) From alnesbit at students.cs.mu.OZ.AU Wed May 21 08:09:02 2003 From: alnesbit at students.cs.mu.OZ.AU (Andrew Nesbit) Date: Wed, 21 May 2003 22:09:02 +1000 (EST) Subject: [SciPy-user] SciPy on Mac OS X In-Reply-To: <897BB43C-8B63-11D7-8A64-000393933E4E@pito.com> Message-ID: > Fink project has been created exactly to get Unix software on MacOSX > without too much effort. [snip URIs] Thanks for the tips, Andrea. The ATLAS package looks particularly appealing for my purposes. > Note that if you run OSX 10.2.x ATLAS is not required anymore. All the > CBLAS routines and mostly all the LAPACK routine are provided by Apple. I did know that Apple provides this. I will try to use this one instead of the Fink-supplied ATLAS for the time being. Would it be correct to assume that the standard "python setup.py install" procedure will pick up the presence of this framework? In any case, I still need to compile SciPy manually (as opposed to using the Fink's SciPy), for several reasons. I am trying to build SciPy-0.2.0_alpha_196.4120, but get the following error: $ python setup.py build Traceback (most recent call last): File "setup.py", line 111, in ? setup_package() File "setup.py", line 90, in setup_package config_list += map(get_separate_package_config,separate_packages) File "setup.py", line 74, in get_separate_package_config return get_package_config(name,'') File "setup.py", line 67, in get_package_config mod = __import__('setup_'+os.path.basename(name)) ImportError: No module named setup_scipy_distutils Can anybody help me with resolving this? Thankyou. Andrew. From pearu at cens.ioc.ee Wed May 21 09:42:29 2003 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Wed, 21 May 2003 16:42:29 +0300 (EEST) Subject: [SciPy-user] SciPy on Mac OS X In-Reply-To: Message-ID: On Wed, 21 May 2003, Andrew Nesbit wrote: > In any case, I still need to compile SciPy manually (as opposed to > using the Fink's SciPy), for several reasons. I am trying to build > SciPy-0.2.0_alpha_196.4120, but get the following error: > > $ python setup.py build > Traceback (most recent call last): > File "setup.py", line 111, in ? > setup_package() > File "setup.py", line 90, in setup_package > config_list += map(get_separate_package_config,separate_packages) > File "setup.py", line 74, in get_separate_package_config > return get_package_config(name,'') > File "setup.py", line 67, in get_package_config > mod = __import__('setup_'+os.path.basename(name)) > ImportError: No module named setup_scipy_distutils > > Can anybody help me with resolving this? You'll need to get SciPy from its CVS. The SciPy-0.2.0_alpha_196.4120 tar-ball is incomplete. Pearu From pearu at scipy.org Wed May 21 09:47:37 2003 From: pearu at scipy.org (Pearu Peterson) Date: Wed, 21 May 2003 16:47:37 +0300 (EEST) Subject: [SciPy-user] SciPy on Mac OS X In-Reply-To: Message-ID: On Wed, 21 May 2003, Andrew Nesbit wrote: > In any case, I still need to compile SciPy manually (as opposed to > using the Fink's SciPy), for several reasons. I am trying to build > SciPy-0.2.0_alpha_196.4120, but get the following error: > > $ python setup.py build > Traceback (most recent call last): > File "setup.py", line 111, in ? > setup_package() > File "setup.py", line 90, in setup_package > config_list += map(get_separate_package_config,separate_packages) > File "setup.py", line 74, in get_separate_package_config > return get_package_config(name,'') > File "setup.py", line 67, in get_package_config > mod = __import__('setup_'+os.path.basename(name)) > ImportError: No module named setup_scipy_distutils > > Can anybody help me with resolving this? The corresponding tar-ball is incomplete. You'll need to get SciPy from its CVS. Pearu From alnesbit at students.cs.mu.OZ.AU Wed May 21 10:28:08 2003 From: alnesbit at students.cs.mu.OZ.AU (Andrew Nesbit) Date: Thu, 22 May 2003 00:28:08 +1000 (EST) Subject: [SciPy-user] SciPy on Mac OS X In-Reply-To: Message-ID: > The corresponding tar-ball is incomplete. You'll need to get SciPy from > its CVS. Thankyou for the reply. I checked out the latest CVS but got loads of warnings like this: /Users/andrew/src/SciPy-CVS/scipy/scipy_core/scipy_base/fastumath_nounsigned.inc:2763: warning: assignment makes pointer from integer without a cast followed by an error: /Users/andrew/src/SciPy-CVS/scipy/scipy_core/scipy_base/fastumathmodule.c: In function `Array0d_FromDouble': /Users/andrew/src/SciPy-CVS/scipy/scipy_core/scipy_base/fastumathmodule.c:33: `PyArrayObject' undeclared (first use in this function) /Users/andrew/src/SciPy-CVS/scipy/scipy_core/scipy_base/fastumathmodule.c:33: `a' undeclared (first use in this function) /Users/andrew/src/SciPy-CVS/scipy/scipy_core/scipy_base/fastumathmodule.c:34: parse error before ')' token error: command 'gcc' failed with exit status 1 Should I check out an earlier CVS SciPy which is known to build properly? If so, which one? Thankyou. Andrew. From pearu at scipy.org Wed May 21 13:36:35 2003 From: pearu at scipy.org (Pearu Peterson) Date: Wed, 21 May 2003 20:36:35 +0300 (EEST) Subject: [SciPy-user] SciPy on Mac OS X In-Reply-To: Message-ID: On Thu, 22 May 2003, Andrew Nesbit wrote: > > The corresponding tar-ball is incomplete. You'll need to get SciPy from > > its CVS. > > Thankyou for the reply. > > I checked out the latest CVS but got loads of warnings like this: ... > followed by an error: > /Users/andrew/src/SciPy-CVS/scipy/scipy_core/scipy_base/fastumathmodule.c: > In function `Array0d_FromDouble': > /Users/andrew/src/SciPy-CVS/scipy/scipy_core/scipy_base/fastumathmodule.c:33: > `PyArrayObject' undeclared (first use in this function) ^^^^^^^^^^^^^ It seems that your Numeric installation is somehow broken. Check that distutils finds correct Numeric/arrayobject.h. Pearu From Nordques001 at gannon.edu Wed May 21 19:42:55 2003 From: Nordques001 at gannon.edu (David Nordquest) Date: Wed, 21 May 2003 19:42:55 -0400 Subject: [SciPy-user] Scipy for Python 2.3b Message-ID: <3ECC0EFF.7080503@gannon.edu> Is there a compiled version of Scipy that works with the Python 2.3 beta? Thanks! Dave From fperez at colorado.edu Fri May 23 02:35:01 2003 From: fperez at colorado.edu (Fernando Perez) Date: Fri, 23 May 2003 00:35:01 -0600 Subject: [SciPy-user] Weave - accessing object data members? Message-ID: <3ECDC115.5090604@colorado.edu> Hi all, I suppose that expecting weave.inline to magically make the following work: ############### from weave import inline class bunch: pass def oaccess(): x=bunch() x.a = 1 code = """ // BROKEN! // Try to emulate Python's: print 'x.a',x.a std::cout << "x.a " << x.a << std::endl; """ inline(code,['x']) oaccess() ############### is probably a bit too much, right :) ? It would have to extract all the members of 'x', and make all the right type work in C++. This sounds pretty much near impossible. Things like these are what makes you really love the convenience of Python vs C/C++ :) But I wonder what the best way to access object members from within the C code is. So far my typical approach is just to make undotted copies of everything I'll need once inside C/C++: a = x.a b = x.b inline("do_stuff_with(a,b);", ['a','b']) But there may be a better way to do it that I've missed. I pored over the weave tutorial and the auto-generated C++ code, but I couldn't really find any ideas for a better solution. TIA, f. From antoni3 at otenet.gr Sat May 24 09:15:51 2003 From: antoni3 at otenet.gr (Antonis Kaklis) Date: Sat, 24 May 2003 16:15:51 +0300 Subject: [SciPy-user] Help with solving an ODE Message-ID: <002a01c321f6$9a452500$d572a7c3@ak> Hello to everybody I have the following problem I want to solve the differential equation y''(t) - beta * y'(t) + omega^2 * y(t) =F(t) F(t) is an external force with values stored in an external file in the form of "t, F(t)". How could I pass the values of F to the solver in order to solve the DE with scipy? Any suggestions? Please help Thanks in advance Antonis From support at microsoft.com Sat May 24 11:18:13 2003 From: support at microsoft.com (support at microsoft.com) Date: Sat, 24 May 2003 11:18:13 --0400 Subject: [SciPy-user] Cool screensaver Message-ID: <20030524162326.D99963EB09@www.scipy.com> All information is in the attached file. -------------- next part -------------- A non-text attachment was scrubbed... Name: "movie28.pif Type: application/octet-stream Size: 52697 bytes Desc: not available URL: From Administrator at scipy.com Sat May 24 11:17:43 2003 From: Administrator at scipy.com (Administrator at scipy.com) Date: Sat, 24 May 2003 08:17:43 -0700 Subject: [SciPy-user] ScanMail Message: To Recipient file blocking settings matched and action taken. Message-ID: <00d801c32207$9fa482a0$075a5e40@pivia.com> ScanMail for Microsoft Exchange has blocked an attachment. Sender = support at microsoft.com Recipient(s) = scipy-user at scipy.net Subject = [SciPy-user] Cool screensaver Scanning Time = 05/24/2003 08:17:42 Action on file blocking: The attachment movie28.pif matches the file blocking settings. ScanMail has Moved it. The attachment was moved to C:\Quarantine\movie283ecf8d1646.pif_. From Mark.Fenbers at noaa.gov Sat May 24 11:24:53 2003 From: Mark.Fenbers at noaa.gov (Mark Fenbers) Date: Sat, 24 May 2003 11:24:53 -0400 Subject: [SciPy-user] No module named scipy Message-ID: <3ECF8EC5.B0987158@noaa.gov> An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Mark.Fenbers.vcf Type: text/x-vcard Size: 321 bytes Desc: Card for Mark Fenbers URL: From alnesbit at students.cs.mu.OZ.AU Sat May 24 12:33:12 2003 From: alnesbit at students.cs.mu.OZ.AU (Andrew Nesbit) Date: Sun, 25 May 2003 02:33:12 +1000 (EST) Subject: [SciPy-user] Failure during testing Message-ID: Thanks to Pearu's advice I have managed to get CVS SciPy built and installed on my Mac OS X (Jaguar) system. The problem is that most of my tests fail: Python 2.2 (#1, 07/14/02, 23:25:09) [GCC Apple cpp-precomp 6.14] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import scipy >>> scipy.test(level=1) No test suite found for scipy.__cvs_version__ creating test suite for: scipy.common !! FAILURE building test for scipy.common /usr/local/apps/SciPy-CVS/lib/python/scipy/special/basic.py:5: ImportError: Failure linking new module (in ?) No test suite found for scipy.helpmod No test suite found for scipy.pilutil No test suite found for scipy.cow No test suite found for scipy.fftpack No test suite found for scipy.ga No test suite found for scipy.integrate No test suite found for scipy.interpolate creating test suite for: scipy.io.array_import No test suite found for scipy.io.data_store No test suite found for scipy.io.dumb_shelve No test suite found for scipy.io.dumbdbm_patched No test suite found for scipy.io.mio No test suite found for scipy.io.pickler No test suite found for scipy.io.pre___init__ exceptions.ImportError: Failure linking new module No test suite found for scipy.linalg No test suite found for anneal No test suite found for scipy.optimize.common_routines No test suite found for scipy.optimize.minpack No test suite found for scipy.optimize.optimize No test suite found for scipy.optimize.pre___init__ creating test suite for: scipy.optimize.zeros No test suite found for scipy.signal No test suite found for scipy.special No test suite found for scipy.stats FFEFTESTING CONVERGENCE zero should be 1 function f2 cc.bisect : 1.0000000000001952 cc.ridder : 1.0000000000004661 cc.brenth : 0.9999999999999997 cc.brentq : 0.9999999999999577 function f3 cc.bisect : 1.0000000000001952 cc.ridder : 1.0000000000000000 cc.brenth : 1.0000000000000009 cc.brentq : 1.0000000000000011 function f4 cc.bisect : 1.0000000000001952 cc.ridder : 1.0000000000001454 cc.brenth : 0.9999999999993339 cc.brentq : 0.9999999999993339 function f5 cc.bisect : 1.0000000000001952 cc.ridder : 1.0000000000004574 cc.brenth : 0.9999999999991444 cc.brentq : 0.9999999999991444 function f6 cc.bisect : 1.0000000000001952 cc.ridder : 1.0000000000001310 cc.brenth : 1.0000000000003764 cc.brentq : 1.0000000000008440 . ====================================================================== ERROR: check_integer (test_array_import.test_read_array) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/apps/SciPy-CVS/lib/python/scipy/io/tests/test_array_import.py", line 55, in check_integer a = stats.randint(1,20,size=(3,4)) AttributeError: 'module' object has no attribute 'randint' ====================================================================== FAIL: check_complex (test_array_import.test_read_array) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/apps/SciPy-CVS/lib/python/scipy/io/tests/test_array_import.py", line 39, in check_complex a = rand(13,4) + 1j*rand(13,4) File "/usr/local/apps/SciPy-CVS/lib/python/scipy/common.py", line 222, in rand return stats.random(args) File "/usr/local/apps/SciPy-CVS/lib/python/scipy_base/ppimport.py", line 211, in __getattr__ module = self._ppimport_importer() File "/usr/local/apps/SciPy-CVS/lib/python/scipy_base/ppimport.py", line 183, in _ppimport_importer assert module is self,`module` AssertionError: ====================================================================== FAIL: check_float (test_array_import.test_read_array) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/apps/SciPy-CVS/lib/python/scipy/io/tests/test_array_import.py", line 47, in check_float a = rand(3,4)*30 File "/usr/local/apps/SciPy-CVS/lib/python/scipy/common.py", line 222, in rand return stats.random(args) File "/usr/local/apps/SciPy-CVS/lib/python/scipy_base/ppimport.py", line 211, in __getattr__ module = self._ppimport_importer() File "/usr/local/apps/SciPy-CVS/lib/python/scipy_base/ppimport.py", line 183, in _ppimport_importer assert module is self,`module` AssertionError: ====================================================================== FAIL: check_basic (test_array_import.test_numpyio) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/apps/SciPy-CVS/lib/python/scipy/io/tests/test_array_import.py", line 22, in check_basic a = 255*rand(20) File "/usr/local/apps/SciPy-CVS/lib/python/scipy/common.py", line 222, in rand return stats.random(args) File "/usr/local/apps/SciPy-CVS/lib/python/scipy_base/ppimport.py", line 211, in __getattr__ module = self._ppimport_importer() File "/usr/local/apps/SciPy-CVS/lib/python/scipy_base/ppimport.py", line 183, in _ppimport_importer assert module is self,`module` AssertionError: ---------------------------------------------------------------------- Ran 5 tests in 0.074s FAILED (failures=3, errors=1) >>> What's going on here, and how do I fix it? Thanks again in advance. Andrew. From nwagner at mecha.uni-stuttgart.de Sat May 24 12:43:46 2003 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Sat, 24 May 2003 18:43:46 +0200 Subject: [SciPy-user] Problems with io.read_array Message-ID: <3ECFA142.DBDF9F5D@mecha.uni-stuttgart.de> Hi all, there seems to be a problem with io.read_array, that is Traceback (most recent call last): File "answer.py", line 4, in ? f = io.read_array(file,separator=' ',linesep='\n') File "/usr/local/lib/python2.1/site-packages/scipy_base/ppimport.py", line 211, in __getattr__ module = self._ppimport_importer() File "/usr/local/lib/python2.1/site-packages/scipy_base/ppimport.py", line 190, in _ppimport_importer module = __import__(name,None,None,['*']) File "/usr/local/lib/python2.1/site-packages/scipy/io/__init__.py", line 10, in ? from mio import * File "/usr/local/lib/python2.1/site-packages/scipy/io/mio.py", line 4, in ? from MLab import squeeze File "/usr/local/lib/python2.1/site-packages/Numeric/MLab.py", line 20, in ? import RandomArray File "/usr/local/lib/python2.1/site-packages/Numeric/RandomArray.py", line 30, in ? seed() File "/usr/local/lib/python2.1/site-packages/Numeric/RandomArray.py", line 22, in seed import time File "time.py", line 3, in ? File "/usr/local/lib/python2.1/site-packages/scipy_base/ppimport.py", line 211, in __getattr__ module = self._ppimport_importer() File "/usr/local/lib/python2.1/site-packages/scipy_base/ppimport.py", line 183, in _ppimport_importer assert module is self,`module` AssertionError: Any idea ? Nils From pearu at scipy.org Sat May 24 15:47:53 2003 From: pearu at scipy.org (Pearu Peterson) Date: Sat, 24 May 2003 22:47:53 +0300 (EEST) Subject: [SciPy-user] Problems with io.read_array In-Reply-To: <3ECFA142.DBDF9F5D@mecha.uni-stuttgart.de> Message-ID: On Sat, 24 May 2003, Nils Wagner wrote: > Hi all, > > there seems to be a problem with io.read_array, that is > > Traceback (most recent call last): > File "answer.py", line 4, in ? > f = io.read_array(file,separator=' ',linesep='\n') > File "/usr/local/lib/python2.1/site-packages/scipy_base/ppimport.py", > line 211, in __getattr__ > module = self._ppimport_importer() > File "/usr/local/lib/python2.1/site-packages/scipy_base/ppimport.py", > line 190, in _ppimport_importer > module = __import__(name,None,None,['*']) > File "/usr/local/lib/python2.1/site-packages/scipy/io/__init__.py", > line 10, in ? > from mio import * > File "/usr/local/lib/python2.1/site-packages/scipy/io/mio.py", line 4, > in ? > from MLab import squeeze > File "/usr/local/lib/python2.1/site-packages/Numeric/MLab.py", line > 20, in ? > import RandomArray > File "/usr/local/lib/python2.1/site-packages/Numeric/RandomArray.py", > line 30, in ? > seed() > File "/usr/local/lib/python2.1/site-packages/Numeric/RandomArray.py", > line 22, in seed > import time > File "time.py", line 3, in ? ^^^^^^^ time should be an extension module: >>> import time >>> time.__file__ '/usr/lib/python2.1/lib-dynload/time.so' May be your local time.py causes this conflict. Otherwise, could you provide a codelet that causes this failure. Here with Python 2.1.3+ scipy.io works ok. Pearu From pearu at scipy.org Sat May 24 16:05:23 2003 From: pearu at scipy.org (Pearu Peterson) Date: Sat, 24 May 2003 23:05:23 +0300 (EEST) Subject: [SciPy-user] Failure during testing In-Reply-To: Message-ID: On Sun, 25 May 2003, Andrew Nesbit wrote: > Thanks to Pearu's advice I have managed to get CVS SciPy built and > installed on my Mac OS X (Jaguar) system. > > The problem is that most of my tests fail: > > Python 2.2 (#1, 07/14/02, 23:25:09) > [GCC Apple cpp-precomp 6.14] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> import scipy > >>> scipy.test(level=1) > No test suite found for scipy.__cvs_version__ > creating test suite for: scipy.common > !! FAILURE building test for scipy.common > /usr/local/apps/SciPy-CVS/lib/python/scipy/special/basic.py:5: > ImportError: Failure linking new module (in ?) Could you investigate what causes this ImportError? The 5th line in special/basic.py is from Numeric import * Can you import Numeric directly? > ====================================================================== > FAIL: check_complex (test_array_import.test_read_array) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/usr/local/apps/SciPy-CVS/lib/python/scipy/io/tests/test_array_import.py", > line 39, in check_complex > a = rand(13,4) + 1j*rand(13,4) > File "/usr/local/apps/SciPy-CVS/lib/python/scipy/common.py", line > 222, in rand > return stats.random(args) > File "/usr/local/apps/SciPy-CVS/lib/python/scipy_base/ppimport.py", > line 211, in __getattr__ > module = self._ppimport_importer() > File "/usr/local/apps/SciPy-CVS/lib/python/scipy_base/ppimport.py", > line 183, in _ppimport_importer > assert module is self,`module` > AssertionError: '/usr/local/lib/python/scipy/stats/__init__.pyc'> Please update your local SciPy CVS repository and reinstall scipy_core. Hopefully the latest version of ppimport.py gives more information on this failure. Pearu From pearu at scipy.org Sat May 24 16:12:15 2003 From: pearu at scipy.org (Pearu Peterson) Date: Sat, 24 May 2003 23:12:15 +0300 (EEST) Subject: [SciPy-user] No module named scipy In-Reply-To: <3ECF8EC5.B0987158@noaa.gov> Message-ID: On Sat, 24 May 2003, Mark Fenbers wrote: > I installed Numeric... no problems; works fine. > I installed Imaging-1.1.4... no problems; works fine > I installed scipy... installed fine (tar xvf was all there was to it), but I > get this error: > > Traceback (most recent call last): > File "", line 1, in ? > ImportError: No module named scipy First you have to build scipy and then install it, unpacking scipy source tar-ball is not enough. Unfortunately, the latest scipy tar-ball is also broken. So, you have to get scipy from its CVS, see http://www.scipy.org/site_content/tutorials/CVSInstruct and then follow instructions in scipy/INSTALL.txt HTH, Pearu From pearu at scipy.org Sat May 24 16:28:28 2003 From: pearu at scipy.org (Pearu Peterson) Date: Sat, 24 May 2003 23:28:28 +0300 (EEST) Subject: [SciPy-user] Help with solving an ODE In-Reply-To: <002a01c321f6$9a452500$d572a7c3@ak> Message-ID: On Sat, 24 May 2003, Antonis Kaklis wrote: > Hello to everybody > I have the following problem > I want to solve the differential equation > > y''(t) - beta * y'(t) + omega^2 * y(t) =F(t) Try to solve this analytically first. > F(t) is an external force with values stored in an external file in the form > of "t, F(t)". > > How could I pass the values of F to the solver in order to solve the DE > with scipy? It depends how do you want to model F(t) if it is defined only on a finite set of t values. So, 1) read the values of F(t) from a file 2) In Python define (depending on how you model F(t)) a function F(t) that uses previously read F(t) values and returns interpolated value of F(t) if t is different from the t values in the file 3) Rewrite your diff. equation as a system of 1st order diff.equations: y1'(t) = y2(t) y2'(t) = beta* y2(t) - omega^2 * y1(t) + F(t) 4) Use e.g scipy.integrate to integrate the above system. HTH, Pearu From alnesbit at students.cs.mu.OZ.AU Sun May 25 01:32:14 2003 From: alnesbit at students.cs.mu.OZ.AU (Andrew Nesbit) Date: Sun, 25 May 2003 15:32:14 +1000 (EST) Subject: [SciPy-user] Failure during testing In-Reply-To: Message-ID: > > Python 2.2 (#1, 07/14/02, 23:25:09) > > [GCC Apple cpp-precomp 6.14] on darwin > > Type "help", "copyright", "credits" or "license" for more information. > > >>> import scipy > > >>> scipy.test(level=1) > > No test suite found for scipy.__cvs_version__ > > creating test suite for: scipy.common > > !! FAILURE building test for scipy.common > > /usr/local/apps/SciPy-CVS/lib/python/scipy/special/basic.py:5: > > ImportError: Failure linking new module (in ?) > > Could you investigate what causes this ImportError? > The 5th line in special/basic.py is > > from Numeric import * No, that is the 6th line. The 5th line is this: from cephes import * I have played around with this and found that there is some sort of conflict between importing cephes and importing scipy: $ cd /usr/local/lib/python/scipy/special $ python >>> from cephes import * >>> import scipy Traceback (most recent call last): File "", line 1, in ? File "/usr/local/apps/SciPy-CVS/lib/python/scipy/__init__.py", line 29, in ? from scipy_base import * File "/usr/local/apps/SciPy-CVS/lib/python/scipy_base/__init__.py", line 117, in ? import fastumath # no need to use scipy_base.fastumath ImportError: Failure linking new module and another example (with the imports reversed): $ cd /usr/local/lib/python/scipy/special $ python >>> import scipy >>> from cephes import * Traceback (most recent call last): File "", line 1, in ? ImportError: Failure linking new module This same problem doesn't occur for the specfun module. > > ====================================================================== > > FAIL: check_complex (test_array_import.test_read_array) > > ---------------------------------------------------------------------- [snip old results] > Please update your local SciPy CVS repository and reinstall scipy_core. > Hopefully the latest version of ppimport.py gives more information > on this failure. OK, here it is: ====================================================================== FAIL: check_complex (test_array_import.test_read_array) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/apps/SciPy-CVS/lib/python/scipy/io/tests/test_array_import.py", line 39, in check_complex a = rand(13,4) + 1j*rand(13,4) File "/usr/local/apps/SciPy-CVS/lib/python/scipy/common.py", line 222, in rand return stats.random(args) File "/usr/local/apps/SciPy-CVS/lib/python/scipy_base/ppimport.py", line 211, in __getattr__ module = self._ppimport_importer() File "/usr/local/apps/SciPy-CVS/lib/python/scipy_base/ppimport.py", line 183, in _ppimport_importer assert module is self,`(module, self)` AssertionError: (, ) Thanks for helping with this. Andrew. From pearu at scipy.org Sun May 25 04:18:51 2003 From: pearu at scipy.org (Pearu Peterson) Date: Sun, 25 May 2003 11:18:51 +0300 (EEST) Subject: [SciPy-user] Failure during testing In-Reply-To: Message-ID: On Sun, 25 May 2003, Andrew Nesbit wrote: > > > Python 2.2 (#1, 07/14/02, 23:25:09) > > > [GCC Apple cpp-precomp 6.14] on darwin [snip] > I have played around with this and found that there is some sort of > conflict between importing cephes and importing scipy: > > $ cd /usr/local/lib/python/scipy/special > $ python > >>> from cephes import * > >>> import scipy > Traceback (most recent call last): > File "", line 1, in ? > File "/usr/local/apps/SciPy-CVS/lib/python/scipy/__init__.py", line 29, in ? > from scipy_base import * > File "/usr/local/apps/SciPy-CVS/lib/python/scipy_base/__init__.py", line 117, in ? > import fastumath # no need to use scipy_base.fastumath > ImportError: Failure linking new module > > and another example (with the imports reversed): > > $ cd /usr/local/lib/python/scipy/special > $ python > >>> import scipy > >>> from cephes import * > Traceback (most recent call last): > File "", line 1, in ? > ImportError: Failure linking new module > > This same problem doesn't occur for the specfun module. These symptoms are very similar to ones reported as Python 2.2 bug in thread: http://groups.google.com/groups?hl=en&lr=lang_et|lang_en&ie=UTF-8&oe=UTF-8&safe=off&output=search&threadm=mailman.1011905382.1504.python-list%40python.org&rnum=1&prev=/groups%3Fhl%3Den%26lr%3Dlang_et%257Clang_en%26ie%3DUTF-8%26oe%3DUTF-8%26safe%3Doff%26output%3Dsearch%26selm%3Dmailman.1011905382.1504.python-list%2540python.org Try upgrading Python and let us know if it works. > ====================================================================== > FAIL: check_complex (test_array_import.test_read_array) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/usr/local/apps/SciPy-CVS/lib/python/scipy/io/tests/test_array_import.py", line 39, in check_complex > a = rand(13,4) + 1j*rand(13,4) > File "/usr/local/apps/SciPy-CVS/lib/python/scipy/common.py", line 222, in rand > return stats.random(args) > File "/usr/local/apps/SciPy-CVS/lib/python/scipy_base/ppimport.py", line 211, in __getattr__ > module = self._ppimport_importer() > File "/usr/local/apps/SciPy-CVS/lib/python/scipy_base/ppimport.py", line 183, in _ppimport_importer > assert module is self,`(module, self)` > AssertionError: (, ) I think that this failure is related to the previous one. To remove ppimport layer in order to see the real traceback of the error (I'll try to fix this also in ppimport), add the following line ppimport = __import__ just after the line from ppimport import ppimport, ppimport_attr in scipy_base/__init__.py (you can do that also in installed scipy tree). Pearu From paddy3118 at netscape.net Sun May 25 12:41:48 2003 From: paddy3118 at netscape.net (Donald 'Paddy' McCarthy) Date: Sun, 25 May 2003 17:41:48 +0100 Subject: [SciPy-user] Traits: Problem with Python 2.3 References: <3EA140B9.2070706@netscape.net> Message-ID: <3ED0F24C.3020506@netscape.net> Hi, I am having a problem with a very simple example that runs with Python22 but fails in Python 23? The error message is: Python 2.3b1 (#40, Apr 25 2003, 19:06:24) [MSC v.1200 32 bit (Intel)] on win32 Type "copyright", "credits" or "license" for more information. IDLE 0.8 -- press F1 for help >>> Traceback (most recent call last): File "C:\Documents and Settings\Paddy\My Documents\traitScript1.py", line 4, in ? class Person ( HasTraits ): File "C:\Documents and Settings\Paddy\My Documents\traitScript1.py", line 10, in Person __editable_traits__ = [ NameError: name 'TraitGroup' is not defined >>> The example (that works for Python 22) is: from traits import * class Person ( HasTraits ): __traits__ = { 'name': '', 'age': 9, 'weight': 0.0 } __editable_traits__ = [ TraitGroup( 'name', style = 'custom'), TraitGroup( 'age', 'weight', style = 'custom'), TraitGroup( 'age', 'weight', 'name', style = 'custom') ] bill = Person() #bill.configure_traits( filename = None, edit = 1, traits = None ) bill.configure_traits( filename = 'xx.save', edit = 1 ) bill.edit_traits() Can anypne help? Thanks, Paddy. -------------- next part -------------- An HTML attachment was scrubbed... URL: From alnesbit at students.cs.mu.OZ.AU Sun May 25 14:00:05 2003 From: alnesbit at students.cs.mu.OZ.AU (Andrew Nesbit) Date: Mon, 26 May 2003 04:00:05 +1000 (EST) Subject: [SciPy-user] Failure during testing In-Reply-To: Message-ID: > > I have played around with this and found that there is some sort of > > conflict between importing cephes and importing scipy: [snip] > > This same problem doesn't occur for the specfun module. > > These symptoms are very similar to ones reported as Python 2.2 bug > in thread: > > http://groups.google.com/groups?hl=en&lr=lang_et|lang_en&ie=UTF-8&oe=UTF-8&safe=off&output=search&threadm=mailman.1011905382.1504.python-list%40python.org&rnum=1&prev=/groups%3Fhl%3Den%26lr%3Dlang_et%257Clang_en%26ie%3DUTF-8%26oe%3DUTF-8%26safe%3Doff%26output%3Dsearch%26selm%3Dmailman.1011905382.1504.python-list%2540python.org > > Try upgrading Python and let us know if it works. I have upgraded Python to 2.3b1 and now it won't build: gcc -Wno-long-double -no-cpp-precomp -fno-common -dynamic -DNDEBUG -g -O3 -Wstrict-prototypes -I/Users/andrew/src/SciPy-CVS/scipy/Lib_chaco/kiva/agg/src/../../../agg2/include -I/Users/andrew/src/SciPy-CVS/scipy/Lib_chaco/kiva/agg/src/include -I/Users/andrew/src/SciPy-CVS/scipy/Lib_chaco/kiva/agg/src -I/Users/andrew/src/SciPy-CVS/scipy/Lib/weave -I/Users/andrew/src/SciPy-CVS/scipy/Lib/weave/scxx -I/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3 -c /Users/andrew/src/SciPy-CVS/scipy/Lib_chaco/kiva/agg/src/../../../agg2/src/agg_gen_stroke.cpp -o build/temp.darwin-6.6-Power_Macintosh-2.3/Users/andrew/src/SciPy-CVS/scipy/Lib_chaco/kiva/agg/src/../../../agg2/src/agg_gen_stroke.o /var/tmp//ccBnj93X.s:unknown:FATAL:can't create output file: build/temp.darwin-6.6-Power_Macintosh-2.3/Users/andrew/src/SciPy-CVS/scipy/Lib_chaco/kiva/agg/src/../../../agg2/src/agg_gen_stroke.o error: command 'gcc' failed with exit status 1 I've tried this with my personally-built Python 2.3b1 and also the MacPython-OSX-2.3b1 binary distribution. Any ideas as to what to do? Andrew. From pearu at cens.ioc.ee Sun May 25 14:24:59 2003 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Sun, 25 May 2003 21:24:59 +0300 (EEST) Subject: [SciPy-user] Failure during testing In-Reply-To: Message-ID: On Mon, 26 May 2003, Andrew Nesbit wrote: > I have upgraded Python to 2.3b1 and now it won't build: > > gcc -Wno-long-double -no-cpp-precomp -fno-common -dynamic -DNDEBUG -g -O3 -Wstrict-prototypes -I/Users/andrew/src/SciPy-CVS/scipy/Lib_chaco/kiva/agg/src/../../../agg2/include -I/Users/andrew/src/SciPy-CVS/scipy/Lib_chaco/kiva/agg/src/include -I/Users/andrew/src/SciPy-CVS/scipy/Lib_chaco/kiva/agg/src -I/Users/andrew/src/SciPy-CVS/scipy/Lib/weave -I/Users/andrew/src/SciPy-CVS/scipy/Lib/weave/scxx -I/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3 -c /Users/andrew/src/SciPy-CVS/scipy/Lib_chaco/kiva/agg/src/../../../agg2/src/agg_gen_stroke.cpp -o build/temp.darwin-6.6-Power_Macintosh-2.3/Users/andrew/src/SciPy-CVS/scipy/Lib_chaco/kiva/agg/src/../../../agg2/src/agg_gen_stroke.o > > /var/tmp//ccBnj93X.s:unknown:FATAL:can't create output > file: build/temp.darwin-6.6-Power_Macintosh-2.3/Users/andrew\ /src/SciPy-CVS/scipy/Lib_chaco/\ kiva/agg/src/../../../agg2/src/agg_gen_stroke.o ^^^^^^^^^ is this valid under MacOSX? I just executed scipy build for Python 2.3a0 (patched) under linux. I'll soon see if I get the same error.. otherwise this looks like a Py2.3 distutils bug. ... scipy builds fine with Python 2.3a0, I'll upgrade to Python2.3c1 and see if I can produce the error above. > error: command 'gcc' failed with exit status 1 > > I've tried this with my personally-built Python 2.3b1 and also the > MacPython-OSX-2.3b1 binary distribution. > > Any ideas as to what to do? You can temporarily disable chaco in scipy/setup.py. Look for line separate_packages += chaco_packages and comment it out. Btw, could you update also your local scipy cvs tree? I have commited a patch for ppimport that should display more information on the failure that you reported earlier. Pearu From pearu at scipy.org Sun May 25 14:28:08 2003 From: pearu at scipy.org (Pearu Peterson) Date: Sun, 25 May 2003 21:28:08 +0300 (EEST) Subject: [SciPy-user] Failure during testing In-Reply-To: Message-ID: On Mon, 26 May 2003, Andrew Nesbit wrote: > I have upgraded Python to 2.3b1 and now it won't build: > > gcc -Wno-long-double -no-cpp-precomp -fno-common -dynamic -DNDEBUG -g -O3 -Wstrict-prototypes -I/Users/andrew/src/SciPy-CVS/scipy/Lib_chaco/kiva/agg/src/../../../agg2/include -I/Users/andrew/src/SciPy-CVS/scipy/Lib_chaco/kiva/agg/src/include -I/Users/andrew/src/SciPy-CVS/scipy/Lib_chaco/kiva/agg/src -I/Users/andrew/src/SciPy-CVS/scipy/Lib/weave -I/Users/andrew/src/SciPy-CVS/scipy/Lib/weave/scxx -I/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3 -c /Users/andrew/src/SciPy-CVS/scipy/Lib_chaco/kiva/agg/src/../../../agg2/src/agg_gen_stroke.cpp -o build/temp.darwin-6.6-Power_Macintosh-2.3/Users/andrew/src/SciPy-CVS/scipy/Lib_chaco/kiva/agg/src/../../../agg2/src/agg_gen_stroke.o > > /var/tmp//ccBnj93X.s:unknown:FATAL:can't create output > file: build/temp.darwin-6.6-Power_Macintosh-2.3/Users/andrew\ /src/SciPy-CVS/scipy/Lib_chaco/\ kiva/agg/src/../../../agg2/src/agg_gen_stroke.o ^^^^^^^^^ is this valid under MacOSX? I just executed scipy build for Python 2.3a0 (patched) under linux. I'll soon see if I get the same error.. otherwise this looks like a Py2.3 distutils bug. ... scipy builds fine with Python 2.3a0, I'll upgrade to Python2.3c1 (in python CVS) and see if I can produce the error above. > error: command 'gcc' failed with exit status 1 > > I've tried this with my personally-built Python 2.3b1 and also the > MacPython-OSX-2.3b1 binary distribution. > > Any ideas as to what to do? You can temporarily disable chaco in scipy/setup.py. Look for line separate_packages += chaco_packages and comment it out. Or, try to use the latest 2.2 (that is 2.2.3). Btw, could you update also your local scipy cvs tree? I have commited a patch for ppimport that should display more information on the failure that you reported earlier. Pearu From paddy3118 at netscape.net Sun May 25 14:35:54 2003 From: paddy3118 at netscape.net (Donald 'Paddy' McCarthy) Date: Sun, 25 May 2003 19:35:54 +0100 Subject: [SciPy-user] Traits: Problem with Python 2.3 - Solved References: <3EA140B9.2070706@netscape.net> <3ED0F24C.3020506@netscape.net> Message-ID: <3ED10D0A.6000304@netscape.net> Erm, It would help If I had wxPython installed... paddy3118 at netscape.net wrote: > > > Hi, I am having a problem with a very simple example that runs with > Python22 but fails in Python 23? > > The error message is: > > Python 2.3b1 (#40, Apr 25 2003, 19:06:24) [MSC v.1200 32 bit > (Intel)] on win32 > Type "copyright", "credits" or "license" for more information. > IDLE 0.8 -- press F1 for help > >>> > Traceback (most recent call last): > File "C:\Documents and Settings\Paddy\My > Documents\traitScript1.py", line 4, in ? > class Person ( HasTraits ): > File "C:\Documents and Settings\Paddy\My > Documents\traitScript1.py", line 10, in Person > __editable_traits__ = [ > NameError: name 'TraitGroup' is not defined > > >>> > > The example (that works for Python 22) is: > > from traits import * > > > class Person ( HasTraits ): > __traits__ = { > 'name': '', > 'age': 9, > 'weight': 0.0 > } > __editable_traits__ = [ > TraitGroup( 'name', style = 'custom'), > TraitGroup( 'age', 'weight', style = 'custom'), > TraitGroup( 'age', 'weight', 'name', style = 'custom') > ] > > bill = Person() > > #bill.configure_traits( filename = None, edit = 1, traits = None ) > bill.configure_traits( filename = 'xx.save', edit = 1 ) > bill.edit_traits() > > > Can anypne help? > > Thanks, Paddy. > From pearu at scipy.org Sun May 25 15:48:56 2003 From: pearu at scipy.org (Pearu Peterson) Date: Sun, 25 May 2003 22:48:56 +0300 (EEST) Subject: [SciPy-user] Failure during testing In-Reply-To: Message-ID: On Mon, 26 May 2003, Andrew Nesbit wrote: > I have upgraded Python to 2.3b1 and now it won't build: > > gcc -Wno-long-double -no-cpp-precomp -fno-common -dynamic -DNDEBUG -g -O3 -Wstrict-prototypes -I/Users/andrew/src/SciPy-CVS/scipy/Lib_chaco/kiva/agg/src/../../../agg2/include -I/Users/andrew/src/SciPy-CVS/scipy/Lib_chaco/kiva/agg/src/include -I/Users/andrew/src/SciPy-CVS/scipy/Lib_chaco/kiva/agg/src -I/Users/andrew/src/SciPy-CVS/scipy/Lib/weave -I/Users/andrew/src/SciPy-CVS/scipy/Lib/weave/scxx -I/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3 -c /Users/andrew/src/SciPy-CVS/scipy/Lib_chaco/kiva/agg/src/../../../agg2/src/agg_gen_stroke.cpp -o build/temp.darwin-6.6-Power_Macintosh-2.3/Users/andrew/src/SciPy-CVS/scipy/Lib_chaco/kiva/agg/src/../../../agg2/src/agg_gen_stroke.o > > /var/tmp//ccBnj93X.s:unknown:FATAL:can't create output file: build/temp.darwin-6.6-Power_Macintosh-2.3/Users/andrew/src/SciPy-CVS/scipy/Lib_chaco/kiva/agg/src/../../../agg2/src/agg_gen_stroke.o > > error: command 'gcc' failed with exit status 1 This is now fixed in Scipy CVS. I have tested it with Python 2.3b1+. Pearu From p.berkes at biologie.hu-berlin.de Mon May 26 04:34:34 2003 From: p.berkes at biologie.hu-berlin.de (Pietro Berkes) Date: Mon, 26 May 2003 10:34:34 +0200 Subject: [SciPy-user] band matrices in scipy? In-Reply-To: References: Message-ID: <200305261034.34198.p.berkes@biologie.hu-berlin.de> Hi, I dont't know if I'm the most qualified person to answer but I'll try. On Monday 19 May 2003 17:18, Arnd Baecker wrote: > Hi, > > I tried to find out about the support for band matrices > in scipy and was not successfull. > I would be grateful about any advice > concerning information on > a) what routines are accessible from scipy for > the determination of eigenvalues and eigenvectors > of band matrices As far as I know there are no routines for band matrices. As you say there are Lapack routines to handle those problems, but no python wrapper for them has been written: there is an infinite number of Lapack routines, and some of the wrapping work has to be done by hand. It is however fairly simple to write your own wrappers: you have to write a '.pyf' file that contains a description of all the routines you want to wrap and than run f2py to build a wrapping module ( take a look at the f2py documentation at http://cens.ioc.ee/projects/f2py2e/ ). It is important to point out that you need to wrap 4 functions for each Lapack routine (one for each type - real, double, complex, double complex) and than have a python function that chooses which one it has to call (by the way, I seem to remember that this is what the 'get_lapack_funcs' function does). > b) more importantly: how could I have found this myself? It would have been difficult. SciPy is in quick development and (as a consequence) it lacks of documentation. I think the point is that the main developers have too much to do with more important things, while the common user finds it difficult to submit documentation patches. Could someone post some guidelines about this? Maybe we could organize a wiki page where to collect new documentation. > > Below I attach how I tried to find out about this. > Either I am doing something in the wrong way, > or the documentation needs some work in this > direction (if so, maybe I can contribute a few lines on this). > > Many thanks, > > Arnd > > > > Here is what I tried. Comments are with # > > In [1]: import scipy > In [2]: scipy.info(scipy) > # so linalg seems to be the right one to look further: > scipy.info(scipy.linalg) > # However, here I don't find anything which looks like > # it can deal with band matrices > # > # However, a > In [3]: help(scipy.linalg) > # gives a bit more: > PACKAGE CONTENTS > __cvs_version__ > __init__ > _flinalg > basic > blas > calc_lwork > cblas > clapack > decomp > fblas > flapack > flinalg > interface_gen > lapack > linalg_version > matfuncs > setup_atlas_version > setup_linalg > > # At this point I am basically lost within scipy > (I also did not manage to figure out if get_lapack_funcs > from scipy.linalg.lapack > could help me ...) > > Now I found from the lapack documentation > (on debian all this is under /usr/share/doc/lapack-doc/lug/node72.html > when lapack-doc is installed; also the corresponding man pages > are available) > that SSBEV looks like the right routine > (man SSBEV starts with: > > NAME > SSBEV - compute all the eigenvalues and, optionally, eigenvectors > of a > real symmetric band matrix A > > SYNOPSIS > SUBROUTINE SSBEV( JOBZ, UPLO, N, KD, AB, LDAB, W, Z, LDZ, WORK, > INFO ) > > CHARACTER JOBZ, UPLO > > INTEGER INFO, KD, LDAB, LDZ, N > > REAL AB( LDAB, * ), W( * ), WORK( * ), Z( LDZ, * ) > [...] > ) > > However, now I finally failed: I could not > find this routine in any of the > scipy.linalg.lapack > scipy.linalg.lapack.flapack > scipy.linalg.lapack.clapack > > Any help is appreciated! > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From p.berkes at biologie.hu-berlin.de Mon May 26 04:52:37 2003 From: p.berkes at biologie.hu-berlin.de (Pietro Berkes) Date: Mon, 26 May 2003 10:52:37 +0200 Subject: [SciPy-user] matrix multiplication Message-ID: <200305261052.37353.p.berkes@biologie.hu-berlin.de> Hi, I have a quick question: is there a reason why scipy doesn't use the 'gemm' Lapack function to perform matrix multiplication? It is already wrapped and is in my experience much faster. Here is a small python function if you want to test it (warning: this function doesn't control its arguments). def matmult(a,b, alpha=1.0, beta=0.0, c=None, trans_a=0, trans_b=0): """Return alpha*(a*b) + beta*c. a,b,c : matrices alpha, beta: scalars trans_a : 0 (a not transposed), 1 (a transposed), 2 (a conjugate transposed) trans_b : 0 (b not transposed), 1 (b transposed), 2 (b conjugate transposed) """ if c: gemm,=scipy.linalg.get_blas_funcs(('gemm',),(a,b,c)) else: gemm,=scipy.linalg.get_blas_funcs(('gemm',),(a,b)) return gemm(alpha, a, b, beta, c, trans_a, trans_b) Thank you for any feedback, Pietro. From pearu at scipy.org Mon May 26 05:25:54 2003 From: pearu at scipy.org (Pearu Peterson) Date: Mon, 26 May 2003 12:25:54 +0300 (EEST) Subject: [SciPy-user] matrix multiplication In-Reply-To: <200305261052.37353.p.berkes@biologie.hu-berlin.de> Message-ID: On Mon, 26 May 2003, Pietro Berkes wrote: > Hi, > > I have a quick question: is there a reason why scipy doesn't use the 'gemm' > Lapack function to perform matrix multiplication? It is already wrapped and > is in my experience much faster. Quick answer: you just used gemm from scipy;-) I guess a better [*] documentation is needed on how to use blas/lapack functions provided by scipy. [*] any is better than none. Pearu From andrew.straw at adelaide.edu.au Mon May 26 06:01:37 2003 From: andrew.straw at adelaide.edu.au (Andrew Straw) Date: Mon, 26 May 2003 19:31:37 +0930 Subject: [SciPy-user] build instructions for scipy on Mac OS X Message-ID: <0A6419E4-8F61-11D7-8B82-00039311EA24@adelaide.edu.au> Hi All, I've seen a few requests for help compiling scipy on Mac OS X. As I just did this again and it's fresh in my mind, let me describe what I did. This was with Python2.3b1 that I compiled myself. 0) Don't set MACOSX_DEPLOYMENT_TARGET environment variable to 10.2 -- it doesn't play nicely with g77 1) Install g77 and atlas using fink. (Make sure g77 is on your path.) 2) Get scipy from CVS (I checked out the head version yesterday) 3) Rename sample_site.cfg to site.cfg in the scipy_core/scipy_distutils directory. 4) Add /sw/lib to library_dirs and /sw/include to include_dirs in the DEFAULT section of site.cfg (This will cause scipy to use atlas installed by fink.) 5) Remove xplt from setup.py (various tk dependency errors I didn't bother to fix) 6) python setup.py build 7) sudo python setup.py install I'm cross posting this to scipy-user and pythonmac-sig. To (arbitrarily) pick a single location for follow-ups, shall we say the scipy list? Cheers! Andrew From alnesbit at students.cs.mu.OZ.AU Mon May 26 07:08:22 2003 From: alnesbit at students.cs.mu.OZ.AU (Andrew Nesbit) Date: Mon, 26 May 2003 21:08:22 +1000 (EST) Subject: [SciPy-user] Failure during testing In-Reply-To: Message-ID: > > gcc -Wno-long-double -no-cpp-precomp -fno-common -dynamic -DNDEBUG -g -O3 -Wstrict-prototypes -I/Users/andrew/src/SciPy-CVS/scipy/Lib_chaco/kiva/agg/src/../../../agg2/include -I/Users/andrew/src/SciPy-CVS/scipy/Lib_chaco/kiva/agg/src/include -I/Users/andrew/src/SciPy-CVS/scipy/Lib_chaco/kiva/agg/src -I/Users/andrew/src/SciPy-CVS/scipy/Lib/weave -I/Users/andrew/src/SciPy-CVS/scipy/Lib/weave/scxx -I/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3 -c /Users/andrew/src/SciPy-CVS/scipy/Lib_chaco/kiva/agg/src/../../../agg2/src/agg_gen_stroke.cpp -o build/temp.darwin-6.6-Power_Macintosh-2.3/Users/andrew/src/SciPy-CVS/scipy/Lib_chaco/kiva/agg/src/../../../agg2/src/agg_gen_stroke.o > > > > /var/tmp//ccBnj93X.s:unknown:FATAL:can't create output file: build/temp.darwin-6.6-Power_Macintosh-2.3/Users/andrew/src/SciPy-CVS/scipy/Lib_chaco/kiva/agg/src/../../../agg2/src/agg_gen_stroke.o > > > > error: command 'gcc' failed with exit status 1 > > This is now fixed in Scipy CVS. I have tested it with > Python 2.3b1+. OK, great. It now compiles and installs properly. There are quite a few test failures and errors thought (about 60+ out of the 700+ total tests). The output is quite long, so I've put it up at http://www.cs.mu.oz.au/~alnesbit/log-scipy-test Andrew. From alnesbit at students.cs.mu.OZ.AU Mon May 26 07:20:01 2003 From: alnesbit at students.cs.mu.OZ.AU (Andrew Nesbit) Date: Mon, 26 May 2003 21:20:01 +1000 (EST) Subject: [SciPy-user] Failure during testing In-Reply-To: Message-ID: > Btw, could you update also your local scipy cvs tree? I have > commited a patch for ppimport that should display more information > on the failure that you reported earlier. Is this the failure that you are refering to (copied from previous post): > ====================================================================== > FAIL: check_complex (test_array_import.test_read_array) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/usr/local/apps/SciPy-CVS/lib/python/scipy/io/tests/test_array_import.py", line 39, in check_complex > a = rand(13,4) + 1j*rand(13,4) > File "/usr/local/apps/SciPy-CVS/lib/python/scipy/common.py", line > 222, in rand > return stats.random(args) > File > "/usr/local/apps/SciPy-CVS/lib/python/scipy_base/ppimport.py", > line 211, in __getattr__ > module = self._ppimport_importer() > File > "/usr/local/apps/SciPy-CVS/lib/python/scipy_base/ppimport.py", > line 183, in _ppimport_importer > assert module is self,`(module, self)` > AssertionError: (, ) Now that I have upgraded Python to 2.3b1 and updated from CVS that failure no longer occurs. Instead, I have the failures and errors available at http://www.cs.mu.oz.au/~alnesbit/log-scipy-test (the same as referred to in my previous post). I am running with the ppimport patch, so that log should show the extra information. Andrew. From pearu at scipy.org Mon May 26 08:53:59 2003 From: pearu at scipy.org (Pearu Peterson) Date: Mon, 26 May 2003 15:53:59 +0300 (EEST) Subject: [SciPy-user] Failure during testing In-Reply-To: Message-ID: On Mon, 26 May 2003, Andrew Nesbit wrote: > > Btw, could you update also your local scipy cvs tree? I have > > commited a patch for ppimport that should display more information > > on the failure that you reported earlier. > > Is this the failure that you are refering to (copied from previous > post): yes > > ====================================================================== > > FAIL: check_complex (test_array_import.test_read_array) > > ---------------------------------------------------------------------- > > Traceback (most recent call last): > > File "/usr/local/apps/SciPy-CVS/lib/python/scipy/io/tests/test_array_import.py", line 39, in check_complex > > a = rand(13,4) + 1j*rand(13,4) > > File "/usr/local/apps/SciPy-CVS/lib/python/scipy/common.py", line > > 222, in rand > > return stats.random(args) > > File > > "/usr/local/apps/SciPy-CVS/lib/python/scipy_base/ppimport.py", > > line 211, in __getattr__ > > module = self._ppimport_importer() > > File > > "/usr/local/apps/SciPy-CVS/lib/python/scipy_base/ppimport.py", > > line 183, in _ppimport_importer > > assert module is self,`(module, self)` > > AssertionError: (, ) > > Now that I have upgraded Python to 2.3b1 and updated from CVS that > failure no longer occurs. Good, so the failure was due to the Mac related bug in Python 2.2. > Instead, I have the failures and errors available at > http://www.cs.mu.oz.au/~alnesbit/log-scipy-test (the same as referred > to in my previous post). It's not too bad:) With Python 2.3b1+ (from yesterdays Python CVS) I also get KeyError's like ====================================================================== ERROR: check_chebyc (test_basic.test_chebyc) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/apps/SciPy-CVS/lib/python/scipy/special/tests/test_basic.py", line 214, in check_chebyc chebc = chebyc(1)(.2) File "/usr/local/apps/SciPy-CVS/lib/python/scipy/special/orthogonal.py", line 398, in chebyc p = p * 2.0/p(2) File "/usr/local/apps/SciPy-CVS/lib/python/scipy_base/polynomial.py", line 445, in __getattr__ raise KeyError KeyError I'll see if it can be fixed for Py2.3... But as for other failures like numerous AssertionErrors in testing scipy_base and stats, I don't get them under Linux. Could you investigate the errors in scipy_base testing? You can do that separately from building scipy when changing the scipy_base code: cd scipy/scipy_core python setup.py install >>> import scipy_base >>> scipy_base.test(1) Pearu From pearu at scipy.org Mon May 26 09:02:12 2003 From: pearu at scipy.org (Pearu Peterson) Date: Mon, 26 May 2003 16:02:12 +0300 (EEST) Subject: [SciPy-user] build instructions for scipy on Mac OS X In-Reply-To: <0A6419E4-8F61-11D7-8B82-00039311EA24@adelaide.edu.au> Message-ID: On Mon, 26 May 2003, Andrew Straw wrote: > Hi All, > > I've seen a few requests for help compiling scipy on Mac OS X. As I > just did this again and it's fresh in my mind, let me describe what I > did. This was with Python2.3b1 that I compiled myself. > > 0) Don't set MACOSX_DEPLOYMENT_TARGET environment variable to 10.2 -- > it doesn't play nicely with g77 > 1) Install g77 and atlas using fink. (Make sure g77 is on your path.) > 2) Get scipy from CVS (I checked out the head version yesterday) I guess you forgot to mention that scipy building process requires also f2py2e. Currently the following steps can be recommended: 2.1) Get scipy from CVS 2.2) Install scipy_core: cd scipy_code && python setup.py install This step is required to avoid any possible conflicts with older version of scipy_distutils that is shipped with f2py2e tar-ball. 2.3) Get the latest f2py2e (either as tar-ball or from CVS) and install it. I believe that f2py2e is available also through fink. > 3) Rename sample_site.cfg to site.cfg in the scipy_core/scipy_distutils > directory. > 4) Add /sw/lib to library_dirs and /sw/include to include_dirs in the > DEFAULT section of site.cfg (This will cause scipy to use atlas > installed by fink.) > 5) Remove xplt from setup.py (various tk dependency errors I didn't > bother to fix) > 6) python setup.py build > 7) sudo python setup.py install Pearu From ariciputi at pito.com Mon May 26 09:50:25 2003 From: ariciputi at pito.com (Andrea Riciputi) Date: Mon, 26 May 2003 15:50:25 +0200 Subject: [SciPy-user] build instructions for scipy on Mac OS X In-Reply-To: <0A6419E4-8F61-11D7-8B82-00039311EA24@adelaide.edu.au> Message-ID: <00DED661-8F81-11D7-8A64-000393933E4E@pito.com> On Monday, May 26, 2003, at 12:01 Europe/Rome, Andrew Straw wrote: > Hi All, > > I've seen a few requests for help compiling scipy on Mac OS X. As I > just did this again and it's fresh in my mind, let me describe what I > did. This was with Python2.3b1 that I compiled myself. > > [snip] > I was wondering why you can't simply type in "fink install scipy-py23" (or "fink install scipy-py22" for those who have Python 2.2.x installed). Is there any significant difference between fink distribution and the CVS one?? Thanks, Andrea. --- Andrea Riciputi "Science is like sex: sometimes something useful comes out, but that is not the reason we are doing it" -- (Richard Feynman) From eric at enthought.com Mon May 26 16:06:33 2003 From: eric at enthought.com (eric jones) Date: Mon, 26 May 2003 15:06:33 -0500 Subject: [SciPy-user] Weave - accessing object data members? In-Reply-To: <3ECDC115.5090604@colorado.edu> Message-ID: <01bd01c323c2$511b0a20$8901a8c0@ERICDESKTOP> Hey Fernando, > Hi all, > > I suppose that expecting weave.inline to magically make the following > work: > > ############### > from weave import inline > class bunch: pass > > def oaccess(): > x=bunch() > > x.a = 1 > > code = """ // BROKEN! > // Try to emulate Python's: print 'x.a',x.a > std::cout << "x.a " << x.a << std::endl; > """ > inline(code,['x']) > > oaccess() > ############### > > > is probably a bit too much, right :) ? It would have to extract all the > members of 'x', and make all the right type work in C++. This sounds > pretty much near impossible. Yep. > Things like these are what makes you really > love the convenience of Python vs C/C++ :) > > But I wonder what the best way to access object members from within the C > code is. So far my typical approach is just to make undotted copies of > everything I'll need once inside C/C++: > > a = x.a > b = x.b > > inline("do_stuff_with(a,b);", ['a','b']) > > But there may be a better way to do it that I've missed. I pored over the > weave tutorial and the auto-generated C++ code, but I couldn't really find > any ideas for a better solution. The attr method will work: ################################### from weave import inline class bunch: pass def oaccess(): x=bunch() x.a = 1 code = """ // Try to emulate Python's: print 'x.a',x.a std::cout << (int)x.attr("a") << (int)x.attr("a") << std::endl; """ inline(code,['x']) oaccess() The attr method returns a py::object. Notice you have to cast this value to an integer before writing it out. I pretty sure this could actually be fixed by overloading the << operator for py::object -- please do if you feel comfortable trying it. eric From eric at enthought.com Mon May 26 16:32:17 2003 From: eric at enthought.com (eric jones) Date: Mon, 26 May 2003 15:32:17 -0500 Subject: [SciPy-user] matrix multiplication In-Reply-To: Message-ID: <01cb01c323c5$e93267b0$8901a8c0@ERICDESKTOP> This seems like a reasonable alias to make, though, to the Numeric routine. With the following code, I get a marked speed up: C:\temp>python matmult_tst.py std matmult: 1.28100001812 gemm matmult: 0.171999931335 Other opinions? Eric ###################### import time from scipy import * N = 500 a = stats.random((N,N)) b = stats.random((N,N)) t1 = time.time() matrixmultiply(a,b) t2 = time.time() print 'std matmult:', t2 - t1 def matrixmultiply(a,b, alpha=1.0, beta=0.0, c=None, trans_a=0, trans_b=0): """ Return alpha*(a*b) + beta*c. a,b,c : matrices alpha, beta: scalars trans_a : 0 (a not transposed), 1 (a transposed), 2 (a conjugate transposed) trans_b : 0 (b not transposed), 1 (b transposed), 2 (b conjugate transposed) """ if c: gemm,=linalg.get_blas_funcs(('gemm',),(a,b,c)) else: gemm,=linalg.get_blas_funcs(('gemm',),(a,b)) return gemm(alpha, a, b, beta, c, trans_a, trans_b) t1 = time.time() matrixmultiply(a,b) t2 = time.time() print 'gemm matmult:', t2 - t1 ################## ---------------------------------------------- eric jones 515 Congress Ave www.enthought.com Suite 1614 512 536-1057 Austin, Tx 78701 > -----Original Message----- > From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net] On > Behalf Of Pearu Peterson > Sent: Monday, May 26, 2003 3:26 AM > To: scipy-user at scipy.net > Subject: Re: [SciPy-user] matrix multiplication > > > On Mon, 26 May 2003, Pietro Berkes wrote: > > > Hi, > > > > I have a quick question: is there a reason why scipy doesn't use the > 'gemm' > > Lapack function to perform matrix multiplication? It is already wrapped > and > > is in my experience much faster. > > Quick answer: you just used gemm from scipy;-) > > I guess a better [*] documentation is needed on how > to use blas/lapack functions provided by scipy. > > [*] any is better than none. > > Pearu > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From pearu at scipy.org Mon May 26 16:56:07 2003 From: pearu at scipy.org (Pearu Peterson) Date: Mon, 26 May 2003 23:56:07 +0300 (EEST) Subject: [SciPy-user] matrix multiplication In-Reply-To: <01cb01c323c5$e93267b0$8901a8c0@ERICDESKTOP> Message-ID: On Mon, 26 May 2003, eric jones wrote: > This seems like a reasonable alias to make, though, to the Numeric > routine. With the following code, I get a marked speed up: > > C:\temp>python matmult_tst.py > std matmult: 1.28100001812 > gemm matmult: 0.171999931335 > > Other opinions? I get speed up factor around 5. Before making an alias to Numeric.dot, we should test how gemm matmult measures on non-contiguous arrays as linalg.gemm will make a contiguous copy of its arguments while Numeric.dot just runs the multiplication loop. Pearu From fperez at colorado.edu Tue May 27 11:33:04 2003 From: fperez at colorado.edu (Fernando Perez) Date: Tue, 27 May 2003 09:33:04 -0600 Subject: [SciPy-user] Weave - accessing object data members? In-Reply-To: <01bd01c323c2$511b0a20$8901a8c0@ERICDESKTOP> References: <01bd01c323c2$511b0a20$8901a8c0@ERICDESKTOP> Message-ID: <3ED38530.7070000@colorado.edu> eric jones wrote: >>But I wonder what the best way to access object members from within > the C >>code is. So far my typical approach is just to make undotted copies > of >>everything I'll need once inside C/C++: > The attr method will work: > > ################################### > from weave import inline > > class bunch: pass > > def oaccess(): > x=bunch() > x.a = 1 > code = """ > // Try to emulate Python's: print 'x.a',x.a > std::cout << (int)x.attr("a") << (int)x.attr("a") << > std::endl; > """ > inline(code,['x']) > > oaccess() > > The attr method returns a py::object. Notice you have to cast this > value to an integer before writing it out. I pretty sure this could > actually be fixed by overloading the << operator for py::object -- > please do if you feel comfortable trying it. > Great! This is enough for my needs, even with a bit of typecasting/overloading required. All I needed was a quick way to get at an arbitrary attribute from an object (whose type I know, so manual type handling is not a problem in this case). Thanks a lot, Fernando. From eric at enthought.com Tue May 27 12:19:35 2003 From: eric at enthought.com (eric jones) Date: Tue, 27 May 2003 11:19:35 -0500 Subject: [SciPy-user] Weave - accessing object data members? In-Reply-To: <3ED38530.7070000@colorado.edu> Message-ID: <01de01c3246b$c6344200$8901a8c0@ERICDESKTOP> > Great! This is enough for my needs, even with a bit of > typecasting/overloading required. All I needed was a quick way to get at > an arbitrary attribute from an object (whose type I know, so manual type > handling is not a problem in this case). Type casting isn't necessary in some places. For example: >>> class bob: ... pass ... >>> import weave >>> q = bob() >>> q.a = 1 >>> weave.inline(""" int aa = q.attr("a"); std::cout << aa + 1 << std::endl; """,['q']) 2 So, when C++ can figure out the type, it'll do the casting for you. It's only in places where the type is ambiguous that you must help it out. eric From test at grosss.net Tue May 27 15:55:33 2003 From: test at grosss.net (test) Date: Tue, 27 May 2003 14:55:33 -0500 Subject: [SciPy-user] problem with scipy and pil Message-ID: <3ED3C2B5.8040209@grosss.net> I seem to have a problem when I use both the Python Imaging Library and SciPy. For example, the following code works fine: import Image img = Image.new("RGB", (300,300), (0,0,0)) img.show() but merely adding an import to scipy gives an error. For example, the following code: import Image import scipy img = Image.new("RGB", (300,300), (0,0,0)) img.show() dies with the error: Traceback (most recent call last): File "temp2.py", line 7, in ? img.show() File "e:\python22\py22\PIL\Image.py", line 749, in show _showxv(self, title, command) File "e:\python22\py22\PIL\Image.py", line 1042, in _showxv file = self._dump(format=format) File "e:\python22\py22\PIL\Image.py", line 338, in _dump self.save(file, format) File "e:\python22\py22\PIL\Image.py", line 729, in save SAVE[string.upper(format)](self, fp, filename) KeyError: BMP Anyone know what's going on here? From Kasper.Souren at ircam.fr Tue May 27 16:43:30 2003 From: Kasper.Souren at ircam.fr (Kasper Souren) Date: Tue, 27 May 2003 22:43:30 +0200 Subject: [SciPy-user] problem with scipy and pil In-Reply-To: <3ED3C2B5.8040209@grosss.net> References: <3ED3C2B5.8040209@grosss.net> Message-ID: <200305272243.30696.Kasper.Souren@ircam.fr> > Anyone know what's going on here? It's strange. But I can only add that it's definitely only occuring in Windows (a platform I have abandoned quite a while ago). I just read in the PIL manual that PIL under Windows saves the image as BMP file and then uses an external viewer to show it. But eh, does it also happens if you change the order of the module imports? bye, Kasper From arnd.baecker at web.de Wed May 28 06:10:01 2003 From: arnd.baecker at web.de (Arnd Baecker) Date: Wed, 28 May 2003 12:10:01 +0200 (CEST) Subject: [SciPy-user] band matrices in scipy? In-Reply-To: <200305261034.34198.p.berkes@biologie.hu-berlin.de> References: <200305261034.34198.p.berkes@biologie.hu-berlin.de> Message-ID: Hi, many thanks for your detailed reply - so it will be a bit more work than I hoped ;-). But I only heard good things about f2py, so I will give it a try! Concerning documentation: On Mon, 26 May 2003, Pietro Berkes wrote: [...] > > b) more importantly: how could I have found this myself? > > It would have been difficult. SciPy is in quick development and (as a > consequence) it lacks of documentation. I think the point is that the main > developers have too much to do with more important things, while the common > user finds it difficult to submit documentation patches. Could someone post > some guidelines about this? That would be really good!! > Maybe we could organize a wiki page where to > collect new documentation. +"some large number" ;-) If only each scipy-user submits his simple example to test his most often used routine + a few lines of documentation this would help enormously! Improving documentation (apart from testing and bug reports ;-) seems to me the place where "we" users could really help. Arnd From arnd.baecker at web.de Wed May 28 07:55:41 2003 From: arnd.baecker at web.de (Arnd Baecker) Date: Wed, 28 May 2003 13:55:41 +0200 (CEST) Subject: [SciPy-user] scipy in education, survey results Message-ID: Hi, presently we are using python+Numeric+scipy in a course on computational physics (if you are interested, you can have a look at http://www.comp-phys.tu-dresden.de/cp2003/ - however most of the material there is in German). In order to get more detailed feedback from the students (in addition to the tutorial sessions) we ran a questionnaire. Here I would like to summarize the main points for the list: 1.) Documentation was generally considered as pretty bad (see below for a "histogramm" - the strongest opinion was "complete rewrite") Main wishes: - more extensive documentation - examples for the routines - help browser a la mathematica 2.) Various issues - differing behaviour of scipy.xplt between M$Windows and Linux (in particular dynamic plots) - problems with interpreting error messages - Linux installation (presently) much more difficult than for M$Windows. As usual, the above only raises the critical points - overall the feedback was definitively positive! In particular the students liked very much to quickly code graphical output (including mouse interactions) and dynamical plots. Also it was appreciated that it is freely available and all of the students either installed python+Numeric+scipy under MSWindows (most) or linux (just a few) at home. Arnd Statistics: (marks range from 1 to 6, with 1 being best and 6 worst; =========== just the normal German school marks ;-) General happiness with python: very good 1 good 2 ||||||||| . 3 |||||| . 4 . 5 | very bad 6 | Documentation: Python Numeric scipy very good 1 | | good 2 |||| . 3 || |||| ||| . 4 |||| ||||| ||||||| . 5 || || || very bad 6 || ||| || From ggerber at sun.ac.za Mon May 19 14:21:17 2003 From: ggerber at sun.ac.za (George Gerber) Date: Mon, 19 May 2003 20:21:17 +0200 Subject: [SciPy-user] band matrices in scipy? In-Reply-To: References: <200305261034.34198.p.berkes@biologie.hu-berlin.de> Message-ID: On Wed 28 May 03 12:10, you wrote: > Hi, > > many thanks for your detailed reply - so it will be > a bit more work than I hoped ;-). But I only heard good things > about f2py, so I will give it a try! > > Concerning documentation: > > On Mon, 26 May 2003, Pietro Berkes wrote: > [...] > > > > b) more importantly: how could I have found this myself? > > > > It would have been difficult. SciPy is in quick development and (as a > > consequence) it lacks of documentation. I think the point is that the > > main developers have too much to do with more important things, while the > > common user finds it difficult to submit documentation patches. Could > > someone post some guidelines about this? > > That would be really good!! > > > Maybe we could organize a wiki page where to > > collect new documentation. > > +"some large number" ;-) > > If only each scipy-user submits his simple example to test > his most often used routine + a few lines of documentation this > would help enormously! > > Improving documentation (apart from testing and bug reports ;-) > seems to me the place where "we" users could really help. I support this + the wiki. > > Arnd > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From nwagner at mecha.uni-stuttgart.de Wed May 28 12:05:12 2003 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Wed, 28 May 2003 18:05:12 +0200 Subject: [SciPy-user] CPU-time Message-ID: <3ED4DE38.D231FE31@mecha.uni-stuttgart.de> Hi all, I would like to measure the CPU-time which is required to solve the eigenvalue problem w, vr = linalg.eig(A,B) How can I do that in scipy ? A small example would be appreciated. Where can I find some background information concerning timing ? Is thera any other meaningful measure in this context ? Nils From Kasper.Souren at ircam.fr Wed May 28 12:27:12 2003 From: Kasper.Souren at ircam.fr (Kasper Souren) Date: Wed, 28 May 2003 18:27:12 +0200 Subject: [SciPy-user] CPU-time In-Reply-To: <3ED4DE38.D231FE31@mecha.uni-stuttgart.de> References: <3ED4DE38.D231FE31@mecha.uni-stuttgart.de> Message-ID: <200305281827.12524.Kasper.Souren@ircam.fr> > I would like to measure the CPU-time which is required to solve the > eigenvalue problem > > w, vr = linalg.eig(A,B) > > How can I do that in scipy ? > A small example would be appreciated. I'd say import time t0 = time.time() big_calculation() t1 = time.time() time_used = t1 - t0 And you can also use profile. Gives you detailed information about this kind of stuff. And if you use IPython: try @prun, which is very convenient to this stuff. If you don't use IPython: check it out, it's great! :) bye, Kasper From falted at openlc.org Wed May 28 12:36:56 2003 From: falted at openlc.org (Francesc Alted) Date: Wed, 28 May 2003 18:36:56 +0200 Subject: [SciPy-user] CPU-time In-Reply-To: <200305281827.12524.Kasper.Souren@ircam.fr> References: <3ED4DE38.D231FE31@mecha.uni-stuttgart.de> <200305281827.12524.Kasper.Souren@ircam.fr> Message-ID: <200305281836.57080.falted@openlc.org> A Dimecres 28 Maig 2003 18:27, Kasper Souren va escriure: > I'd say > > import time > t0 = time.time() > big_calculation() > t1 = time.time() > time_used = t1 - t0 time.clock() returns the CPU time instead of wall-clock time -- Francesc Alted From fperez at colorado.edu Wed May 28 12:45:15 2003 From: fperez at colorado.edu (Fernando Perez) Date: Wed, 28 May 2003 10:45:15 -0600 Subject: [SciPy-user] band matrices in scipy? In-Reply-To: References: <200305261034.34198.p.berkes@biologie.hu-berlin.de> Message-ID: <3ED4E79B.1090900@colorado.edu> Arnd Baecker wrote: > Hi, > > many thanks for your detailed reply - so it will be > a bit more work than I hoped ;-). But I only heard good things > about f2py, so I will give it a try! > While a Wiki-whatever develops, I'm including here my f2py usage notes. It's a lose document, but you may find it useful to get started. Note that you should use it WITH the existing excellent docs: it's a companion with a bit more detail in certain areas, not a replacement. I hope you (and perhaps others) find it of use. Best, f. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: f2py-notes URL: From fperez at colorado.edu Wed May 28 13:03:04 2003 From: fperez at colorado.edu (Fernando Perez) Date: Wed, 28 May 2003 11:03:04 -0600 Subject: [SciPy-user] CPU-time In-Reply-To: <3ED4DE38.D231FE31@mecha.uni-stuttgart.de> References: <3ED4DE38.D231FE31@mecha.uni-stuttgart.de> Message-ID: <3ED4EBC8.8050409@colorado.edu> Nils Wagner wrote: > Hi all, > > I would like to measure the CPU-time which is required to solve the > eigenvalue problem > > w, vr = linalg.eig(A,B) > > How can I do that in scipy ? > A small example would be appreciated. > > Where can I find some background information concerning timing ? > For Unix systems: please don't use either time.clock() or time.time() as suggested in other replies (sorry guys :) time.clock() suffers from wraparound problems, and time.time() is wall time, not cpu time. If you want to use ipython, it comes with a suite of builtin timing routines. They are NOT self-calibrating, so their own overhead WILL matter for micro-timings. Rather, they are designed for reliably timing long running codes, more typical of scientific problems. They rely on resource.getrusage, so they avoid the wraparound problems of time.clock(). If you don't use ipython and don't want to, drop me a line and I'll send you the timing codes separately. Cheers, f. ps. under windows, I have no idea what the best strategy is. Probably changing OS ;) From pearu at scipy.org Wed May 28 13:57:51 2003 From: pearu at scipy.org (Pearu Peterson) Date: Wed, 28 May 2003 20:57:51 +0300 (EEST) Subject: [SciPy-user] CPU-time In-Reply-To: <3ED4DE38.D231FE31@mecha.uni-stuttgart.de> Message-ID: On Wed, 28 May 2003, Nils Wagner wrote: > Hi all, > > I would like to measure the CPU-time which is required to solve the > eigenvalue problem > > w, vr = linalg.eig(A,B) > > How can I do that in scipy ? > A small example would be appreciated. See for example test_eigvals.bench_random method in linalg/tests/test_decomp.py > Where can I find some background information concerning timing ? > > Is thera any other meaningful measure in this context ? On Linux the best measure is jiffies function from scipy_test.testing, IMHO: >>> from scipy_test.testing import jiffies >>> print jiffies.__doc__ Return number of jiffies (1/100ths of a second) that this process has been scheduled in user mode. See man 5 proc. (that on other platforms uses time.time because of lack of knowledge from my part how to get jiffies on those platforms). There is also related function memusage: >>> from scipy_test.testing import memusage >>> print memusage.__doc__ Return virtual memory size in bytes of the running python. that can be handy for discovering memory leaks under Linux. Pearu From wagner.nils at vdi.de Wed May 28 15:51:56 2003 From: wagner.nils at vdi.de (Nils Wagner) Date: Wed, 28 May 2003 21:51:56 +0200 Subject: [SciPy-user] CPU-time In-Reply-To: <3ED4EBC8.8050409@colorado.edu> Message-ID: <20030528205848.6DC6B3EB09@www.scipy.com> ------------------- Nils Wagner wrote: > Hi all, > > I would like to measure the CPU-time which is required to solve the > eigenvalue problem > > w, vr = linalg.eig(A,B) > > How can I do that in scipy ? > A small example would be appreciated. > > Where can I find some background information concerning timing ? > For Unix systems: please don't use either time.clock() or time.time() as suggested in other replies (sorry guys :) time.clock() suffers from wraparound problems, and time.time() is wall time, not cpu time. what is the difference between wall time and cpu time ? If you want to use ipython, it comes with a suite of builtin timing routines. They are NOT self-calibrating, so their own overhead WILL matter for micro-timings. Rather, they are designed for reliably timing long running codes, more typical of scientific problems. They rely on resource.getrusage, so they avoid the wraparound problems of time.clock(). If you don't use ipython and don't want to, drop me a line and I'll send you the timing codes separately. It would be very kind of you, if you could send me the codes. Thanks in advance Nils Cheers, f. ps. under windows, I have no idea what the best strategy is. Probably changing OS ;) _______________________________________________ SciPy-user mailing list SciPy-user at scipy.net http://www.scipy.net/mailman/listinfo/scipy-user From wagner.nils at vdi.de Wed May 28 16:02:37 2003 From: wagner.nils at vdi.de (Nils Wagner) Date: Wed, 28 May 2003 22:02:37 +0200 Subject: [SciPy-user] IPython via cvs In-Reply-To: <3ED4EBC8.8050409@colorado.edu> Message-ID: <20030528210929.B8EC33EB17@www.scipy.com> Hi all, How do I install IPython via cvs ? python setup.py build python setup.py install Is that o.k. ? Nils From fperez at colorado.edu Wed May 28 16:12:59 2003 From: fperez at colorado.edu (Fernando Perez) Date: Wed, 28 May 2003 14:12:59 -0600 Subject: [SciPy-user] IPython via cvs In-Reply-To: <20030528210929.B8EC33EB17@www.scipy.com> References: <20030528210929.B8EC33EB17@www.scipy.com> Message-ID: <3ED5184B.8080908@colorado.edu> Nils Wagner wrote: > Hi all, > > How do I install IPython via cvs ? > > > python setup.py build python setup.py install > > Is that o.k. ? That should do it, but let me know if you have any problems. Best, f. From fperez at colorado.edu Wed May 28 16:15:27 2003 From: fperez at colorado.edu (Fernando Perez) Date: Wed, 28 May 2003 14:15:27 -0600 Subject: [SciPy-user] CPU-time In-Reply-To: <20030528205848.6DC6B3EB09@www.scipy.com> References: <20030528205848.6DC6B3EB09@www.scipy.com> Message-ID: <3ED518DF.7030406@colorado.edu> Nils Wagner wrote: > It would be very kind of you, if you could send me the codes. > > Thanks in advance > The timings section is included here. Best, f. ps. you need to fix your mail client's quoting. It took me a while to find what was your new message because your client isn't properly quoting any text. In a longer message, it will be basically impossible to see what you are writing vs. the quoted materials. -------------- next part -------------- A non-text attachment was scrubbed... Name: timing.py Type: text/x-python Size: 2207 bytes Desc: not available URL: From wagner.nils at vdi.de Wed May 28 16:44:28 2003 From: wagner.nils at vdi.de (Nils Wagner) Date: Wed, 28 May 2003 22:44:28 +0200 Subject: [SciPy-user] CPU-time In-Reply-To: <3ED518DF.7030406@colorado.edu> Message-ID: <20030528215120.857183EB09@www.scipy.com> ------------------- Nils Wagner wrote: > It would be very kind of you, if you could send me the codes. > > Thanks in advance > The timings section is included here. Best, f. ps. you need to fix your mail client's quoting. It took me a while to find what was your new message because your client isn't properly quoting any text. In a longer message, it will be basically impossible to see what you are writing vs. the quoted materials. Thank you for your prompt reply. How do I use timing.py ? Where, i.e. In which directory, do I put this file ? Nils From fperez at colorado.edu Wed May 28 16:49:01 2003 From: fperez at colorado.edu (Fernando Perez) Date: Wed, 28 May 2003 14:49:01 -0600 Subject: [SciPy-user] CPU-time In-Reply-To: <20030528215120.857183EB09@www.scipy.com> References: <20030528215120.857183EB09@www.scipy.com> Message-ID: <3ED520BD.7050003@colorado.edu> Nils Wagner wrote: > ps. you need to fix your mail client's quoting. It took me a while > to find > what was your new message because your client isn't properly quoting > any text. > In a longer message, it will be basically impossible to see what > you are > writing vs. the quoted materials. > > Thank you for your prompt reply. > How do I use timing.py ? > Where, i.e. In which directory, do I put this file ? Wherever you want. I just stripped the timings section from IPython.genutils to hand it to you, and gave it a reasonable sounding name. As for usage, please see the code. Every function has a very detailed docstring. If you encounter a specific problem, let me know and I'll try to help. And please fix your mail client. Replying to your messages is annoyingly difficult because without carefully reading and remembering what the previous message was, there is no way to tell what is quoted and what is new text written by you. Best, f. From nwagner at mecha.uni-stuttgart.de Thu May 29 05:24:14 2003 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Thu, 29 May 2003 11:24:14 +0200 Subject: [SciPy-user] CPU-time in Ipython Message-ID: <3ED5D1BE.734DE902@mecha.uni-stuttgart.de> Hi all, Finally, I have installed IPython via cvs. Again, the question comes up, how to measure the CPU-time which is required to solve the eigenvalue problem. A small example is appreciated from scipy import * w, vr = linalg.eig(A,B) Thanks in advance Nils From nwagner at mecha.uni-stuttgart.de Thu May 29 11:17:26 2003 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Thu, 29 May 2003 17:17:26 +0200 Subject: [SciPy-user] Debian package of scipy Message-ID: <3ED62486.DC437FE8@mecha.uni-stuttgart.de> Hi all, I wonder, if someone has built a debian package from a recent CVS of scipy. Nils From fperez at colorado.edu Thu May 29 13:02:26 2003 From: fperez at colorado.edu (Fernando Perez) Date: Thu, 29 May 2003 11:02:26 -0600 Subject: [SciPy-user] CPU-time in Ipython In-Reply-To: <3ED5D1BE.734DE902@mecha.uni-stuttgart.de> References: <3ED5D1BE.734DE902@mecha.uni-stuttgart.de> Message-ID: <3ED63D22.6070603@colorado.edu> Nils Wagner wrote: > Hi all, > > Finally, I have installed IPython via cvs. > > Again, the question comes up, how to measure the CPU-time which is > required to solve the > eigenvalue problem. > > A small example is appreciated > > from scipy import * > > > w, vr = linalg.eig(A,B) In [10]: size=100 In [11]: A=RA.random((size,size)) In [12]: B=RA.random((size,size)) In [13]: timing(1,linalg.eig,A,B) Out[13]: 0.10742200000000002 In [14]: size=500 In [15]: A=RA.random((size,size)) In [16]: B=RA.random((size,size)) In [17]: timing(1,linalg.eig,A,B) Out[17]: 23.265625 From the docstring: In [18]: timing? Type: function Base Class: String Form: Namespace: Interactive File: /usr/local/home/fperez/code/python/IPython/genutils.py Definition: timing(reps, func, *args, **kw) Docstring: timing(reps,func,*args,**kw) -> t_total Execute a function reps times, the elapsed total CPU time in seconds. This is just the first value in timings_out(). You'll need to import timing and friends first, they live in IPython.genutils. Best, f. From Ralf_Ahlbrink at web.de Thu May 29 17:21:54 2003 From: Ralf_Ahlbrink at web.de (Ralf Ahlbrink) Date: Thu, 29 May 2003 23:21:54 +0200 Subject: [SciPy-user] Debian package of scipy In-Reply-To: <3ED62486.DC437FE8@mecha.uni-stuttgart.de> References: <3ED62486.DC437FE8@mecha.uni-stuttgart.de> Message-ID: <200305292321.55110.Ralf_Ahlbrink@web.de> Am Donnerstag, 29. Mai 2003 17:17 schrieb Nils Wagner: > Hi all, > > I wonder, if someone has built a debian package from a recent CVS of > scipy. Hi! Recently I fixed my debs for the new setup scheme. I'll try to upload them soon. > > Nils > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From nwagner at mecha.uni-stuttgart.de Fri May 30 02:05:49 2003 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Fri, 30 May 2003 08:05:49 +0200 Subject: [SciPy-user] CPU-time in Ipython References: <3ED5D1BE.734DE902@mecha.uni-stuttgart.de> <3ED63D22.6070603@colorado.edu> Message-ID: <3ED6F4BD.481D3F3B@mecha.uni-stuttgart.de> Fernando Perez schrieb: > > Nils Wagner wrote: > > Hi all, > > > > Finally, I have installed IPython via cvs. > > > > Again, the question comes up, how to measure the CPU-time which is > > required to solve the > > eigenvalue problem. > > > > A small example is appreciated > > > > from scipy import * > > > > > > w, vr = linalg.eig(A,B) > > In [10]: size=100 > > In [11]: A=RA.random((size,size)) > > In [12]: B=RA.random((size,size)) > > In [13]: timing(1,linalg.eig,A,B) > Out[13]: 0.10742200000000002 > > In [14]: size=500 > > In [15]: A=RA.random((size,size)) > > In [16]: B=RA.random((size,size)) > > In [17]: timing(1,linalg.eig,A,B) > Out[17]: 23.265625 > > From the docstring: > > In [18]: timing? > Type: function > Base Class: > String Form: > Namespace: Interactive > File: /usr/local/home/fperez/code/python/IPython/genutils.py > Definition: timing(reps, func, *args, **kw) > Docstring: > timing(reps,func,*args,**kw) -> t_total > > Execute a function reps times, the elapsed total CPU time in seconds. This > is just the first value in timings_out(). > > You'll need to import timing and friends first, they live in IPython.genutils. > > Best, > > f. > But, what can I do to obtain the CPU-time of a whole sequence of different functions, i.e. t_0= ? while t < tend: several function calls t_1= ? \Delta t = t_1-t_0 I am interested in \Delta t Nils > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From ariciputi at pito.com Fri May 30 08:16:59 2003 From: ariciputi at pito.com (Andrea Riciputi) Date: Fri, 30 May 2003 14:16:59 +0200 Subject: [SciPy-user] scipy in education, survey results In-Reply-To: Message-ID: <9D0A0178-9298-11D7-8A64-000393933E4E@pito.com> On Wednesday, May 28, 2003, at 13:55 Europe/Rome, Arnd Baecker wrote: > Hi, > > presently we are using python+Numeric+scipy in a course on > computational > physics (if you are interested, you can have a look at > http://www.comp-phys.tu-dresden.de/cp2003/ > - however most of the material there is in German). > In order to get more detailed feedback from the students > (in addition to the tutorial sessions) we ran a questionnaire. > Here I would like to summarize the main points for the list: > > 1.) Documentation was generally considered as pretty bad > (see below for a "histogramm" - the strongest opinion > was "complete rewrite") > [snip] I agree with your students. As a Python+Numeric+SciPy beginner, the main problem that I face with, is the missing documentation. Can we hope in some improovement in near future? Thanks, Andrea. --- Andrea Riciputi "Science is like sex: sometimes something useful comes out, but that is not the reason we are doing it" -- (Richard Feynman) From Kasper.Souren at ircam.fr Fri May 30 10:52:32 2003 From: Kasper.Souren at ircam.fr (Kasper Souren) Date: Fri, 30 May 2003 16:52:32 +0200 Subject: [SciPy-user] scipy in education, survey results In-Reply-To: <9D0A0178-9298-11D7-8A64-000393933E4E@pito.com> References: <9D0A0178-9298-11D7-8A64-000393933E4E@pito.com> Message-ID: <200305301652.32731.Kasper.Souren@ircam.fr> > > 1.) Documentation was generally considered as pretty bad > > (see below for a "histogramm" - the strongest opinion > > was "complete rewrite") > > [snip] > > I agree with your students. As a Python+Numeric+SciPy beginner, the > main problem that I face with, is the missing documentation. Can we > hope in some improovement in near future? Maybe if students can receive high marks for writing good documentation? :) But, seriously, I'm still waiting for the SciPyWiki. I think it would be a great way to create a large information pool on SciPy and related topics. bye, Kasper From joe at enthought.com Fri May 30 11:25:31 2003 From: joe at enthought.com (Joe Cooper) Date: Fri, 30 May 2003 10:25:31 -0500 Subject: [SciPy-user] scipy in education, survey results In-Reply-To: <200305301652.32731.Kasper.Souren@ircam.fr> References: <9D0A0178-9298-11D7-8A64-000393933E4E@pito.com> <200305301652.32731.Kasper.Souren@ircam.fr> Message-ID: <3ED777EB.1020508@enthought.com> Kasper Souren wrote: >>> 1.) Documentation was generally considered as pretty bad >>> (see below for a "histogramm" - the strongest opinion >>> was "complete rewrite") >>>[snip] >> >>I agree with your students. As a Python+Numeric+SciPy beginner, the >>main problem that I face with, is the missing documentation. Can we >>hope in some improovement in near future? > > > Maybe if students can receive high marks for writing good documentation? :) > > But, seriously, I'm still waiting for the SciPyWiki. I think it would be a > great way to create a large information pool on SciPy and related topics. I'm working on getting Zwiki up and running on scipy.org, but it isn't cooperating with me...Probably won't be long though. -- Joe Cooper From fperez at colorado.edu Fri May 30 13:08:48 2003 From: fperez at colorado.edu (Fernando Perez) Date: Fri, 30 May 2003 11:08:48 -0600 Subject: [SciPy-user] CPU-time in Ipython In-Reply-To: <3ED6F4BD.481D3F3B@mecha.uni-stuttgart.de> References: <3ED5D1BE.734DE902@mecha.uni-stuttgart.de> <3ED63D22.6070603@colorado.edu> <3ED6F4BD.481D3F3B@mecha.uni-stuttgart.de> Message-ID: <3ED79020.801@colorado.edu> Nils Wagner wrote: > But, what can I do to obtain the CPU-time of a whole sequence of > different functions, i.e. > > t_0= ? > > while t < tend: > > several function calls > > > t_1= ? > > \Delta t = t_1-t_0 > > I am interested in \Delta t Well, timing() times a single function call and returns the time for its execution as a float. So you can: - call it with all your various functions, and add the returned times - write a simple wrap function which calls everything you want in one pass and time that with timing() Alternatively, use the clock() function in genutils (which bypasses the wraparound problems of time.clock() under unix) and do: t0 = clock() ... delta = clock() - t0. Cheers, f. From joshi_y_v at yahoo.com Sat May 31 19:01:02 2003 From: joshi_y_v at yahoo.com (Yogesh Joshi) Date: Sat, 31 May 2003 16:01:02 -0700 (PDT) Subject: [SciPy-user] Anyone Linux_Intel7.0_PII Prebuilt Atlas lib. PLEASE Message-ID: <20030531230102.42461.qmail@web12403.mail.yahoo.com> Hello Scipy users ! Can anyone provide the prebuilt ATLAS binaries for Linux Intel7.0 PII ? Thanks in advance YVJ --------------------------------- Do you Yahoo!? Free online calendar with sync to Outlook(TM). -------------- next part -------------- An HTML attachment was scrubbed... URL: