From prabhu at aero.iitm.ernet.in Tue Oct 1 01:12:29 2002 From: prabhu at aero.iitm.ernet.in (Prabhu Ramachandran) Date: Tue, 1 Oct 2002 10:42:29 +0530 Subject: [SciPy-user] atlas/clapack/etc problems. In-Reply-To: <15769.6261.434511.89927@12-248-11-90.client.attbi.com> References: <15769.4045.442880.462542@monster.linux.in> <15769.6261.434511.89927@12-248-11-90.client.attbi.com> Message-ID: <15769.11965.856552.749440@monster.linux.in> >>>>> "SM" == Skip Montanaro writes: Prabhu> export ATLAS=/full/path/to/your/freshly/built/atlas/*.a SM> Is this correct? I've never seen any sort of library or The example I gave was confusing. :( To clarify, ATLAS needs to point to the directory that contains all the libs build by atlas and not to the libs themselves. So if that is /src/ATLAS/lib/arch/Linux_PIII/ export ATLAS=/src/ATLAS/lib/arch/Linux_PIII/ SM> I would have expected a directory reference like SM> export ATLAS=/full/path/to/your/freshly/built/atlas Yes, it is a directory reference to the directory that contains all the *.a's. That is what I meant but gave a lousy example. cheers, prabhu From eric at enthought.com Tue Oct 1 04:47:42 2002 From: eric at enthought.com (eric jones) Date: Tue, 1 Oct 2002 03:47:42 -0500 Subject: [SciPy-user] about using python class in weave In-Reply-To: Message-ID: <003a01c26927$34d72070$6b01a8c0@ericlaptop> > -----Original Message----- > From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net] On > Behalf Of Jing (George) Cao > Sent: Monday, September 23, 2002 3:32 PM > To: scipy-user at scipy.net > Subject: RE: [SciPy-user] about using python class in weave > > I am now want to make SWIG and python work together, so I guess I met the > same problem. > > Dave told me weave works fine with previous version of SWIG, and I also > found a directory named swig in WEAVE. Is there any document about what > you've done to make weave and previous SWIG works together and where can > I find it? The documentation on the weave site is about all there is right now. The CVS version is significantly changed from this, and the code is much cleaner. There is a weave/wx_spec.py file that defines the wx converter. For now, you'll need to examine this. The c_spec.py file may also be useful. eric > > Thank you. > > Jing > > On Mon, 23 Sep 2002, eric jones wrote: > > > Instance conversion isn't supported in the released version, but the CVS > > version handles it. CVS also has limited support for working with > > attributes. I'm in the process of augmenting SCXX for this sort of > > thing. Support for calling methods (what you want) hasn't been added > > yet, but probably will appear within the next week or so. > > > > It's worth noting that, unless your Python class is a wrapper around a > > C++ class (using SWIG or boost or whatever), the performance is going to > > be lousy for this because it has to call back into Python. It's > > actually worse than Python because of the overhead in the C++ classes > > used to represent Pyhon objects (perhaps this can be reduced). > > > > So, if your app needs to access the python class information within a > > computational loop, weave isn't going to help much. However, if you can > > do something like: > > > > a = s.blah() > > weave.inline("", ['a']) > > > > then you could get big wins. > > > > To get back to the same speed as Python (possibly even 10-100% faster > > actually), you can manipulate py_s instead of s. py_s is a raw > > PyObject* and you can use the Python C API on this guy until your hearts > > content. > > > > The other option is to tackle the problem of writing type converters > > that are based on the boost library. This library is a lot more complex > > than SCXX (which we use now), but it is also more powerful. Something > > along the lines of what you want is probably likely using it. > > > > Regards, > > Eric > > > > > -----Original Message----- > > > From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net] > > On > > > Behalf Of Yijue Hou > > > Sent: Monday, September 23, 2002 1:51 PM > > > To: scipy-user at scipy.net > > > Subject: [SciPy-user] about using python class in weave > > > > > > weave.inline call use python integers directly, > > > but while I tried to use python classes, it doesn't work. > > > > > > suppose s is a python class, > > > my code: > > > weave.inline("s.blah();",['s']) > > > > > > it said it unable to convert to c++ types, so how to call python > > > classes in c function using weave? > > > > > > Thanks > > > > > > > > > _______________________________________________ > > > 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 nwagner at mecha.uni-stuttgart.de Wed Oct 2 09:03:03 2002 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Wed, 02 Oct 2002 15:03:03 +0200 Subject: [SciPy-user] Latest CVS problems during build Message-ID: <3D9AEE87.AE6CF1F1@mecha.uni-stuttgart.de> Hi, There seems to be a problem with the latest cvs-version This is the output of /usr/local/bin/python setup.py build Traceback (most recent call last): File "setup.py", line 133, in ? install_package() File "setup.py", line 99, in install_package config.extend([get_package_config(x,parent_package)for x in standard_packages]) File "setup.py", line 49, in get_package_config config = mod.configuration(parent) File "linalg/setup_linalg.py", line 33, in configuration atlas_info = get_info('atlas') File "scipy_distutils/system_info.py", line 127, in get_info return cl().get_info() File "scipy_distutils/system_info.py", line 224, in __init__ assert isinstance(self.search_static_first, int) TypeError: isinstance() arg 2 must be a class or type Any idea ? Nils From pearu at cens.ioc.ee Wed Oct 2 09:44:51 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Wed, 2 Oct 2002 16:44:51 +0300 (EEST) Subject: [SciPy-user] Latest CVS problems during build In-Reply-To: <3D9AEE87.AE6CF1F1@mecha.uni-stuttgart.de> Message-ID: On Wed, 2 Oct 2002, Nils Wagner wrote: > Hi, > > There seems to be a problem with the latest cvs-version > > This is the output of /usr/local/bin/python setup.py build > > Traceback (most recent call last): > File "setup.py", line 133, in ? > install_package() > File "setup.py", line 99, in install_package > config.extend([get_package_config(x,parent_package)for x in > standard_packages]) > File "setup.py", line 49, in get_package_config > config = mod.configuration(parent) > File "linalg/setup_linalg.py", line 33, in configuration > atlas_info = get_info('atlas') > File "scipy_distutils/system_info.py", line 127, in get_info > return cl().get_info() > File "scipy_distutils/system_info.py", line 224, in __init__ > assert isinstance(self.search_static_first, int) > TypeError: isinstance() arg 2 must be a class or type > > Any idea ? Fixed in CVS. Thanks. Pearu From nwagner at mecha.uni-stuttgart.de Wed Oct 2 10:08:54 2002 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Wed, 02 Oct 2002 16:08:54 +0200 Subject: [SciPy-user] scipy.test('fast') failed Message-ID: <3D9AFDF6.D56D717A@mecha.uni-stuttgart.de> Hi, The result of scipy.test('fast') is an infinite loop. What is the reason for that ? Python 2.1.2 (#1, Feb 25 2002, 18:04:21) [GCC 2.95.3 20010315 (SuSE)] on linux2 Type "copyright", "credits" or "license" for more information. >>> import scipy >>> scipy.__version__ '0.2.0_alpha_139.4230' Nils From pearu at cens.ioc.ee Wed Oct 2 11:54:49 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Wed, 2 Oct 2002 18:54:49 +0300 (EEST) Subject: [SciPy-user] scipy.test('fast') failed In-Reply-To: <3D9AFDF6.D56D717A@mecha.uni-stuttgart.de> Message-ID: On Wed, 2 Oct 2002, Nils Wagner wrote: > Hi, > > The result of scipy.test('fast') is an infinite loop. That's interesting! > What is the reason for that ? The reason is irrelevant because AFAIK scipy.test takes only integer arguments. So, use scipy.test(1) Pearu From nwagner at mecha.uni-stuttgart.de Wed Oct 2 12:05:16 2002 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Wed, 02 Oct 2002 18:05:16 +0200 Subject: [SciPy-user] scipy.test('fast') failed References: Message-ID: <3D9B193C.7EC5F666@mecha.uni-stuttgart.de> Pearu Peterson schrieb: > > On Wed, 2 Oct 2002, Nils Wagner wrote: > > > Hi, > > > > The result of scipy.test('fast') is an infinite loop. > > That's interesting! > > > What is the reason for that ? > > The reason is irrelevant because AFAIK scipy.test takes only integer > arguments. So, use > > scipy.test(1) > What you may find in installation.txt is 7. Testing SciPy Python comes with some unit tests and the numbers are growing every day (well monthly anyway). To test your installation use scipy.test('fast') to test the quick sub-set of all tests or scipy.test() to run all available tests. The first should take less than one second, the second will take minutes, depending on your processor speed because it includes the scipy.compiler tests which give gcc a major workout. c:> python ... >>> import scipy >>> scipy.test('fast') No test suite found for scipy.build_flib No test suite found for scipy.data_store No test suite found for scipy.doctest snip Nils > Pearu > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From pearu at cens.ioc.ee Wed Oct 2 12:13:42 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Wed, 2 Oct 2002 19:13:42 +0300 (EEST) Subject: [SciPy-user] scipy.test('fast') failed In-Reply-To: <3D9B193C.7EC5F666@mecha.uni-stuttgart.de> Message-ID: On Wed, 2 Oct 2002, Nils Wagner wrote: > Pearu Peterson schrieb: > > > > On Wed, 2 Oct 2002, Nils Wagner wrote: > > > > > Hi, > > > > > > The result of scipy.test('fast') is an infinite loop. > > > > That's interesting! > > > > > What is the reason for that ? > > > > The reason is irrelevant because AFAIK scipy.test takes only integer > > arguments. So, use > > > > scipy.test(1) > > > What you may find in installation.txt is Well, these docs are wrong then. Read the source or use scipy.test() Pearu From eric at enthought.com Wed Oct 2 13:34:32 2002 From: eric at enthought.com (eric jones) Date: Wed, 2 Oct 2002 12:34:32 -0500 Subject: [SciPy-user] scipy.test('fast') failed In-Reply-To: <3D9B193C.7EC5F666@mecha.uni-stuttgart.de> Message-ID: <000101c26a39$f7b43de0$777ba8c0@ericlaptop> > Pearu Peterson schrieb: > > > > On Wed, 2 Oct 2002, Nils Wagner wrote: > > > > > Hi, > > > > > > The result of scipy.test('fast') is an infinite loop. > > > > That's interesting! > > > > > What is the reason for that ? > > > > The reason is irrelevant because AFAIK scipy.test takes only integer > > arguments. So, use > > > > scipy.test(1) > > > What you may find in installation.txt is References: <3D9AEE87.AE6CF1F1@mecha.uni-stuttgart.de> Message-ID: <15771.5539.13042.739751@12-248-11-90.client.attbi.com> Nils> There seems to be a problem with the latest cvs-version ... Nils> TypeError: isinstance() arg 2 must be a class or type What version of Python are you using? I forgot momentarily that people might use SciPy with Python < 2.2. "int" became a type in 2.2. I should have left that as 'type(0)'. -- Skip Montanaro - skip at pobox.com "Airplanes don't fly until the paperwork equals the weight of the aircraft. Same with i18N." - from the "Perl, Unicode and i18N FAQ" From wagner.nils at vdi.de Wed Oct 2 15:40:31 2002 From: wagner.nils at vdi.de (My VDI Freemail) Date: Wed, 02 Oct 2002 21:40:31 +0200 Subject: [SciPy-user] =?iso-8859-1?q?scipy.test=28'fast'=29?= failed In-Reply-To: Message-ID: <20021002194704.298E13EAD2@www.scipy.com> ------------------- > > On Wed, 2 Oct 2002, Nils Wagner wrote: > > > Pearu Peterson schrieb: > > > > > > On Wed, 2 Oct 2002, Nils Wagner wrote: > > > > > > > Hi, > > > > > > > > The result of scipy.test('fast') is an infinite loop. > > > > > > That's interesting! > > > > > > > What is the reason for that ? > > > > > > The reason is irrelevant because AFAIK scipy.test takes only integer > > > arguments. So, use > > > > > > scipy.test(1) > > > > > What you may find in installation.txt is > > > > Well, these docs are wrong then. Read the source or use > scipy.test() > > Pearu > > The result of scipy.test(1) is also an infinite loop. Any suggestion ? Nils > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From pearu at cens.ioc.ee Wed Oct 2 16:17:18 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Wed, 2 Oct 2002 23:17:18 +0300 (EEST) Subject: [SciPy-user] =?iso-8859-1?q?scipy.test=28'fast'=29?= failed In-Reply-To: <20021002194704.298E13EAD2@www.scipy.com> Message-ID: On Wed, 2 Oct 2002, My VDI Freemail wrote: > The result of scipy.test(1) is also an infinite loop. Strange, here scipy.test(1) works fine: >>> scipy.test(1) No test suite found for scipy.__cvs_version__ creating test suite for: scipy.common No test suite found for scipy.helper Ran 428 tests in 1.243s OK >>> scipy.__version__ '0.2.0_alpha_139.4232' > Any suggestion ? Once we had the same problem from weave tests. Since then weave has changed quite a bit and may be you have old weave bits in your system. Suggestions: 1) Try to run scipy module tests separately to find out which module is causing the infinite loop: >>> scipy.linalg.test(1) >>> scipy.stats.test(1) >>> scipy.weave.test(1) etc. 2) Remove all installed scipy modules and the scipy/build directory, and rebuild scipy from a clean source tree. Pearu From wagner.nils at vdi.de Wed Oct 2 16:35:22 2002 From: wagner.nils at vdi.de (My VDI Freemail) Date: Wed, 02 Oct 2002 22:35:22 +0200 Subject: [SciPy-user] =?iso-8859-1?q?scipy.test=28'fast'=29?= failed In-Reply-To: Message-ID: <20021002204158.7B5AB3EAD2@www.scipy.com> ------------------- > > On Wed, 2 Oct 2002, My VDI Freemail wrote: > > > The result of scipy.test(1) is also an infinite loop. > > Strange, here scipy.test(1) works fine: > > >>> scipy.test(1) > No test suite found for scipy.__cvs_version__ > creating test suite for: scipy.common > No test suite found for scipy.helper > > > > Ran 428 tests in 1.243s > > OK > > >>> scipy.__version__ > '0.2.0_alpha_139.4232' > > > Any suggestion ? > > Once we had the same problem from weave tests. Since then weave has > changed quite a bit and may be you have old weave bits in your system. > > Suggestions: > > 1) Try to run scipy module tests separately to find out which module is > causing the infinite loop: > > >>> scipy.linalg.test(1) > >>> scipy.stats.test(1) > >>> scipy.weave.test(1) > etc. > > 2) Remove all installed scipy modules and the scipy/build directory, > and rebuild scipy from a clean source tree. > > Pearu Thank you very much. I have removed all the stuff. However, there is one failure ====================================================================== FAIL: check_basic (test_morestats.test_shapiro) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.2/site-packages/scipy/stats/tests/test_morestats.py", line 30, in check_basic assert_almost_equal(w,0.90047299861907959,8) File "/usr/lib/python2.2/site-packages/scipy_test/testing.py", line 335, in assert_almost_equal assert round(abs(desired - actual),decimal) == 0, msg AssertionError: Items are not equal: DESIRED: 0.900472998619 ACTUAL: 0.900472939014 ---------------------------------------------------------------------- Ran 428 tests in 1.098s FAILED (failures=1) Nils > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From wagner.nils at vdi.de Wed Oct 2 16:39:42 2002 From: wagner.nils at vdi.de (My VDI Freemail) Date: Wed, 02 Oct 2002 22:39:42 +0200 Subject: [SciPy-user] More failures in =?iso-8859-1?q?scipy.test=281=29?= In-Reply-To: Message-ID: <20021002204612.47A193EADA@www.scipy.com> Hi, looking carefully on the output of scipy.test(1) I found the following FAILURE to import scipy_base.scipy_base_version /usr/lib/python2.2/site-packages/scipy_base/scipy_base_version.py:6: ImportError: No module named __cvs_version__ (in ?) creating test suite for: scipy.linalg.matfuncs !! FAILURE building test for scipy.linalg.matfuncs :1: ImportError: No module named test_matfuncs (in ?) Nils From travis at enthought.com Wed Oct 2 18:04:15 2002 From: travis at enthought.com (Travis N. Vaught) Date: Wed, 2 Oct 2002 17:04:15 -0500 Subject: [SciPy-user] More failures in scipy.test(1) In-Reply-To: <20021002204612.47A193EADA@www.scipy.com> Message-ID: The import error should go away with a re-install of the cvs version of scipy--you might wait until later today, though...I'm looking to rebuild the tarballs shortly... Pearu is finishing up a task I started and left half-done -- the addition of versioning for scipy_base et al. (thanks Pearu). Travis > -----Original Message----- > From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net]On > Behalf Of My VDI Freemail > Sent: Wednesday, October 02, 2002 3:40 PM > To: scipy-user at scipy.net > Subject: [SciPy-user] More failures in scipy.test(1) > > > Hi, > > looking carefully on the output of scipy.test(1) > I found the following > > FAILURE to import scipy_base.scipy_base_version > /usr/lib/python2.2/site-packages/scipy_base/scipy_base_version.py: > 6: ImportError: No module named __cvs_version__ (in ?) > > creating test suite for: scipy.linalg.matfuncs > !! FAILURE building test for scipy.linalg.matfuncs > :1: ImportError: No module named test_matfuncs (in ?) > > > Nils > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From dbdavidson at yahoo.com Thu Oct 3 08:16:07 2002 From: dbdavidson at yahoo.com (Daniel Davidson) Date: Thu, 3 Oct 2002 05:16:07 -0700 (PDT) Subject: [SciPy-user] newbie python & optimization Message-ID: <20021003121607.3044.qmail@web11602.mail.yahoo.com> Im taking a course in fixed income asset pricing and professor *strongly* suggests matlab with optimization, financial toolbox, statistics toolbox and spline toolbox (~$360 ouch). Have following questions: * What is probability that Python with scipy will do the trick? * Have been reading python and playing. The NumPy pdf docs I read specify a certain behavior for ufuncs, which I see until I import optimize. What causes this and can I use optimize without this happening?: >>> from Numeric import * >>> a = array(([1,2,3])) >>> a*a array([1, 4, 9]) >>> import scipy.optimize >>> a*a array([0, 0, 0]) I can get around this by putting Numeric in everywhere Numeric.multiply(a,a), but I would prefer not. * I successfully use fmin to minimize a particular form function (Nelson Siegel) to curve fit a yield to some data points. I try 3 cases and the first two smaller cases succeed (approach 0) and the last does not really. Yet my partner was able to do the 3rd one in excel solver. When I take his spreadsheat and change the 'guess' (there are four parameters) and try to solve again it also fails - so maybe this is not the algorithm to use (maybe local minima)? * When using optimizations routines you pass it a function to evaluate. The algorithm picks numbers to put in. What is a good strategy for handling errors due to the choice (e.g. OverflowError,....)? Any ideas or suggestions welcome. Cordially, Dan PS Here is the funcion and I welcome any criticisms. def ZHat(args, P, C): """ args: optimization parameterized arguments (e.g. theta's and lambda) P: Price Matrix C: Cashflow Matrix """ j=arange(1,size(P)+1) partialPeriod = Numeric.divide(j,args[3]) expPartialPeriod = Numeric.exp(Numeric.multiply(-1.0, partialPeriod)) r = args[0] + Numeric.multiply((args[1]+args[2]),(Numeric.divide((1.0-expPartialPeriod),partialPeriod))) \ - Numeric.multiply(args[2],expPartialPeriod) return 100.0*(Numeric.power(Numeric.divide(1.0,Numeric.add(1.0,r)),j)) def PHat(args,P,C): zhat = ZHat(args,P,C) return matrixmultiply(C,zhat) globalPrevObj = 1e+100 def funcFormHelper(args, P, C): """ The functional form to be curve fitted. args: optimization parameterized arguments (e.g. theta's and lambda) P: Price Matrix C: Cashflow Matrix """ try: p_hat = PHat(args,P,C) difference = P-p_hat difference_sq = Numeric.power(difference,2) obj = add.reduce(difference_sq) except Exception: print "Unexpected Error:", sys.exc_info()[0] obj = YieldExtractor.globalPrevObj + 1 YieldExtractor.globalPrevObj = obj return obj def createFuncForm(P, C): """ Helper function used just to pass P, C cleanly to functional form """ return lambda args: funcFormHelper(args, P, C) Invoked like: self.optimVars = fmin(createFuncForm(self.P,self.C), \ [0.1,1.0,0,1.1], \ maxfun=100000, maxiter=100000, \ xtol=1e-10, ftol=1e-10, disp=1) --------------------------------- Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! -------------- next part -------------- An HTML attachment was scrubbed... URL: From steven.robbins at videotron.ca Thu Oct 3 08:39:51 2002 From: steven.robbins at videotron.ca (Steve M. Robbins) Date: Thu, 03 Oct 2002 08:39:51 -0400 Subject: [SciPy-user] newbie python & optimization In-Reply-To: <20021003121607.3044.qmail@web11602.mail.yahoo.com> References: <20021003121607.3044.qmail@web11602.mail.yahoo.com> Message-ID: <20021003123951.GD29890@nyongwa.montreal.qc.ca> On Thu, Oct 03, 2002 at 05:16:07AM -0700, Daniel Davidson wrote: > > Im taking a course in fixed income asset pricing and professor *strongly* suggests matlab with optimization, financial toolbox, statistics toolbox and spline toolbox (~$360 ouch). Have following questions: > > * What is probability that Python with scipy will do the trick? 0.7 -S From gvermeul at grenoble.cnrs.fr Thu Oct 3 10:47:46 2002 From: gvermeul at grenoble.cnrs.fr (Gerard Vermeulen) Date: Thu, 3 Oct 2002 16:47:46 +0200 Subject: [SciPy-user] newbie python & optimization In-Reply-To: <20021003121607.3044.qmail@web11602.mail.yahoo.com> References: <20021003121607.3044.qmail@web11602.mail.yahoo.com> Message-ID: <20021003144746.GA4678@venus.grenoble.cnrs.fr> On Thu, Oct 03, 2002 at 05:16:07AM -0700, Daniel Davidson wrote: > > Im taking a course in fixed income asset pricing and professor *strongly* suggests matlab with optimization, financial toolbox, statistics toolbox and spline toolbox (~$360 ouch). Have following questions: > > * What is probability that Python with scipy will do the trick? > 100 % (depends on you), you might have to work a little harder, but you will learn more. Python is a much better language than MatLab. > > * Have been reading python and playing. The NumPy pdf docs I read specify a certain behavior for ufuncs, which I see until I import optimize. What causes this and can I use optimize without this happening?: > > >>> from Numeric import * > >>> a = array(([1,2,3])) > >>> a*a > array([1, 4, 9]) > >>> import scipy.optimize > >>> a*a > array([0, 0, 0]) > I can do: [packer at venus packer]$ python Python 2.2.1 (#1, May 8 2002, 22:31:32) [GCC 2.96 20000731 (Mandrake Linux 8.2 2.96-0.76mdk)] on linux-i386 Type "help", "copyright", "credits" or "license" for more information. >>> from Numeric import * >>> a = array([1,2,3]) >>> a*a array([1, 4, 9]) >>> from scipy import optimize >>> a*a array([1, 4, 9]) >>> Works fine for me. Without more information (OS, SciPy, Python, ...) nobody can help you. Gerard From Nadavh at envision.co.il Thu Oct 3 11:41:30 2002 From: Nadavh at envision.co.il (Nadav Horesh) Date: Thu, 03 Oct 2002 18:41:30 +0300 Subject: [SciPy-user] erfc function Message-ID: <3D9C652A.4010706@envision.co.il> Can get scipy.special.erfc function to work: >>> erfc(0,1.2) Traceback (most recent call last): File "", line 1, in ? TypeError: return arrays must be of arraytype Any suggestions? Thanks, Nadav. From Daniel.Davidson at citadelgroup.com Thu Oct 3 13:10:47 2002 From: Daniel.Davidson at citadelgroup.com (Davidson, Daniel) Date: Thu, 3 Oct 2002 12:10:47 -0500 Subject: [SciPy-user] newbie python & optimization Message-ID: <82374C57F2A547478A45FD576C1713F517CCD874@bdcexchange.wfg.com> >> Works fine for me. Without more information (OS, SciPy, Python, ...) nobody can help you. Thanks, Gerard. Here is what I'm using OS: NT (same for Windows 2000) Python: Python 2.2.1 SciPy: Installed from running SciPy-0.2.0_alpha_133.4185.win32-py2.2 Is this configuration not supported? Is there a better windows alternative? Thanks, Dan From oliphant at ee.byu.edu Thu Oct 3 15:03:55 2002 From: oliphant at ee.byu.edu (Travis Oliphant) Date: Thu, 3 Oct 2002 13:03:55 -0600 (MDT) Subject: [SciPy-user] erfc function In-Reply-To: <3D9C652A.4010706@envision.co.il> Message-ID: > > >>> erfc(0,1.2) > Traceback (most recent call last): > File "", line 1, in ? > TypeError: return arrays must be of arraytype erfc takes only a single argument. erfc(1.2) The error here is a bit cryptic, I admit. It's the default ufunc error message and would require changes to Numeric to alter. -Travis From gvermeul at grenoble.cnrs.fr Fri Oct 4 04:39:13 2002 From: gvermeul at grenoble.cnrs.fr (Gerard Vermeulen) Date: Fri, 4 Oct 2002 10:39:13 +0200 Subject: [SciPy-user] newbie python & optimization In-Reply-To: <82374C57F2A547478A45FD576C1713F517CCD874@bdcexchange.wfg.com> References: <82374C57F2A547478A45FD576C1713F517CCD874@bdcexchange.wfg.com> Message-ID: <20021004083913.GA3249@venus.grenoble.cnrs.fr> On Thu, Oct 03, 2002 at 12:10:47PM -0500, Davidson, Daniel wrote: > > >> Works fine for me. Without more information (OS, SciPy, Python, ...) > nobody can help you. > Thanks, Gerard. Here is what I'm using > OS: NT (same for Windows 2000) > Python: Python 2.2.1 > SciPy: Installed from running SciPy-0.2.0_alpha_133.4185.win32-py2.2 > > Is this configuration not supported? Is there a better windows alternative? > > Thanks, > Dan Dan, I am not a Windows user, but trying the latest build (SciPy-0.2.0_alpha_140.4277.win32-py2.2.exe), I get: Python 2.2.1 (#34, Apr 9 2002, 19:34:33) [MSC 32 bit (Intel)] on win32 Type "copyright", "credits" or "license" for more information. IDLE 0.8 -- press F1 for help >>> from Numeric import * >>> a = array([1, 2, 3]) >>> a*a array([1, 4, 9]) >>> import scipy Traceback (most recent call last): File "", line 1, in ? import scipy File "C:\PYTHON22\Lib\site-packages\scipy\__init__.py", line 49, in ? import special, io, linalg, stats, fftpack File "C:\PYTHON22\Lib\site-packages\scipy\stats\__init__.py", line 195, in ? from stats import * File "C:\PYTHON22\Lib\site-packages\scipy\stats\stats.py", line 1434, in ? import distributions File "C:\PYTHON22\lib\site-packages\scipy\stats\distributions.py", line 3152 cond2 = (pr >= 1) || (pr <=0) ^ SyntaxError: invalid syntax >>> Gerard From nwagner at mecha.uni-stuttgart.de Fri Oct 4 04:44:59 2002 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Fri, 04 Oct 2002 10:44:59 +0200 Subject: [SciPy-user] FAILURE to import scipy.pilutil Message-ID: <3D9D550B.29A8A0E4@mecha.uni-stuttgart.de> Hi, There is a new failure within scipy.test(1) Python 2.1.2 (#1, Feb 25 2002, 18:04:21) [GCC 2.95.3 20010315 (SuSE)] on linux2 Type "copyright", "credits" or "license" for more information. >>> import scipy >>> scipy.__version__ '0.2.0_alpha_140.4284' >>> scipy.test(1) FAILURE to import scipy.pilutil :0: AttributeError: 'scipy' module has no attribute 'pilutil' (in ?) creating test suite for: scipy.common !! FAILURE building test for scipy.common :1: SyntaxError: invalid syntax (test_common.py, line 77) (in ?) Nils From dbdavidson at yahoo.com Fri Oct 4 07:07:03 2002 From: dbdavidson at yahoo.com (Daniel Davidson) Date: Fri, 4 Oct 2002 04:07:03 -0700 (PDT) Subject: [SciPy-user] newbie python & optimization In-Reply-To: <20021004083913.GA3249@venus.grenoble.cnrs.fr> Message-ID: <20021004110703.57204.qmail@web11601.mail.yahoo.com> --- Gerard Vermeulen wrote: > On Thu, Oct 03, 2002 at 12:10:47PM -0500, Davidson, > Daniel wrote: > > > > >> Works fine for me. Without more information > (OS, SciPy, Python, ...) > > nobody can help you. > > Thanks, Gerard. Here is what I'm using > > OS: NT (same for Windows 2000) > > Python: Python 2.2.1 > > SciPy: Installed from running > SciPy-0.2.0_alpha_133.4185.win32-py2.2 > > > > Is this configuration not supported? Is there a > better windows alternative? > > > > Thanks, > > Dan > Dan, I am not a Windows user, but trying the latest > build > (SciPy-0.2.0_alpha_140.4277.win32-py2.2.exe), I get: > > Python 2.2.1 (#34, Apr 9 2002, 19:34:33) [MSC 32 > bit (Intel)] on win32 > Type "copyright", "credits" or "license" for more > information. > IDLE 0.8 -- press F1 for help > >>> from Numeric import * > >>> a = array([1, 2, 3]) > >>> a*a > array([1, 4, 9]) > >>> import scipy > Traceback (most recent call last): > File "", line 1, in ? > import scipy > File > "C:\PYTHON22\Lib\site-packages\scipy\__init__.py", > line 49, in ? > import special, io, linalg, stats, fftpack > File > "C:\PYTHON22\Lib\site-packages\scipy\stats\__init__.py", > line 195, in ? > from stats import * > File > "C:\PYTHON22\Lib\site-packages\scipy\stats\stats.py", > line 1434, in ? > import distributions > File > "C:\PYTHON22\lib\site-packages\scipy\stats\distributions.py", > line 3152 > cond2 = (pr >= 1) || (pr <=0) > ^ > SyntaxError: invalid syntax > >>> > > Gerard Gerard, Thanks for your help. I believe I have a temporary workaround. I don't know if this is bad, but I have installed python 2.1 and my python path points to my original scipy (still under python 2.2). Now it works as expected. Maybe my problems with getting exceptions in the fmin of optimize (which also went away by going to python 2.1) are related to this: http://scipy.net/pipermail/scipy-dev/2002-March/000621.html __________________________________________________ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.com From nwagner at mecha.uni-stuttgart.de Fri Oct 4 10:09:31 2002 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Fri, 04 Oct 2002 16:09:31 +0200 Subject: [SciPy-user] Bug in eig(A) Message-ID: <3D9DA11B.652A619E@mecha.uni-stuttgart.de> Hi, There is an interesting discussion concerning a bug of eig(A) in octave. I have attached the example already converted into scipy. Any suggestion ? Nils -------------- next part -------------- from scipy import * # # http://www.octave.org/mailing-lists/bug-octave/2002/184 # A = array(([0.00430344378328325,0.00775725778022706,0.00775725778022705,0.0145879135099477,0.0145879135099477], [0.00430344378328325,0.00775725778022706,0.00775725778022705,0.0145879135099477,0.0145879135099477], [0.00430344378328325,0.00775725778022706,0.00775725778022705,0.0145879135099477,0.0145879135099477], [0.00430344378328325,0.00775725778022706,0.00775725778022705,0.0145879135099477,0.0145879135099477], [0.00430344378328325,0.00775725778022706,0.00775725778022705,0.0145879135099477,0.0145879135099477])) # # Eigenvalues, eigenvectors # w, vr = linalg.eig(A) print w # # Singular value decomposition # u, s, vh = linalg.svd(A) print 'Singular values', s # # QR decomposition # q,r = linalg.qr(A) print q print r From karshi.hasanov at utoronto.ca Thu Oct 3 22:43:26 2002 From: karshi.hasanov at utoronto.ca (Karshi) Date: Thu, 03 Oct 2002 22:43:26 -0400 Subject: [SciPy-user] meshgrid Message-ID: <3D9D004E.FADE22B4@utoronto.ca> Hi Is there matlab like "meshgrid' in SciPy? If so, how do I use it? Thanks From pearu at cens.ioc.ee Fri Oct 4 10:46:48 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Fri, 4 Oct 2002 17:46:48 +0300 (EEST) Subject: [SciPy-user] Bug in eig(A) In-Reply-To: <3D9DA11B.652A619E@mecha.uni-stuttgart.de> Message-ID: On Fri, 4 Oct 2002, Nils Wagner wrote: > Hi, > > There is an interesting discussion concerning a bug of eig(A) in octave. > I have attached the example already converted into scipy. > > Any suggestion ? It sounds like a bug in Lapack or some kind nasty effect from inexact numerics. This bug shows up if the rows of A are *exactly* equal: >>> w,vr=linalg.eig([[1,2,3,4]]*4) >>> linalg.det(vr) 9.4423977399734633e-17 but a very small perturbation hides the bug: >>> w,vr=linalg.eig([[1,2,3,4]]*3+[[1,2,3,4+5e-16]]) >>> linalg.det(vr) 0.24653292274310895 Hmm, also Matlab 6.0.0.88 R12 has the same problem: >> [w,v]=eig([1,2,3,4;1,2,3,4;1,2,3,4;1,2,3,4]); >> det(w) ans = 7.0836e-17 >> [v,w]=eig([1,2,3,4;1,2,3,4;1,2,3,4;1,2,3,4+5e-16]); >> det(v) ans = 0.0855 >> [w,v]=eig([1,2,3,4;1,2,3,4;1,2,3,4;1,2,3,4+5e-16],'nobalance'); >> det(w) ans = 0.2872 Pearu From travis at enthought.com Fri Oct 4 11:57:05 2002 From: travis at enthought.com (Travis N. Vaught) Date: Fri, 4 Oct 2002 10:57:05 -0500 Subject: [SciPy-user] meshgrid In-Reply-To: <3D9D004E.FADE22B4@utoronto.ca> Message-ID: I'm not sure it fits your needs, but I think array broadcasting can give you this. There is a good tutorial of this here: http://www.scipy.org/site_content/tutorials/scipytutorial.pdf Travis > -----Original Message----- > From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net]On > Behalf Of Karshi > Sent: Thursday, October 03, 2002 9:43 PM > To: scipy-user at scipy.net > Subject: [SciPy-user] meshgrid > > > Hi > > Is there matlab like "meshgrid' in SciPy? > If so, how do I use it? > Thanks > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From hornak at csb.sunysb.edu Fri Oct 4 14:51:27 2002 From: hornak at csb.sunysb.edu (Viktor Hornak) Date: 04 Oct 2002 14:51:27 -0400 Subject: [SciPy-user] help with scipy installation Message-ID: <1033757488.9907.21.camel@frodo.bio.sunysb.edu> Hello, I am having trouble to get scipy compiled/installed on RedHat linux 7.3 (python2.2, numeric-22.0, atlas with full lapack in, wxPython-2.3.2, fftw-2.1.3). The binary installation (SciPy-0.2.0_alpha_105.3699.linux2_py2.2.tar.gz) seg faults on "from scipy import * " (or any scipy module) so I was trying to compile from CVS sources (SciPy-0.2.0_alpha_140.4284_src.tar.gz). I tried: % python2 setup.py build The compilation runs for a while but then it stops with the error: building 'scipy.xplt.gistC' extension error: file '.../scipy/SciPy-0.2.0_alpha_140.4284/xplt/gistCmodule.c' does not exist and the file 'gistCmodule.c' really is not there (or anywhere in the distribution). I wouldn't mind to skip xplt package (because I'd like to get Chaco working anyway) but I don't know how to specify which packages to skip during building. Thanks for help... Cheers, -Viktor -- =================================================================== Viktor Hornak Center for Structural Biology Phone: (631)632-1439 SUNY at Stony Brook Fax: (631)632-1555 Stony Brook, NY 11794-5115 E-mail: viktor.hornak at sunysb.edu =================================================================== From oliphant.travis at ieee.org Fri Oct 4 14:59:52 2002 From: oliphant.travis at ieee.org (Travis Oliphant) Date: 04 Oct 2002 12:59:52 -0600 Subject: [SciPy-user] meshgrid In-Reply-To: References: Message-ID: <1033757994.17853.5.camel@travis.local.net> > > > > Hi > > > > Is there matlab like "meshgrid' in SciPy? > > If so, how do I use it? > > Thanks Yes, yes. There are two things you can use. Before you do, remember that because of array broadcasting you do not always need to flesh out an entire meshgrid to do calculations. Use NewAxis appropriately. The two commands are mgrid[range1, range2, range3, ..., rangeN] this returns N N-dimensional arrays similar to meshrid. For example >>> mgrid[0:5,0:5] array([[[0, 0, 0, 0, 0], [1, 1, 1, 1, 1], [2, 2, 2, 2, 2], [3, 3, 3, 3, 3], [4, 4, 4, 4, 4]], [[0, 1, 2, 3, 4], [0, 1, 2, 3, 4], [0, 1, 2, 3, 4], [0, 1, 2, 3, 4], [0, 1, 2, 3, 4]]]) You may just need ogrid though, which does not flesh out the inside of the grid but merely sets up the shape correctly >>> ogrid[0:5,0:5] [array([[0],[1],[2],[3],[4]]), array([[0, 1, 2, 3, 4]])] Good luck, -Travis Oliphant From oliphant.travis at ieee.org Fri Oct 4 15:03:55 2002 From: oliphant.travis at ieee.org (Travis Oliphant) Date: 04 Oct 2002 13:03:55 -0600 Subject: [SciPy-user] newbie python & optimization In-Reply-To: <20021004083913.GA3249@venus.grenoble.cnrs.fr> References: <82374C57F2A547478A45FD576C1713F517CCD874@bdcexchange.wfg.com> <20021004083913.GA3249@venus.grenoble.cnrs.fr> Message-ID: <1033758236.17853.8.camel@travis.local.net> On Fri, 2002-10-04 at 02:39, Gerard Vermeulen wrote: > On Thu, Oct 03, 2002 at 12:10:47PM -0500, Davidson, Daniel wrote: > > > > >> Works fine for me. Without more information (OS, SciPy, Python, ...) > > nobody can help you. > > Thanks, Gerard. Here is what I'm using > > OS: NT (same for Windows 2000) > > Python: Python 2.2.1 > > SciPy: Installed from running SciPy-0.2.0_alpha_133.4185.win32-py2.2 > > > > Is this configuration not supported? Is there a better windows alternative? > > > > Thanks, > > Dan > Dan, I am not a Windows user, but trying the latest build > (SciPy-0.2.0_alpha_140.4277.win32-py2.2.exe), I get: > > Python 2.2.1 (#34, Apr 9 2002, 19:34:33) [MSC 32 bit (Intel)] on win32 > Type "copyright", "credits" or "license" for more information. > IDLE 0.8 -- press F1 for help > >>> from Numeric import * > >>> a = array([1, 2, 3]) > >>> a*a > array([1, 4, 9]) > >>> import scipy > Traceback (most recent call last): > File "", line 1, in ? > import scipy > File "C:\PYTHON22\Lib\site-packages\scipy\__init__.py", line 49, in ? > import special, io, linalg, stats, fftpack > File "C:\PYTHON22\Lib\site-packages\scipy\stats\__init__.py", line 195, in ? > from stats import * > File "C:\PYTHON22\Lib\site-packages\scipy\stats\stats.py", line 1434, in ? > import distributions > File "C:\PYTHON22\lib\site-packages\scipy\stats\distributions.py", line 3152 > cond2 = (pr >= 1) || (pr <=0) > ^ Unfortunately, this was a typo that was in CVS for a few hours (it's not there anymore) --- long enough for an automatic build to get completed. You can easily fix it yourself by changing || to | or get a new version. -Travis O. From fgibbons at hms.harvard.edu Fri Oct 4 15:58:25 2002 From: fgibbons at hms.harvard.edu (Frank Gibbons) Date: Fri, 04 Oct 2002 15:58:25 -0400 Subject: [SciPy-user] problems building - missing cvs/SciPy/xplt/gistCmodule.c Message-ID: <5.0.0.25.2.20021004155029.07728350@hms.harvard.edu> Hi, I've been using Python for about 5 months now, to write data-intensive bioinformatics code. Having had good luck with Numeric (and contributed features, bug-fixes and a test suite to its Jython counterpart, JNumeric), SciPy sounded like just what I need to go further. So I've just signed up, downloaded the source, and tried to build it. (I'm not root where I work, can't use RPMs etc.) I also got ATLAS and f2py and they apparently installed properly. I edited site.cfg to let SciPy know where to find ATLAS, and ran 'python setup.py install'. It runs through a bunch of stuff, but stops short at this: building 'scipy.xplt.gistC' extension error: file 'cvs/SciPy/xplt/gistCmodule.c' does not exist Anyone have any words of wisdom about how to get around this? If I were using make I'd give it a '-k' to ignore errors and keep going, in the hopes that I don't really need what I appear not to have. Is there something analogous in setup.py? Also, I may have overlooked this, but I couldn't find anything on the website listing specifically what functionality was available in SciPy - it lists packages, but not function names and descriptions. Please don't tell me I have to read the docstrings in each file, or pydoc them! A PDF file that covered the entire package would be really useful (yes, I saw the request for help setting up unit tests and working on docs - I'd be happy to, but first I need to get up and running). Thanks for any help, Frank Gibbons PhD, Computational Biologist, Harvard Medical School BCMP/SGM-322, 250 Longwood Ave, Boston MA 02115, USA. Tel: 617-432-3555 Fax: 617-432-3557 http://llama.med.harvard.edu/~fgibbons From falted at openlc.org Fri Oct 4 17:34:31 2002 From: falted at openlc.org (Francesc Alted) Date: Fri, 4 Oct 2002 23:34:31 +0200 Subject: [SciPy-user] ANN: PyTables 0.1 Message-ID: <20021004213431.GA1265@openlc.org> Hi!, PyTables is a Python package which allows dealing with HDF5 tables. Such a table is defined as a collection of records whose values are stored in fixed-length fields. PyTables is intended to be easy-to-use, and tries to be a high-performance interface to HDF5. To achieve this, the newest improvements introduced in Python 2.2 (like generators or slots and metaclasses in new-brand classes) has been used. Pyrex creation extension tool has been chosen to access the HDF5 library. This package should be platform independent, but until now I've tested it only with Linux. It's the first public release (v 0.1), and it is in alpha state. You can get it from: http://sourceforge.net/projects/pytables/ There is still not a project home page. Perhaps in next days. Feedback welcome.! -- Francesc Alted PGP KeyID: 0x61C8C11F Scientific aplications developer Public PGP key available: http://www.openlc.org/falted_at_openlc.asc Key fingerprint = 1518 38FE 3A3D 8BE8 24A0 3E5B 1328 32CC 61C8 C11F From travis at enthought.com Fri Oct 4 17:48:57 2002 From: travis at enthought.com (Travis N. Vaught) Date: Fri, 4 Oct 2002 16:48:57 -0500 Subject: [SciPy-user] problems building - missing cvs/SciPy/xplt/gistCmodule.c In-Reply-To: <5.0.0.25.2.20021004155029.07728350@hms.harvard.edu> Message-ID: Frank, If you're OK with skipping xplt install (and it sounds like you are), you may edit the scipy/setup.py file like so: Line 103 old: unix_packages = ['xplt'] Line 103 new: unix_packages = [] I haven't tried this, but it should work and costs little to test. Travis > -----Original Message----- > From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net]On > Behalf Of Frank Gibbons > Sent: Friday, October 04, 2002 2:58 PM > To: SciPy > Subject: [SciPy-user] problems building - missing > cvs/SciPy/xplt/gistCmodule.c > > > Hi, > > I've been using Python for about 5 months now, to write data-intensive > bioinformatics code. Having had good luck with Numeric (and contributed > features, bug-fixes and a test suite to its Jython counterpart, > JNumeric), > SciPy sounded like just what I need to go further. > > So I've just signed up, downloaded the source, and tried to build > it. (I'm > not root where I work, can't use RPMs etc.) I also got ATLAS and f2py and > they apparently installed properly. I edited site.cfg to let SciPy know > where to find ATLAS, and ran 'python setup.py install'. It runs through a > bunch of stuff, but stops short at this: > > building 'scipy.xplt.gistC' extension > error: file 'cvs/SciPy/xplt/gistCmodule.c' does not exist > > Anyone have any words of wisdom about how to get around this? If I were > using make I'd give it a '-k' to ignore errors and keep going, in > the hopes > that I don't really need what I appear not to have. Is there something > analogous in setup.py? > > Also, I may have overlooked this, but I couldn't find anything on the > website listing specifically what functionality was available in > SciPy - it > lists packages, but not function names and descriptions. Please > don't tell > me I have to read the docstrings in each file, or pydoc them! A PDF file > that covered the entire package would be really useful (yes, I saw the > request for help setting up unit tests and working on docs - I'd be happy > to, but first I need to get up and running). > > Thanks for any help, > > Frank Gibbons > > PhD, Computational Biologist, > Harvard Medical School BCMP/SGM-322, 250 Longwood Ave, Boston MA > 02115, USA. > Tel: 617-432-3555 Fax: > 617-432-3557 http://llama.med.harvard.edu/~fgibbons > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From travis at enthought.com Fri Oct 4 22:48:21 2002 From: travis at enthought.com (Travis N. Vaught) Date: Fri, 4 Oct 2002 21:48:21 -0500 Subject: [SciPy-user] help with scipy installation In-Reply-To: <1033757488.9907.21.camel@frodo.bio.sunysb.edu> Message-ID: You might look at the response here: http://www.scipy.org/site_content/mailman?fn=scipy-user/2002-October/000750. html but it occurs to me now that there may be a problem with the source tarballs that you downloaded. Anyway, a *build* should work from the latest cvs sources (not the tarballs), since I see a gistCmodule.c in the cvs repository--not sure why it's not in the tarball. cvs instructions are here: http://www.scipy.org/site_content/tutorials/CVSInstruct Travis V. > -----Original Message----- > From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net]On > Behalf Of Viktor Hornak > Sent: Friday, October 04, 2002 1:51 PM > To: scipy-user at scipy.net > Subject: [SciPy-user] help with scipy installation > > > Hello, > > I am having trouble to get scipy compiled/installed on RedHat linux 7.3 > (python2.2, numeric-22.0, atlas with full lapack in, wxPython-2.3.2, > fftw-2.1.3). The binary installation > (SciPy-0.2.0_alpha_105.3699.linux2_py2.2.tar.gz) seg faults on "from > scipy import * " (or any scipy module) so I was trying to compile from > CVS sources (SciPy-0.2.0_alpha_140.4284_src.tar.gz). I tried: > > % python2 setup.py build > > The compilation runs for a while but then it stops with the error: > building 'scipy.xplt.gistC' extension > error: file '.../scipy/SciPy-0.2.0_alpha_140.4284/xplt/gistCmodule.c' > does not exist > > and the file 'gistCmodule.c' really is not there (or anywhere in the > distribution). I wouldn't mind to skip xplt package (because I'd like to > get Chaco working anyway) but I don't know how to specify which packages > to skip during building. > Thanks for help... > > Cheers, > -Viktor > -- > =================================================================== > Viktor Hornak > Center for Structural Biology Phone: (631)632-1439 > SUNY at Stony Brook Fax: (631)632-1555 > Stony Brook, NY 11794-5115 E-mail: viktor.hornak at sunysb.edu > =================================================================== > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From karshi.hasanov at utoronto.ca Sat Oct 5 01:49:05 2002 From: karshi.hasanov at utoronto.ca (Karshi) Date: Sat, 05 Oct 2002 01:49:05 -0400 Subject: [SciPy-user] meshgrid_errors Message-ID: <3D9E7D51.32504F21@utoronto.ca> >>> from scipy import * >>> mgrid[0:5,05] Traceback (most recent call last): File "", line 1, in ? mgrid[0:5,05] File "C:\PYTHON22\Lib\site-packages\scipy_base\index_tricks.py", line 53, in __getitem__ step = key[k].step AttributeError: 'int' object has no attribute 'step' >>> ogrid[0:5,0:5] [array([[0], [1], [2], [3], [4]]), array([ [0, 1, 2, 3, 4]])] >>> From pearu at cens.ioc.ee Sat Oct 5 14:50:08 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Sat, 5 Oct 2002 21:50:08 +0300 (EEST) Subject: [SciPy-user] meshgrid_errors In-Reply-To: <3D9E7D51.32504F21@utoronto.ca> Message-ID: On Sat, 5 Oct 2002, Karshi wrote: ... here is your typo. Pearu From pearu at cens.ioc.ee Sat Oct 5 14:53:06 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Sat, 5 Oct 2002 21:53:06 +0300 (EEST) Subject: [SciPy-user] meshgrid_errors In-Reply-To: <3D9E7D51.32504F21@utoronto.ca> Message-ID: On Sat, 5 Oct 2002, Karshi wrote: > >>> from scipy import * > >>> mgrid[0:5,05] ... here is the typo. Pearu From gvermeul at grenoble.cnrs.fr Sun Oct 6 09:16:30 2002 From: gvermeul at grenoble.cnrs.fr (Gerard Vermeulen) Date: Sun, 6 Oct 2002 15:16:30 +0200 Subject: [SciPy-user] overwriting Numeric on Windows is M$ policy :-) Message-ID: <20021006131630.GA3201@venus.grenoble.cnrs.fr> Hoping to do an easy install for a student, I tried to install SciPy on Windows and to port some of my NumPy extensions to Windows. (I am a Linux user, with very little Windows experience). The SciPy windows installer policy of overwriting a few modules, got me into trouble. This has the side effect that the Numerical header files (and C-API numbers) are out of sync with the binary modules. Consequently, my home cooked extensions started to return NumPy arrays of Complex instead of Float :-) >From your web site, I got the impression that SciPy for Windows has been built with Numeric-21.0, but this information looks dated. So, I have tried several versions (CVS included), but somehow the SciPy installer refused to overwrite the necessary modules (maybe because they were newer, or because my registry database is broken -- I am running Windows 98 with Win4Lin under Linux). IMHO, it is much more friendly to include a full NumPy (even if it is not the latest), instead of only a few binary modules. You are locking authors of NumPy based extension modules out of the 'market' ( I have written a Qt/Qwt based plotting package, see http://gerard.vermeulen.free.fr ). MicroSoft has been sued for a similar policy :-) Regards -- Gerard Vermeulen PS: your recipy for rebuilding SciPy on Windows looks pretty old. Did anybody try MinGW-2.O.O? And is MSYS-1.0.7 sufficient to build ATLAS? PPS: I am not rich enough to sue you. From fgibbons at hms.harvard.edu Mon Oct 7 14:31:02 2002 From: fgibbons at hms.harvard.edu (Frank Gibbons) Date: Mon, 07 Oct 2002 14:31:02 -0400 Subject: [SciPy-user] Re: SciPy-user digest, Vol 1 #201 - 7 msgs In-Reply-To: <20021005170001.6177.97754.Mailman@shaft> Message-ID: <5.0.0.25.2.20021007111501.00ac1ea8@hms.harvard.edu> Travis, I tried this, and it does allow me to finish building, but why are there no files in the xplt directory (except for setup_xplt.py), when I can see them on the CVS page. I see that someone else had a similar problem to me, with the downloaded tarball. Thanks for the tip. However.... I realized that I needed to get the full LAPACK installation (and therefore had to also build BLAS since I have no vendor-supplied version). My full LAPACK weighs in at a healthy 6MB, and I followed the procedures in the installation guide to replace ATLAS's wimpy version of LAPACK with the real one. So far, so good. Now the setup script runs to completion, but when I try to import scipy here's what happens: % ~/bin/python Python 2.1.1 (#1, Aug 9 2001, 11:10:31) [GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2 Type "copyright", "credits" or "license" for more information. >>> import scipy Traceback (most recent call last): File "", line 1, in ? File "/home/fgibbons/lib/python2.1/site-packages/scipy/__init__.py", line 36, in ? from scipy_base import * File "scipy_base/__init__.py", line 99, in ? import fastumath ImportError: No module named fastumath To summarize my setup, I'm using the following: Python 2.1.1 Numeric 21.0 ATLAS 3.4.1 f2py 2.23.190... gcc 2.95.4 g77 (0.5.25 20010319) on a Debian Linux box. Since I've had to go back and forth in the build process a few times, I wonder if I might be able to just do the equivalent of 'make clean' and start it fresh. I'm not very familiar with setup.py (why is this better than make?) - can anyone tell me how to do the equivalent of 'make clean'? What is 'fastumath'? Where are the sources? How do I get them to build? Thanks a lot for the tips so far - I feel like I'm close, and I'm drooling at the possibility of having LAPACK/BLAS power available from Python! -Frank At 01:00 PM 10/5/2002, you wrote: >Message: 6 >From: "Travis N. Vaught" >To: >Subject: RE: [SciPy-user] problems building - missing >cvs/SciPy/xplt/gistCmodule.c >Date: Fri, 4 Oct 2002 16:48:57 -0500 >Reply-To: scipy-user at scipy.net > >Frank, > >If you're OK with skipping xplt install (and it sounds like you are), you >may edit the scipy/setup.py file like so: > >Line 103 old: > unix_packages = ['xplt'] > >Line 103 new: > unix_packages = [] > >I haven't tried this, but it should work and costs little to test. > >Travis PhD, Computational Biologist, Harvard Medical School BCMP/SGM-322, 250 Longwood Ave, Boston MA 02115, USA. Tel: 617-432-3555 Fax: 617-432-3557 http://llama.med.harvard.edu/~fgibbons From viktor.hornak at sunysb.edu Mon Oct 7 14:57:31 2002 From: viktor.hornak at sunysb.edu (Viktor Hornak) Date: Mon, 07 Oct 2002 14:57:31 -0400 Subject: [SciPy-user] Re: SciPy-user digest, Vol 1 #201 - 7 msgs References: <5.0.0.25.2.20021007111501.00ac1ea8@hms.harvard.edu> Message-ID: <3DA1D91B.5050302@sunysb.edu> Frank, I had problems building from tar files but after I checked out CVS tree directly (as Travis suggested) everything worked fine (including Chaco that I installed write after finishing scipy). I am running on RedHat 7.3 though, so versions for python, gcc, etc. are a bit different. You can clean your current built by: python setup.py clean I don't know why your build wasn't successful though, so maybe someone else can help with that... Good Luck, -Viktor Frank Gibbons wrote: > Travis, > > I tried this, and it does allow me to finish building, but why are there > no files in the xplt directory (except for setup_xplt.py), when I can > see them on the CVS page. I see that someone else had a similar problem > to me, with the downloaded tarball. > > Thanks for the tip. However.... > > I realized that I needed to get the full LAPACK installation (and > therefore had to also build BLAS since I have no vendor-supplied > version). My full LAPACK weighs in at a healthy 6MB, and I followed the > procedures in the installation guide to replace ATLAS's wimpy version of > LAPACK with the real one. So far, so good. Now the setup script runs to > completion, but when I try to import scipy here's what happens: > > % ~/bin/python > Python 2.1.1 (#1, Aug 9 2001, 11:10:31) > [GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2 > Type "copyright", "credits" or "license" for more information. > >>> import scipy > Traceback (most recent call last): > File "", line 1, in ? > File "/home/fgibbons/lib/python2.1/site-packages/scipy/__init__.py", > line 36, in ? > from scipy_base import * > File "scipy_base/__init__.py", line 99, in ? > import fastumath > ImportError: No module named fastumath > > To summarize my setup, I'm using the following: > > Python 2.1.1 > Numeric 21.0 > ATLAS 3.4.1 > f2py 2.23.190... > gcc 2.95.4 > g77 (0.5.25 20010319) > on a Debian Linux box. > > Since I've had to go back and forth in the build process a few times, I > wonder if I might be able to just do the equivalent of 'make clean' and > start it fresh. I'm not very familiar with setup.py (why is this better > than make?) - can anyone tell me how to do the equivalent of 'make clean'? > > What is 'fastumath'? Where are the sources? How do I get them to build? > > Thanks a lot for the tips so far - I feel like I'm close, and I'm > drooling at the possibility of having LAPACK/BLAS power available from > Python! > > -Frank > > At 01:00 PM 10/5/2002, you wrote: > >> Message: 6 >> From: "Travis N. Vaught" >> To: >> Subject: RE: [SciPy-user] problems building - missing >> cvs/SciPy/xplt/gistCmodule.c >> Date: Fri, 4 Oct 2002 16:48:57 -0500 >> Reply-To: scipy-user at scipy.net >> >> Frank, >> >> If you're OK with skipping xplt install (and it sounds like you are), you >> may edit the scipy/setup.py file like so: >> >> Line 103 old: >> unix_packages = ['xplt'] >> >> Line 103 new: >> unix_packages = [] >> >> I haven't tried this, but it should work and costs little to test. >> >> Travis > > > PhD, Computational Biologist, > Harvard Medical School BCMP/SGM-322, 250 Longwood Ave, Boston MA 02115, > USA. > Tel: 617-432-3555 Fax: 617-432-3557 > http://llama.med.harvard.edu/~fgibbons > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From travis at enthought.com Mon Oct 7 16:23:29 2002 From: travis at enthought.com (Travis N. Vaught) Date: Mon, 7 Oct 2002 15:23:29 -0500 Subject: [SciPy-user] Re: SciPy-user digest, Vol 1 #201 - 7 msgs In-Reply-To: <3DA1D91B.5050302@sunysb.edu> Message-ID: Hey Frank, It sounds like you may be trying to import scipy from a python session started in your build directory. Try switching to another dir (like ~/ or /) and begin the python session and try an import. I won't tell you how many times I have to force myself to remember this each week. Travis > -----Original Message----- > From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net]On > Behalf Of Viktor Hornak > Sent: Monday, October 07, 2002 1:58 PM > To: scipy-user at scipy.net > Subject: Re: [SciPy-user] Re: SciPy-user digest, Vol 1 #201 - 7 msgs > > > Frank, > > I had problems building from tar files but after I checked out CVS tree > directly (as Travis suggested) everything worked fine (including Chaco > that I installed write after finishing scipy). I am running on RedHat > 7.3 though, so versions for python, gcc, etc. are a bit different. > You can clean your current built by: > python setup.py clean > I don't know why your build wasn't successful though, so maybe someone > else can help with that... > > Good Luck, > -Viktor > > Frank Gibbons wrote: > > Travis, > > > > I tried this, and it does allow me to finish building, but why > are there > > no files in the xplt directory (except for setup_xplt.py), when I can > > see them on the CVS page. I see that someone else had a similar problem > > to me, with the downloaded tarball. > > > > Thanks for the tip. However.... > > > > I realized that I needed to get the full LAPACK installation (and > > therefore had to also build BLAS since I have no vendor-supplied > > version). My full LAPACK weighs in at a healthy 6MB, and I followed the > > procedures in the installation guide to replace ATLAS's wimpy > version of > > LAPACK with the real one. So far, so good. Now the setup script runs to > > completion, but when I try to import scipy here's what happens: > > > > % ~/bin/python > > Python 2.1.1 (#1, Aug 9 2001, 11:10:31) > > [GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2 > > Type "copyright", "credits" or "license" for more information. > > >>> import scipy > > Traceback (most recent call last): > > File "", line 1, in ? > > File "/home/fgibbons/lib/python2.1/site-packages/scipy/__init__.py", > > line 36, in ? > > from scipy_base import * > > File "scipy_base/__init__.py", line 99, in ? > > import fastumath > > ImportError: No module named fastumath > > > > To summarize my setup, I'm using the following: > > > > Python 2.1.1 > > Numeric 21.0 > > ATLAS 3.4.1 > > f2py 2.23.190... > > gcc 2.95.4 > > g77 (0.5.25 20010319) > > on a Debian Linux box. > > > > Since I've had to go back and forth in the build process a few times, I > > wonder if I might be able to just do the equivalent of 'make clean' and > > start it fresh. I'm not very familiar with setup.py (why is this better > > than make?) - can anyone tell me how to do the equivalent of > 'make clean'? > > > > What is 'fastumath'? Where are the sources? How do I get them to build? > > > > Thanks a lot for the tips so far - I feel like I'm close, and I'm > > drooling at the possibility of having LAPACK/BLAS power available from > > Python! > > > > -Frank > > > > At 01:00 PM 10/5/2002, you wrote: > > > >> Message: 6 > >> From: "Travis N. Vaught" > >> To: > >> Subject: RE: [SciPy-user] problems building - missing > >> cvs/SciPy/xplt/gistCmodule.c > >> Date: Fri, 4 Oct 2002 16:48:57 -0500 > >> Reply-To: scipy-user at scipy.net > >> > >> Frank, > >> > >> If you're OK with skipping xplt install (and it sounds like > you are), you > >> may edit the scipy/setup.py file like so: > >> > >> Line 103 old: > >> unix_packages = ['xplt'] > >> > >> Line 103 new: > >> unix_packages = [] > >> > >> I haven't tried this, but it should work and costs little to test. > >> > >> Travis > > > > > > PhD, Computational Biologist, > > Harvard Medical School BCMP/SGM-322, 250 Longwood Ave, Boston MA 02115, > > USA. > > Tel: 617-432-3555 Fax: 617-432-3557 > > http://llama.med.harvard.edu/~fgibbons > > > > _______________________________________________ > > 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 skip at pobox.com Mon Oct 7 18:36:45 2002 From: skip at pobox.com (Skip Montanaro) Date: Mon, 7 Oct 2002 17:36:45 -0500 Subject: [SciPy-user] Re: SciPy-user digest, Vol 1 #201 - 7 msgs In-Reply-To: References: <3DA1D91B.5050302@sunysb.edu> Message-ID: <15778.3197.339505.707367@montanaro.dyndns.org> Travis> It sounds like you may be trying to import scipy from a python Travis> session started in your build directory. Try switching to Travis> another dir (like ~/ or /) and begin the python session and try Travis> an import. I won't tell you how many times I have to force Travis> myself to remember this each week. I get bitten by this occasionally as well. It's mildly irksome that I need to install scipy to test it. Has anyone debugged this problem? -- Skip Montanaro - skip at pobox.com "Airplanes don't fly until the paperwork equals the weight of the aircraft. Same with i18N." - from the "Perl, Unicode and i18N FAQ" From lcordier at dsp.sun.ac.za Tue Oct 8 08:24:58 2002 From: lcordier at dsp.sun.ac.za (Louis Cordier) Date: Tue, 8 Oct 2002 14:24:58 +0200 (SAST) Subject: [SciPy-user] my contribution Message-ID: After experiencing a bit of difficulty to get everything {ATLAS,LAPACK,F2PY,Numeric,SciPy} working, I wrote this little script to automate the process for nodes on a cluster. I guess it can serve as a quick & dirty how-to for other newcomers. I used downloads from a local-network machine, just uncomment the original locations, etc. Feel free to use and redistribute it however you like. Regards, Louis. -------------------------------------------------------------- Louis Cordier, c:+27721472305, h:+27218865145, w:+27218084315 lcordier at dsp.sun.ac.za, http://www.dsp.sun.ac.za/~lcordier/ University of Stellenbosch - Electric & Electronic Engineering -------------------------------------------------------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: scipy_install.sh Type: application/x-sh Size: 8807 bytes Desc: URL: From fgibbons at hms.harvard.edu Tue Oct 8 11:30:18 2002 From: fgibbons at hms.harvard.edu (Frank Gibbons) Date: Tue, 08 Oct 2002 11:30:18 -0400 Subject: [SciPy-user] no module fastumath - how to fix it Message-ID: <5.0.0.25.2.20021008112319.050adf38@hms.harvard.edu> Got no response from the list on this, found it in the archives (Aug 2002) http://www.scipy.org/site_content/mailman?fn=scipy-user/2002-August/000561.html didn't quite understand the message, but got some hints from it. I'm sending this so that it's in the archive, and other people don't spend two hours trying to figure this out... After installing SciPy, you will be tempted to run python immediately, and import scipy (in fact, the docs suggest that, in INSTALL.txt). However, they don't mention that this may fail if you run it in the installation directory. So, go to another directory, then start python, then 'import scipy'. You may also want to check this message (I followed these instructions, but am not sure whether they helped or not): http://scipy.net/pipermail/scipy-user/2002-April/000302.html It may or may not also help to rename the directory from ~/cvs/SciPy to ~/cvs/SciPy_CVS (assuming that you, like most CVS users I know, have a cvs directory where you put all your projects). And to think I just about to throw in the towel on SciPy! -Frank P.S. If anyone has a better understanding of why this is a problem, I think it would be useful to put together a complete explanation (from the comments in the various emails, it seems to be a somewhat known problem). PhD, Computational Biologist, Harvard Medical School BCMP/SGM-322, 250 Longwood Ave, Boston MA 02115, USA. Tel: 617-432-3555 Fax: 617-432-3557 http://llama.med.harvard.edu/~fgibbons From fgibbons at hms.harvard.edu Tue Oct 8 11:38:28 2002 From: fgibbons at hms.harvard.edu (Frank Gibbons) Date: Tue, 08 Oct 2002 11:38:28 -0400 Subject: [SciPy-user] Re: SciPy-user digest, Vol 1 #203 - 6 msgs In-Reply-To: <20021008153900.16070.18584.Mailman@shaft> Message-ID: <5.0.0.25.2.20021008113445.0509fc18@hms.harvard.edu> Thanks to all of you for your suggestions. I get the mailing list in digest mode, which is why I had had no response - not enough volume. Looks like my last message kicked it over the limit. Anyway, I'm now happily SciPy-ing. My first task (once I get familiar with SciPy) will be to add this kind of help to the installation instructions! :) -Frank P.S. As a one-time FORTRAN programmer, it's kind of twilight-zonish to see odeint() and friends in Python ;) At 11:39 AM 10/8/2002, you wrote: >From: "Travis N. Vaught" >To: >Subject: RE: [SciPy-user] Re: SciPy-user digest, Vol 1 #201 - 7 msgs >Date: Mon, 7 Oct 2002 15:23:29 -0500 >Reply-To: scipy-user at scipy.net > >Hey Frank, > >It sounds like you may be trying to import scipy from a python session >started in your build directory. Try switching to another dir (like ~/ or >/) and begin the python session and try an import. I won't tell you how >many times I have to force myself to remember this each week. PhD, Computational Biologist, Harvard Medical School BCMP/SGM-322, 250 Longwood Ave, Boston MA 02115, USA. Tel: 617-432-3555 Fax: 617-432-3557 http://llama.med.harvard.edu/~fgibbons From prabhu at aero.iitm.ernet.in Tue Oct 8 11:44:36 2002 From: prabhu at aero.iitm.ernet.in (Prabhu Ramachandran) Date: Tue, 8 Oct 2002 21:14:36 +0530 Subject: [SciPy-user] my contribution In-Reply-To: References: Message-ID: <15778.64868.650724.14398@monster.linux.in> >>>>> "LC" == Louis Cordier writes: LC> After experiencing a bit of difficulty to get everything LC> {ATLAS,LAPACK,F2PY,Numeric,SciPy} working, I wrote this little LC> script to automate the process for nodes on a cluster. I guess LC> it can serve as a quick & dirty how-to for other newcomers. LC> I used downloads from a local-network machine, just uncomment LC> the original locations, etc. Feel free to use and redistribute LC> it however you like. Nice. I am not sure you need to build lapack from source. I've used the standard debian lapack-dev and it seems to work ok. Also I notice that you stick the ATLAS stuff in /usr/lib/atlas which is not the right thing to do. I think /usr/local/lib/atlas is better. cheers, prabhu From mike_sorich at hotmail.com Wed Oct 9 03:59:40 2002 From: mike_sorich at hotmail.com (Michael Sorich) Date: Wed, 9 Oct 2002 17:29:40 +0930 Subject: [SciPy-user] debugging weave inline Message-ID: <000101c26f69$d1d631c0$8205120a@MikesLaptop> Hi I have recently started to use weave.inline. It is great, however, I spend a lot of time trying to find bugs in the c code. Are there any tips for how I can best debug inline c code? Is it possible to retrieve error messages from the compiler (eg for syntax errors)? Thanks Michael Sorich PhD Student School of Pharmaceutical, Molecular and Biomedical Sciences University of South Australia Email: michael.sorich at postgrads.unisa.edu.au mike_sorich at hotmail.com --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.393 / Virus Database: 223 - Release Date: 30/09/2002 -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric at enthought.com Wed Oct 9 04:24:20 2002 From: eric at enthought.com (eric jones) Date: Wed, 9 Oct 2002 03:24:20 -0500 Subject: [SciPy-user] debugging weave inline In-Reply-To: <000101c26f69$d1d631c0$8205120a@MikesLaptop> Message-ID: <000201c26f6d$44c5d750$777ba8c0@ericlaptop> Hey Micheal, If you are running from a standard command line python (not a gui such as PythonWin), the error messages from the compiler should show up in the window - they are not suppressed in any way. For even more information, you can use: weave.inline(code,args,verbose=2) which will print all the information of the compile to the command line just like 'make' would. Either approach should also print out the name of the .c file generated by weave with the line where the syntax error occurred. You can examine the file in an editor to see where the error occurred in your code. Hope that helps, eric -----Original Message----- From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net] On Behalf Of Michael Sorich Sent: Wednesday, October 09, 2002 3:00 AM To: scipy-user at scipy.net Subject: [SciPy-user] debugging weave inline Hi I have recently started to use weave.inline. It is great, however, I spend a lot of time trying to find bugs in the c code. Are there any tips for how I can best debug inline c code? Is it possible to retrieve error messages from the compiler (eg for syntax errors)? Thanks Michael Sorich PhD Student School of Pharmaceutical, Molecular and Biomedical Sciences University of South Australia Email: michael.sorich at postgrads.unisa.edu.au mike_sorich at hotmail.com --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.393 / Virus Database: 223 - Release Date: 30/09/2002 -------------- next part -------------- An HTML attachment was scrubbed... URL: From JAJAYERIMA at MAIL.COM Wed Oct 9 11:26:01 2002 From: JAJAYERIMA at MAIL.COM (jaja yerima) Date: Wed, 09 Oct 2002 17:26:01 +0200 Subject: [SciPy-user] jaja yerima Message-ID: <20021009153245.7D6FB3EACE@www.scipy.com> CONFIDENTIAL BUSINESS PROPOSAL dear sir You may be suprise to receive this letter from me since you dont know me personally. The purpose of my introduction is that I am JAJA YERIMA, the first son of DAVID YERIMA , the most popular farmer in Zimbabwe who was recently murdered in the land dispute in my country. I got your contact through network online hence decide to write you. Before the death of my father, he had taken me to Johannesburg to deposit the sum of US$7,000,000.00(seven million united states of America dollars)in one security company as he forsaw the coming danger in zimbabwe. This money was deposited in a box as gemstones in to avoid much demurage from the security company.This amount was meart for the purchase of new machines and chemicals for the new farm and establishment in Swiztland. This land problems came when Zimbawean president ROBERT MUGABE introduced a new land act reform who holly affected the rich white farmers and some few black farmers. And this resulted to the killing and mob action by Zimbabwe war returns and some lunatics in the society. It is against this background that I and my family fled Zimbabwe for fear of our lives and currently staying in The Netherlands where we seek political asylum and mooreso have decided to transfer my father' money to more reliable foreign account sinces the law of The netherland prohibits a refugee to open any bank account or to be involveed in any financial transaction throughout the territorial zone of Netherland . As the eldest son of my father , I am saddled to which the respobility of seeking a genuine foreign account where this money could be transfered without the the knowledge of my government who are bert on taking everything we have got.The South Africa government seems to be playing along with them. I am faced with the delima of moving this amount of money out of South Africa for fear of going through the same experience in future, both countries have similar political history. I am seeking for a partner who I have to entrust my future and family in his hand, I must let you know that this transaction is risk free. If you accept to assist me and my family , all I want you to do for me , is to arrange with the security company to clear the consignment (funds) from their afiliate office here in the Netherlands as I have already given directives for the consignment to be brought to The Netherlands from South Africa. But before then all modalities will have to be put in place e.g change of ownership to the consignment and this money intend I intend to use for investment . I have two options for you , firstly you can choose to have certain percentage of the money or you can go into partnership with me for the proper profitable investment of the money in your country . Which ever the option you want , feel free to notify me. I have aslo mapped out 5% of the money for all kinds of expense incured in the process of this transaction. If you do not prefer a partnership I am willing to give you 15% of the money while the remaining 80% will be for my investment in your country. Contact me with the above email address while i imlore you to maintain the absolute secrecy required in this transaction. and your phone and fax number will be need for the transaction. Thanks God bless you JAJA YERIMA. From mike_sorich at hotmail.com Wed Oct 9 21:50:22 2002 From: mike_sorich at hotmail.com (Michael Sorich) Date: Thu, 10 Oct 2002 11:20:22 +0930 Subject: [SciPy-user] debugging weave inline In-Reply-To: <000201c26f6d$44c5d750$777ba8c0@ericlaptop> Message-ID: <001c01c26fff$6572c840$8205120a@MikesLaptop> Thanks for the advice. I was running the code from PythonWin and using the command line allowed me to access the error messages. I have no idea how difficult it would be, but it would seem useful to print the error messages in the IDE (perhaps only when verbose=2). Cheers Michael Sorich PhD Student School of Pharmaceutical, Molecular and Biomedical Sciences University of South Australia Email: michael.sorich at postgrads.unisa.edu.au mike_sorich at hotmail.com -----Original Message----- From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net] On Behalf Of eric jones Sent: Wednesday, 9 October 2002 5:54 PM To: scipy-user at scipy.net Subject: RE: [SciPy-user] debugging weave inline Hey Micheal, If you are running from a standard command line python (not a gui such as PythonWin), the error messages from the compiler should show up in the window ? they are not suppressed in any way. For even more information, you can use: weave.inline(code,args,verbose=2) which will print all the information of the compile to the command line just like ?make? would. Either approach should also print out the name of the .c file generated by weave with the line where the syntax error occurred. You can examine the file in an editor to see where the error occurred in your code. Hope that helps, eric -----Original Message----- From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net] On Behalf Of Michael Sorich Sent: Wednesday, October 09, 2002 3:00 AM To: scipy-user at scipy.net Subject: [SciPy-user] debugging weave inline Hi I have recently started to use weave.inline. It is great, however, I spend a lot of time trying to find bugs in the c code. Are there any tips for how I can best debug inline c code? Is it possible to retrieve error messages from the compiler (eg for syntax errors)? Thanks Michael Sorich PhD Student School of Pharmaceutical, Molecular and Biomedical Sciences University of South Australia Email: michael.sorich at postgrads.unisa.edu.au mike_sorich at hotmail.com --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.393 / Virus Database: 223 - Release Date: 30/09/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.393 / Virus Database: 223 - Release Date: 30/09/2002 -------------- next part -------------- An HTML attachment was scrubbed... URL: From mike_sorich at hotmail.com Thu Oct 10 00:57:10 2002 From: mike_sorich at hotmail.com (Michael Sorich) Date: Thu, 10 Oct 2002 14:27:10 +0930 Subject: [SciPy-user] C++ reference recomendations Message-ID: <002c01c27019$7db67cc0$8205120a@MikesLaptop> I wish to learn how to program in C++, in order to speed up portions of my code that are computationally expensive. Can anyone recommend a reference to get up to speed in C++ quickly? Preferably it would deal with concepts specifically related to C++ (rather than programming in general) that are most important for scientific programming. Thanks Michael Sorich PhD Student School of Pharmaceutical, Molecular and Biomedical Sciences University of South Australia Email: michael.sorich at postgrads.unisa.edu.au mike_sorich at hotmail.com --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.393 / Virus Database: 223 - Release Date: 30/09/2002 -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric at enthought.com Thu Oct 10 01:20:19 2002 From: eric at enthought.com (eric jones) Date: Thu, 10 Oct 2002 00:20:19 -0500 Subject: [SciPy-user] C++ reference recomendations In-Reply-To: <002c01c27019$7db67cc0$8205120a@MikesLaptop> Message-ID: <000201c2701c$b9d3b5d0$777ba8c0@ericlaptop> "The C++ Programming Language" by Stroustrup is the definitive reference. http://www.amazon.com/exec/obidos/tg/detail/-/0201700735/qid=1034227051/ sr=8-1/ref=sr_8_1/103-5444377-5347008?v=glance&n=507846 Also Scott Meyer's "Effective C++" is another essential book. http://www.amazon.com/exec/obidos/ASIN/0201924889/qid=1034227195/sr=2-1/ ref=sr_2_1/103-5444377-5347008 eric -----Original Message----- From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net] On Behalf Of Michael Sorich Sent: Wednesday, October 09, 2002 11:57 PM To: scipy-user at scipy.net Subject: [SciPy-user] C++ reference recomendations I wish to learn how to program in C++, in order to speed up portions of my code that are computationally expensive. Can anyone recommend a reference to get up to speed in C++ quickly? Preferably it would deal with concepts specifically related to C++ (rather than programming in general) that are most important for scientific programming. Thanks Michael Sorich PhD Student School of Pharmaceutical, Molecular and Biomedical Sciences University of South Australia Email: michael.sorich at postgrads.unisa.edu.au mike_sorich at hotmail.com --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.393 / Virus Database: 223 - Release Date: 30/09/2002 -------------- next part -------------- An HTML attachment was scrubbed... URL: From h.jansen at fel.tno.nl Thu Oct 10 04:14:44 2002 From: h.jansen at fel.tno.nl (H Jansen) Date: Thu, 10 Oct 2002 10:14:44 +0200 Subject: [SciPy-user] C++ reference recomendations References: <000201c2701c$b9d3b5d0$777ba8c0@ericlaptop> Message-ID: <3DA536F3.5AE79A62@fel.tno.nl> Also "C++ Primer" (3rd ed, ISBN 0-201-82470-1) of Stanley Lippman (co-creator of C++ with Soustrup) and Lajoie is very good and comprehensive. I find it more readable then Soustrup's own book. Henk Jansen eric jones wrote: > "The C++ Programming Language" by Stroustrup is the definitive > reference. > > http://www.amazon.com/exec/obidos/tg/detail/-/0201700735/qid=1034227051/sr=8-1/ref=sr_8_1/103-5444377-5347008?v=glance&n=507846 > > Also Scott Meyer's "Effective C++" is another essential book. > > > ttp://www.amazon.com/exec/obidos/ASIN/0201924889/qid=1034227195/sr=2-1/ref=sr_2_1/103-5444377-5347008 > > eric > > -----Original Message----- > > From: scipy-user-admin at scipy.net > [mailto:scipy-user-admin at scipy.net] On Behalf Of Michael Sorich > Sent:Wednesday, October 09, 200211:57 PM > To: scipy-user at scipy.net > Subject: [SciPy-user] C++ reference recomendations > > I wish to learn how to program in C++, in order to speed up portions > of my code that are computationally expensive. Can anyone recommend a > reference to get up to speed in C++ quickly? Preferably it would deal > with concepts specifically related to C++ (rather than programming in > general) that are most important for scientific programming. > > Thanks > > Michael Sorich > > PhD Student > > School of Pharmaceutical, Molecular and Biomedical Sciences > > University of South Australia > > Email: michael.sorich at postgrads.unisa.edu.au > > mike_sorich at hotmail.com > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.393 / Virus Database: 223 - Release Date: 30/09/2002 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: h.jansen.vcf Type: text/x-vcard Size: 471 bytes Desc: Card for H Jansen URL: From F.L.Burton at udcf.gla.ac.uk Thu Oct 10 04:59:12 2002 From: F.L.Burton at udcf.gla.ac.uk (Francis Burton) Date: Thu, 10 Oct 2002 09:59:12 +0100 Subject: [SciPy-user] C++ reference recomendations Message-ID: <3.0.32.20021010095911.025369c0@lenzie.cent.gla.ac.uk> At 14:27 10/10/02 +0930, Michael SOrich wrote: name="PlaceName"/> name="PlaceType"/> name="place"/> name="PersonName"/> Clean Clean DocumentEmail MicrosoftInternetExplorer4 st1\:*{behavior:url(#default#ieooui) } /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman";} etc. For some reason, my email program Eudora doesn't interpret the markup above. It doesn't look like HTML to me. Anyway, it makes reading the actual message harder than it should be. Would it be possible for people to post plain ASCII text only, please? I believe there is no good reason to do otherwise. Cheers, Francis From eric at enthought.com Thu Oct 10 05:14:38 2002 From: eric at enthought.com (eric jones) Date: Thu, 10 Oct 2002 04:14:38 -0500 Subject: [SciPy-user] C++ reference recomendations In-Reply-To: <3.0.32.20021010095911.025369c0@lenzie.cent.gla.ac.uk> Message-ID: <000201c2703d$760e4d80$777ba8c0@ericlaptop> Sorry bout that. My mailer occasionally chooses to send mail out in HTML format. I've twisted all the knobs I know of to "plain text," but, when responding to some messages formats, it still chooses HTML. eric > -----Original Message----- > From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net] On > Behalf Of Francis Burton > Sent: Thursday, October 10, 2002 3:59 AM > To: scipy-user at scipy.net > Subject: Re: [SciPy-user] C++ reference recomendations > > At 14:27 10/10/02 +0930, Michael SOrich wrote: > name="PlaceName"/> name="PlaceType"/> name="place"/> > name="PersonName"/> Clean Clean DocumentEmail > MicrosoftInternetExplorer4 > st1\:*{behavior:url(#default#ieooui) } /* Style Definitions */ > table.MsoNormalTable {mso-style-name:"Table Normal"; > mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; > mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt > 0cm > 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; > mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times > New > Roman";} > > etc. > > For some reason, my email program Eudora doesn't interpret > the markup above. It doesn't look like HTML to me. Anyway, > it makes reading the actual message harder than it should be. > > Would it be possible for people to post plain ASCII text only, > please? I believe there is no good reason to do otherwise. > > Cheers, > Francis > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From bryan.cole at teraview.co.uk Thu Oct 10 05:54:03 2002 From: bryan.cole at teraview.co.uk (bryan cole) Date: 10 Oct 2002 10:54:03 +0100 Subject: [SciPy-user] wavelets and python In-Reply-To: <3DA536F3.5AE79A62@fel.tno.nl> References: <000201c2701c$b9d3b5d0$777ba8c0@ericlaptop> <3DA536F3.5AE79A62@fel.tno.nl> Message-ID: <1034243654.23489.1.camel@bryan.teraviewhq.local> Anyone know of any wavelet-toolkits with python wrappers? Alternatively, can anyone recommend a C/C++ wavelet toolkit for which I could make wrappers. I havn't come across any but I though I'd seek the wisdom of the list... Bryan -- 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 From eric at enthought.com Thu Oct 10 13:38:41 2002 From: eric at enthought.com (eric jones) Date: Thu, 10 Oct 2002 12:38:41 -0500 Subject: [SciPy-user] wavelets and python In-Reply-To: <1034243654.23489.1.camel@bryan.teraviewhq.local> Message-ID: <000601c27083$df87c980$6b01a8c0@ericlaptop> I have a "lifting" package lying around somewhere. It is based on Sweldon's lifting implementation of wavelets. If your're interested in this, I'll poke around and try to find it. Eric > -----Original Message----- > From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net] On > Behalf Of bryan cole > Sent: Thursday, October 10, 2002 4:54 AM > To: scipy-user at scipy.net > Subject: [SciPy-user] wavelets and python > > Anyone know of any wavelet-toolkits with python wrappers? Alternatively, > can anyone recommend a C/C++ wavelet toolkit for which I could make > wrappers. > > I havn't come across any but I though I'd seek the wisdom of the list... > > Bryan > > -- > 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 > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From eric at enthought.com Thu Oct 10 13:40:28 2002 From: eric at enthought.com (eric jones) Date: Thu, 10 Oct 2002 12:40:28 -0500 Subject: [SciPy-user] debugging weave inline In-Reply-To: <001c01c26fff$6572c840$8205120a@MikesLaptop> Message-ID: <000701c27084$1f832e80$6b01a8c0@ericlaptop> Not so sure how to capture this stuff from distutils, but I'm sure it is possible. If someone figures out how to do it, please send the patch my way. Thanks, eric -----Original Message----- From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net] On Behalf Of Michael Sorich Sent: Wednesday, October 09, 2002 8:50 PM To: scipy-user at scipy.net Subject: RE: [SciPy-user] debugging weave inline Thanks for the advice. I was running the code from PythonWin and using the command line allowed me to access the error messages. I have no idea how difficult it would be, but it would seem useful to print the error messages in the IDE (perhaps only when verbose=2). Cheers Michael Sorich PhD Student School of Pharmaceutical, Molecular and Biomedical Sciences University of South Australia Email: michael.sorich at postgrads.unisa.edu.au mike_sorich at hotmail.com -----Original Message----- From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net] On Behalf Of eric jones Sent: Wednesday, 9 October 2002 5:54 PM To: scipy-user at scipy.net Subject: RE: [SciPy-user] debugging weave inline Hey Micheal, If you are running from a standard command line python (not a gui such as PythonWin), the error messages from the compiler should show up in the window - they are not suppressed in any way. For even more information, you can use: weave.inline(code,args,verbose=2) which will print all the information of the compile to the command line just like 'make' would. Either approach should also print out the name of the .c file generated by weave with the line where the syntax error occurred. You can examine the file in an editor to see where the error occurred in your code. Hope that helps, eric -----Original Message----- From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net] On Behalf Of Michael Sorich Sent: Wednesday, October 09, 2002 3:00 AM To: scipy-user at scipy.net Subject: [SciPy-user] debugging weave inline Hi I have recently started to use weave.inline. It is great, however, I spend a lot of time trying to find bugs in the c code. Are there any tips for how I can best debug inline c code? Is it possible to retrieve error messages from the compiler (eg for syntax errors)? Thanks Michael Sorich PhD Student School of Pharmaceutical, Molecular and Biomedical Sciences University of South Australia Email: michael.sorich at postgrads.unisa.edu.au mike_sorich at hotmail.com --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.393 / Virus Database: 223 - Release Date: 30/09/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.393 / Virus Database: 223 - Release Date: 30/09/2002 -------------- next part -------------- An HTML attachment was scrubbed... URL: From fperez at pizero.colorado.edu Thu Oct 10 14:20:41 2002 From: fperez at pizero.colorado.edu (Fernando Perez) Date: Thu, 10 Oct 2002 12:20:41 -0600 (MDT) Subject: [SciPy-user] wavelets and python In-Reply-To: <000601c27083$df87c980$6b01a8c0@ericlaptop> Message-ID: On Thu, 10 Oct 2002, eric jones wrote: > I have a "lifting" package lying around somewhere. It is based on > Sweldon's lifting implementation of wavelets. If your're interested in > this, I'll poke around and try to find it. Please do so Eric. My new job is with a wavelets group, so I'll be very interested in looking at this in the future. Cheers, f. From mike_sorich at hotmail.com Fri Oct 11 03:02:01 2002 From: mike_sorich at hotmail.com (Michael Sorich) Date: Fri, 11 Oct 2002 16:32:01 +0930 Subject: [SciPy-user] conversion of c++ vector in weave Message-ID: <000001c270f4$198653c0$8205120a@MikesLaptop> Hi I wish to convert a small part of my code to C++ for speed. The code is not amenable to numeric arrays and uses lists extensively. I am thinking about using c++ vectors in place of python lists (I presume that this will be a lot faster than using Py::List). What little experience I have in extending python with C/C++ is limited to using weave. If I use vectors, is there any method to automatically convert my result (vector< vector >) to something that can be returned to python (tuple/list/array). I believe that Boost can do this (at least the upcoming v2, see http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/boost/boost/li bs/python/doc/v2/faq.html), however I am not sure how I would be able to integrate this with weave.inline. It does not appear obvious that there is anything in CXX that will do this. Any help would be appreciated. Thanks Michael Sorich PhD Student School of Pharmaceutical, Molecular and Biomedical Sciences University of South Australia Email: michael.sorich at postgrads.unisa.edu.au mike_sorich at hotmail.com --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.393 / Virus Database: 223 - Release Date: 30/09/2002 From nwagner at mecha.uni-stuttgart.de Fri Oct 11 03:38:03 2002 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Fri, 11 Oct 2002 09:38:03 +0200 Subject: [SciPy-user] Complex random numbers in scipy Message-ID: <3DA67FDB.8C2D3994@mecha.uni-stuttgart.de> Hi, rand(d1,...,dn) returns a matrix of the given dimensions which is initialized to random numbers from a uniform distribution in the range [0,1) Is there a similar function for complex random numbers ? Nils From pearu at cens.ioc.ee Fri Oct 11 03:35:53 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Fri, 11 Oct 2002 10:35:53 +0300 (EEST) Subject: [SciPy-user] Complex random numbers in scipy In-Reply-To: <3DA67FDB.8C2D3994@mecha.uni-stuttgart.de> Message-ID: On Fri, 11 Oct 2002, Nils Wagner wrote: > Hi, > > rand(d1,...,dn) returns a matrix of the given dimensions > which is initialized to random numbers from a uniform distribution > in the range [0,1) > > Is there a similar function for complex random numbers ? Try rand(d1,...,dn)+1j*rand(d1,...,dn) Pearu From eric at enthought.com Fri Oct 11 04:19:15 2002 From: eric at enthought.com (eric jones) Date: Fri, 11 Oct 2002 03:19:15 -0500 Subject: [SciPy-user] conversion of c++ vector in weave In-Reply-To: <000001c270f4$198653c0$8205120a@MikesLaptop> Message-ID: <000001c270fe$e3245b50$6b01a8c0@ericlaptop> Hey Michael, Can you give me a little more information about your application -- especially what your data structure looks like. This'll help us give more informed ideas on how to speed up the code and whether weave is going to help or not. If you are working with a list of numbers, then the following example might give you some clues. Note, though, that the fastest versions assume you are using a homogeneous list of integers and doesn't do any error checking at all. This'll lead to bad things if you pass in a list with a string in it. Further, if your data looks like this, your data would fit nicely into Numeric arrays, so I'm betting this isn't the ticket. YOU'LL NEED THE LATEST WEAVE FROM CVS TO RUN THE EXAMPLES !! I've made quite a few changes in the last week. I'm finally to the point of updating the documentation. When that is done, I'll release weave 0.3. regards, eric #----------------------------------------------------------------------- ----- # Example converting list to std::vector # Typical run: # h:\tmp>python std_vec.py # a initially: [1, 2, 3] # a on return: [101, 102, 103] # time it: N = 1000000 # python-loop (sec): 0.56299996376 # python-list-comprehension (sec): 0.827999949455 # simple weave (sec): 0.139999985695 # fast weave(sec): 0.0470000505447 # weave-no-vector(sec): 0.0460000038147 #----------------------------------------------------------------------- ----- import time import weave code = """ const int Na = a.length(); int i; // convert to std::vector std::vector v_a(Na); for(i = 0; i < Na; i++) v_a[i] = a[i]; // do something with the vector for(i = 0; i < Na; i++) v_a[i] = v_a[i] + 100; // put results back into a for(i = 0; i < Na; i++) a[i] = v_a[i]; """ a = [1,2,3] print "a initially:", a weave.inline(code,['a'],headers=[""]) print "a on return:", a N = 1000000 print "time it: N =", N #----------------------------------------------------------------------- ----- # Python #----------------------------------------------------------------------- ----- a = range(N) t1 = time.time() for i in xrange(N): a[i] = a[i] + 100 t2 = time.time() print "python-loop (sec):", t2 - t1 #----------------------------------------------------------------------- ----- # Python List Comprehension #----------------------------------------------------------------------- ----- a = range(N) t1 = time.time() a = [x + 100 for x in a] t2 = time.time() print "python-list-comprehension (sec):", t2 - t1 #----------------------------------------------------------------------- ----- # Simple weave #----------------------------------------------------------------------- ----- a = range(N) t1 = time.time() weave.inline(code,['a'],headers=[""]) t2 = time.time() print "simple weave (sec):", t2 - t1 #----------------------------------------------------------------------- ----- # Python API #----------------------------------------------------------------------- ----- api_code = """ const int Na = a.length(); int i; // convert to std::vector std::vector v_a(Na); for(i = 0; i < Na; i++) v_a[i] = PyInt_AS_LONG(PyList_GET_ITEM(py_a,i)); // do something with the vector for(i = 0; i < Na; i++) v_a[i] = v_a[i] + 100; // put results back into a for(i = 0; i < Na; i++) PyList_SET_ITEM(py_a,i,PyInt_FromLong(v_a[i])); """ a = [1,2,3] weave.inline(api_code,['a'],headers=[""]) a = range(N) t1 = time.time() weave.inline(api_code,['a'],headers=[""]) t2 = time.time() print "fast weave(sec):", t2 - t1 #----------------------------------------------------------------------- ----- # Python API -- no std::vector #----------------------------------------------------------------------- ----- api_code = """ const int Na = a.length(); int i, val; // convert to std::vector for(i = 0; i < Na; i++) { val = PyInt_AS_LONG(PyList_GET_ITEM(py_a,i)); PyList_SET_ITEM(py_a,i,PyInt_FromLong(val+100)); } """ a = [1,2,3] weave.inline(api_code,['a'],headers=[""]) a = range(N) t1 = time.time() weave.inline(api_code,['a'],headers=[""]) t2 = time.time() print "weave-no-vector(sec):", t2 - t1 > -----Original Message----- > From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net] On > Behalf Of Michael Sorich > Sent: Friday, October 11, 2002 2:02 AM > To: scipy-user at scipy.net > Subject: [SciPy-user] conversion of c++ vector in weave > > Hi > > I wish to convert a small part of my code to C++ for speed. The code is > not amenable to numeric arrays and uses lists extensively. I am thinking > about using c++ vectors in place of python lists (I presume that this > will be a lot faster than using Py::List). What little experience I have > in extending python with C/C++ is limited to using weave. > > If I use vectors, is there any method to automatically convert my result > (vector< vector >) to something that can be returned to python > (tuple/list/array). I believe that Boost can do this (at least the > upcoming v2, see > http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/boost/boost/li > bs/python/doc/v2/faq.html), however I am not sure how I would be able to > integrate this with weave.inline. It does not appear obvious that there > is anything in CXX that will do this. > > Any help would be appreciated. > > Thanks > > Michael Sorich > PhD Student > School of Pharmaceutical, Molecular and Biomedical Sciences > University of South Australia > Email: michael.sorich at postgrads.unisa.edu.au > mike_sorich at hotmail.com > > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.393 / Virus Database: 223 - Release Date: 30/09/2002 > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From bryan.cole at teraview.co.uk Fri Oct 11 04:58:23 2002 From: bryan.cole at teraview.co.uk (bryan cole) Date: 11 Oct 2002 09:58:23 +0100 Subject: [SciPy-user] wavelets and python In-Reply-To: References: Message-ID: <1034326715.24951.4.camel@bryan.teraviewhq.local> Yes, I'd be interested in anything you've got (I've got no background in wavelets but I've got to learn some). I also came across http://www.cse.sc.edu/~fernande/liftpack/release.html which looks like it might be a good candidate for python wrapping. I looked briefly at the documentation for the WAILI wavelets library (http://www.cs.kuleuven.ac.be/~wavelets/) but this looked way to complicated for my little brain. Bryan On Thu, 2002-10-10 at 19:20, Fernando Perez wrote: > On Thu, 10 Oct 2002, eric jones wrote: > > > I have a "lifting" package lying around somewhere. It is based on > > Sweldon's lifting implementation of wavelets. If your're interested in > > this, I'll poke around and try to find it. > > Please do so Eric. My new job is with a wavelets group, so I'll be very > interested in looking at this in the future. > > Cheers, > > f. > > _______________________________________________ > 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 From sales at smoking.com.net Fri Oct 11 10:28:08 2002 From: sales at smoking.com.net (Sales Department) Date: Fri, 11 Oct 2002 16:28:08 +0200 Subject: [SciPy-user] Low Price Tobacco Message-ID: <20021012232657.623A13EACE@www.scipy.com> Dear Sir or Madam In the past you have requested information on discounted products. If you are not a smoker, and find this email offensive, then we sincerely apologise. We will be only too happy to take you off our database. If you are a smoker, however, you are probably fed up with paying high prices for your cigarettes and tobacco. Take a look at what we can do for you at http://www.smokersassociation.co.uk/?S=32&ID=2 We can send you, legally, by registered air mail, direct to your door, 4 cartons of cigarettes or 40 pouches of rolling tobacco (all brands are available) from only 170 Euros - about 105 pounds - fully inclusive of postage and packing. Why pay more? If you would rather not hear from us any more, this link will ensure that you are not bothered again. mailto:unsubscribe at smokersassociation.co.uk Yours faithfully. Smokers Association http://www.smokersassociation.co.uk/?S=32&ID=2 xay10878701y From stephen at theboulets.net Sun Oct 13 12:15:28 2002 From: stephen at theboulets.net (Stephen Boulet) Date: Sun, 13 Oct 2002 11:15:28 -0500 Subject: [SciPy-user] Can't find atlas for scipy install Message-ID: <200210131115.28967.stephen@theboulets.net> I've installed atlas (atlas-3.2.1 and atlas-c++-0.4.5). "/usr/lib" is in my "/etc/ld.so.conf" and I've run "ldconfig". When I try installing scipy (cvs), I get the messages below. Can someone tell me what I'm doing wrong? (I did notice that there is a "/usr/bin/atlas-config" executable in the atlas distribution; I'm not sure how to use it though.) -- Stephen # python setup.py install atlas_info: NOT AVAILABLE linalg/setup_linalg.py:36: UserWarning: Atlas (http://math-atlas.sourceforge.net/) libraries not found. Directories to search for the libraries can be specified in the scipy_distutils/site.cfg file (section [atlas]) or by setting the ATLAS environment variable. warnings.warn(AtlasNotFoundError.__doc__) blas_info: NOT AVAILABLE linalg/setup_linalg.py:40: UserWarning: Blas (http://www.netlib.org/blas/) libraries not found. Directories to search for the libraries can be specified in the scipy_distutils/site.cfg file (section [blas]) or by setting the BLAS environment variable. warnings.warn(BlasNotFoundError.__doc__) blas_src_info: NOT AVAILABLE Traceback (most recent call last): File "setup.py", line 130, in ? install_package() File "setup.py", line 95, in install_package config.extend([get_package_config(x,parent_package)for x in standard_packages]) File "setup.py", line 45, in get_package_config config = mod.configuration(parent) File "linalg/setup_linalg.py", line 43, in configuration raise BlasSrcNotFoundError,BlasSrcNotFoundError.__doc__ scipy_distutils.system_info.BlasSrcNotFoundError: Blas (http://www.netlib.org/blas/) sources not found. Directories to search for the sources can be specified in the scipy_distutils/site.cfg file (section [blas_src]) or by setting the BLAS_SRC environment variable. From pearu at cens.ioc.ee Sun Oct 13 13:49:23 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Sun, 13 Oct 2002 20:49:23 +0300 (EEST) Subject: [SciPy-user] Can't find atlas for scipy install In-Reply-To: <200210131115.28967.stephen@theboulets.net> Message-ID: On Sun, 13 Oct 2002, Stephen Boulet wrote: > I've installed atlas (atlas-3.2.1 and atlas-c++-0.4.5). "/usr/lib" is in my > "/etc/ld.so.conf" and I've run "ldconfig". Did you installed ATLAS from source? If yes, then note that when giving a command make install in ATLAS source directory, it actually does not install the libraries anywhere, it just builds them. You have to copy the libraries manually where your system can find them, preferably to /usr/local/lib/atlas. Very important: before you copy, you must apply the instructions from http://math-atlas.sourceforge.net/errata.html#completelp If no, then what Linux distribution are you using? Check that the directory where ATLAS libraries were installed, contains at least the following four files: libatlas.a libcblas.a libf77blas.a liblapack.a Btw, scipy does not require atlas-c++. > When I try installing scipy (cvs), I get the messages below. Can someone tell > me what I'm doing wrong? > > (I did notice that there is a "/usr/bin/atlas-config" executable in the atlas > distribution; I'm not sure how to use it though.) There is no atlas-config in ATLAS-3.2.1 source distribution, it is not even created when building ATLAS. Pearu From stephen at theboulets.net Sun Oct 13 14:12:53 2002 From: stephen at theboulets.net (Stephen Boulet) Date: Sun, 13 Oct 2002 13:12:53 -0500 Subject: [SciPy-user] Can't find atlas for scipy install In-Reply-To: References: Message-ID: <200210131312.53482.stephen@theboulets.net> You hit the nail on the head. I'm using Gentoo linux, which is a source based distribution. The install file used here places those files: /usr/lib/libtstatlas.a /usr/lib/libatlas.a /usr/lib/libf77blas.a /usr/lib/libcblas.a /usr/share/atlas/liblapack.a I copied /usr/share/atlas/liblapack.a to /usr/lib, reran ldconfig, and setup.py worked. Thanks! I'll submit the bug to bugs.gentoo.org. -- Stephen On Sunday 13 October 2002 12:49 pm, Pearu Peterson wrote: > On Sun, 13 Oct 2002, Stephen Boulet wrote: > > I've installed atlas (atlas-3.2.1 and atlas-c++-0.4.5). "/usr/lib" is in > > my "/etc/ld.so.conf" and I've run "ldconfig". > > Did you installed ATLAS from source? > > If yes, then note that when giving a command > make install > in ATLAS source directory, it actually does not install the libraries > anywhere, it just builds them. You have to copy the libraries manually > where your system can find them, preferably to /usr/local/lib/atlas. > Very important: before you copy, you must apply the instructions from > http://math-atlas.sourceforge.net/errata.html#completelp > > If no, then what Linux distribution are you using? Check that the > directory where ATLAS libraries were installed, contains at least the > following four files: > libatlas.a libcblas.a libf77blas.a liblapack.a From stephen at theboulets.net Sun Oct 13 14:23:56 2002 From: stephen at theboulets.net (Stephen Boulet) Date: Sun, 13 Oct 2002 13:23:56 -0500 Subject: [SciPy-user] Error on importing scipy Message-ID: <200210131323.56873.stephen@theboulets.net> Now that I have scipy installed, I get this error as a regular user: >>> import scipy exceptions.ImportError: /usr/lib/python2.2/site-packages/scipy/linalg/_flinalg.so: undefined symbol: dlaswp_ Traceback (most recent call last): File "", line 1, in ? File "/usr/lib/python2.2/site-packages/scipy/__init__.py", line 49, in ? import special, io, linalg, stats, fftpack File "/usr/lib/python2.2/site-packages/scipy/special/__init__.py", line 328, in ? import orthogonal File "/usr/lib/python2.2/site-packages/scipy/special/orthogonal.py", line 59, in ? from scipy.linalg import eig File "/usr/lib/python2.2/site-packages/scipy/linalg/__init__.py", line 42, in ? from basic import * File "/usr/lib/python2.2/site-packages/scipy/linalg/basic.py", line 17, in ? import calc_lwork ImportError: /usr/lib/python2.2/site-packages/scipy/linalg/calc_lwork.so: undefined symbol: ieeeck_ But as root, I get this error: >>> import scipy Traceback (most recent call last): File "", line 1, in ? File "/usr/lib/python2.2/site-packages/scipy/__init__.py", line 36, in ? from scipy_base import * File "scipy_base/__init__.py", line 99, in ? import fastumath ImportError: No module named fastumath From travis at enthought.com Sun Oct 13 15:08:09 2002 From: travis at enthought.com (Travis N. Vaught) Date: Sun, 13 Oct 2002 14:08:09 -0500 Subject: [SciPy-user] Error on importing scipy In-Reply-To: <200210131323.56873.stephen@theboulets.net> Message-ID: Try running python from the ~/ directory or /. You are probably running from the built dir and, therefore, don't see the installed libs. This is an issue--another older thread starts here: http://www.scipy.org/site_content/mailman?fn=scipy-user/2002-October/000756. html Hopefully this will help. Travis > -----Original Message----- > From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net]On > Behalf Of Stephen Boulet > Sent: Sunday, October 13, 2002 1:24 PM > To: scipy > Subject: [SciPy-user] Error on importing scipy > > > Now that I have scipy installed, I get this error as a regular user: > > >>> import scipy > exceptions.ImportError: > /usr/lib/python2.2/site-packages/scipy/linalg/_flinalg.so: > undefined symbol: > dlaswp_ > Traceback (most recent call last): > File "", line 1, in ? > File "/usr/lib/python2.2/site-packages/scipy/__init__.py", line 49, in ? > import special, io, linalg, stats, fftpack > File > "/usr/lib/python2.2/site-packages/scipy/special/__init__.py", line 328, > in ? > import orthogonal > File > "/usr/lib/python2.2/site-packages/scipy/special/orthogonal.py", line > 59, in ? > from scipy.linalg import eig > File > "/usr/lib/python2.2/site-packages/scipy/linalg/__init__.py", line 42, > in ? > from basic import * > File "/usr/lib/python2.2/site-packages/scipy/linalg/basic.py", > line 17, in ? > import calc_lwork > ImportError: /usr/lib/python2.2/site-packages/scipy/linalg/calc_lwork.so: > undefined symbol: ieeeck_ > > But as root, I get this error: > > >>> import scipy > Traceback (most recent call last): > File "", line 1, in ? > File "/usr/lib/python2.2/site-packages/scipy/__init__.py", line 36, in ? > from scipy_base import * > File "scipy_base/__init__.py", line 99, in ? > import fastumath > ImportError: No module named fastumath > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From pearu at cens.ioc.ee Sun Oct 13 15:26:14 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Sun, 13 Oct 2002 22:26:14 +0300 (EEST) Subject: [SciPy-user] Error on importing scipy In-Reply-To: <200210131323.56873.stephen@theboulets.net> Message-ID: On Sun, 13 Oct 2002, Stephen Boulet wrote: > Now that I have scipy installed, I get this error as a regular user: > > >>> import scipy > exceptions.ImportError: > /usr/lib/python2.2/site-packages/scipy/linalg/_flinalg.so: undefined symbol: > dlaswp_ ^^^^^^^ Did you follow instructions in http://math-atlas.sourceforge.net/errata.html#completelp If yes, then what is the output of python scipy_distutils/system_info.py ? Hmm, in scipy/INSTALL.txt is written that SciPy requires ATLAS 3.3.14 or newer. Is anyone using ATLAS 3.2.1 succesfully with scipy? > But as root, I get this error: > > >>> import scipy > Traceback (most recent call last): > File "", line 1, in ? > File "/usr/lib/python2.2/site-packages/scipy/__init__.py", line 36, in ? > from scipy_base import * > File "scipy_base/__init__.py", line 99, in ? ^^^^^^^^^^^^^^^^^^^^^^ > import fastumath > ImportError: No module named fastumath That's because you are trying to import scipy from its source directory. Change to another directory and try again. Pearu From laytonjb at bellsouth.net Sun Oct 13 19:54:15 2002 From: laytonjb at bellsouth.net (Jeffrey B. Layton) Date: Sun, 13 Oct 2002 19:54:15 -0400 Subject: [SciPy-user] Install failed for SciPy Message-ID: <3DAA07A7.2040005@bellsouth.net> Good evening, I've started to install SciPy and I received an error: ifc -shared build/temp.linux-i686-2.2/cephesmodule.o build/temp.linux-i686-2.2/amos_wrappers.o build/temp.linux-i686-2.2/specfun_wrappers.o build/temp.linux-i686-2.2/toms_wrappers.o build/temp.linux-i686-2.2/cdf_wrappers.o build/temp.linux-i686-2.2/ufunc_extras.o -Lbuild/temp.linux-i686-2.2 -Lbuild/temp.linux-i686-2.2 -lamos -ltoms -lc_misc -lcephes -lmach -lcdf -lspecfun -o build/lib.linux-i686-2.2/scipy/special/cephes.so /opt/intel/compiler60/ia32/lib/libF90.a(int8.o): In function `isnan': int8.o(.text+0x4c40): multiple definition of `isnan' build/temp.linux-i686-2.2/libcephes.a(isnan.o):/home/laytonj/RESEARCH/PYTHON/SCIPY/SciPy-0.2.0_alpha_142.4307/special/cephes/isnan.c:125: first defined here ld: Warning: size of symbol `isnan' changed from 51 to 80 in /opt/intel/compiler60/ia32/lib/libF90.a(int8.o) error: command 'ifc' failed with exit status 1 I'll try to give you all of the details about the setup. It's a RH 7.3 system on an Athlon XP 1800+. The kernel is a custom 2.4.18 kernel with the "jam0" patches installed (http://giga.cps.unizar.es/~magallon/linux/kernel/). These patches include the -aa patches. I'm using python-2.2 that came with RH 7.3. If I run the command: '/usr/bin/python2.2 -c 'import os,sys;print os.name,sys.platform' here are the results: [root at home3 SciPy-0.2.0_alpha_142.4307]# /usr/bin/python2.2 -c 'import os,sys;print os.name,sys.platform' posix linux2 I'm using the Intel Fortran compiler and gcc-3.1.1 that I build into my account using the directions from the ATLAS homepage. Here is the result of using 'ifc -V' Intel(R) Fortran Compiler for 32-bit applications, Version 6.0 Build 020609Z Copyright (C) 1985-2002 Intel Corporation. All rights reserved. I built ATLAS using gcc-3.1.1 and ifc. I also built the ATLAS test suite and ran the F77 version. I received no errors. I compiled LAPACK-3.0 with ifc using the following options: -Vaxlib -ip -O2 -w90 -w95 -axK -tpp6 -unroll -mp1 -fp_port -prefetch -xK -unfoll -align and used '-Vaxlib' in the link command. I copied these libraries to /usr/local/lib/atlas and reran ranlib on them. I installed Numeric 20.1.0 and fftw (via the RPMs: fftw-2.1.3-1). I also installed f2py (F2PY-2.23.190-1369) with python-2.2. I'm using /usr/bin/python2.2, but the install script may have tried to use /usr/bin/python. I'm not sure if this is my problem are not. I'm building SciPy-0.2.0_alpha_142.4307. Thanks for any and all help! Jeff From mike_sorich at hotmail.com Sun Oct 13 22:35:45 2002 From: mike_sorich at hotmail.com (Michael Sorich) Date: Mon, 14 Oct 2002 12:05:45 +0930 Subject: [SciPy-user] conversion of c++ vector in weave In-Reply-To: <000001c270fe$e3245b50$6b01a8c0@ericlaptop> Message-ID: <000001c2732a$660e5070$6a5e32d2@MikesLaptop> Thanks for the help, Eric. Sorry about the lack of details. The part that I want to speed up takes a distance matrix (array) and a list of bins (which can be overlapping) and returns all the combinations of bins that the values in the distance matrix upper triangle fall within, as a list of bin index lists. Example: distMatrix = [[0.,1.,2.],[1.,0.,3.],[2.,3.,0.]] bins = [[0.9,2.1],[1.9,3.1],[2.9,4.1]], where the inner lists contain the min and max values of the bin. In this example there are 3 distances to be binned (1.,2.,3.). distance 1 can be binned into bin 0, dist 2 into bins 0 and 1 and dist 3 into bins 1 and 2. The combinations include [0,0,1],[0,0,2],[0,1,1],[0,1,2] It is a little more complicated than above, in that the function takes multiple dist matrices (these are stored in the third dimension of the distMatrix variable). I have implemented this in python using lists to store the combinations, because I could not see any way to determine the size of the array at the time of construction. I figured that vectors in C++ would be the best replacement for the lists, however I was unsure what would be the most efficient method to return the results stored in the vector. Thanks for the examples of how to do this. What I have ended up doing is creating a PyArray (since at the end the size of the vector is known) and copying the data across and then returning the PyArray. It wasn't as complicated as I had feared. I have attached the python and c versions of the function, if you are interested. The algorithm I made is a quick hack. If you know of a better way please let me know! Thanks again, Michael -----Original Message----- From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net] On Behalf Of eric jones Sent: Friday, 11 October 2002 5:49 PM To: scipy-user at scipy.net Subject: RE: [SciPy-user] conversion of c++ vector in weave Hey Michael, Can you give me a little more information about your application -- especially what your data structure looks like. This'll help us give more informed ideas on how to speed up the code and whether weave is going to help or not. If you are working with a list of numbers, then the following example might give you some clues. Note, though, that the fastest versions assume you are using a homogeneous list of integers and doesn't do any error checking at all. This'll lead to bad things if you pass in a list with a string in it. Further, if your data looks like this, your data would fit nicely into Numeric arrays, so I'm betting this isn't the ticket. YOU'LL NEED THE LATEST WEAVE FROM CVS TO RUN THE EXAMPLES !! I've made quite a few changes in the last week. I'm finally to the point of updating the documentation. When that is done, I'll release weave 0.3. regards, eric #----------------------------------------------------------------------- ----- # Example converting list to std::vector # Typical run: # h:\tmp>python std_vec.py # a initially: [1, 2, 3] # a on return: [101, 102, 103] # time it: N = 1000000 # python-loop (sec): 0.56299996376 # python-list-comprehension (sec): 0.827999949455 # simple weave (sec): 0.139999985695 # fast weave(sec): 0.0470000505447 # weave-no-vector(sec): 0.0460000038147 #----------------------------------------------------------------------- ----- import time import weave code = """ const int Na = a.length(); int i; // convert to std::vector std::vector v_a(Na); for(i = 0; i < Na; i++) v_a[i] = a[i]; // do something with the vector for(i = 0; i < Na; i++) v_a[i] = v_a[i] + 100; // put results back into a for(i = 0; i < Na; i++) a[i] = v_a[i]; """ a = [1,2,3] print "a initially:", a weave.inline(code,['a'],headers=[""]) print "a on return:", a N = 1000000 print "time it: N =", N #----------------------------------------------------------------------- ----- # Python #----------------------------------------------------------------------- ----- a = range(N) t1 = time.time() for i in xrange(N): a[i] = a[i] + 100 t2 = time.time() print "python-loop (sec):", t2 - t1 #----------------------------------------------------------------------- ----- # Python List Comprehension #----------------------------------------------------------------------- ----- a = range(N) t1 = time.time() a = [x + 100 for x in a] t2 = time.time() print "python-list-comprehension (sec):", t2 - t1 #----------------------------------------------------------------------- ----- # Simple weave #----------------------------------------------------------------------- ----- a = range(N) t1 = time.time() weave.inline(code,['a'],headers=[""]) t2 = time.time() print "simple weave (sec):", t2 - t1 #----------------------------------------------------------------------- ----- # Python API #----------------------------------------------------------------------- ----- api_code = """ const int Na = a.length(); int i; // convert to std::vector std::vector v_a(Na); for(i = 0; i < Na; i++) v_a[i] = PyInt_AS_LONG(PyList_GET_ITEM(py_a,i)); // do something with the vector for(i = 0; i < Na; i++) v_a[i] = v_a[i] + 100; // put results back into a for(i = 0; i < Na; i++) PyList_SET_ITEM(py_a,i,PyInt_FromLong(v_a[i])); """ a = [1,2,3] weave.inline(api_code,['a'],headers=[""]) a = range(N) t1 = time.time() weave.inline(api_code,['a'],headers=[""]) t2 = time.time() print "fast weave(sec):", t2 - t1 #----------------------------------------------------------------------- ----- # Python API -- no std::vector #----------------------------------------------------------------------- ----- api_code = """ const int Na = a.length(); int i, val; // convert to std::vector for(i = 0; i < Na; i++) { val = PyInt_AS_LONG(PyList_GET_ITEM(py_a,i)); PyList_SET_ITEM(py_a,i,PyInt_FromLong(val+100)); } """ a = [1,2,3] weave.inline(api_code,['a'],headers=[""]) a = range(N) t1 = time.time() weave.inline(api_code,['a'],headers=[""]) t2 = time.time() print "weave-no-vector(sec):", t2 - t1 > -----Original Message----- > From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net] On > Behalf Of Michael Sorich > Sent: Friday, October 11, 2002 2:02 AM > To: scipy-user at scipy.net > Subject: [SciPy-user] conversion of c++ vector in weave > > Hi > > I wish to convert a small part of my code to C++ for speed. The code is > not amenable to numeric arrays and uses lists extensively. I am thinking > about using c++ vectors in place of python lists (I presume that this > will be a lot faster than using Py::List). What little experience I have > in extending python with C/C++ is limited to using weave. > > If I use vectors, is there any method to automatically convert my result > (vector< vector >) to something that can be returned to python > (tuple/list/array). I believe that Boost can do this (at least the > upcoming v2, see > http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/boost/boost/li > bs/python/doc/v2/faq.html), however I am not sure how I would be able to > integrate this with weave.inline. It does not appear obvious that there > is anything in CXX that will do this. > > Any help would be appreciated. > > Thanks > > Michael Sorich > PhD Student > School of Pharmaceutical, Molecular and Biomedical Sciences > University of South Australia > Email: michael.sorich at postgrads.unisa.edu.au > mike_sorich at hotmail.com > > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.393 / Virus Database: 223 - Release Date: 30/09/2002 > > _______________________________________________ > 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 --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.393 / Virus Database: 223 - Release Date: 30/09/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.393 / Virus Database: 223 - Release Date: 30/09/2002 -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: testBinMap.py URL: From pearu at cens.ioc.ee Mon Oct 14 04:54:42 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Mon, 14 Oct 2002 11:54:42 +0300 (EEST) Subject: [SciPy-user] ATLAS 3.2.1 support Message-ID: Hi, SciPy now supports also ATLAS 3.2.1 (because that seems to be the latest ATLAS version for most Linux distributions). To enjoy this support, one must 1) set atlas_version_pre_3_3=1 in the header of scipy/linalg/setup_linalg.py 2) remove scipy/linalg/clapack.pyf 3) rebuild/reinstall scipy. Regards, Pearu From prabhu at aero.iitm.ernet.in Mon Oct 14 06:13:50 2002 From: prabhu at aero.iitm.ernet.in (Prabhu Ramachandran) Date: Mon, 14 Oct 2002 15:43:50 +0530 Subject: [SciPy-user] ATLAS 3.2.1 support In-Reply-To: References: Message-ID: <15786.39134.60201.242117@monster.linux.in> >>>>> "PP" == Pearu Peterson writes: PP> Hi, PP> SciPy now supports also ATLAS 3.2.1 (because that seems to be PP> the latest ATLAS version for most Linux distributions). To PP> enjoy this support, one must 1) set atlas_version_pre_3_3=1 in PP> the header of scipy/linalg/setup_linalg.py 2) remove PP> scipy/linalg/clapack.pyf 3) rebuild/reinstall scipy. Thanks. I think this will make it much easier for many to install SciPy. cheers, prabhu From pearu at cens.ioc.ee Mon Oct 14 07:18:58 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Mon, 14 Oct 2002 14:18:58 +0300 (EEST) Subject: [SciPy-user] ATLAS 3.2.1 support In-Reply-To: Message-ID: On Mon, 14 Oct 2002, Pearu Peterson wrote: > > Hi, > > SciPy now supports also ATLAS 3.2.1 (because that seems to be the latest > ATLAS version for most Linux distributions). To enjoy this support, one > must > 1) set > atlas_version_pre_3_3=1 > in the header of scipy/linalg/setup_linalg.py This part can be skipped now. SciPy is now able to determine the ATLAS version automatically. > 2) remove > scipy/linalg/clapack.pyf > 3) rebuild/reinstall scipy. Pearu From pearu at cens.ioc.ee Mon Oct 14 08:42:49 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Mon, 14 Oct 2002 15:42:49 +0300 (EEST) Subject: [SciPy-user] Install failed for SciPy In-Reply-To: <3DAA07A7.2040005@bellsouth.net> Message-ID: On Sun, 13 Oct 2002, Jeffrey B. Layton wrote: > Good evening, > > I've started to install SciPy and I received an error: > > ifc -shared build/temp.linux-i686-2.2/cephesmodule.o > build/temp.linux-i686-2.2/amos_wrappers.o > build/temp.linux-i686-2.2/specfun_wrappers.o > build/temp.linux-i686-2.2/toms_wrappers.o > build/temp.linux-i686-2.2/cdf_wrappers.o > build/temp.linux-i686-2.2/ufunc_extras.o -Lbuild/temp.linux-i686-2.2 > -Lbuild/temp.linux-i686-2.2 -lamos -ltoms -lc_misc -lcephes -lmach -lcdf > -lspecfun -o build/lib.linux-i686-2.2/scipy/special/cephes.so > /opt/intel/compiler60/ia32/lib/libF90.a(int8.o): In function `isnan': > int8.o(.text+0x4c40): multiple definition of `isnan' > build/temp.linux-i686-2.2/libcephes.a(isnan.o):/home/laytonj/RESEARCH/PYTHON/SCIPY/SciPy-0.2.0_alpha_142.4307/special/cephes/isnan.c:125: > first defined here > ld: Warning: size of symbol `isnan' changed from 51 to 80 in > /opt/intel/compiler60/ia32/lib/libF90.a(int8.o) > error: command 'ifc' failed with exit status 1 Because the symbol `isnan' has different sizes in libcephes.a and libF90.a, I am not sure that we can skip using isnan() function from cephes library in favor of the one in libF90.a -- they probably have different signatures and would crash python if we'd do that (though, I have not tested this statement). Currently, I don't have any better suggestion than use g77 compiler for building/installing scipy: setup.py build build_flib --fcompiler=Gnu or setup.py build build_flib --fcompiler=Gnu install Suggestions how to solve the problem of supporting Intel compiler are welcome. One solution would be renaming isnan to cephes_isnan in cephes library. Other ideas? Pearu From eric at enthought.com Mon Oct 14 09:20:15 2002 From: eric at enthought.com (eric jones) Date: Mon, 14 Oct 2002 08:20:15 -0500 Subject: [SciPy-user] ATLAS 3.2.1 support In-Reply-To: Message-ID: <000301c27384$71c26dc0$8901a8c0@ERICDESKTOP> > -----Original Message----- > From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net] On > Behalf Of Pearu Peterson > Sent: Monday, October 14, 2002 5:19 AM > To: scipy-user at scipy.net > Subject: Re: [SciPy-user] ATLAS 3.2.1 support > > > On Mon, 14 Oct 2002, Pearu Peterson wrote: > > > > > Hi, > > > > SciPy now supports also ATLAS 3.2.1 (because that seems to be the latest > > ATLAS version for most Linux distributions). To enjoy this support, one > > must > > 1) set > > atlas_version_pre_3_3=1 > > in the header of scipy/linalg/setup_linalg.py > > This part can be skipped now. SciPy is now able to determine > the ATLAS version automatically. Very good! As I read your previous post, I was hoping there would be a way to find this automatically. Eric From eric at enthought.com Mon Oct 14 09:46:19 2002 From: eric at enthought.com (eric jones) Date: Mon, 14 Oct 2002 08:46:19 -0500 Subject: [SciPy-user] Install failed for SciPy In-Reply-To: Message-ID: <000701c27388$16166c70$8901a8c0@ERICDESKTOP> > -----Original Message----- > From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net] On > Behalf Of Pearu Peterson > Sent: Monday, October 14, 2002 6:43 AM > To: scipy-user at scipy.net > Subject: Re: [SciPy-user] Install failed for SciPy > > > On Sun, 13 Oct 2002, Jeffrey B. Layton wrote: > > > Good evening, > > > > I've started to install SciPy and I received an error: > > > > ifc -shared build/temp.linux-i686-2.2/cephesmodule.o > > build/temp.linux-i686-2.2/amos_wrappers.o > > build/temp.linux-i686-2.2/specfun_wrappers.o > > build/temp.linux-i686-2.2/toms_wrappers.o > > build/temp.linux-i686-2.2/cdf_wrappers.o > > build/temp.linux-i686-2.2/ufunc_extras.o -Lbuild/temp.linux-i686-2.2 > > -Lbuild/temp.linux-i686-2.2 -lamos -ltoms -lc_misc -lcephes -lmach -lcdf > > -lspecfun -o build/lib.linux-i686-2.2/scipy/special/cephes.so > > /opt/intel/compiler60/ia32/lib/libF90.a(int8.o): In function `isnan': > > int8.o(.text+0x4c40): multiple definition of `isnan' > > build/temp.linux-i686- > 2.2/libcephes.a(isnan.o):/home/laytonj/RESEARCH/PYTHON/SCIPY/SciPy- > 0.2.0_alpha_142.4307/special/cephes/isnan.c:125: > > first defined here > > ld: Warning: size of symbol `isnan' changed from 51 to 80 in > > /opt/intel/compiler60/ia32/lib/libF90.a(int8.o) > > error: command 'ifc' failed with exit status 1 > > Because the symbol `isnan' has different sizes in libcephes.a and > libF90.a, I am not sure that we can skip using isnan() function from > cephes library in favor of the one in libF90.a -- they probably have > different signatures and would crash python if we'd do that (though, > I have not tested this statement). I don't know, since cephes has been around so long, maybe they mimicked its behavior. Perhaps I'm being to optiomistic... > > Currently, I don't have any better suggestion than use g77 compiler for > building/installing scipy: > setup.py build build_flib --fcompiler=Gnu > or > setup.py build build_flib --fcompiler=Gnu install > > Suggestions how to solve the problem of supporting Intel compiler are > welcome. Yes, I would be very interested in this also. > One solution would be renaming isnan to cephes_isnan in cephes library. > Other ideas? If the signatures are different, then this seems to be the best option. Perhaps we should add a test in system_info that builds a little Fortran file with isnan defined and tests to see if builds. If so, we disable the cephes version (that's assuming the its compatible -- perhaps another tests). Hmmm. cephes_isnan is easier and doesn't really have a downside (right?). Let's just do that. eric From pearu at cens.ioc.ee Mon Oct 14 11:43:54 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Mon, 14 Oct 2002 18:43:54 +0300 (EEST) Subject: [SciPy-user] Install failed for SciPy In-Reply-To: <000701c27388$16166c70$8901a8c0@ERICDESKTOP> Message-ID: On Mon, 14 Oct 2002, eric jones wrote: > > One solution would be renaming isnan to cephes_isnan in cephes > library. > > Other ideas? > > If the signatures are different, then this seems to be the best option. > Perhaps we should add a test in system_info that builds a little Fortran > file with isnan defined and tests to see if builds. If so, we disable > the cephes version (that's assuming the its compatible -- perhaps > another tests). > Hmmm. cephes_isnan is easier and doesn't really have a downside > (right?). Let's just do that. Ok, I did it by defining #define isnan cephes_isnan in special/cephes/mconf_??.h files and now scipy builds fine with ifc. However, now I get >>> scipy.stats.test(1) .Testing ncf Segmentation fault Other tests, eg in linalg that actually use Fortran functions, run succesfully. I am not sure whether this segfault is due to my change or there are other bugs lying around... Pearu From aureli at ipk.fhg.de Mon Oct 14 12:27:21 2002 From: aureli at ipk.fhg.de (Aureli Soria Frisch) Date: Mon, 14 Oct 2002 18:27:21 +0200 Subject: [SciPy-user] Scipy install failed Message-ID: Hi, I tried to install SciPy and got the following error line: > building 'scipy.xplt.gistC' extension > error: file '/tmp/SciPy-0.2.0_alpha_143.4327/xplt/gistCmodule.c' does not >exist The version of SciPy I am trying is 0.2.0 and I have Python 2.2.1 with Numeric 22.0... One more thing. I installed ATLAS and thence copying the lib files per hand to my /usr/lib (as stated in a recent mail of the mailing list). Nevertheless the setup.py install still begins telling me there is no ATLAS library installed... Can you further help me? Thanks in advance... Aureli -- ################################# Aureli Soria Frisch Fraunhofer IPK Dept. Pattern Recognition post: Pascalstr. 8-9, 10587 Berlin, Germany e-mail: aureli at ipk.fhg.de fon: +49 30 39006-143 fax: +49 30 3917517 web: http://vision.fhg.de/~aureli/web-aureli_en.html ################################# From skip at pobox.com Sun Oct 13 13:04:50 2002 From: skip at pobox.com (Skip Montanaro) Date: Sun, 13 Oct 2002 12:04:50 -0500 Subject: [SciPy-user] Can't find atlas for scipy install In-Reply-To: <200210131115.28967.stephen@theboulets.net> References: <200210131115.28967.stephen@theboulets.net> Message-ID: <15785.42930.484118.522104@montanaro.dyndns.org> Stephen> I've installed atlas (atlas-3.2.1 and Stephen> atlas-c++-0.4.5). "/usr/lib" is in my "/etc/ld.so.conf" and Stephen> I've run "ldconfig". Stephen> When I try installing scipy (cvs), I get the messages Stephen> below. Can someone tell me what I'm doing wrong? I take it you installed atlas in /usr/lib? Did you set the ATLAS environment variable (I don't know if it looks in common places or if it always requires ATLAS to be set)? export ATLAS=/usr/lib If that doesn't work, check to make sure you've properly merged your atlas and lapack libraries. (Check the atlas FAQ for details on how to do this.) -- Skip Montanaro - skip at pobox.com http://www.mojam.com/ http://www.musi-cal.com/ From falted at openlc.org Mon Oct 14 13:16:44 2002 From: falted at openlc.org (Francesc Alted) Date: Mon, 14 Oct 2002 19:16:44 +0200 Subject: [SciPy-user] Problems installing CVS version of scipy Message-ID: <20021014171644.GA5951@openlc.org> Hi, I've installed the CVS version of scipy following directions stated on this mailing list, and everything compiled ok (apparently!). But, when I try to import scipy, I get the next error: $ python2.2 Python 2.2.1 (#1, Apr 21 2002, 08:38:44) [GCC 2.95.4 20011002 (Debian prerelease)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import scipy exceptions.ImportError: /usr/local/lib/python2.2/site-packages/scipy/linalg/_fli nalg.so: undefined symbol: dlaswp_ Traceback (most recent call last): File "", line 1, in ? File "/usr/local/lib/python2.2/site-packages/scipy/__init__.py", line 49, in ? import special, io, linalg, stats, fftpack File "/usr/local/lib/python2.2/site-packages/scipy/special/__init__.py", line 328, in ? import orthogonal File "/usr/local/lib/python2.2/site-packages/scipy/special/orthogonal.py", lin e 59, in ? from scipy.linalg import eig File "/usr/local/lib/python2.2/site-packages/scipy/linalg/__init__.py", line 4 2, in ? from basic import * File "/usr/local/lib/python2.2/site-packages/scipy/linalg/basic.py", line 17, in ? import calc_lwork ImportError: /usr/local/lib/python2.2/site-packages/scipy/linalg/calc_lwork.so: undefined symbol: ieeeck_ and, curiously enough, if I try to import again, it succeeds!: >>> import scipy >>> scipy.test(10) creating test suite for: scipy_base.type_check No test suite found for scipy_base.polynomial creating test suite for: scipy_base.shape_base creating test suite for: scipy_base.function_base No test suite found for scipy_base.scimath No test suite found for scipy_base.__cvs_version__ creating test suite for: scipy_base.limits creating test suite for: scipy_base.index_tricks No test suite found for scipy_base.scipy_base_version creating test suite for: scipy_base.matrix_base ................................................................................ ................................... ---------------------------------------------------------------------- Ran 115 tests in 0.323s OK The CVS version I'm using is: >>> scipy.__cvs_version__.cvs_version (1, 144, 1520, 4350) Using Debian 3.0 Linux here, and installed Numeric 22.0, Atlas 3.4.1 and F2PY 2.23.190-1369. The rest of the packages are from distribution. Any hint? -- Francesc Alted PGP KeyID: 0x61C8C11F Aplications developer Public PGP key available: http://www.openlc.org/falted_at_openlc.asc Key fingerprint = 1518 38FE 3A3D 8BE8 24A0 3E5B 1328 32CC 61C8 C11F From pearu at cens.ioc.ee Mon Oct 14 13:44:28 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Mon, 14 Oct 2002 20:44:28 +0300 (EEST) Subject: [SciPy-user] Problems installing CVS version of scipy In-Reply-To: <20021014171644.GA5951@openlc.org> Message-ID: On Mon, 14 Oct 2002, Francesc Alted wrote: > Hi, > > I've installed the CVS version of scipy following directions stated on this > mailing list, and everything compiled ok (apparently!). > > But, when I try to import scipy, I get the next error: > > $ python2.2 > Python 2.2.1 (#1, Apr 21 2002, 08:38:44) > [GCC 2.95.4 20011002 (Debian prerelease)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import scipy > exceptions.ImportError: > /usr/local/lib/python2.2/site-packages/scipy/linalg/_flinalg.so: > undefined symbol: dlaswp_ ^^^^^^^^^^^^^^^^^^^^^^^^ This is the key symptom. > and, curiously enough, if I try to import again, it succeeds!: > > >>> import scipy It is not so curious as this second import does nothing with respect to reimporting scipy: in the first import, scipy is put into sys.modules and after the failure it is kept there, though being unusable. In the second import, python looks to sys.modules and sees that scipy is already imported (though unsuccesfully) and does nothing. > >>> scipy.test(10) > creating test suite for: scipy_base.type_check > ---------------------------------------------------------------------- > Ran 115 tests in 0.323s There should be at least 423 tests. > Using Debian 3.0 Linux here, and installed Numeric 22.0, Atlas 3.4.1 and > F2PY 2.23.190-1369. The rest of the packages are from distribution. > > Any hint? Yes. Please provide the full output of python scipy_distutils/system_info.py and the exact location of ATLAS libraries with its relevant content: ls -l /path/to/atlas/lib/lib{atlas,cblas,f77blas,lapack}.* to get any useful advice. Pearu From pearu at cens.ioc.ee Mon Oct 14 14:08:33 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Mon, 14 Oct 2002 21:08:33 +0300 (EEST) Subject: [SciPy-user] Can't find atlas for scipy install In-Reply-To: <15785.42930.484118.522104@montanaro.dyndns.org> Message-ID: On Sun, 13 Oct 2002, Skip Montanaro wrote: > Did you set the ATLAS environment variable (I don't know if it looks > in common places or if it always requires ATLAS to be set)? ( scipy/system_info.py looks ATLAS libraries in all common places such as /usr/lib,/usr/local/lib,/opt/lib,/usr/lib/atlas,/lib, etc etc (but not necessary in the given order) and setting ATLAS environment variable is *not* an requirement. ATLAS environment variable can be useful only if 1) ATLAS is installed in a rather uncommon place, 2) or if one has different ATLAS libraries in the system and then ATLAS environment variable can be used to specify which one scipy should use. However, scipy/system_info.py refuses to find ATLAS libraries that are incomplete. The definition of completness is as follows: The following four files liblapack.a, libf77blas.a, libcblas.a, libatlas.a must exist in the *same* directory and the size of liblapack.a should be around 6MB (that is, the instructions in http://math-atlas.sourceforge.net/errata.html#completelp are succesfully applied). If any of these conditions is unsatisfied, expect problems when importing scipy. ) Pearu From pearu at cens.ioc.ee Mon Oct 14 14:25:36 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Mon, 14 Oct 2002 21:25:36 +0300 (EEST) Subject: [SciPy-user] Scipy install failed In-Reply-To: Message-ID: On Mon, 14 Oct 2002, Aureli Soria Frisch wrote: > Hi, > > I tried to install SciPy and got the following error line: > > > building 'scipy.xplt.gistC' extension > > error: file '/tmp/SciPy-0.2.0_alpha_143.4327/xplt/gistCmodule.c' does not > >exist > > The version of SciPy I am trying is 0.2.0 and I have Python 2.2.1 > with Numeric 22.0... > > One more thing. I installed ATLAS and thence copying the lib files > per hand to my /usr/lib (as stated in a recent mail of the mailing > list). Nevertheless the setup.py install still begins telling me > there is no ATLAS library installed... > > Can you further help me? See http://www.scipy.org/site_content/mailman?fn=scipy-user/2002-October/000802.html for how scipy finds ATLAS libraries. If that is not helpful then provide more details about your setup. The output of python scipy_distutils/system_info.py and the exact location of ATLAS libraries and its content would be most important for further help. Pearu From falted at openlc.org Mon Oct 14 14:27:14 2002 From: falted at openlc.org (Francesc Alted) Date: Mon, 14 Oct 2002 20:27:14 +0200 Subject: [SciPy-user] Problems installing CVS version of scipy In-Reply-To: References: <20021014171644.GA5951@openlc.org> Message-ID: <20021014182714.GD5951@openlc.org> On Mon, Oct 14, 2002 at 08:44:28PM +0300, Pearu Peterson wrote: > Yes. Please provide the full output of > > python scipy_distutils/system_info.py Ok. here you have: atlas_info: scipy_distutils/system_info.py:468: UserWarning: ********************************************************************* Lapack library (from ATLAS) is probably incomplete: size of /usr/local/lib/atlas/liblapack.a is 307k (expected >4000k) Follow the instructions in the KNOWN PROBLEMS section of the file scipy/INSTALL.txt. ********************************************************************* warnings.warn(message) FOUND: libraries = ['lapack', 'f77blas', 'cblas', 'atlas'] library_dirs = ['/usr/local/lib/atlas'] include_dirs = ['/usr/include'] blas_info: FOUND: libraries = ['blas'] library_dirs = ['/usr/lib'] blas_src_info: NOT AVAILABLE dfftw_info: NOT AVAILABLE dfftw_threads_info: NOT AVAILABLE djbfft_info: NOT AVAILABLE fftw_info: FOUND: libraries = ['fftw', 'rfftw'] library_dirs = ['/usr/lib'] define_macros = [('SCIPY_FFTW_H', None)] include_dirs = ['/usr/include'] fftw_threads_info: FOUND: libraries = ['rfftw_threads', 'fftw_threads'] library_dirs = ['/usr/lib'] define_macros = [('SCIPY_FFTW_THREADS_H', None)] include_dirs = ['/usr/include'] lapack_info: FOUND: libraries = ['lapack'] library_dirs = ['/usr/lib'] lapack_src_info: NOT AVAILABLE sfftw_info: NOT AVAILABLE sfftw_threads_info: NOT AVAILABLE x11_info: FOUND: libraries = ['X11'] library_dirs = ['/usr/X11R6/lib'] include_dirs = ['/usr/X11R6/include'] and yes, I was aware about the warning, but I fetched the ATLAS binaries (atlas3.4.1_Linux_ATHLON.tar.gz) from the http://math-atlas.sourceforge.net, because I was unable to make scipy to find the atlas libraries using the Debian packages. I've installed the atlas2-3dnow and atlas2-3dnow-dev packages: revolta:/home/falted/computacio/scipy-CVS/scipy# dpkg -l atlas2-3dnow Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) ||/ Name Version Description +++-==============-==============-============================================ ii atlas2-3dnow 3.2.1ln-7 Automatically Tuned Linear Algebra Software, revolta:/home/falted/computacio/scipy-CVS/scipy# dpkg -l atlas2-3dnow-dev Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) ||/ Name Version Description +++-==============-==============-============================================ ii atlas2-3dnow-d 3.2.1ln-7 Automatically Tuned Linear Algebra Software, in fact, if I move the binary libraries downloaded and installed in /usr/local/lib/atlas to tmp, scipy is unable to find the Debian ATLAS libraries, as stated by scipy_distutils/system_info.py script: atlas_info: NOT AVAILABLE . . . > > and the exact location of ATLAS libraries with its relevant content: > > ls -l /path/to/atlas/lib/lib{atlas,cblas,f77blas,lapack}.* I list to you the binary libraries downloaded from http://math-atlas.sourceforge.net/: ll /tmp/atlas.new/ total 6128 -rw-r--r-- 1 root root 5324564 Oct 14 18:47 libatlas.a -rw-r--r-- 1 root root 276600 Oct 14 18:47 libcblas.a -rw-r--r-- 1 root root 353898 Oct 14 18:47 libf77blas.a -rw-r--r-- 1 root root 314952 Oct 14 18:47 liblapack.a and here, the libraries as installed by the Debian packages: # ll /usr/lib/3dnow total 10601 drwxr-xr-x 2 root root 304 Oct 14 18:30 atlas -rw-r--r-- 1 root root 6240386 Apr 13 2002 libatlas.a lrwxrwxrwx 1 root root 13 Oct 14 18:30 libatlas.so -> libatlas.so.2 lrwxrwxrwx 1 root root 15 Apr 30 12:55 libatlas.so.2 -> libatlas.so.2.3 -rw-r--r-- 1 root root 3567508 Apr 13 2002 libatlas.so.2.3 -rw-r--r-- 1 root root 268380 Apr 13 2002 libcblas.a lrwxrwxrwx 1 root root 13 Oct 14 18:30 libcblas.so -> libcblas.so.2 lrwxrwxrwx 1 root root 15 Apr 30 12:55 libcblas.so.2 -> libcblas.so.2.3 -rw-r--r-- 1 root root 133184 Apr 13 2002 libcblas.so.2.3 -rw-r--r-- 1 root root 334576 Apr 13 2002 libf77blas.a lrwxrwxrwx 1 root root 15 Oct 14 18:30 libf77blas.so -> libf77blas.so.2 lrwxrwxrwx 1 root root 17 Apr 30 12:55 libf77blas.so.2 -> libf77blas.so.2.3 -rw-r--r-- 1 root root 89692 Apr 13 2002 libf77blas.so.2.3 -rw-r--r-- 1 root root 155540 Apr 13 2002 liblapack_atlas.a lrwxrwxrwx 1 root root 20 Oct 14 18:30 liblapack_atlas.so -> liblapack_atlas.so.2 lrwxrwxrwx 1 root root 22 Apr 30 12:55 liblapack_atlas.so.2 -> liblapack_atlas.so.2.3 -rw-r--r-- 1 root root 53780 Apr 13 2002 liblapack_atlas.so.2.3 and, in the /usr/lib/3dnow/atlas: total 20588 -rw-r--r-- 1 root root 6843134 Apr 13 2002 libblas.a lrwxrwxrwx 1 root root 12 Oct 14 18:30 libblas.so -> libblas.so.2 lrwxrwxrwx 1 root root 14 Apr 30 12:55 libblas.so.2 -> libblas.so.2.3 -rw-r--r-- 1 root root 3767348 Apr 13 2002 libblas.so.2.3 -rw-r--r-- 1 root root 6107786 Apr 13 2002 liblapack.a lrwxrwxrwx 1 root root 14 Oct 14 18:30 liblapack.so -> liblapack.so.2 lrwxrwxrwx 1 root root 16 Apr 30 12:55 liblapack.so.2 -> liblapack.so.2.3 -rw-r--r-- 1 root root 4355504 Apr 13 2002 liblapack.so.2.3 Cheers, -- Francesc Alted PGP KeyID: 0x61C8C11F Aplications developer Public PGP key available: http://www.openlc.org/falted_at_openlc.asc Key fingerprint = 1518 38FE 3A3D 8BE8 24A0 3E5B 1328 32CC 61C8 C11F From falted at openlc.org Mon Oct 14 14:49:53 2002 From: falted at openlc.org (Francesc Alted) Date: Mon, 14 Oct 2002 20:49:53 +0200 Subject: [SciPy-user] Can't find atlas for scipy install In-Reply-To: References: <15785.42930.484118.522104@montanaro.dyndns.org> Message-ID: <20021014184953.GE5951@openlc.org> On Mon, Oct 14, 2002 at 09:08:33PM +0300, Pearu Peterson wrote: > > However, scipy/system_info.py refuses to find ATLAS libraries that are > incomplete. The definition of completness is as follows: > > The following four files > > liblapack.a, libf77blas.a, libcblas.a, libatlas.a > Yeah, this is the problem in the case of a Debian system. liblapack.a is in /usr/lib/3dnow/atlas, and the rest of the libraries are in /usr/lib/3dnow. After doing a symbolic link from /usr/lib/3dnow/liblapack.a to /usr/lib/3dnow/atlas/liblapack.a, scipy detects the libraries and everything goes smoothly: >>> import scipy >>> scipy.test(10) . . function f6 cc.bisect : 1.080 cc.ridder : 1.250 cc.brenth : 1.200 cc.brentq : 1.130 . ---------------------------------------------------------------------- Ran 423 tests in 129.553s OK So, it seems to be a problem with the atlas3.4.1_Linux_ATHLON.tar.gz from the http://math-atlas.sourceforge.net site. Do you think this is a bug on the ATLAS binary libraries side? Thanks for the help! -- Francesc Alted PGP KeyID: 0x61C8C11F Aplications developer Public PGP key available: http://www.openlc.org/falted_at_openlc.asc Key fingerprint = 1518 38FE 3A3D 8BE8 24A0 3E5B 1328 32CC 61C8 C11F From pearu at cens.ioc.ee Mon Oct 14 15:10:22 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Mon, 14 Oct 2002 22:10:22 +0300 (EEST) Subject: [SciPy-user] Can't find atlas for scipy install In-Reply-To: <20021014184953.GE5951@openlc.org> Message-ID: On Mon, 14 Oct 2002, Francesc Alted wrote: > On Mon, Oct 14, 2002 at 09:08:33PM +0300, Pearu Peterson wrote: > > > > However, scipy/system_info.py refuses to find ATLAS libraries that are > > incomplete. The definition of completness is as follows: > > > > The following four files > > > > liblapack.a, libf77blas.a, libcblas.a, libatlas.a > > > > Yeah, this is the problem in the case of a Debian system. liblapack.a is in > /usr/lib/3dnow/atlas, and the rest of the libraries are in /usr/lib/3dnow. Yes. I am working on it to make system_info.py more Debian friendly. > So, it seems to be a problem with the atlas3.4.1_Linux_ATHLON.tar.gz from > the http://math-atlas.sourceforge.net site. Do you think this is a bug on > the ATLAS binary libraries side? Actually no. They have choosed to distribute atlas libraries in their way and that's fine. Note that the Atlas project aims providing efficient replacement for the blas library, not for the lapack library. The fact that they also provide some hooks for making lapack more efficient is very useful for us but we cannot expect that they should distribute full lapack libraries. Pearu From eric at enthought.com Mon Oct 14 15:46:59 2002 From: eric at enthought.com (eric jones) Date: Mon, 14 Oct 2002 14:46:59 -0500 Subject: [SciPy-user] conversion of c++ vector in weave In-Reply-To: <000001c2732a$660e5070$6a5e32d2@MikesLaptop> Message-ID: <000c01c273ba$78e8f700$8901a8c0@ERICDESKTOP> I think Numeric will work fine for you (with perhaps a wee bit of weave). You'll need to use a mixture of arrays for "fixed" sized data blocks and list for things that are changing size all the time. Give me a little more info on your needs and I'll send back my take on the algorithm: In a typical run: 1. Are the distMatrix ever very large, or are they always 3x3? 2. Do you have a zillion distMatrices in a typical run, or just a few? 3. Do you have zillions of bins or just a few? I think if 1 is true, then you'll need to weavify much of the code, but if only 2 and 3 are true, then you only need a few lines of weave. 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 Michael Sorich > Sent: Sunday, October 13, 2002 8:36 PM > To: scipy-user at scipy.net > Subject: RE: [SciPy-user] conversion of c++ vector in weave > > Thanks for the help, Eric. Sorry about the lack of details. > > The part that I want to speed up takes a distance matrix (array) and a > list of bins (which can be overlapping) and returns all the combinations > of bins that the values in the distance matrix upper triangle fall > within, as a list of bin index lists. > > Example: > distMatrix = [[0.,1.,2.],[1.,0.,3.],[2.,3.,0.]] > bins = [[0.9,2.1],[1.9,3.1],[2.9,4.1]], where the inner lists contain > the min and max values of the bin. > In this example there are 3 distances to be binned (1.,2.,3.). distance > 1 can be binned into bin 0, dist 2 into bins 0 and 1 and dist 3 into > bins 1 and 2. The combinations include [0,0,1],[0,0,2],[0,1,1],[0,1,2] > > It is a little more complicated than above, in that the function takes > multiple dist matrices (these are stored in the third dimension of the > distMatrix variable). > > I have implemented this in python using lists to store the combinations, > because I could not see any way to determine the size of the array at > the time of construction. I figured that vectors in C++ would be the > best replacement for the lists, however I was unsure what would be the > most efficient method to return the results stored in the vector. Thanks > for the examples of how to do this. What I have ended up doing is > creating a PyArray (since at the end the size of the vector is known) > and copying the data across and then returning the PyArray. It wasn't as > complicated as I had feared. > > I have attached the python and c versions of the function, if you are > interested. The algorithm I made is a quick hack. If you know of a > better way please let me know! > > Thanks again, > > Michael > > -----Original Message----- > From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net] On > Behalf Of eric jones > Sent: Friday, 11 October 2002 5:49 PM > To: scipy-user at scipy.net > Subject: RE: [SciPy-user] conversion of c++ vector in weave > > Hey Michael, > > Can you give me a little more information about your application -- > especially what your data structure looks like. This'll help us > give more informed ideas on how to speed up the code and whether > weave is going to help or not. > > If you are working with a list of numbers, then the following example > might give you some clues. Note, though, that the fastest versions > assume > you are using a homogeneous list of integers and doesn't do any error > checking at all. This'll lead to bad things if you pass in a list with > a > string in it. Further, if your data looks like this, your data would > fit > nicely into Numeric arrays, so I'm betting this isn't the ticket. > > YOU'LL NEED THE LATEST WEAVE FROM CVS TO RUN THE EXAMPLES !! > > I've made quite a few changes in the last week. I'm finally to the > point > of updating the documentation. When that is done, I'll release weave > 0.3. > > regards, > eric > > #----------------------------------------------------------------------- > ----- > # Example converting list to std::vector > # Typical run: > # h:\tmp>python std_vec.py > # a initially: [1, 2, 3] > # a on return: [101, 102, 103] > # time it: N = 1000000 > # python-loop (sec): 0.56299996376 > # python-list-comprehension (sec): 0.827999949455 > # simple weave (sec): 0.139999985695 > # fast weave(sec): 0.0470000505447 > # weave-no-vector(sec): 0.0460000038147 > #----------------------------------------------------------------------- > ----- > > import time > import weave > > code = """ > const int Na = a.length(); > int i; > // convert to std::vector > std::vector v_a(Na); > for(i = 0; i < Na; i++) > v_a[i] = a[i]; > > // do something with the vector > for(i = 0; i < Na; i++) > v_a[i] = v_a[i] + 100; > > // put results back into a > for(i = 0; i < Na; i++) > a[i] = v_a[i]; > """ > a = [1,2,3] > print "a initially:", a > weave.inline(code,['a'],headers=[""]) > print "a on return:", a > > N = 1000000 > print "time it: N =", N > > #----------------------------------------------------------------------- > ----- > # Python > #----------------------------------------------------------------------- > ----- > a = range(N) > t1 = time.time() > for i in xrange(N): > a[i] = a[i] + 100 > t2 = time.time() > print "python-loop (sec):", t2 - t1 > > #----------------------------------------------------------------------- > ----- > # Python List Comprehension > #----------------------------------------------------------------------- > ----- > a = range(N) > t1 = time.time() > a = [x + 100 for x in a] > t2 = time.time() > print "python-list-comprehension (sec):", t2 - t1 > > #----------------------------------------------------------------------- > ----- > # Simple weave > #----------------------------------------------------------------------- > ----- > a = range(N) > t1 = time.time() > weave.inline(code,['a'],headers=[""]) > t2 = time.time() > print "simple weave (sec):", t2 - t1 > > #----------------------------------------------------------------------- > ----- > # Python API > #----------------------------------------------------------------------- > ----- > api_code = """ > const int Na = a.length(); > int i; > // convert to std::vector > std::vector v_a(Na); > for(i = 0; i < Na; i++) > v_a[i] = PyInt_AS_LONG(PyList_GET_ITEM(py_a,i)); > > // do something with the vector > for(i = 0; i < Na; i++) > v_a[i] = v_a[i] + 100; > > // put results back into a > for(i = 0; i < Na; i++) > PyList_SET_ITEM(py_a,i,PyInt_FromLong(v_a[i])); > """ > a = [1,2,3] > weave.inline(api_code,['a'],headers=[""]) > > a = range(N) > t1 = time.time() > weave.inline(api_code,['a'],headers=[""]) > t2 = time.time() > print "fast weave(sec):", t2 - t1 > > #----------------------------------------------------------------------- > ----- > # Python API -- no std::vector > #----------------------------------------------------------------------- > ----- > api_code = """ > const int Na = a.length(); > int i, val; > // convert to std::vector > for(i = 0; i < Na; i++) > { > val = PyInt_AS_LONG(PyList_GET_ITEM(py_a,i)); > PyList_SET_ITEM(py_a,i,PyInt_FromLong(val+100)); > } > """ > a = [1,2,3] > weave.inline(api_code,['a'],headers=[""]) > > a = range(N) > t1 = time.time() > weave.inline(api_code,['a'],headers=[""]) > t2 = time.time() > print "weave-no-vector(sec):", t2 - t1 > > > -----Original Message----- > > From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net] > On > > Behalf Of Michael Sorich > > Sent: Friday, October 11, 2002 2:02 AM > > To: scipy-user at scipy.net > > Subject: [SciPy-user] conversion of c++ vector in weave > > > > Hi > > > > I wish to convert a small part of my code to C++ for speed. The code > is > > not amenable to numeric arrays and uses lists extensively. I am > thinking > > about using c++ vectors in place of python lists (I presume that this > > will be a lot faster than using Py::List). What little experience I > have > > in extending python with C/C++ is limited to using weave. > > > > If I use vectors, is there any method to automatically convert my > result > > (vector< vector >) to something that can be returned to python > > (tuple/list/array). I believe that Boost can do this (at least the > > upcoming v2, see > > > http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/boost/boost/li > > bs/python/doc/v2/faq.html), however I am not sure how I would be able > to > > integrate this with weave.inline. It does not appear obvious that > there > > is anything in CXX that will do this. > > > > Any help would be appreciated. > > > > Thanks > > > > Michael Sorich > > PhD Student > > School of Pharmaceutical, Molecular and Biomedical Sciences > > University of South Australia > > Email: michael.sorich at postgrads.unisa.edu.au > > mike_sorich at hotmail.com > > > > > > > > --- > > Outgoing mail is certified Virus Free. > > Checked by AVG anti-virus system (http://www.grisoft.com). > > Version: 6.0.393 / Virus Database: 223 - Release Date: 30/09/2002 > > > > _______________________________________________ > > 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 > > --- > Incoming mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.393 / Virus Database: 223 - Release Date: 30/09/2002 > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.393 / Virus Database: 223 - Release Date: 30/09/2002 > > From pearu at cens.ioc.ee Mon Oct 14 19:16:17 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Tue, 15 Oct 2002 02:16:17 +0300 (EEST) Subject: [SciPy-user] Can't find atlas for scipy install In-Reply-To: <20021014184953.GE5951@openlc.org> Message-ID: On Mon, 14 Oct 2002, Francesc Alted wrote: > On Mon, Oct 14, 2002 at 09:08:33PM +0300, Pearu Peterson wrote: > > > > However, scipy/system_info.py refuses to find ATLAS libraries that are > > incomplete. The definition of completness is as follows: > > > > The following four files > > > > liblapack.a, libf77blas.a, libcblas.a, libatlas.a > > > > Yeah, this is the problem in the case of a Debian system. liblapack.a is in > /usr/lib/3dnow/atlas, and the rest of the libraries are in /usr/lib/3dnow. > After doing a symbolic link from /usr/lib/3dnow/liblapack.a to > /usr/lib/3dnow/atlas/liblapack.a, scipy detects the libraries and everything > goes smoothly: CVS scipy should now detect Debian atlas libraries so that creating the symbolic link above would be unnecessary. Can you confirm that? Also, the rules of detecting ATLAS libraries are now more flexible: only the files libf77blas.a, libcblas.a, libatlas.a must be in the same directory. liblapack.a can be either in the same directory, or in the subdirectory atlas*, or in a completely different place, or also missing but then LAPACK sources must be available. Btw, does Redhat and other linux distributions provide atlas libraries that are optimized for certain CPUs (e.g. Debian provides sse, sse2, 3dnow optimized atlas libraries)? If yes, what is the location and the names of such libraries? While I am on it, I could add system_info support also for these cases now. Regards, Pearu From sales at smoking.com.net Mon Oct 14 09:53:50 2002 From: sales at smoking.com.net (Sales Department) Date: Mon, 14 Oct 2002 15:53:50 +0200 Subject: [SciPy-user] Low Price Fags Message-ID: <20021015004446.4368F3EACE@www.scipy.com> Dear Sir or Madam In the past you have requested information on discounted products. If you are not a smoker, and find this email offensive, then we sincerely apologise. We will be only too happy to take you off our database. If you are a smoker, however, you are probably fed up with paying high prices for your cigarettes and tobacco. Take a look at what we can do for you at http://www.smokersassociation.co.uk/?S=20&ID=2 We can send you, legally, by registered air mail, direct to your door, 4 cartons of cigarettes or 40 pouches of rolling tobacco (all brands are available) from only 170 Euros - about 105 pounds - fully inclusive of postage and packing. Why pay more? If you would rather not hear from us any more, this link will ensure that you are not bothered again. mailto:unsubscribe at smokersassociation.co.uk Yours faithfully. Smokers Association http://www.smokersassociation.co.uk/?S=20&ID=2 xay26558021y From mike_sorich at hotmail.com Mon Oct 14 20:57:21 2002 From: mike_sorich at hotmail.com (Michael Sorich) Date: Tue, 15 Oct 2002 10:27:21 +0930 Subject: [SciPy-user] conversion of c++ vector in weave In-Reply-To: <000c01c273ba$78e8f700$8901a8c0@ERICDESKTOP> Message-ID: <000001c273e5$d1a7b810$8205120a@MikesLaptop> distMatrices will usually be 3x3 or 4x4 (perhaps 5x5). Number of distMatrices will be between 1 and 20000 per function call in most cases, though in some cases there will be around 500 000 distMatrices. Presently I am only using ~20 bins, however I would like to be able to scale this to ~1000 bins per run for later work. I am interested to see how you will do this! Michael -----Original Message----- From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net] On Behalf Of eric jones Sent: Tuesday, 15 October 2002 5:17 AM To: scipy-user at scipy.net Subject: RE: [SciPy-user] conversion of c++ vector in weave I think Numeric will work fine for you (with perhaps a wee bit of weave). You'll need to use a mixture of arrays for "fixed" sized data blocks and list for things that are changing size all the time. Give me a little more info on your needs and I'll send back my take on the algorithm: In a typical run: 1. Are the distMatrix ever very large, or are they always 3x3? 2. Do you have a zillion distMatrices in a typical run, or just a few? 3. Do you have zillions of bins or just a few? I think if 1 is true, then you'll need to weavify much of the code, but if only 2 and 3 are true, then you only need a few lines of weave. 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 Michael Sorich > Sent: Sunday, October 13, 2002 8:36 PM > To: scipy-user at scipy.net > Subject: RE: [SciPy-user] conversion of c++ vector in weave > > Thanks for the help, Eric. Sorry about the lack of details. > > The part that I want to speed up takes a distance matrix (array) and a > list of bins (which can be overlapping) and returns all the combinations > of bins that the values in the distance matrix upper triangle fall > within, as a list of bin index lists. > > Example: > distMatrix = [[0.,1.,2.],[1.,0.,3.],[2.,3.,0.]] > bins = [[0.9,2.1],[1.9,3.1],[2.9,4.1]], where the inner lists contain > the min and max values of the bin. > In this example there are 3 distances to be binned (1.,2.,3.). distance > 1 can be binned into bin 0, dist 2 into bins 0 and 1 and dist 3 into > bins 1 and 2. The combinations include [0,0,1],[0,0,2],[0,1,1],[0,1,2] > > It is a little more complicated than above, in that the function takes > multiple dist matrices (these are stored in the third dimension of the > distMatrix variable). > > I have implemented this in python using lists to store the combinations, > because I could not see any way to determine the size of the array at > the time of construction. I figured that vectors in C++ would be the > best replacement for the lists, however I was unsure what would be the > most efficient method to return the results stored in the vector. Thanks > for the examples of how to do this. What I have ended up doing is > creating a PyArray (since at the end the size of the vector is known) > and copying the data across and then returning the PyArray. It wasn't as > complicated as I had feared. > > I have attached the python and c versions of the function, if you are > interested. The algorithm I made is a quick hack. If you know of a > better way please let me know! > > Thanks again, > > Michael > > -----Original Message----- > From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net] On > Behalf Of eric jones > Sent: Friday, 11 October 2002 5:49 PM > To: scipy-user at scipy.net > Subject: RE: [SciPy-user] conversion of c++ vector in weave > > Hey Michael, > > Can you give me a little more information about your application -- > especially what your data structure looks like. This'll help us > give more informed ideas on how to speed up the code and whether > weave is going to help or not. > > If you are working with a list of numbers, then the following example > might give you some clues. Note, though, that the fastest versions > assume > you are using a homogeneous list of integers and doesn't do any error > checking at all. This'll lead to bad things if you pass in a list with > a > string in it. Further, if your data looks like this, your data would > fit > nicely into Numeric arrays, so I'm betting this isn't the ticket. > > YOU'LL NEED THE LATEST WEAVE FROM CVS TO RUN THE EXAMPLES !! > > I've made quite a few changes in the last week. I'm finally to the > point > of updating the documentation. When that is done, I'll release weave > 0.3. > > regards, > eric > > #----------------------------------------------------------------------- > ----- > # Example converting list to std::vector > # Typical run: > # h:\tmp>python std_vec.py > # a initially: [1, 2, 3] > # a on return: [101, 102, 103] > # time it: N = 1000000 > # python-loop (sec): 0.56299996376 > # python-list-comprehension (sec): 0.827999949455 > # simple weave (sec): 0.139999985695 > # fast weave(sec): 0.0470000505447 > # weave-no-vector(sec): 0.0460000038147 > #----------------------------------------------------------------------- > ----- > > import time > import weave > > code = """ > const int Na = a.length(); > int i; > // convert to std::vector > std::vector v_a(Na); > for(i = 0; i < Na; i++) > v_a[i] = a[i]; > > // do something with the vector > for(i = 0; i < Na; i++) > v_a[i] = v_a[i] + 100; > > // put results back into a > for(i = 0; i < Na; i++) > a[i] = v_a[i]; > """ > a = [1,2,3] > print "a initially:", a > weave.inline(code,['a'],headers=[""]) > print "a on return:", a > > N = 1000000 > print "time it: N =", N > > #----------------------------------------------------------------------- > ----- > # Python > #----------------------------------------------------------------------- > ----- > a = range(N) > t1 = time.time() > for i in xrange(N): > a[i] = a[i] + 100 > t2 = time.time() > print "python-loop (sec):", t2 - t1 > > #----------------------------------------------------------------------- > ----- > # Python List Comprehension > #----------------------------------------------------------------------- > ----- > a = range(N) > t1 = time.time() > a = [x + 100 for x in a] > t2 = time.time() > print "python-list-comprehension (sec):", t2 - t1 > > #----------------------------------------------------------------------- > ----- > # Simple weave > #----------------------------------------------------------------------- > ----- > a = range(N) > t1 = time.time() > weave.inline(code,['a'],headers=[""]) > t2 = time.time() > print "simple weave (sec):", t2 - t1 > > #----------------------------------------------------------------------- > ----- > # Python API > #----------------------------------------------------------------------- > ----- > api_code = """ > const int Na = a.length(); > int i; > // convert to std::vector > std::vector v_a(Na); > for(i = 0; i < Na; i++) > v_a[i] = PyInt_AS_LONG(PyList_GET_ITEM(py_a,i)); > > // do something with the vector > for(i = 0; i < Na; i++) > v_a[i] = v_a[i] + 100; > > // put results back into a > for(i = 0; i < Na; i++) > PyList_SET_ITEM(py_a,i,PyInt_FromLong(v_a[i])); > """ > a = [1,2,3] > weave.inline(api_code,['a'],headers=[""]) > > a = range(N) > t1 = time.time() > weave.inline(api_code,['a'],headers=[""]) > t2 = time.time() > print "fast weave(sec):", t2 - t1 > > #----------------------------------------------------------------------- > ----- > # Python API -- no std::vector > #----------------------------------------------------------------------- > ----- > api_code = """ > const int Na = a.length(); > int i, val; > // convert to std::vector > for(i = 0; i < Na; i++) > { > val = PyInt_AS_LONG(PyList_GET_ITEM(py_a,i)); > PyList_SET_ITEM(py_a,i,PyInt_FromLong(val+100)); > } > """ > a = [1,2,3] > weave.inline(api_code,['a'],headers=[""]) > > a = range(N) > t1 = time.time() > weave.inline(api_code,['a'],headers=[""]) > t2 = time.time() > print "weave-no-vector(sec):", t2 - t1 > > > -----Original Message----- > > From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net] > On > > Behalf Of Michael Sorich > > Sent: Friday, October 11, 2002 2:02 AM > > To: scipy-user at scipy.net > > Subject: [SciPy-user] conversion of c++ vector in weave > > > > Hi > > > > I wish to convert a small part of my code to C++ for speed. The code > is > > not amenable to numeric arrays and uses lists extensively. I am > thinking > > about using c++ vectors in place of python lists (I presume that this > > will be a lot faster than using Py::List). What little experience I > have > > in extending python with C/C++ is limited to using weave. > > > > If I use vectors, is there any method to automatically convert my > result > > (vector< vector >) to something that can be returned to python > > (tuple/list/array). I believe that Boost can do this (at least the > > upcoming v2, see > > > http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/boost/boost/li > > bs/python/doc/v2/faq.html), however I am not sure how I would be able > to > > integrate this with weave.inline. It does not appear obvious that > there > > is anything in CXX that will do this. > > > > Any help would be appreciated. > > > > Thanks > > > > Michael Sorich > > PhD Student > > School of Pharmaceutical, Molecular and Biomedical Sciences > > University of South Australia > > Email: michael.sorich at postgrads.unisa.edu.au > > mike_sorich at hotmail.com > > > > > > > > --- > > Outgoing mail is certified Virus Free. > > Checked by AVG anti-virus system (http://www.grisoft.com). > > Version: 6.0.393 / Virus Database: 223 - Release Date: 30/09/2002 > > > > _______________________________________________ > > 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 > > --- > Incoming mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.393 / Virus Database: 223 - Release Date: 30/09/2002 > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.393 / Virus Database: 223 - Release Date: 30/09/2002 > > _______________________________________________ SciPy-user mailing list SciPy-user at scipy.net http://www.scipy.net/mailman/listinfo/scipy-user --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.393 / Virus Database: 223 - Release Date: 30/09/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.393 / Virus Database: 223 - Release Date: 30/09/2002 From pyzun18 at yahoo.com.au Tue Oct 15 06:01:49 2002 From: pyzun18 at yahoo.com.au (=?iso-8859-1?q?Johnny=20boi?=) Date: Tue, 15 Oct 2002 20:01:49 +1000 (EST) Subject: [SciPy-user] Setting up Scipy In-Reply-To: <20021015061500.32116.59334.Mailman@shaft> Message-ID: <20021015100149.2489.qmail@web13102.mail.yahoo.com> Hi there, I'm new to Scipy, and I'm having some possibly minor problems in regards to setting it up on a RH 7.2 Linux box. My question is, should I simple tar the Scipy file into the directory of python/site-packages? I noticed that it extracted 4 directories, do i have to run any setup scripts? Many thanks, Johnny --------------------------------- Yahoo! Messenger for SMS- Always be connected to your Messenger Friends -------------- next part -------------- An HTML attachment was scrubbed... URL: From nwagner at mecha.uni-stuttgart.de Tue Oct 15 08:37:35 2002 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Tue, 15 Oct 2002 14:37:35 +0200 Subject: [SciPy-user] polyeig Message-ID: <3DAC0C0F.3EF4D624@mecha.uni-stuttgart.de> Hi, I wonder, if the matlab function polyeig will be available in scipy. Nils From pearu at cens.ioc.ee Tue Oct 15 10:04:04 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Tue, 15 Oct 2002 17:04:04 +0300 (EEST) Subject: [SciPy-user] Setting up Scipy In-Reply-To: <20021015100149.2489.qmail@web13102.mail.yahoo.com> Message-ID: On Tue, 15 Oct 2002, Johnny boi wrote: > > Hi there, > > I'm new to Scipy, and I'm having some possibly minor problems in > regards to setting it up on a RH 7.2 Linux box. > > My question is, should I simple tar the Scipy file into the directory > of python/site-packages? Yes. > I noticed that it extracted 4 directories, do i have to run any setup > scripts? No. Pearu PS: Do not send HTML formated E-mails to this list. From falted at openlc.org Tue Oct 15 11:29:09 2002 From: falted at openlc.org (Francesc Alted) Date: Tue, 15 Oct 2002 17:29:09 +0200 Subject: [SciPy-user] Can't find atlas for scipy install In-Reply-To: References: <20021014184953.GE5951@openlc.org> Message-ID: <20021015152909.GA1461@openlc.org> On Tue, Oct 15, 2002 at 02:16:17AM +0300, Pearu Peterson wrote: > CVS scipy should now detect Debian atlas libraries so that creating the > symbolic link above would be unnecessary. Can you confirm that? Ok. I have checked out the last version of scipy in CVS, deleted the symbolic link (I mean, /usr/lib/3dnow/liblapack.a -> /usr/lib/3dnow/atlas/liblapack.a), and here are my results: - Output of scipy_distutils/system_info.py: atlas_info: FOUND: include_dirs = ['/usr/include'] library_dirs = ['/usr/lib/3dnow/atlas', '/usr/lib/3dnow'] libraries = ['lapack', 'f77blas', 'cblas', 'atlas'] lapack_info: FOUND: libraries = ['lapack'] library_dirs = ['/usr/lib'] which seems to be good... - After compiling and installing it, I've made the next checks: $ ldd /usr/local/lib/python2.2/site-packages/scipy/linalg/clapack.so liblapack.so.2 => /usr/lib/3dnow/atlas/liblapack.so.2 (0x40030000) libf77blas.so.2 => /usr/lib/3dnow/libf77blas.so.2 (0x4055d000) libcblas.so.2 => /usr/lib/3dnow/libcblas.so.2 (0x40575000) libatlas.so.2 => /usr/lib/3dnow/libatlas.so.2 (0x40597000) libm.so.6 => /lib/libm.so.6 (0x408ff000) libc.so.6 => /lib/libc.so.6 (0x40920000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000) $ ldd /usr/local/lib/python2.2/site-packages/scipy/linalg/cblas.so liblapack.so.2 => /usr/lib/3dnow/atlas/liblapack.so.2 (0x40020000) libf77blas.so.2 => /usr/lib/3dnow/libf77blas.so.2 (0x4054d000) libcblas.so.2 => /usr/lib/3dnow/libcblas.so.2 (0x40565000) libatlas.so.2 => /usr/lib/3dnow/libatlas.so.2 (0x40587000) libm.so.6 => /lib/libm.so.6 (0x408ef000) libc.so.6 => /lib/libc.so.6 (0x40910000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000) which seems to be fine - The first import worked: Python 2.2.1 (#1, Apr 21 2002, 08:38:44) [GCC 2.95.4 20011002 (Debian prerelease)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import scipy >>> scipy.__cvs_version__.cvs_version (1, 144, 1520, 4355) so far so good - when doing the tests: >>> scipy.test(10) it I'm getting the next (non-fatal) errors: the first: creating test suite for: scipy.common !! FAILURE building test for scipy.common :1: SyntaxError: invalid syntax (test_common.py, line 77) (in ?) No test suite found for scipy.scipy_tempfile the second: **************************************************************** WARNING: Importing clapack failed with the following exception: ----------- exceptions.ImportError: /usr/local/lib/python2.2/site-packages/scipy/linalg/clapack.so: undefined symbol: clapack_sgetri ----------- See scipy/INSTALL.txt for troubleshooting. Notes: * If atlas library is not found by scipy/system_info.py, then scipy skips building clapack and uses flapack instead. **************************************************************** the third and last: creating test suite for: scipy.linalg.matfuncs !! FAILURE building test for scipy.linalg.matfuncs :1: ImportError: No module named test_matfuncs (in ?) creating test suite for: scipy.linalg.basic I've run the tests four times, and these errors are always present. Normally all the tests ended OK: . ---------------------------------------------------------------------- Ran 423 tests in 118.583s OK but I had this once: . ====================================================================== FAIL: check_normal (test_morestats.test_anderson) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.2/site-packages/scipy/stats/tests/test_morestats. py", line 46, in check_normal assert(scipy.all(A < crit[-2:])) AssertionError ---------------------------------------------------------------------- Ran 423 tests in 117.422s FAILED (failures=1) it appeared on my second try, but I was unable to reproduce it. I suppose this is not important. Sorry, I don't remember if these errors appeared on the previous version I've tested. > > Also, the rules of detecting ATLAS libraries are now more flexible: only > the files libf77blas.a, libcblas.a, libatlas.a must be in the same > directory. liblapack.a can be either in the same directory, or in the > subdirectory atlas*, or in a completely different place, or also missing > but then LAPACK sources must be available. Great!, that should facilitate the ATLAS inclusion in scipy. > > Btw, does Redhat and other linux distributions provide atlas > libraries that are optimized for certain CPUs (e.g. Debian provides > sse, sse2, 3dnow optimized atlas libraries)? If yes, what is the > location and the names of such libraries? > While I am on it, I could add system_info support also for these cases > now. I personally have only experience with Debian in the last years... Cheers, -- Francesc Alted PGP KeyID: 0x61C8C11F Scientific Aplications developer Public PGP key available: http://www.openlc.org/falted_at_openlc.asc Key fingerprint = 1518 38FE 3A3D 8BE8 24A0 3E5B 1328 32CC 61C8 C11F From pearu at cens.ioc.ee Tue Oct 15 14:30:20 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Tue, 15 Oct 2002 21:30:20 +0300 (EEST) Subject: [SciPy-user] Can't find atlas for scipy install In-Reply-To: <20021015152909.GA1461@openlc.org> Message-ID: On Tue, 15 Oct 2002, Francesc Alted wrote: > On Tue, Oct 15, 2002 at 02:16:17AM +0300, Pearu Peterson wrote: > > CVS scipy should now detect Debian atlas libraries so that creating the > > symbolic link above would be unnecessary. Can you confirm that? > > Ok. I have checked out the last version of scipy in CVS, deleted the > symbolic link (I mean, /usr/lib/3dnow/liblapack.a -> > /usr/lib/3dnow/atlas/liblapack.a), and here are my results: > lapack_info: > FOUND: > libraries = ['lapack'] > library_dirs = ['/usr/lib'] Btw, on Debian, if atlas is present then scipy does not need that lapack or blas would be installed. > it I'm getting the next (non-fatal) errors: > > the first: > > creating test suite for: scipy.common > !! FAILURE building test for scipy.common > :1: SyntaxError: invalid syntax (test_common.py, line 77) Fixed in CVS. > the second: > > **************************************************************** > WARNING: Importing clapack failed with the following exception: > ----------- > exceptions.ImportError: > /usr/local/lib/python2.2/site-packages/scipy/linalg/clapack.so: > undefined symbol: clapack_sgetri > ----------- > See scipy/INSTALL.txt for troubleshooting. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ I understand that often such comments can be ignored (can they?) but in this particular case you should follow it literally. > the third and last: > > creating test suite for: scipy.linalg.matfuncs > !! FAILURE building test for scipy.linalg.matfuncs > :1: ImportError: No module named test_matfuncs (in ?) > creating test suite for: scipy.linalg.basic It means that nobody had a change to implement the tests for scipy.linalg.matfuncs module, yet. > but I had this once: > > . > ====================================================================== > FAIL: check_normal (test_morestats.test_anderson) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/usr/local/lib/python2.2/site-packages/scipy/stats/tests/test_morestats. > py", line 46, in check_normal > assert(scipy.all(A < crit[-2:])) > AssertionError Yes, that sometimes happens. You can ignore it. > Sorry, I don't remember if these errors appeared on the previous version > I've tested. First and third error were certainly there, second error could not be there because atlas was not used, and the fourth you'll probably see also in future, occasionally. Regards, Pearu From falted at openlc.org Tue Oct 15 14:58:29 2002 From: falted at openlc.org (Francesc Alted) Date: Tue, 15 Oct 2002 20:58:29 +0200 Subject: [SciPy-user] Can't find atlas for scipy install In-Reply-To: References: <20021015152909.GA1461@openlc.org> Message-ID: <20021015185829.GE5698@openlc.org> On Tue, Oct 15, 2002 at 09:30:20PM +0300, Pearu Peterson wrote: > > See scipy/INSTALL.txt for troubleshooting. > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > I understand that often such comments can be ignored (can they?) but in > this particular case you should follow it literally. Yeah, this was my fault. Now this is ok. Thanks for all the help! -- Francesc Alted PGP KeyID: 0x61C8C11F Scientific aplications developer Public PGP key available: http://www.openlc.org/falted_at_openlc.asc Key fingerprint = 1518 38FE 3A3D 8BE8 24A0 3E5B 1328 32CC 61C8 C11F From wagner.nils at vdi.de Tue Oct 15 16:44:16 2002 From: wagner.nils at vdi.de (My VDI Freemail) Date: Tue, 15 Oct 2002 22:44:16 +0200 Subject: [SciPy-user] =?iso-8859-1?q?scipy.test=281=29?= FAIL: =?iso-8859-1?q?check=5Fbasic?= =?iso-8859-1?q?_=28test=5Fmorestats.test=5Fshapiro=29?= Message-ID: <20021015205152.9B6433EACE@www.scipy.com> Hi, I am using latest CVS that is >>> scipy.__version__ '0.2.0_alpha_144.4360' Running scipy.test(1) gives the following messages BTW some information concerning my OS SuSE 8.1 Python 2.2.1 (#1, Sep 10 2002, 17:49:17) [GCC 3.2] on linux2 creating test suite for: scipy.linalg.matfuncs !! FAILURE building test for scipy.linalg.matfuncs :1: ImportError: No module named test_matfuncs (in ?) ====================================================================== FAIL: check_basic (test_morestats.test_shapiro) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.2/site-packages/scipy/stats/tests/test_morestats.py", line 30, in check_basic assert_almost_equal(w,0.90047299861907959,8) File "/usr/lib/python2.2/site-packages/scipy_test/testing.py", line 335, in assert_almost_equal assert round(abs(desired - actual),decimal) == 0, msg AssertionError: Items are not equal: DESIRED: 0.900472998619 ACTUAL: 0.900472939014 Any idea ? Nils From travis at enthought.com Tue Oct 15 17:55:16 2002 From: travis at enthought.com (Travis N. Vaught) Date: Tue, 15 Oct 2002 16:55:16 -0500 Subject: [SciPy-user] Setting up Scipy In-Reply-To: <20021015100149.2489.qmail@web13102.mail.yahoo.com> Message-ID: There are some great installation instructions in the INSTALL.txt file that comes with the source. If this isn't sufficient, please post a specific question to the list. Thanks, Travis -----Original Message----- From: scipy-user-admin at scipy.net [mailto:scipy-user-admin at scipy.net]On Behalf Of Johnny boi Sent: Tuesday, October 15, 2002 5:02 AM To: scipy-user at scipy.net Subject: [SciPy-user] Setting up Scipy Hi there, I'm new to Scipy, and I'm having some possibly minor problems in regards to setting it up on a RH 7.2 Linux box. My question is, should I simple tar the Scipy file into the directory of python/site-packages? I noticed that it extracted 4 directories, do i have to run any setup scripts? Many thanks, Johnny Yahoo! Messenger for SMS - Always be connected to your Messenger Friends From eric at enthought.com Wed Oct 16 12:12:45 2002 From: eric at enthought.com (eric jones) Date: Wed, 16 Oct 2002 11:12:45 -0500 Subject: [SciPy-user] ANNOUNCE: Class -- Building C/C++ Extensions for Python Message-ID: <003501c2752e$dfc350e0$8901a8c0@ERICDESKTOP> Building C/C++ Extensions for Python Description: Enthought is proud to announce "Building C/C++ extensions for Python," an intense 3 day course taught by David Beazley, David Abrahams, and Eric Jones, the lead authors of SWIG, Boost.Python, and Weave. This hands-on course is geared toward C/C++ programmers and teaches the start-to-finish process of exposing C/C++ libraries for use in Python. Students are sure to benefit from this opportunity to learn from three of the leading experts in the field. The class teaches the fundamentals of designing and building Python extensions and addresses the common problems that arise during the process. Boost.Python, SWIG, and Weave are central to the discussion, and each is covered in depth. Fundamental topics such as handling reference counts and building Python 2.2 style extension types by hand are also covered. Other topics discussed include Pyrex, distributing extensions using distutils, debugging extensions, and solving shared library issues. The course is divided equally between lectures and hands-on programming sessions. Users will need to bring either a Linux or a Windows NT/2000/XP, network enabled, laptop to the class with Python 2.2 and a C++ compiler installed for the programming sessions. More information about setup requirements is available at the website. Space is limited. Website: http://www.enthought.com/training/building_extensions.html Signup Information: Call (512) 536-1057 to reserve your place. Dates: December 9th, 10th, and 11th, 2002 (Monday through Wednesday) Instruction Hours: Instruction runs from 9am-9pm on the first two days (with breaks for lunch, dinner, and between sessions), and 9am-6pm on the final day of the class. Location: The Driskill Hotel www.driskillhotel.com 604 Brazos Street Austin, Texas The Driskill is conveniently located in the heart of downtown Austin. And, yes, it has high speed internet connections in the guest rooms. What's Included: 3 nights of lodging All meals and snacks Unlimited caffeinated drinks Class materials 3 days of instruction Cost: $2400.00 US. About the Authors: David Beazley David is an assistant professor in the Department of Computer Science at the University of Chicago. He has worked on Python extension building since 1996 and is the creator of SWIG (www.swig.org). He is also the author of the "Python Essential Reference." David holds a PhD in Computer Science from the University of Utah. David Abrahams David is a founding member and moderator of Boost (www.boost.org) and heads Boost Consulting, a company dedicated to providing professional support and development services for the Boost C++ libraries and associated tools. He has been an ANSI/ISO C++ committee member since 1996, when he contributed a theory, specification, and implementation of exception handling for the C++ standard library. In his 14-year career he has developed applications for the desktop and embedded devices in the fields of music software, speech recognition, and circuit simulation. David holds a BSE in Computer Science from the University of Pennsylvania. Eric Jones Eric has a broad background in engineering and software development and leads Enthought's product engineering and software design. Eric is a lead developer on the SciPy (www.scipy.org) and Weave projects and has taught numerous courses about Python and how to leverage it for scientific computing. Prior to co-founding Enthought, Eric worked in the fields of numerical electromagnetics and genetic optimization. Eric holds a PhD degree in Electrical Engineering from Duke University. ---------------------------------------------- eric jones 515 Congress Ave www.enthought.com Suite 1614 512 536-1057 Austin, Tx 78701 From s3060954 at ics.mq.edu.au Wed Oct 16 22:09:08 2002 From: s3060954 at ics.mq.edu.au (Ly Johnny) Date: Thu, 17 Oct 2002 12:09:08 +1000 Subject: [SciPy-user] SciPy setup, Atlas3.4.1 Message-ID: <000c01c27582$2d1081d0$a9eb6f89@student.ads.ics.mq.edu.au> Hi, I'm trying to get SciPy 0.2 up and running. I've read through the install.txt file from the source. I tried installing Atlas 3.4.1 yesterday, the install was not complete as if took over 9 hours and I lost my patients and aborted the install. I was wondering is there a quicker way to get SciPy working? Regards, Johnny -------------- next part -------------- An HTML attachment was scrubbed... URL: From nwagner at mecha.uni-stuttgart.de Thu Oct 17 03:38:23 2002 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Thu, 17 Oct 2002 09:38:23 +0200 Subject: [SciPy-user] Nonlinear programming codes in scipy Message-ID: <3DAE68EF.8A300607@mecha.uni-stuttgart.de> Hi, I wonder if scipy will support nonlinear programming codes like Spellucci's mixed SQP/ECQP-method for general continuous nonlinear programming problems. See http://plato.la.asu.edu/donlp2.html for further details. Nils From mariska at nrl.navy.mil Thu Oct 17 09:07:21 2002 From: mariska at nrl.navy.mil (Mariska, John) Date: Thu, 17 Oct 2002 09:07:21 -0400 Subject: [SciPy-user] New to scipy and having problems getting started Message-ID: I'm running Active Python 2.1.1, wxPython, Numeric 20.2.0, and gnuplot. All were installed some time ago and work fine. I installed SciPy-0.2.0_alpha_144.4373.win32-py2.1.exe with no error messages. When I try to get into scipy and run the test program, however, I get the following traceback. Is there something else I need to do to configure scipy? John M. PythonWin 2.1.1 (#20, Jul 26 2001, 11:38:51) [MSC 32 bit (Intel)] on win32. Portions Copyright 1994-2001 Mark Hammond (MarkH at ActiveState.com) - see 'Help/About PythonWin' for further copyright information. >>> from scipy import * Traceback (most recent call last): File "", line 1, in ? File "E:\Python21\scipy\__init__.py", line 36, in ? from scipy_base import * File "E:\Python21\scipy_base\__init__.py", line 109, in ? import limits File "E:\Python21\scipy_base\limits.py", line 45, in ? float_epsilon = epsilon(Numeric.Float32) File "E:\Python21\scipy_base\limits.py", line 28, in epsilon x = x * cast(.5) ArithmeticError: Integer overflow in multiply. >>> From gvermeul at grenoble.cnrs.fr Thu Oct 17 11:02:26 2002 From: gvermeul at grenoble.cnrs.fr (Gerard Vermeulen) Date: Thu, 17 Oct 2002 17:02:26 +0200 Subject: [SciPy-user] New to scipy and having problems getting started In-Reply-To: References: Message-ID: <20021017150226.GA4809@venus.grenoble.cnrs.fr> I have exactly the same problem with all recent *.exe installers on Python-2.2.1+Numeric-21.0. The last working installer for my config is SciPy-0.2.0_alpha_139.4209.win32-py2.2\[1\].exe (found in a hidden Internet Explorer folder). Uninstalling the newer version and reinstalling the older works for me. Gerard On Thu, Oct 17, 2002 at 09:07:21AM -0400, Mariska, John wrote: > I'm running Active Python 2.1.1, wxPython, Numeric 20.2.0, and gnuplot. All > were installed some time ago and work fine. I installed > SciPy-0.2.0_alpha_144.4373.win32-py2.1.exe with no error messages. When I > try to get into scipy and run the test program, however, I get the following > traceback. Is there something else I need to do to configure scipy? > > John M. > > PythonWin 2.1.1 (#20, Jul 26 2001, 11:38:51) [MSC 32 bit (Intel)] on win32. > Portions Copyright 1994-2001 Mark Hammond (MarkH at ActiveState.com) - see > 'Help/About PythonWin' for further copyright information. > >>> from scipy import * > Traceback (most recent call last): > File "", line 1, in ? > File "E:\Python21\scipy\__init__.py", line 36, in ? > from scipy_base import * > File "E:\Python21\scipy_base\__init__.py", line 109, in ? > import limits > File "E:\Python21\scipy_base\limits.py", line 45, in ? > float_epsilon = epsilon(Numeric.Float32) > File "E:\Python21\scipy_base\limits.py", line 28, in epsilon > x = x * cast(.5) > ArithmeticError: Integer overflow in multiply. > >>> > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From skip at pobox.com Thu Oct 17 14:37:47 2002 From: skip at pobox.com (Skip Montanaro) Date: Thu, 17 Oct 2002 13:37:47 -0500 Subject: [SciPy-user] SciPy setup, Atlas3.4.1 In-Reply-To: <000c01c27582$2d1081d0$a9eb6f89@student.ads.ics.mq.edu.au> References: <000c01c27582$2d1081d0$a9eb6f89@student.ads.ics.mq.edu.au> Message-ID: <15791.891.787279.373773@montanaro.dyndns.org> Johnny> I tried installing Atlas 3.4.1 yesterday, the install was not Johnny> complete as if took over 9 hours and I lost my patients and Johnny> aborted the install. I was wondering is there a quicker way to Johnny> get SciPy working? Waiting for Atlas to build can be frustrating. If you are trying to build on an architecture which is recognized, during "make" it will prompt you to use the "express setup". If you are given this opportunity, answer "y"es. This will speed things up dramatically (build time should be < 1 hour on reasonably modern architectures). Otherwise, you have to be patient. The Atlas configurator is tweaking this and nudging that to try and build the fastest possible library it can for you. -- Skip Montanaro - skip at pobox.com http://www.mojam.com/ http://www.musi-cal.com/ From oliphant at ee.byu.edu Thu Oct 17 16:17:59 2002 From: oliphant at ee.byu.edu (Travis Oliphant) Date: Thu, 17 Oct 2002 14:17:59 -0600 (MDT) Subject: [SciPy-user] New to scipy and having problems getting started In-Reply-To: Message-ID: > I'm running Active Python 2.1.1, wxPython, Numeric 20.2.0, and gnuplot. All > were installed some time ago and work fine. I installed > SciPy-0.2.0_alpha_144.4373.win32-py2.1.exe with no error messages. When I > try to get into scipy and run the test program, however, I get the following > traceback. Is there something else I need to do to configure scipy? > > John M. I'm not sure what version of Numeric, SciPy was built with, but this looks like SciPy was compiled against a different version of Numeric then you have installed. Try installing Numeric 22.0 -Travis O. From laytonjb at bellsouth.net Thu Oct 17 18:10:28 2002 From: laytonjb at bellsouth.net (Jeffrey B. Layton) Date: Thu, 17 Oct 2002 18:10:28 -0400 Subject: [SciPy-user] Install failure of SciPy Message-ID: <3DAF3554.1010502@bellsouth.net> Hello again, Thanks for the quick response in fixing (correct word?) SciPy so I could install it. I downloaded the latest source (SciPy-0.2.0_alpha_144.4350) and started the build process, /usr/bin/python2.2 setup.py install It got further than last time. It died looking for a g2c library: gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/lib/python2.2/site-packages/f2py2e/src -I/usr/include/python2.2 -c build/temp.linux-i686-2.2/fblasmodule.c -o build/temp.linux-i686-2.2/fblasmodule.o -O2 -malign-double -fomit-frame-pointer ifc -shared build/temp.linux-i686-2.2/fortranobject.o build/temp.linux-i686-2.2/fblasmodule.o -L/usr/local/lib/atlas -Lbuild/temp.linux-i686-2.2 -Lbuild/temp.linux-i686-2.2 -L/home/laytonj/local/gcc-3.1.1/lib/gcc-lib/i686-pc-linux-gnu/3.1.1 -lfblas -llapack -lf77blas -lcblas -latlas -lg2c -o build/lib.linux-i686-2.2/scipy/linalg/fblas.so ld: cannot find -lg2c error: command 'ifc' failed with exit status 1 I'm not sure what g2c is. Also, is there a way to specify the particular gcc to use for the build process? I built ATLAS with gcc-3.1.1 that I built in my home directory. TIA! Jeff From pearu at cens.ioc.ee Thu Oct 17 18:36:03 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Fri, 18 Oct 2002 01:36:03 +0300 (EEST) Subject: [SciPy-user] Install failure of SciPy In-Reply-To: <3DAF3554.1010502@bellsouth.net> Message-ID: On Thu, 17 Oct 2002, Jeffrey B. Layton wrote: > Hello again, > > Thanks for the quick response in fixing (correct word?) > SciPy so I could install it. I downloaded the latest source > (SciPy-0.2.0_alpha_144.4350) and started the build process, > > /usr/bin/python2.2 setup.py install > > It got further than last time. It died looking for a g2c library: > > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -I/usr/lib/python2.2/site-packages/f2py2e/src -I/usr/include/python2.2 > -c build/temp.linux-i686-2.2/fblasmodule.c -o > build/temp.linux-i686-2.2/fblasmodule.o -O2 -malign-double > -fomit-frame-pointer > ifc -shared build/temp.linux-i686-2.2/fortranobject.o > build/temp.linux-i686-2.2/fblasmodule.o -L/usr/local/lib/atlas > -Lbuild/temp.linux-i686-2.2 -Lbuild/temp.linux-i686-2.2 > -L/home/laytonj/local/gcc-3.1.1/lib/gcc-lib/i686-pc-linux-gnu/3.1.1 > -lfblas -llapack -lf77blas -lcblas -latlas -lg2c -o > build/lib.linux-i686-2.2/scipy/linalg/fblas.so > ld: cannot find -lg2c > error: command 'ifc' failed with exit status 1 > > > I'm not sure what g2c is. Hmm, normally there should be a file libg2c.a (or libg2c.so or libg2c-pic.a or ...) in /home/laytonj/local/gcc-3.1.1/lib/gcc-lib/i686-pc-linux-gnu/3.1.1 If not, then how did you configure gcc? Right now I suspect broken gcc installation in your case. You can also try running the above linking command without -lg2c and then importing fblas.so to python. If it fails with a message about missing symbol s_..., then you'll certainly need -lg2c. > Also, is there a way to specify the particular gcc to use > for the build process? Yes, there are many ways, I guess. I'll give you mine. I am using colorgcc that uses configuration file ~/.colorgccrc for getting full paths to gcc compilers. I have created the following two files (given with their contents as follows): ~/.colorgccrc-2.95.4 g++: /usr/bin/g++-2.95 gcc: /usr/bin/gcc-2.95 c++: /usr/bin/g++-2.95 cc: /usr/bin/gcc-2.95 ~/.colorgccrc-3.1 g++: /usr/bin/g++-3.1 gcc: /usr/bin/gcc-3.1 c++: /usr/bin/g++-3.1 cc: /usr/bin/gcc-3.1 Now, when I want to use gcc-3.1, then I'll do ln -s ~/.colorgccrc-3.1 ~/.colorgccrc Otherwise, I'll do ln -s ~/.colorgccrc-2.95.4 ~/.colorgccrc This works nicely for me (running on debian), I am not sure if it is applicable for other systems. Pearu From laytonjb at bellsouth.net Thu Oct 17 18:57:45 2002 From: laytonjb at bellsouth.net (Jeffrey B. Layton) Date: Thu, 17 Oct 2002 18:57:45 -0400 Subject: [SciPy-user] Install failure of SciPy References: Message-ID: <3DAF4069.3000805@bellsouth.net> Pearu Peterson wrote: >On Thu, 17 Oct 2002, Jeffrey B. Layton wrote: > > > >>Hello again, >> >> Thanks for the quick response in fixing (correct word?) >>SciPy so I could install it. I downloaded the latest source >>(SciPy-0.2.0_alpha_144.4350) and started the build process, >> >>/usr/bin/python2.2 setup.py install >> >>It got further than last time. It died looking for a g2c library: >> >>gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC >>-I/usr/lib/python2.2/site-packages/f2py2e/src -I/usr/include/python2.2 >>-c build/temp.linux-i686-2.2/fblasmodule.c -o >>build/temp.linux-i686-2.2/fblasmodule.o -O2 -malign-double >>-fomit-frame-pointer >>ifc -shared build/temp.linux-i686-2.2/fortranobject.o >>build/temp.linux-i686-2.2/fblasmodule.o -L/usr/local/lib/atlas >>-Lbuild/temp.linux-i686-2.2 -Lbuild/temp.linux-i686-2.2 >>-L/home/laytonj/local/gcc-3.1.1/lib/gcc-lib/i686-pc-linux-gnu/3.1.1 >>-lfblas -llapack -lf77blas -lcblas -latlas -lg2c -o >>build/lib.linux-i686-2.2/scipy/linalg/fblas.so >>ld: cannot find -lg2c >>error: command 'ifc' failed with exit status 1 >> >> >>I'm not sure what g2c is. >> >> > >Hmm, normally there should be a file libg2c.a (or libg2c.so or >libg2c-pic.a or ...) in > > /home/laytonj/local/gcc-3.1.1/lib/gcc-lib/i686-pc-linux-gnu/3.1.1 > >If not, then how did you configure gcc? Right now I suspect broken gcc >installation in your case. > I built gcc using the instructions on the ATLAS homepage: http://math-atlas.sourceforge.net/errata.html#UnixGccInst It was made with bootstrap-lean. Is that a problem? > >You can also try running the above linking command without -lg2c and >then importing fblas.so to python. If it fails with a message >about missing symbol s_..., then you'll certainly need -lg2c. > Trying that now... It built, but I'm not sure how o import fblas.so (>>> import fblas ?) Thanks! Jeff > > >Pearu > >_______________________________________________ >SciPy-user mailing list >SciPy-user at scipy.net >http://www.scipy.net/mailman/listinfo/scipy-user > > > From pearu at cens.ioc.ee Thu Oct 17 19:18:31 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Fri, 18 Oct 2002 02:18:31 +0300 (EEST) Subject: [SciPy-user] Install failure of SciPy In-Reply-To: <3DAF4069.3000805@bellsouth.net> Message-ID: On Thu, 17 Oct 2002, Jeffrey B. Layton wrote: > >Hmm, normally there should be a file libg2c.a (or libg2c.so or > >libg2c-pic.a or ...) in > > > > /home/laytonj/local/gcc-3.1.1/lib/gcc-lib/i686-pc-linux-gnu/3.1.1 > > > >If not, then how did you configure gcc? Right now I suspect broken gcc > >installation in your case. > > > > I built gcc using the instructions on the ATLAS homepage: > > http://math-atlas.sourceforge.net/errata.html#UnixGccInst > > It was made with bootstrap-lean. Is that a problem? I don't know. Though the instructions in errata.html#UnixGccInst look ok to me, you are pretty much on your own when not following official instructions. See http://www.gnu.org/software/gcc/gcc.html You could also try locating libg2c.a in other places in your system, but here I can provide little help. > >You can also try running the above linking command without -lg2c and > >then importing fblas.so to python. If it fails with a message > >about missing symbol s_..., then you'll certainly need -lg2c. > > > > Trying that now... > > It built, but I'm not sure how o import fblas.so (>>> import fblas ?) change to directoy build/lib.linux-i686-2.2/scipy/linalg and in python do import fblas. Pearu From groma at nucleus.szbk.u-szeged.hu Fri Oct 18 03:09:20 2002 From: groma at nucleus.szbk.u-szeged.hu (=?iso-8859-1?Q?G=E9za_Groma?=) Date: Fri, 18 Oct 2002 09:09:20 +0200 Subject: [SciPy-user] scipy + py2exe problem Message-ID: <004801c27675$47ff2570$a13f72a0@szbk.uszeged.hu> I built an application called Coherent using SciPy-0.2.0_alpha_144.4373.win32-py2.2.exe on Win NT4.0sp6a. It runs without error if started directly from python. However, when it was packed to Coherent.exe by py2exe I got the following error on execution: D:\Python22\Lib\site-packages\Coherent\dist\Coherent>Coherent Traceback (most recent call last): File "", line 3, in ? File "imputil.pyc", line 132, in _import_hook File "", line 70, in _finish_import File "imputil.pyc", line 316, in _load_tail File "imputil.pyc", line 271, in _import_one File "", line 128, in _process_result File "Scibook\page.pyc", line 3, in ? File "imputil.pyc", line 103, in _import_hook File "", line 52, in _import_top_module File "imputil.pyc", line 216, in import_top File "imputil.pyc", line 271, in _import_one File "", line 128, in _process_result File "scipy\__init__.pyc", line 49, in ? File "imputil.pyc", line 93, in _import_hook File "imputil.pyc", line 347, in _do_import File "imputil.pyc", line 271, in _import_one File "", line 128, in _process_result File "scipy\special\__init__.pyc", line 326, in ? File "imputil.pyc", line 93, in _import_hook File "imputil.pyc", line 347, in _do_import File "imputil.pyc", line 271, in _import_one File "", line 128, in _process_result File "scipy\special\special.pyc", line 5, in ? File "imputil.pyc", line 106, in _import_hook ImportError: No module named cephes Rebuilding with the '--includes scipy.special.cephes' flag cured the above problem but resulted in: D:\Python22\Lib\site-packages\Coherent\dist\Coherent>Coherent Traceback (most recent call last): File "", line 3, in ? File "imputil.pyc", line 132, in _import_hook File "", line 70, in _finish_import File "imputil.pyc", line 316, in _load_tail File "imputil.pyc", line 271, in _import_one File "", line 128, in _process_result File "Scibook\page.pyc", line 3, in ? File "imputil.pyc", line 103, in _import_hook File "", line 52, in _import_top_module File "imputil.pyc", line 216, in import_top File "imputil.pyc", line 271, in _import_one File "", line 128, in _process_result File "scipy\__init__.pyc", line 69, in ? File "imputil.pyc", line 103, in _import_hook File "", line 52, in _import_top_module File "imputil.pyc", line 216, in import_top File "imputil.pyc", line 271, in _import_one File "", line 128, in _process_result File "weave\__init__.pyc", line 10, in ? File "imputil.pyc", line 93, in _import_hook File "imputil.pyc", line 347, in _do_import File "imputil.pyc", line 271, in _import_one File "", line 128, in _process_result File "weave\blitz_tools.pyc", line 9, in ? File "imputil.pyc", line 93, in _import_hook File "imputil.pyc", line 347, in _do_import File "imputil.pyc", line 271, in _import_one File "", line 128, in _process_result File "weave\converters.pyc", line 4, in ? File "imputil.pyc", line 93, in _import_hook File "imputil.pyc", line 347, in _do_import File "imputil.pyc", line 271, in _import_one File "", line 128, in _process_result File "weave\common_info.pyc", line 127, in ? IOError: [Errno 2] No such file or directory: 'D:\\Python22\\Lib\\site-packages\ \Coherent\\dist\\Coherent\\ and getting the __file__ attribute in "weave\common_info.pyc", line 127 kept the leading <. BTW, I had no intention to use weave at all, it was just invoked by the cascade of imports. G?za Groma Institute of Biophysics Biological Research Center of Hungarian Academy of Sciences 6701 Szeged, Hungary -------------- next part -------------- An HTML attachment was scrubbed... URL: From laytonjb at bellsouth.net Fri Oct 18 16:50:40 2002 From: laytonjb at bellsouth.net (Jeffrey B. Layton) Date: Fri, 18 Oct 2002 16:50:40 -0400 Subject: [SciPy-user] Install failure of SciPy References: Message-ID: <3DB07420.3060906@bellsouth.net> Good afternoon, After some suggestions Pearu made, I rebuilt gcc-3.1.1 in my home account. I found the g2c libs and linked them appropriately. I then downloaded the CVS version of Scipy and start building again. Unfortunately, I got another error, ifc -shared build/temp.linux-i686-2.2/cephesmodule.o build/temp.linux-i686-2.2/amos_wrappers.o build/temp.linux-i686-2.2/specfun_wrappers.o build/temp.linux-i686-2.2/toms_wrappers.o build/temp.linux-i686-2.2/cdf_wrappers.o build/temp.linux-i686-2.2/ufunc_extras.o -Lbuild/temp.linux-i686-2.2 -Lbuild/temp.linux-i686-2.2 -L/home/laytonj/local/gcc-3.1.1/lib/gcc-lib/i686-pc-linux-gnu/3.1.1 -lamos -ltoms -lc_misc -lcephes -lmach -lcdf -lspecfun -lg2c -o build/lib.linux-i686-2.2/scipy/special/cephes.so /opt/intel/compiler60/ia32/lib/libF90.a(int8.o): In function `isnan': int8.o(.text+0x4c40): multiple definition of `isnan' build/temp.linux-i686-2.2/libcephes.a(isnan.o):/home/laytonj/TEMP/scipy/special/cephes/isnan.c:125: first defined here ld: Warning: size of symbol `isnan' changed from 51 to 80 in /opt/intel/compiler60/ia32/lib/libF90.a(int8.o) error: command 'ifc' failed with exit status 1 I'm not sure the problem is, but I'll hazard to guess that isnan is being redefined. Thanks! Jeff From pearu at cens.ioc.ee Fri Oct 18 17:44:15 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Sat, 19 Oct 2002 00:44:15 +0300 (EEST) Subject: [SciPy-user] Install failure of SciPy In-Reply-To: <3DB07420.3060906@bellsouth.net> Message-ID: On Fri, 18 Oct 2002, Jeffrey B. Layton wrote: > Good afternoon, > > After some suggestions Pearu made, I rebuilt gcc-3.1.1 in > my home account. I found the g2c libs and linked them > appropriately. I then downloaded the CVS version of Scipy > and start building again. Unfortunately, I got another error, > > ifc -shared build/temp.linux-i686-2.2/cephesmodule.o > build/temp.linux-i686-2.2/amos_wrappers.o > build/temp.linux-i686-2.2/specfun_wrappers.o > build/temp.linux-i686-2.2/toms_wrappers.o > build/temp.linux-i686-2.2/cdf_wrappers.o > build/temp.linux-i686-2.2/ufunc_extras.o -Lbuild/temp.linux-i686-2.2 > -Lbuild/temp.linux-i686-2.2 > -L/home/laytonj/local/gcc-3.1.1/lib/gcc-lib/i686-pc-linux-gnu/3.1.1 > -lamos -ltoms -lc_misc -lcephes -lmach -lcdf -lspecfun -lg2c -o > build/lib.linux-i686-2.2/scipy/special/cephes.so > /opt/intel/compiler60/ia32/lib/libF90.a(int8.o): In function `isnan': > int8.o(.text+0x4c40): multiple definition of `isnan' > build/temp.linux-i686-2.2/libcephes.a(isnan.o):/home/laytonj/TEMP/scipy/special/cephes/isnan.c:125: > first defined here > ld: Warning: size of symbol `isnan' changed from 51 to 80 in > /opt/intel/compiler60/ia32/lib/libF90.a(int8.o) > error: command 'ifc' failed with exit status 1 > > > I'm not sure the problem is, but I'll hazard to guess that > isnan is being redefined. I hope that after all the trouble, you'll not give up on SciPy, especially when I have another bad news about the Intel compiler support. First, to fix the above problem, insert the following line #define isnan cephes_isnan to files special/cephes/mconf_LE.h special/cephes/mconf_BE.h and re-run the build command that should finish now successfully. The bad news is that when running scipy tests, it will segfault after .Testing ncf in the stats module (I have tested it both on suse and debian with Intel 5.0 compiler). All other tests from other modules seem to pass fine. I am not sure yet what function, even what module exactly, is causing this segfault, but it must be either stats or special (as stats uses special). And both modules cannot be tested locally (special even doesn't have working unittests) as they import scipy and that makes finding/fixing bugs very time consuming and difficult. I also tried to remove the dependencies of these modules on scipy but gave up on short term, the dependencies were too deep and messy. On long term, I think these issues (the lack of independence and unittests) really ought to be fixed. So, unless someone will figure out quickly the source of this segfault, the Intel compiler remains unsupported. But I'll keep looking for the solution ... Until then, I'd suggest using g77 compiler for building scipy (see one of my previous mails how) and when we have fixed scipy for Intel compiler, you can later simply rebuild scipy. Sorry for inconvinience, Pearu From laytonjb at bellsouth.net Fri Oct 18 18:27:13 2002 From: laytonjb at bellsouth.net (Jeffrey B. Layton) Date: Fri, 18 Oct 2002 18:27:13 -0400 Subject: [SciPy-user] Install failure of SciPy References: Message-ID: <3DB08AC1.9070106@bellsouth.net> Pearu Peterson wrote: > > >>I'm not sure the problem is, but I'll hazard to guess that >>isnan is being redefined. >> >> > >I hope that after all the trouble, you'll not give up on SciPy, especially >when I have another bad news about the Intel compiler support. > I'm not ready to give up yet. > >Until then, I'd suggest using g77 compiler for building scipy (see one of >my previous mails how) and when we have fixed scipy for Intel compiler, >you can later simply rebuild scipy. > OK. This sounds like a plan to me! > >Sorry for inconvinience, > Pearu > > >_______________________________________________ >SciPy-user mailing list >SciPy-user at scipy.net >http://www.scipy.net/mailman/listinfo/scipy-user > > > From oliphant at ee.byu.edu Fri Oct 18 21:02:11 2002 From: oliphant at ee.byu.edu (Travis Oliphant) Date: Fri, 18 Oct 2002 19:02:11 -0600 (MDT) Subject: [SciPy-dev] Re: [SciPy-user] Install failure of SciPy In-Reply-To: Message-ID: > > I hope that after all the trouble, you'll not give up on SciPy, especially > when I have another bad news about the Intel compiler support. > > First, to fix the above problem, insert the following line > > #define isnan cephes_isnan > > to files > > special/cephes/mconf_LE.h > special/cephes/mconf_BE.h > Should this be changed in the source tree. It looks like other platforms/compilers have an isnan already defined. > and re-run the build command that should finish now successfully. > > The bad news is that when running scipy tests, it will segfault after > > .Testing ncf > This is definitely a special function problem. This is the "first-place" in the scipy testing that one calls out to a (hand-wrapped) fortran-compiled special function. I'm sure the problem is with different linking needs, here. The special function module needs a c-function to call so that's why f2py was not used. I'm not sure how to get setup to use the right compiler switches so that the FORTRAN code called in cdf_wrappers.c works on many platforms. > in the stats module (I have tested it both on suse and debian with > Intel 5.0 compiler). All other tests from other modules seem to pass fine. > > I am not sure yet what function, even what module exactly, is causing this > segfault, but it must be either stats or special (as stats uses special). I'm sure it's special. Try calling special.ncfdtr all by itself and seeing what happens. > And both modules cannot be tested locally (special even doesn't have > working unittests) Unittests for special are being written as we speak (I've got an undergrad working on it). > as they import scipy and that makes finding/fixing bugs > very time consuming and difficult. I also tried to remove the dependencies > of these modules on scipy I don't think stats should ever have dependency on scipy removed (it will always need special for example). Special should be able to depend only on scipy_base. > > So, unless someone will figure out quickly the source of this segfault, > the Intel compiler remains unsupported. But I'll keep looking for the > solution ... > Again, I think it has to do with magic C-to-Fortran calling conventions for the Intel compiler. Pearu, You will recognize the #if defined(NO_APPEND_FORTRAN) #if defined(UPPERCASE_FORTRAN) #define F_FUNC(f,F) F #else #define F_FUNC(f,F) f #endif #else #if defined(UPPERCASE_FORTRAN) #define F_FUNC(f,F) F##_ #else #define F_FUNC(f,F) f##_ #endif #endif code in the C-wrappers (remember these are not Python wrappers) for the fortran code in cdflib and specfun. -Travis O. From laytonjb at bellsouth.net Sat Oct 19 14:15:37 2002 From: laytonjb at bellsouth.net (Jeffrey B. Layton) Date: Sat, 19 Oct 2002 14:15:37 -0400 Subject: [SciPy-user] import failure using g77 Message-ID: <3DB1A149.3070607@bellsouth.net> Hey! I finally listened to Pearu and built SciPy with g77! However, I built g77 from gcc-3.1.1 that I installed locally in my home directory (this could be the cause of the problem). I built ATLAS, LAPACK, etc. with gcc-3.1.1. I then built/installed SciPy using the command: /usr/bin/python2.2 setup.py build build_flib --fcompiler=Gnu install (I had previously installed fftw, Numeric, and f2py). Everything good so far. So, I start up python2.2 and try to import scipy. Here's what I got: [laytonj at home3 scipy]$ /usr/bin/python2.2 Python 2.2 (#1, Apr 12 2002, 15:29:57) [GCC 2.96 20000731 (Red Hat Linux 7.2 2.96-109)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import scipy Traceback (most recent call last): File "", line 1, in ? File "/usr/lib/python2.2/site-packages/scipy/__init__.py", line 30, in ? import Numeric File "/usr/lib/python2.2/site-packages/Numeric/Numeric.py", line 133, in ? import multiarray ImportError: libgcc_s.so.1: cannot open shared object file: No such file or directory >>> Could this be because I built SciPy with gcc-3.1.1 and python2.2 was built with gcc-2.96? Or could this be a bum gcc build? Perhaps a problem with my library directories? TIA! Jeff "Won't give up" Layton From stephen at theboulets.net Sat Oct 19 14:31:57 2002 From: stephen at theboulets.net (Stephen Boulet) Date: Sat, 19 Oct 2002 13:31:57 -0500 Subject: [SciPy-user] Install issues with lapack Message-ID: <200210191331.57842.stephen@theboulets.net> I'm trying to install scipy, but I'm having trouble with lapack. According to "http://math-atlas.sourceforge.net/errata.html#completelp" (as Pearu mentioned), I should "[f]irst, download and install the standard LAPACK library from the LAPACK homepage." I copied "INSTALL/make.inc.LINUX" to "/usr/src/LAPACK/make.inc". I understand that not altering the file "Makefile" will give you all the types (single, double, complex, and complex16). From the lapack docs: By default, the presence of no arguments following the make command will result in the build- ing of all four data types. The file "Makefile" has this in it by default: all: install lib testing blas_testing timing blas_timing lib: lapacklib tmglib #lib: blaslib lapacklib tmglib Just typing make, though, leads to this error after some compilation: g77: ../../blas_LINUX.a: No such file or directory The compile did put the files "tmglib_LINUX.a" and "lapack_LINUX.a" in "/usr/src/LAPACK". Where does blas_LINUX.a come from? Lapack's install instructions say: Next, if you will be using a locally available BLAS library, you will need to remove blaslib from the lib definition. -- Stephen From pearu at cens.ioc.ee Sat Oct 19 14:36:35 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Sat, 19 Oct 2002 21:36:35 +0300 (EEST) Subject: [SciPy-user] import failure using g77 In-Reply-To: <3DB1A149.3070607@bellsouth.net> Message-ID: On Sat, 19 Oct 2002, Jeffrey B. Layton wrote: > Hey! > > I finally listened to Pearu and built SciPy with g77! > However, I built g77 from gcc-3.1.1 that I installed > locally in my home directory (this could be the cause > of the problem). (Yes, you might need to fix this using LD_LIBRARY_PATH, see below.) > I built ATLAS, LAPACK, etc. with gcc-3.1.1. > I then built/installed SciPy using the command: > > /usr/bin/python2.2 setup.py build build_flib --fcompiler=Gnu install > > (I had previously installed fftw, Numeric, and f2py). > Everything good so far. > So, I start up python2.2 and try to import scipy. Here's > what I got: > > [laytonj at home3 scipy]$ /usr/bin/python2.2 > Python 2.2 (#1, Apr 12 2002, 15:29:57) > [GCC 2.96 20000731 (Red Hat Linux 7.2 2.96-109)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import scipy > Traceback (most recent call last): > File "", line 1, in ? > File "/usr/lib/python2.2/site-packages/scipy/__init__.py", line 30, in ? > import Numeric > File "/usr/lib/python2.2/site-packages/Numeric/Numeric.py", line 133, in ? > import multiarray > ImportError: libgcc_s.so.1: cannot open shared object file: No such file > or directory > >>> > > > Could this be because I built SciPy with gcc-3.1.1 and > python2.2 was built with gcc-2.96? It shouldn't be. I am succesfully using extension modules built with gcc-3.1.1 in python2.2 that is built with gcc-2.95.4. > Or could this be a bum gcc build? Perhaps a problem with my library > directories? Could be. libgcc_s.so should be in /path/to/lib/gcc-lib/i386-linux/3.1.1. If it exists there, a quick fix would be defining an environment variable LD_LIBRARY_PATH, e.g. export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/lib/gcc-lib/i386-linux/3.1.1 but read on. Also note that the import problem above is not due to Scipy but comes from Numeric import. I bet, direct 'import Numeric' will also fail. May be rebuilding Numeric will fix the problem. HTH, Pearu From laytonjb at bellsouth.net Sat Oct 19 14:41:45 2002 From: laytonjb at bellsouth.net (Jeffrey B. Layton) Date: Sat, 19 Oct 2002 14:41:45 -0400 Subject: [SciPy-user] Install issues with lapack References: <200210191331.57842.stephen@theboulets.net> Message-ID: <3DB1A769.4060600@bellsouth.net> Stephen Boulet wrote: >Where does blas_LINUX.a come from? Lapack's install instructions say: > By default building LAPACK will also build BLAS as part of lapack_LINUX.a (BLAS is a subdirectory off the main LAPACK directory). To get just the libraries, I use the following command: make lib That way all of the testing, timing, etc. stuff doesn't get built. Once you're done, you can follow the directions on the ATLAS webpage to combine ATLAS and LAPACK to create and "optimized" LAPACK library. Good Luck! Jeff > > Next, if you will be using a locally available BLAS library, you > will need to remove blaslib from the lib definition. > >-- Stephen >_______________________________________________ >SciPy-user mailing list >SciPy-user at scipy.net >http://www.scipy.net/mailman/listinfo/scipy-user > > > From laytonjb at bellsouth.net Sat Oct 19 14:48:32 2002 From: laytonjb at bellsouth.net (Jeffrey B. Layton) Date: Sat, 19 Oct 2002 14:48:32 -0400 Subject: [SciPy-user] import failure using g77 References: Message-ID: <3DB1A900.6060001@bellsouth.net> Pearu Peterson wrote: > > >> >> > >(Yes, you might need to fix this using LD_LIBRARY_PATH, see below.) > This was indeed the problem. I can import Numeric. However, here's the result if I import scipy: [laytonj at home3 laytonj]$ /usr/bin/python2.2 Python 2.2 (#1, Apr 12 2002, 15:29:57) [GCC 2.96 20000731 (Red Hat Linux 7.2 2.96-109)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import Numeric >>> import scipy Traceback (most recent call last): File "", line 1, in ? File "/usr/lib/python2.2/site-packages/scipy/__init__.py", line 49, in ? import special, io, linalg, stats, fftpack File "/usr/lib/python2.2/site-packages/scipy/special/__init__.py", line 326, in ? from special import * File "/usr/lib/python2.2/site-packages/scipy/special/special.py", line 5, in ? from cephes import * ImportError: /usr/lib/python2.2/site-packages/scipy/special/cephes.so: undefined symbol: d_int_val This may be left over from trying to build with ifc. I'm going to grab the CVS an try it again. Thanks! Jeff > > > >HTH, > Pearu > > >_______________________________________________ >SciPy-user mailing list >SciPy-user at scipy.net >http://www.scipy.net/mailman/listinfo/scipy-user > > > From pearu at cens.ioc.ee Sat Oct 19 14:49:40 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Sat, 19 Oct 2002 21:49:40 +0300 (EEST) Subject: [SciPy-user] import failure using g77 In-Reply-To: <3DB1A900.6060001@bellsouth.net> Message-ID: On Sat, 19 Oct 2002, Jeffrey B. Layton wrote: > This was indeed the problem. I can import Numeric. However, here's > the result if I import scipy: > > from cephes import * > ImportError: /usr/lib/python2.2/site-packages/scipy/special/cephes.so: > undefined symbol: d_int_val > > > This may be left over from trying to build with ifc. I'm > going to grab the CVS an try it again. Removing build directory before re-building scipy should fix this. Just updating CVS might not be enough when switching compilers. Pearu From laytonjb at bellsouth.net Sat Oct 19 15:17:34 2002 From: laytonjb at bellsouth.net (Jeffrey B. Layton) Date: Sat, 19 Oct 2002 15:17:34 -0400 Subject: [SciPy-user] import failure using g77 References: Message-ID: <3DB1AFCE.9070007@bellsouth.net> Pearu Peterson wrote: >On Sat, 19 Oct 2002, Jeffrey B. Layton wrote: > > > > >Removing build directory before re-building scipy should fix >this. Just updating CVS might not be enough when switching compilers. > I didn't update, I erased scipy and got a fresh new copy of SciPy. I rebuilt Numeric and scipy. I got this error this time, [laytonj at home3 laytonj]$ /usr/bin/python2.2 Python 2.2 (#1, Apr 12 2002, 15:29:57) [GCC 2.96 20000731 (Red Hat Linux 7.2 2.96-109)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import Numeric >>> import scipy exceptions.ImportError: /usr/lib/python2.2/site-packages/scipy/linalg/_flinalg.so: undefined symbol: f_iob Traceback (most recent call last): File "", line 1, in ? File "/usr/lib/python2.2/site-packages/scipy/__init__.py", line 49, in ? import special, io, linalg, stats, fftpack File "/usr/lib/python2.2/site-packages/scipy/linalg/__init__.py", line 42, in ? from basic import * File "/usr/lib/python2.2/site-packages/scipy/linalg/basic.py", line 17, in ? import calc_lwork ImportError: /usr/lib/python2.2/site-packages/scipy/linalg/calc_lwork.so: undefined symbol: f_cpystr I apologize for taking up bandwidth and everyone's time. When I get scipy working I promise to put together a little blurb for this mailing list on how to build scipy using a gcc/g77 out of your home directory. Thanks! Jeff "Never say die" Layton > >Pearu > >_______________________________________________ >SciPy-user mailing list >SciPy-user at scipy.net >http://www.scipy.net/mailman/listinfo/scipy-user > > > From pearu at cens.ioc.ee Sat Oct 19 15:30:21 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Sat, 19 Oct 2002 22:30:21 +0300 (EEST) Subject: [SciPy-user] import failure using g77 In-Reply-To: <3DB1AFCE.9070007@bellsouth.net> Message-ID: On Sat, 19 Oct 2002, Jeffrey B. Layton wrote: > I didn't update, I erased scipy and got a fresh new copy of SciPy. > I rebuilt Numeric and scipy. I got this error this time, > > [laytonj at home3 laytonj]$ /usr/bin/python2.2 > Python 2.2 (#1, Apr 12 2002, 15:29:57) > [GCC 2.96 20000731 (Red Hat Linux 7.2 2.96-109)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import Numeric > >>> import scipy > exceptions.ImportError: > /usr/lib/python2.2/site-packages/scipy/linalg/_flinalg.so: undefined > symbol: f_iob ^^^^^ This symbol comes from Intel compiler libraries. When building scipy, make sure that Intel compiler is used nowhere. To be sure, you can rename the /path/to/intel/compiler. Pearu From stephen at theboulets.net Sat Oct 19 17:17:26 2002 From: stephen at theboulets.net (Stephen Boulet) Date: Sat, 19 Oct 2002 16:17:26 -0500 Subject: [SciPy-user] Install issues with lapack In-Reply-To: <3DB1A769.4060600@bellsouth.net> References: <200210191331.57842.stephen@theboulets.net> <3DB1A769.4060600@bellsouth.net> Message-ID: <200210191617.26858.stephen@theboulets.net> Hmm, "make lib" makes lapack_LINUX.a and tmglib_LINUX.a but doesn't make blas_LINUX.a. I wonder why not ... g77 aladhd.o alaerh.o alaesm.o alahd.o alareq.o alasum.o alasvm.o chkxer.o icopy.o ilaenv.o xlaenv.o xerbla.o slaord.o schkaa.o schkeq.o schkgb.o schkge.o schkgt.o schklq.o schkpb.o schkpo.o schkpp.o schkpt.o schkq3.o schkql.o schkqp.o schkqr.o schkrq.o schksp.o schksy.o schktb.o schktp.o schktr.o schktz.o sdrvgb.o sdrvge.o sdrvgt.o sdrvls.o sdrvpb.o sdrvpo.o sdrvpp.o sdrvpt.o sdrvsp.o sdrvsy.o serrge.o serrgt.o serrlq.o serrls.o serrpo.o serrql.o serrqp.o serrqr.o serrrq.o serrsy.o serrtr.o serrtz.o serrvx.o sgbt01.o sgbt02.o sgbt05.o sgelqs.o sgeqls.o sgeqrs.o sgerqs.o sget01.o sget02.o sget03.o sget04.o sget06.o sget07.o sgtt01.o sgtt02.o sgtt05.o slaptm.o slarhs.o slatb4.o slattb.o slattp.o slattr.o slavsp.o slavsy.o slqt01.o slqt02.o slqt03.o spbt01.o spbt02.o spbt05.o spot01.o spot02.o spot03.o spot05.o sppt01.o sppt02.o sppt03.o sppt05.o sptt01.o sptt02.o sptt05.o sqlt01.o sqlt02.o sqlt03.o sqpt01.o sqrt01.o sqrt02.o sqrt03.o sqrt11.o sqrt12.o sqrt13.o sqrt14.o sqrt15.o sqrt16.o sqrt17.o srqt01.o srqt02.o srqt03.o srzt01.o srzt02.o sspt01.o ssyt01.o stbt02.o stbt03.o stbt05.o stbt06.o stpt01.o stpt02.o stpt03.o stpt05.o stpt06.o strt01.o strt02.o strt03.o strt05.o strt06.o stzt01.o stzt02.o \ ../../tmglib_LINUX.a ../../lapack_LINUX.a ../../blas_LINUX.a -o ../xlintsts g77: ../../blas_LINUX.a: No such file or directory -- Stephen On Saturday 19 October 2002 01:41 pm, Jeffrey B. Layton wrote: > Stephen Boulet wrote: > >Where does blas_LINUX.a come from? Lapack's install instructions say: > > By default building LAPACK will also build BLAS as part > of lapack_LINUX.a (BLAS is a subdirectory off the main > LAPACK directory). To get just the libraries, I use the > following command: > > make lib > > That way all of the testing, timing, etc. stuff doesn't get > built. > Once you're done, you can follow the directions on the > ATLAS webpage to combine ATLAS and LAPACK to > create and "optimized" LAPACK library. > > Good Luck! > > Jeff > > > Next, if you will be using a locally available BLAS library, you > > will need to remove blaslib from the lib definition. > > > >-- Stephen From pearu at cens.ioc.ee Sat Oct 19 17:29:54 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Sun, 20 Oct 2002 00:29:54 +0300 (EEST) Subject: [SciPy-user] Install issues with lapack In-Reply-To: <200210191617.26858.stephen@theboulets.net> Message-ID: On Sat, 19 Oct 2002, Stephen Boulet wrote: > Hmm, "make lib" makes lapack_LINUX.a and tmglib_LINUX.a but doesn't make > blas_LINUX.a. I wonder why not ... First, blas_LINUX.a nor tmglib_LINUX.a are not required for Scipy. So, minimal command for building LAPACK would be make lapacklib Second, the answer to your question can be probably found in http://www.netlib.org/lapack/lawn41/index.html I just commited to CVS instructions how to build ATLAS+LAPACK libraries for SciPy. Do 'cvs update' and see INSTALL.txt. Pearu From stephen at theboulets.net Sat Oct 19 17:36:57 2002 From: stephen at theboulets.net (Stephen Boulet) Date: Sat, 19 Oct 2002 16:36:57 -0500 Subject: [SciPy-user] Install issues with lapack In-Reply-To: <200210191617.26858.stephen@theboulets.net> References: <200210191331.57842.stephen@theboulets.net> <3DB1A769.4060600@bellsouth.net> <200210191617.26858.stephen@theboulets.net> Message-ID: <200210191636.57214.stephen@theboulets.net> Ok, I found the problem. The Makefile comments out blaslib by default. -- Stephen > On Saturday 19 October 2002 01:41 pm, Jeffrey B. Layton wrote: > > Stephen Boulet wrote: > > >Where does blas_LINUX.a come from? Lapack's install instructions say: From stephen at theboulets.net Sat Oct 19 19:16:47 2002 From: stephen at theboulets.net (Stephen Boulet) Date: Sat, 19 Oct 2002 18:16:47 -0500 Subject: [SciPy-user] Install issues with lapack In-Reply-To: References: Message-ID: <200210191816.47810.stephen@theboulets.net> On Saturday 19 October 2002 04:29 pm, Pearu Peterson wrote: > Second, the answer to your question can be probably found in > http://www.netlib.org/lapack/lawn41/index.html Yes. The instructions are incorrect. They say "Next, if you will be using a locally available BLAS library, you will need to remove blaslib from the lib definition", when actually blaslib is commented out by default, causing an error during the make process. It shouldn't matter, because by that time lapack_LINUX.a has already been built, but I didn't know that, and seeing it bork with an error was confusing. Your Install.txt, by specifying "make lapacklib", should avoid the issue though. Thanks. Are you using a pentium 2? ;) There's another problem, though. Running "python setup.py install", I get: detecting Absoft Fortran compiler... f77 -V -c /tmp/__dummy.f -o /tmp/__dummy.o 32512: sh: f77: command not found detecting SGI Fortran compiler... f77 -version 32512: sh: f77: command not found detecting Sun Fortran compiler... f90 -V 32512: sh: f90: command not found which is obviously not right. But doing python setup.py build build_flib --fcompiler=Gnu using F2PY 2.23.190-1369 using F2PY 2.23.190-1369 using F2PY 2.23.190-1369 using F2PY 2.23.190-1369 using F2PY 2.23.190-1369 using F2PY 2.23.190-1369 using F2PY 2.23.190-1369 running build_flib running find_fortran_compiler running gnu_fortran_compiler.find_lib_directories g77 -v detecting Gnu Fortran compiler... g77 --version found GNU Fortran (GCC 3.2) 3.2 20020814 (release) Traceback (most recent call last): File "setup.py", line 130, in ? install_package() File "setup.py", line 120, in install_package url = "http://www.scipy.org", File "scipy_distutils/core.py", line 42, in setup return old_setup(**new_attr) File "/usr/lib/python2.2/distutils/core.py", line 138, in setup dist.run_commands() File "/usr/lib/python2.2/distutils/dist.py", line 893, in run_commands self.run_command(cmd) File "/usr/lib/python2.2/distutils/dist.py", line 913, in run_command cmd_obj.run() File "/usr/lib/python2.2/distutils/command/build.py", line 107, in run self.run_command(cmd_name) File "/usr/lib/python2.2/distutils/cmd.py", line 330, in run_command self.distribution.run_command(command) File "/usr/lib/python2.2/distutils/dist.py", line 912, in run_command cmd_obj.ensure_finalized() File "/usr/lib/python2.2/distutils/cmd.py", line 112, in ensure_finalized self.finalize_options() File "scipy_distutils/command/build_flib.py", line 148, in finalize_options verbose = self.verbose) File "scipy_distutils/command/build_flib.py", line 1192, in find_fortran_compiler compiler = compiler_class(fc,f90c,verbose = verbose) File "scipy_distutils/command/build_flib.py", line 803, in __init__ self.f77_opt = self.get_opt() File "scipy_distutils/command/build_flib.py", line 839, in get_opt if march_flag: UnboundLocalError: local variable 'march_flag' referenced before assignment Should the method get_opt in class gnu_fortran_compiler be altered: def get_opt(self): import cpuinfo cpu = cpuinfo.cpuinfo() opt = ' -O3 -funroll-loops ' march_flag = 1 # initialize to 1 ? Well, it actually seemed to work. I must have entered the twilight zone. ;) -- Stephen From laytonjb at bellsouth.net Sat Oct 19 19:38:24 2002 From: laytonjb at bellsouth.net (Jeffrey B. Layton) Date: Sat, 19 Oct 2002 19:38:24 -0400 Subject: [SciPy-user] import failure using g77 References: Message-ID: <3DB1ECF0.9060201@bellsouth.net> Pearu Peterson wrote: >On Sat, 19 Oct 2002, Jeffrey B. Layton wrote: > > > >>I didn't update, I erased scipy and got a fresh new copy of SciPy. >>I rebuilt Numeric and scipy. I got this error this time, >> >>[laytonj at home3 laytonj]$ /usr/bin/python2.2 >>Python 2.2 (#1, Apr 12 2002, 15:29:57) >>[GCC 2.96 20000731 (Red Hat Linux 7.2 2.96-109)] on linux2 >>Type "help", "copyright", "credits" or "license" for more information. >> >>> import Numeric >> >>> import scipy >>exceptions.ImportError: >>/usr/lib/python2.2/site-packages/scipy/linalg/_flinalg.so: undefined >>symbol: f_iob >> >> > ^^^^^ > >This symbol comes from Intel compiler libraries. When building scipy, make >sure that Intel compiler is used nowhere. To be sure, you can rename the >/path/to/intel/compiler. > No joy. I move /opt/intel to /opt/intel_old. I then erased (rm -rf) Numeric, f2py, and scipy from their source directories and from /usr/lib/python2.2/site-packages. I then downloaded everything fresh again and rebuilt everything (makine sure that g77 was being used). When I did 'import scipy' I got the exact same errors: [laytonj at home3 laytonj]$ /usr/bin/python2.2 Python 2.2 (#1, Apr 12 2002, 15:29:57) [GCC 2.96 20000731 (Red Hat Linux 7.2 2.96-109)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import Numeric >>> import scipy exceptions.ImportError: /usr/lib/python2.2/site-packages/scipy/linalg/_flinalg.so: undefined symbol: f_iob Traceback (most recent call last): File "", line 1, in ? File "/usr/lib/python2.2/site-packages/scipy/__init__.py", line 49, in ? import special, io, linalg, stats, fftpack File "/usr/lib/python2.2/site-packages/scipy/linalg/__init__.py", line 42, in ? from basic import * File "/usr/lib/python2.2/site-packages/scipy/linalg/basic.py", line 17, in ? import calc_lwork ImportError: /usr/lib/python2.2/site-packages/scipy/linalg/calc_lwork.so: undefined symbol: f_cpystr Did I miss something in erasing the packages from python-2.2? I erased f2py2e, FFT, gui_thread, MA, Numeric, PropertiedClasses, RNG, scipy, scipy_base, scipy_distutils, scipy_test, weave, Numeric.pth. I think my next step is to rebuild ATLAS and LAPACK and reinstall them as well. Thanks! Jeff > >Pearu > >_______________________________________________ >SciPy-user mailing list >SciPy-user at scipy.net >http://www.scipy.net/mailman/listinfo/scipy-user > > > From pearu at cens.ioc.ee Sat Oct 19 19:43:18 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Sun, 20 Oct 2002 02:43:18 +0300 (EEST) Subject: [SciPy-user] import failure using g77 In-Reply-To: <3DB1ECF0.9060201@bellsouth.net> Message-ID: On Sat, 19 Oct 2002, Jeffrey B. Layton wrote: > >>/usr/lib/python2.2/site-packages/scipy/linalg/_flinalg.so: undefined > >>symbol: f_iob > >> > >> > > ^^^^^ > > > >This symbol comes from Intel compiler libraries. When building scipy, make > >sure that Intel compiler is used nowhere. To be sure, you can rename the > >/path/to/intel/compiler. > I think my next step is to rebuild ATLAS and LAPACK and > reinstall them as well. Did you build LAPACK with ifc? If yes then that's it, you'll need to rebuild it with g77. Pearu From pearu at cens.ioc.ee Sat Oct 19 19:45:41 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Sun, 20 Oct 2002 02:45:41 +0300 (EEST) Subject: [SciPy-user] Install issues with lapack In-Reply-To: <200210191816.47810.stephen@theboulets.net> Message-ID: On Sat, 19 Oct 2002, Stephen Boulet wrote: > On Saturday 19 October 2002 04:29 pm, Pearu Peterson wrote: > > > Second, the answer to your question can be probably found in > > http://www.netlib.org/lapack/lawn41/index.html > > Yes. The instructions are incorrect. They say "Next, if you will be using a > locally available BLAS library, you will need to remove blaslib from the lib > definition", when actually blaslib is commented out by default, causing an > error during the make process. It shouldn't matter, because by that time > lapack_LINUX.a has already been built, but I didn't know that, and seeing it > bork with an error was confusing. > > Your Install.txt, by specifying "make lapacklib", should avoid the issue > though. Thanks. Are you using a pentium 2? ;) Yeah, it's great for producing efficient code but poor for running it ;) > There's another problem, though. Running "python setup.py install", I get: > > detecting Absoft Fortran compiler... > f77 -V -c /tmp/__dummy.f -o /tmp/__dummy.o > 32512: sh: f77: command not found > detecting SGI Fortran compiler... > f77 -version > 32512: sh: f77: command not found > detecting Sun Fortran compiler... > f90 -V > 32512: sh: f90: command not found > > which is obviously not right. Actually, it is ok. > > But doing > > python setup.py build build_flib --fcompiler=Gnu > File "scipy_distutils/command/build_flib.py", line 839, in get_opt > if march_flag: > UnboundLocalError: local variable 'march_flag' referenced before assignment Fixed in CVS. Thanks. Pearu From laytonjb at bellsouth.net Sat Oct 19 19:53:01 2002 From: laytonjb at bellsouth.net (Jeffrey B. Layton) Date: Sat, 19 Oct 2002 19:53:01 -0400 Subject: [SciPy-user] import failure using g77 References: Message-ID: <3DB1F05D.3070301@bellsouth.net> Pearu Peterson wrote: >On Sat, 19 Oct 2002, Jeffrey B. Layton wrote: > > > >>>>/usr/lib/python2.2/site-packages/scipy/linalg/_flinalg.so: undefined >>>>symbol: f_iob >>>> >>>> >>>> >>>> >>> ^^^^^ >>> >>>This symbol comes from Intel compiler libraries. When building scipy, make >>>sure that Intel compiler is used nowhere. To be sure, you can rename the >>>/path/to/intel/compiler. >>> >>> > > > > > >> I think my next step is to rebuild ATLAS and LAPACK and >>reinstall them as well. >> >> > >Did you build LAPACK with ifc? If yes then that's it, you'll need to >rebuild it with g77. > No. But I'm going to rebuild everythin just to be sure. :) Thanks! Jeff > >Pearu > >_______________________________________________ >SciPy-user mailing list >SciPy-user at scipy.net >http://www.scipy.net/mailman/listinfo/scipy-user > > > From laytonjb at bellsouth.net Sat Oct 19 20:44:23 2002 From: laytonjb at bellsouth.net (Jeffrey B. Layton) Date: Sat, 19 Oct 2002 20:44:23 -0400 Subject: [SciPy-user] import failure using g77 References: <3DB1F05D.3070301@bellsouth.net> Message-ID: <3DB1FC67.5090603@bellsouth.net> OK. I found a few little things that I missed :) I rebuilt LAPACK and scipy. Unfortunately, when I try to import scipy, I get errors (albeit different ones): [laytonj at home3 laytonj]$ /usr/bin/python2.2 Python 2.2 (#1, Apr 12 2002, 15:29:57) [GCC 2.96 20000731 (Red Hat Linux 7.2 2.96-109)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import Numeric >>> import scipy exceptions.ImportError: /usr/lib/python2.2/site-packages/scipy/linalg/_flinalg.so: undefined symbol: atl_f77wrap_sgetrf__ Traceback (most recent call last): File "", line 1, in ? File "/usr/lib/python2.2/site-packages/scipy/__init__.py", line 49, in ? import special, io, linalg, stats, fftpack File "/usr/lib/python2.2/site-packages/scipy/linalg/__init__.py", line 42, in ? from basic import * File "/usr/lib/python2.2/site-packages/scipy/linalg/basic.py", line 17, in ? import calc_lwork ImportError: /usr/lib/python2.2/site-packages/scipy/linalg/calc_lwork.so: undefined symbol: atl_f77wrap_sgetnb__ I'm using ATLAS 3.4.1 if that causes any problems. Thanks for the help! Jeff From pearu at cens.ioc.ee Sat Oct 19 20:57:13 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Sun, 20 Oct 2002 03:57:13 +0300 (EEST) Subject: [SciPy-user] import failure using g77 In-Reply-To: <3DB1FC67.5090603@bellsouth.net> Message-ID: On Sat, 19 Oct 2002, Jeffrey B. Layton wrote: > > OK. I found a few little things that I missed :) I rebuilt > LAPACK and scipy. Unfortunately, when I try to import > scipy, I get errors (albeit different ones): > > [laytonj at home3 laytonj]$ /usr/bin/python2.2 > Python 2.2 (#1, Apr 12 2002, 15:29:57) > [GCC 2.96 20000731 (Red Hat Linux 7.2 2.96-109)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import Numeric > >>> import scipy > exceptions.ImportError: > /usr/lib/python2.2/site-packages/scipy/linalg/_flinalg.so: undefined > symbol: atl_f77wrap_sgetrf__ ^^^^^^^^^^^^^^^^^^^^^ This symbol should be in liblapack.a after applying http://math-atlas.sourceforge.net/errata.html#completelp Are you sure that you applied them correctly? Use nm to see what symbols are in liblapack.a. Pearu From laytonjb at bellsouth.net Sat Oct 19 21:15:06 2002 From: laytonjb at bellsouth.net (Jeffrey B. Layton) Date: Sat, 19 Oct 2002 21:15:06 -0400 Subject: [SciPy-user] import failure using g77 References: Message-ID: <3DB2039A.6000004@bellsouth.net> Pearu Peterson wrote: >On Sat, 19 Oct 2002, Jeffrey B. Layton wrote: > > > >> OK. I found a few little things that I missed :) I rebuilt >>LAPACK and scipy. Unfortunately, when I try to import >>scipy, I get errors (albeit different ones): >> >>[laytonj at home3 laytonj]$ /usr/bin/python2.2 >>Python 2.2 (#1, Apr 12 2002, 15:29:57) >>[GCC 2.96 20000731 (Red Hat Linux 7.2 2.96-109)] on linux2 >>Type "help", "copyright", "credits" or "license" for more information. >> >>> import Numeric >> >>> import scipy >>exceptions.ImportError: >>/usr/lib/python2.2/site-packages/scipy/linalg/_flinalg.so: undefined >>symbol: atl_f77wrap_sgetrf__ >> >> > ^^^^^^^^^^^^^^^^^^^^^ > >This symbol should be in liblapack.a after applying > > http://math-atlas.sourceforge.net/errata.html#completelp > >Are you sure that you applied them correctly? Use nm to see what symbols >are in liblapack.a. > I'm pretty sure I built everything correctly. Here are the symbols in liblapack.a: [laytonj at home3 G77]$ nm liblapack.a | grep -i sgetrf U sgetrf_ sgetrf.o: U atl_f77wrap_sgetrf__ 00000000 T sgetrf_ U ATL_sgetrf ATL_f77wrap_sgetrf.o: U ATL_sgetrf ATL_sgetrfC.o: 00000000 T ATL_sgetrfC ATL_sgetrf.o: 00000000 T ATL_sgetrf U ATL_sgetrfC U ATL_sgetrfR ATL_sgetrfR.o: 00000000 T ATL_sgetrfR U ATL_sgetrf clapack_sgetrf.o: U ATL_sgetrf 00000000 T clapack_sgetrf It appears to be there (I think). Thanks! Jeff > >Pearu > >_______________________________________________ >SciPy-user mailing list >SciPy-user at scipy.net >http://www.scipy.net/mailman/listinfo/scipy-user > > > From pearu at cens.ioc.ee Sat Oct 19 21:28:04 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Sun, 20 Oct 2002 04:28:04 +0300 (EEST) Subject: [SciPy-user] import failure using g77 In-Reply-To: <3DB2039A.6000004@bellsouth.net> Message-ID: On Sat, 19 Oct 2002, Jeffrey B. Layton wrote: > I'm pretty sure I built everything correctly. Here are the symbols > in liblapack.a: > > [laytonj at home3 G77]$ nm liblapack.a | grep -i sgetrf > U sgetrf_ > sgetrf.o: > U atl_f77wrap_sgetrf__ > It appears to be there (I think). No, it is not there (U means undefined, see 'man nm'). I have ATLAS-3.4.1/lib/Linux_PII$ nm liblapack.a | grep atl_f77wrap_sgetrf__ U atl_f77wrap_sgetrf__ 00000000 T atl_f77wrap_sgetrf__ atl_f77wrap_sgetrf__ appears in ATL_f77wrap_sgetrf.o Pearu From laytonjb at bellsouth.net Sun Oct 20 11:22:13 2002 From: laytonjb at bellsouth.net (Jeffrey B. Layton) Date: Sun, 20 Oct 2002 11:22:13 -0400 Subject: [SciPy-user] import failure using g77 References: Message-ID: <3DB2CA25.8080504@bellsouth.net> Pearu Peterson wrote: >>It appears to be there (I think). >> >> > >No, it is not there (U means undefined, see 'man nm'). I have > >ATLAS-3.4.1/lib/Linux_PII$ nm liblapack.a | grep atl_f77wrap_sgetrf__ > U atl_f77wrap_sgetrf__ >00000000 T atl_f77wrap_sgetrf__ > > >atl_f77wrap_sgetrf__ appears in ATL_f77wrap_sgetrf.o > OK. Here's the problem. If I look at the symbols in the original liblapack.a that ATLAS creates for sgetrd, here's what I find: ATL_sgetrf.o: 00000000 T ATL_sgetrf U ATL_sgetrfC U ATL_sgetrfR ATL_sgetrfC.o: 00000000 T ATL_sgetrfC ATL_sgetrfR.o: 00000000 T ATL_sgetrfR U ATL_sgetrf clapack_sgetrf.o: U ATL_sgetrf 00000000 T clapack_sgetrf U ATL_sgetrf ATL_f77wrap_sgetrf.o: U ATL_sgetrf sgetrf.o: U atl_f77wrap_sgetrf__ 00000000 T sgetrf_ So that means that atl_f77wrap_sgetrf is there, correct? Now, if I lok at liblapack.a after I combine LAPACK and ATLAS for sgetrf, here's what I find: U sgetrf_ sgetrf.o: U atl_f77wrap_sgetrf__ 00000000 T sgetrf_ U ATL_sgetrf ATL_f77wrap_sgetrf.o: U ATL_sgetrf ATL_sgetrfC.o: 00000000 T ATL_sgetrfC ATL_sgetrf.o: 00000000 T ATL_sgetrf U ATL_sgetrfC U ATL_sgetrfR ATL_sgetrfR.o: 00000000 T ATL_sgetrfR U ATL_sgetrf clapack_sgetrf.o: U ATL_sgetrf 00000000 T clapack_sgetrf So, I'm assuming that in recombining the libs, atl_f77wrap_sgetrf__ did not make it. Is that correct? How could this happen? Could it be from using different compile flags (I used some other flags in compiling LAPACK, particularly "-march=athlon")? I'll try compiling LAPACK using -really- generic flags and see what happens. Thanks for any help on this! Jeff "Closer to giving up" Layton > >Pearu > >_______________________________________________ >SciPy-user mailing list >SciPy-user at scipy.net >http://www.scipy.net/mailman/listinfo/scipy-user > > > From pearu at cens.ioc.ee Sun Oct 20 12:53:14 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Sun, 20 Oct 2002 19:53:14 +0300 (EEST) Subject: [SciPy-user] import failure using g77 In-Reply-To: <3DB2CA25.8080504@bellsouth.net> Message-ID: On Sun, 20 Oct 2002, Jeffrey B. Layton wrote: > Pearu Peterson wrote: > > >>It appears to be there (I think). > >> > >> > > > >No, it is not there (U means undefined, see 'man nm'). I have > > > >ATLAS-3.4.1/lib/Linux_PII$ nm liblapack.a | grep atl_f77wrap_sgetrf__ > > U atl_f77wrap_sgetrf__ > >00000000 T atl_f77wrap_sgetrf__ > > > > > >atl_f77wrap_sgetrf__ appears in ATL_f77wrap_sgetrf.o > > > > OK. Here's the problem. If I look at the symbols in the original > liblapack.a that ATLAS creates for sgetrd, here's what I find: > > ATL_sgetrf.o: > 00000000 T ATL_sgetrf > U ATL_sgetrfC > U ATL_sgetrfR > ATL_sgetrfC.o: > 00000000 T ATL_sgetrfC > ATL_sgetrfR.o: > 00000000 T ATL_sgetrfR > U ATL_sgetrf > clapack_sgetrf.o: > U ATL_sgetrf > 00000000 T clapack_sgetrf > U ATL_sgetrf > ATL_f77wrap_sgetrf.o: > U ATL_sgetrf > sgetrf.o: > U atl_f77wrap_sgetrf__ > 00000000 T sgetrf_ > > So that means that atl_f77wrap_sgetrf is there, correct? No, atl_f77wrap_sgetrf__ is not there (notice U), the symbol is just used in sgetrf.o, but not defined. > Now, if I lok at liblapack.a after I combine LAPACK > and ATLAS for sgetrf, here's what I find: > > U sgetrf_ > sgetrf.o: > U atl_f77wrap_sgetrf__ > 00000000 T sgetrf_ > U ATL_sgetrf > ATL_f77wrap_sgetrf.o: > U ATL_sgetrf > ATL_sgetrfC.o: > 00000000 T ATL_sgetrfC > ATL_sgetrf.o: > 00000000 T ATL_sgetrf > U ATL_sgetrfC > U ATL_sgetrfR > ATL_sgetrfR.o: > 00000000 T ATL_sgetrfR > U ATL_sgetrf > clapack_sgetrf.o: > U ATL_sgetrf > 00000000 T clapack_sgetrf > > So, I'm assuming that in recombining the libs, atl_f77wrap_sgetrf__ > did not make it. Is that correct? How could this happen? Could it > be from using different compile flags (I used some other flags in > compiling LAPACK, particularly "-march=athlon")? I'll try compiling > LAPACK using -really- generic flags and see what happens. atl_f77wrap_sgetrf__ was never there. I don't think that it is LAPACK problem, more like ATLAS problem. Did you have g77 installed when building ATLAS? Did ATLAS find it when configuring? If not then may be ATLAS decided not to build f77 support. Try rebuilding atlas. Also, could you send your answers when configuring ATLAS? Of course, if for some reasons you are not able to build working ATLAS libraries, then you can build scipy without ATLAS support. In that case you'll need blas and lapack libraries installed. But I hope that the ATLAS problem above can be fixed. Pearu From laytonjb at bellsouth.net Sun Oct 20 15:21:23 2002 From: laytonjb at bellsouth.net (Jeffrey B. Layton) Date: Sun, 20 Oct 2002 15:21:23 -0400 Subject: [SciPy-user] Next steps in scipy (scipy.test() ) Message-ID: <3DB30233.8030906@bellsouth.net> Hello again :) Pearu was very persistent and helped me get scipy built correctly. I have no errors when I import scipy. I decided to run the scipy tests: >>> scipy.test() Lots of stuff flies by and at the end it says I have one failure. I get lots of 'errors' but one failure. Here is a clip from the initial part of the test suite: >>> scipy.test() No test suite found for scipy.__cvs_version__ creating test suite for: scipy.common No test suite found for scipy.helper No test suite found for scipy.helpmod No test suite found for scipy.pilutil No test suite found for scipy.proc No test suite found for scipy.scipy_tempfile No test suite found for scipy.sync No test suite found for scipy.io creating test suite for: scipy.linalg.basic creating test suite for: scipy.linalg.blas creating test suite for: scipy.linalg.decomp No test suite found for scipy.linalg.flinalg No test suite found for scipy.linalg.interface_gen creating test suite for: scipy.linalg.lapack creating test suite for: scipy.linalg.matfuncs !! FAILURE building test for scipy.linalg.matfuncs :1: ImportError: No module named test_matfuncs (in ?) No test suite found for scipy.special.gendoc ... I'm not sure if this is failure or not. Later, I get this at the end of the run: ====================================================================== FAIL: check_basic (test_morestats.test_shapiro) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.2/site-packages/scipy/stats/tests/test_morestats.py", line 30, in check_basic assert_almost_equal(w,0.90047299861907959,7) File "/usr/lib/python2.2/site-packages/scipy_test/testing.py", line 335, in assert_almost_equal assert round(abs(desired - actual),decimal) == 0, msg AssertionError: Items are not equal: DESIRED: 0.90047299861907959 ACTUAL: 0.90047293901443481 ---------------------------------------------------------------------- Ran 543 tests in 1.111s FAILED (failures=1, errors=40) I would appreciate any help figuring this out. I'm running the CVS version of scipy (as of this morning). Thanks! Jeff From pearu at cens.ioc.ee Sun Oct 20 15:26:11 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Sun, 20 Oct 2002 22:26:11 +0300 (EEST) Subject: [SciPy-user] Next steps in scipy (scipy.test() ) In-Reply-To: <3DB30233.8030906@bellsouth.net> Message-ID: On Sun, 20 Oct 2002, Jeffrey B. Layton wrote: > creating test suite for: scipy.linalg.matfuncs > !! FAILURE building test for scipy.linalg.matfuncs > :1: ImportError: No module named test_matfuncs (in ?) > No test suite found for scipy.special.gendoc > ... > > I'm not sure if this is failure or not. No, it's not. > Later, I get this at the end of the run: > > ====================================================================== > FAIL: check_basic (test_morestats.test_shapiro) > ---------------------------------------------------------------------- > AssertionError: > Items are not equal: > DESIRED: 0.90047299861907959 > ACTUAL: 0.90047293901443481 Again, this is a stats test (that sometimes tend to fail). Since the values are quite close, you can ignore this failure for now. > ---------------------------------------------------------------------- > Ran 543 tests in 1.111s > > FAILED (failures=1, errors=40) > > I would appreciate any help figuring this out. I'm running > the CVS version of scipy (as of this morning). What are these errors? Which tests give them? Pearu From laytonjb at bellsouth.net Sun Oct 20 15:41:36 2002 From: laytonjb at bellsouth.net (Jeffrey B. Layton) Date: Sun, 20 Oct 2002 15:41:36 -0400 Subject: [SciPy-user] Next steps in scipy (scipy.test() ) References: Message-ID: <3DB306F0.8020405@bellsouth.net> > > > >What are these errors? Which tests give them? > Pearu, I'm attaching a file that gives the results of running scipy.test(). I hope this gets throught the mail filters (if not, I'll mail it directly). Thanks! Jeff > >Pearu > >_______________________________________________ >SciPy-user mailing list >SciPy-user at scipy.net >http://www.scipy.net/mailman/listinfo/scipy-user > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults.gz Type: application/x-gzip Size: 2221 bytes Desc: not available URL: From pearu at cens.ioc.ee Sun Oct 20 16:01:49 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Sun, 20 Oct 2002 23:01:49 +0300 (EEST) Subject: [SciPy-user] Next steps in scipy (scipy.test() ) In-Reply-To: <3DB306F0.8020405@bellsouth.net> Message-ID: On Sun, 20 Oct 2002, Jeffrey B. Layton wrote: > >What are these errors? Which tests give them? > I'm attaching a file that gives the results of running scipy.test(). Interesting parts of this file are ====================================================================== ERROR: check_simple (test_fblas.test_ccopy) ---------------------------------------------------------------------- assert_array_equal(x,y) File "/usr/lib/python2.2/site-packages/scipy_test/testing.py", line 366, in assert_array_equal reduced = equal(x,y) TypeError: function not supported for these types, and can't coerce to supported types ====================================================================== ERROR: check_random (test_decomp.test_qr) ---------------------------------------------------------------------- File "/usr/lib/python2.2/site-packages/scipy/linalg/decomp.py", line 362, in qr Q = scipy_base.identity(M,typecode=t) TypeError: identity() got an unexpected keyword argument 'typecode' What Numeric version are you using? What's the value of Numeric.__version__? The above suggest that some very old one. Though Numeric.identity.__doc__ does not document typecode argument but here the following works: >>> Numeric.identity(2,typecode='i') array([[1, 0], [0, 1]],'i') Pearu From laytonjb at bellsouth.net Sun Oct 20 16:57:58 2002 From: laytonjb at bellsouth.net (Jeffrey B. Layton) Date: Sun, 20 Oct 2002 16:57:58 -0400 Subject: [SciPy-user] Next steps in scipy (scipy.test() ) References: Message-ID: <3DB318D6.1050300@bellsouth.net> Pearu Peterson wrote: >On Sun, 20 Oct 2002, Jeffrey B. Layton wrote: > > > >>>What are these errors? Which tests give them? >>> >>> > > > >> I'm attaching a file that gives the results of running scipy.test(). >> >> > >Interesting parts of this file are > >====================================================================== >ERROR: check_simple (test_fblas.test_ccopy) >---------------------------------------------------------------------- > > assert_array_equal(x,y) > File "/usr/lib/python2.2/site-packages/scipy_test/testing.py", line 366, >in assert_array_equal > reduced = equal(x,y) >TypeError: function not supported for these types, and can't coerce to >supported types > >====================================================================== >ERROR: check_random (test_decomp.test_qr) >---------------------------------------------------------------------- > > File "/usr/lib/python2.2/site-packages/scipy/linalg/decomp.py", line >362, in qr > Q = scipy_base.identity(M,typecode=t) >TypeError: identity() got an unexpected keyword argument 'typecode' > > >What Numeric version are you using? What's the value of >Numeric.__version__? The above suggest that some very old one. > >>> print Numeric.__version__ 20.1.0 Jeff > >Though Numeric.identity.__doc__ does not document typecode argument but >here the following works: > > >>>>Numeric.identity(2,typecode='i') >>>> >>>> >array([[1, 0], > [0, 1]],'i') > >Pearu > >_______________________________________________ >SciPy-user mailing list >SciPy-user at scipy.net >http://www.scipy.net/mailman/listinfo/scipy-user > > > From pyzun18 at yahoo.com.au Mon Oct 21 08:29:15 2002 From: pyzun18 at yahoo.com.au (=?iso-8859-1?q?Johnny=20boi?=) Date: Mon, 21 Oct 2002 22:29:15 +1000 (EST) Subject: [SciPy-user] Failure when installing SciPy Message-ID: <20021021122915.93578.qmail@web13107.mail.yahoo.com> Hi all I've install all the Prerequisits for SciPy, (python2.1, Numerical Python, ATLAS, f2py). Then I went on and did a 'python2.1 setup.py install' on SciPy and it gave me all these errors: atlas_info: NOT AVAILABLE linalg/setup_linalg.py:86: UserWarning: Atlas (http://math-atlas.sourceforge.net/) libraries not found. Directories to search for the libraries can be specified in the scipy_distutils/site.cfg file (section [atlas]) or by setting the ATLAS environment variable. warnings.warn(AtlasNotFoundError.__doc__) blas_info: NOT AVAILABLE linalg/setup_linalg.py:90: UserWarning: Blas (http://www.netlib.org/blas/) libraries not found. Directories to search for the libraries can be specified in the scipy_distutils/site.cfg file (section [blas]) or by setting the BLAS environment variable. warnings.warn(BlasNotFoundError.__doc__) blas_src_info: NOT AVAILABLE Traceback (most recent call last): File "setup.py", line 130, in ? install_package() File "setup.py", line 95, in install_package config.extend([get_package_config(x,parent_package)for x in standard_packages]) File "setup.py", line 45, in get_package_config config = mod.configuration(parent) File "linalg/setup_linalg.py", line 93, in configuration raise BlasSrcNotFoundError,BlasSrcNotFoundError.__doc__ scipy_distutils.system_info.BlasSrcNotFoundError: Blas (http://www.netlib.org/blas/) sources not found. Directories to search for the sources can be specified in the scipy_distutils/site.cfg file (section [blas_src]) or by setting the BLAS_SRC environment variable. I've done sanity_test for atlas and everything passed. So what could be the problem?? Regards Johnny --------------------------------- Yahoo! Careers- 1,000's of jobs waiting online for you! -------------- next part -------------- An HTML attachment was scrubbed... URL: From pearu at cens.ioc.ee Mon Oct 21 08:48:12 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Mon, 21 Oct 2002 15:48:12 +0300 (EEST) Subject: [SciPy-user] Failure when installing SciPy In-Reply-To: <20021021122915.93578.qmail@web13107.mail.yahoo.com> Message-ID: I've already answered to this message. See http://www.scipy.org/site_content/mailman?fn=scipy-dev/2002-October/001314.html Pearu From nwagner at mecha.uni-stuttgart.de Mon Oct 21 09:28:53 2002 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Mon, 21 Oct 2002 15:28:53 +0200 Subject: [SciPy-user] Possible bug in linalg.svdvals Message-ID: <3DB40115.1494281A@mecha.uni-stuttgart.de> Hi, I am interested in the singular values of the following matrix >>> A array([[ 0. , 0. , 1. , 0. ], [ 0. , 0. , 0. , 1. ], [-0.81, 0.15, -0.02, 0. ], [ 0.25, -1.21, 0. , -0.02]]) >>> print svdvals(A) [ nan nan nan nan] What is the reason for that ? However svd(A) yields >>> [u,s,v] = svd(A) >>> print s [ 1.29446282 1.00042554 0.99970394 0.72808433] Any idea ? >>> scipy.__version__ '0.2.0_alpha_145.4395' >>> Numeric.__version__ '22.0' Python 2.1.2 (#1, Feb 25 2002, 18:04:21) [GCC 2.95.3 20010315 (SuSE)] on linux2 Type "copyright", "credits" or "license" for more information. Nils From pearu at cens.ioc.ee Mon Oct 21 09:41:23 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Mon, 21 Oct 2002 16:41:23 +0300 (EEST) Subject: [SciPy-user] Possible bug in linalg.svdvals In-Reply-To: <3DB40115.1494281A@mecha.uni-stuttgart.de> Message-ID: On Mon, 21 Oct 2002, Nils Wagner wrote: > Hi, > > I am interested in the singular values of the following matrix > > >>> A > array([[ 0. , 0. , 1. , 0. ], > [ 0. , 0. , 0. , 1. ], > [-0.81, 0.15, -0.02, 0. ], > [ 0.25, -1.21, 0. , -0.02]]) > > > > >>> print svdvals(A) > [ nan nan nan > nan] Strange, it works here: >>> linalg.svdvals(a) array([ 1.29446282, 1.00042554, 0.99970394, 0.72808433]) when using ATLAS 3.3.14 or 3.4.1 and LAPACK-3.0, ifc or gcc. In your case, what ATLAS/LAPACK are you using? Is scipy.linalg.test(1) succesful? Pearu From p.berkes at biologie.hu-berlin.de Mon Oct 21 09:47:27 2002 From: p.berkes at biologie.hu-berlin.de (Pietro Berkes) Date: Mon, 21 Oct 2002 15:47:27 +0200 Subject: [SciPy-user] Possible bug in linalg.svdvals In-Reply-To: <3DB40115.1494281A@mecha.uni-stuttgart.de> References: <3DB40115.1494281A@mecha.uni-stuttgart.de> Message-ID: <02102115472702.28162@sherrington.biologie.hu-berlin.de> Hi! It sounds strange, because (scipy/linalg/decomp.py) def svdvals(a,overwrite_a=0): """Return singular values of a matrix.""" return svd(a,compute_uv=0,overwrite_a=overwrite_a) i.e. svdvals directly calls svd and thus they should return the same result. I have no bug using scipy.__version__=='0.2.0_alpha_133.4174', Numeric.__version__=='22.0' Maybe you could verify the definition of svdvals in your version. Pietro. On Monday 21 October 2002 15:28, you wrote: > Hi, > > I am interested in the singular values of the following matrix > > >>> A > > array([[ 0. , 0. , 1. , 0. ], > [ 0. , 0. , 0. , 1. ], > [-0.81, 0.15, -0.02, 0. ], > [ 0.25, -1.21, 0. , -0.02]]) > > >>> print svdvals(A) > > [ nan nan nan > nan] > > What is the reason for that ? > > However svd(A) yields > > >>> [u,s,v] = svd(A) > >>> print s > > [ 1.29446282 1.00042554 0.99970394 0.72808433] > > Any idea ? > > >>> scipy.__version__ > > '0.2.0_alpha_145.4395' > > >>> Numeric.__version__ > > '22.0' > > Python 2.1.2 (#1, Feb 25 2002, 18:04:21) > [GCC 2.95.3 20010315 (SuSE)] on linux2 > Type "copyright", "credits" or "license" for more information. > > 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 Mon Oct 21 09:56:15 2002 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Mon, 21 Oct 2002 15:56:15 +0200 Subject: [SciPy-user] Possible bug in linalg.svdvals References: Message-ID: <3DB4077F.ADCEA636@mecha.uni-stuttgart.de> Pearu Peterson schrieb: > > On Mon, 21 Oct 2002, Nils Wagner wrote: > > > Hi, > > > > I am interested in the singular values of the following matrix > > > > >>> A > > array([[ 0. , 0. , 1. , 0. ], > > [ 0. , 0. , 0. , 1. ], > > [-0.81, 0.15, -0.02, 0. ], > > [ 0.25, -1.21, 0. , -0.02]]) > > > > > > > > >>> print svdvals(A) > > [ nan nan nan > > nan] > > Strange, it works here: > > >>> linalg.svdvals(a) > array([ 1.29446282, 1.00042554, 0.99970394, 0.72808433]) > > when using ATLAS 3.3.14 or 3.4.1 and LAPACK-3.0, ifc or gcc. > > In your case, what ATLAS/LAPACK are you using? Is > scipy.linalg.test(1) succesful? > > Pearu > >>> import scipy >>> scipy.linalg.test(1) creating test suite for: scipy.linalg.lapack creating test suite for: scipy.linalg.decomp No test suite found for scipy.linalg.flinalg creating test suite for: scipy.linalg.blas No test suite found for scipy.linalg.interface_gen creating test suite for: scipy.linalg.matfuncs !! FAILURE building test for scipy.linalg.matfuncs :1: ImportError: No module named test_matfuncs (in ?) creating test suite for: scipy.linalg.basic ........................................scopy:n=4 ..scopy:n=3 ....dcopy:n=4 ..dcopy:n=3 ....ccopy:n=4 ..ccopy:n=3 ....zcopy:n=4 ..zcopy:n=3 .....saxpy:n=4 ..saxpy:n=3 .....daxpy:n=4 ..daxpy:n=3 .....caxpy:n=4 ..caxpy:n=3 .....zaxpy:n=4 ..zaxpy:n=3 ...sscal:n=4 ...dscal:n=4 ...cscal:n=4 ...zscal:n=4 ....sswap:n=4 ..sswap:n=3 ....dswap:n=4 ..dswap:n=3 ....cswap:n=4 ..cswap:n=3 ....zswap:n=4 ..zswap:n=3 ................................... ---------------------------------------------------------------------- Ran 159 tests in 1.596s OK >>> Nils > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From Subscriber_Services78037 at email.com Mon Oct 21 13:59:25 2002 From: Subscriber_Services78037 at email.com (WALL STREET BULLETIN…..47025) Date: Mon, 21 Oct 2002 12:59:25 -0500 Subject: [SciPy-user] New Stock Pick: NNCO................................................... kiyov Message-ID: <20021021181149.487143EAD2@www.scipy.com> An HTML attachment was scrubbed... URL: From wagner.nils at vdi.de Mon Oct 21 14:25:48 2002 From: wagner.nils at vdi.de (My VDI Freemail) Date: Mon, 21 Oct 2002 20:25:48 +0200 Subject: [SciPy-user] Possible bug in linalg.svdvals In-Reply-To: Message-ID: <20021021183354.8408A3EAD2@www.scipy.com> ------------------- > > On Mon, 21 Oct 2002, Nils Wagner wrote: > > > Hi, > > > > I am interested in the singular values of the following matrix > > > > >>> A > > array([[ 0. , 0. , 1. , 0. ], > > [ 0. , 0. , 0. , 1. ], > > [-0.81, 0.15, -0.02, 0. ], > > [ 0.25, -1.21, 0. , -0.02]]) > > > > > > > > >>> print svdvals(A) > > [ nan nan nan > > nan] > > Strange, it works here: > > >>> linalg.svdvals(a) > array([ 1.29446282, 1.00042554, 0.99970394, 0.72808433]) > > when using ATLAS 3.3.14 or 3.4.1 and LAPACK-3.0, ifc or gcc. > > In your case, what ATLAS/LAPACK are you using? Is > scipy.linalg.test(1) succesful? > > Pearu > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > >>> A=array(([0.,0.,1.,0.],[0.,0.,0.,1.0],[-0.81,0.15,-0.02,0.0],[0.25,-1.21,0.0,-0.02])) >>> A array([[ 0. , 0. , 1. , 0. ], [ 0. , 0. , 0. , 1. ], [-0.81, 0.15, -0.02, 0. ], [ 0.25, -1.21, 0. , -0.02]]) >>> print linalg.svdvals(A) [ nan nan nan nan] >>> u,s,v = linalg.svd(A) >>> print s [ 1.29446282 1.00042554 0.99970394 0.72808433] >>> scipy.__version__ '0.2.0_alpha_144.4388' >>> Numeric.__version__ '22.0' Python 2.2.1 (#1, Sep 10 2002, 17:49:17) [GCC 3.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. Again svdvals didn't work properly. Any suggestion ? Nils From wagner.nils at vdi.de Mon Oct 21 14:28:47 2002 From: wagner.nils at vdi.de (My VDI Freemail) Date: Mon, 21 Oct 2002 20:28:47 +0200 Subject: [SciPy-user] Possible bug in linalg.svdvals In-Reply-To: Message-ID: <20021021183652.64EF23EAD2@www.scipy.com> ------------------- > > On Mon, 21 Oct 2002, Nils Wagner wrote: > > > Hi, > > > > I am interested in the singular values of the following matrix > > > > >>> A > > array([[ 0. , 0. , 1. , 0. ], > > [ 0. , 0. , 0. , 1. ], > > [-0.81, 0.15, -0.02, 0. ], > > [ 0.25, -1.21, 0. , -0.02]]) > > > > > > > > >>> print svdvals(A) > > [ nan nan nan > > nan] > > Strange, it works here: > > >>> linalg.svdvals(a) > array([ 1.29446282, 1.00042554, 0.99970394, 0.72808433]) > > when using ATLAS 3.3.14 or 3.4.1 and LAPACK-3.0, ifc or gcc. > Atlas 3.4.1 rpm -q -i lapack Name : lapack Relocations: (not relocateable) Version : 3.0 Vendor: SuSE Linux AG, Nuernberg, Germany Release : 566 Build Date: Mit 11 Sep 2002 08:48:21 CEST Install date: Mon 30 Sep 2002 22:00:27 CEST Build Host: x330-4.suse.de Group : Development/Libraries/Parallel Source RPM: lapack-3.0-566.src.rpm Size : 10885418 License: distributable Packager : http://www.suse.de/feedback URL : http://www.netlib.org/lapack/ Summary : Linear Algebra Package Description : LAPACK provides routines for solving systems of simultaneous linear equations, least-squares solutions of linear systems of equations, eigenvalue problems, and singular value problems. The associated matrix factorizations (LU, Cholesky, QR, SVD, Schur, generalized Schur) are also provided, as are related computations such as reordering of the Schur factorizations and estimating condition numbers. Dense and banded matrices are handled, but not general sparse matrices. In all areas, similar functionality is provided for real and complex matrices, in both single and double precision. Authors: -------- Jack Dongarra Distribution: SuSE Linux 8.1 (i386) Nils > In your case, what ATLAS/LAPACK are you using? Is > scipy.linalg.test(1) succesful? > > Pearu > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From pearu at cens.ioc.ee Mon Oct 21 14:40:57 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Mon, 21 Oct 2002 21:40:57 +0300 (EEST) Subject: [SciPy-user] Possible bug in linalg.svdvals In-Reply-To: <20021021183354.8408A3EAD2@www.scipy.com> Message-ID: On Mon, 21 Oct 2002, My VDI Freemail wrote: > Again svdvals didn't work properly. > > Any suggestion ? If nobody else is seeing these nans then you have to do some debugging yourself. Look at the svdvals source and try to locate the place where these nans get in. Pearu From nwagner at mecha.uni-stuttgart.de Tue Oct 22 04:17:38 2002 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Tue, 22 Oct 2002 10:17:38 +0200 Subject: [SciPy-user] Not a number in linalg.svdvals References: Message-ID: <3DB509A2.83A667CA@mecha.uni-stuttgart.de> Pearu Peterson schrieb: > > On Mon, 21 Oct 2002, My VDI Freemail wrote: > > > > > Again svdvals didn't work properly. > > > > Any suggestion ? > > If nobody else is seeing these nans then you have to do some debugging > yourself. Look at the svdvals source and try to locate the place where > these nans get in. > > Pearu Pearu, I have removed the whole scipy installation. Then I have reinstalled scipy using latest CVS, but the problem with linalg.svdvals(A) [ nan nan nan nan] is still there. svdvals is defined in decomp.py and afaik it uses svd, but svd works well here. It is exasperating ! Any idea ? Nils > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From p.berkes at biologie.hu-berlin.de Tue Oct 22 04:56:18 2002 From: p.berkes at biologie.hu-berlin.de (Pietro Berkes) Date: Tue, 22 Oct 2002 10:56:18 +0200 Subject: [SciPy-user] Not a number in linalg.svdvals In-Reply-To: <3DB509A2.83A667CA@mecha.uni-stuttgart.de> References: <3DB509A2.83A667CA@mecha.uni-stuttgart.de> Message-ID: <02102210561800.29403@sherrington.biologie.hu-berlin.de> The whole story is very strange: if the tests pass, then svdvals should be allright. Try inserting in svd, line 274 in decomp.py the following line: print u,s,v,info and maybe also print lwork Then call linalg.svdvals again, and look if 's' looks fine. Pietro. On Tuesday 22 October 2002 10:17, you wrote: > Pearu, > > I have removed the whole scipy installation. Then I have reinstalled > scipy > using latest CVS, but the problem with linalg.svdvals(A) > > [ nan nan nan > nan] > > is still there. > > svdvals is defined in decomp.py and afaik it uses svd, but svd works > well here. > > It is exasperating ! > > Any idea ? > > Nils > > > _______________________________________________ > > SciPy-user mailing list > > SciPy-user at scipy.net > > http://www.scipy.net/mailman/listinfo/scipy-user > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From nwagner at mecha.uni-stuttgart.de Tue Oct 22 05:52:29 2002 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Tue, 22 Oct 2002 11:52:29 +0200 Subject: [SciPy-user] Not a number in linalg.svdvals References: <3DB509A2.83A667CA@mecha.uni-stuttgart.de> <02102210561800.29403@sherrington.biologie.hu-berlin.de> Message-ID: <3DB51FDD.5881565D@mecha.uni-stuttgart.de> Pietro Berkes schrieb: > > The whole story is very strange: if the tests pass, then svdvals should be > allright. Try inserting in svd, line 274 in decomp.py the following line: > > print u,s,v,info > > and maybe also > > print lwork > > Then call linalg.svdvals again, and look if 's' looks fine. I have modified decomp.py according to your suggestion, that is in decomp.py line 274 overwrite_a = overwrite_a or a1 is not a gesdd, = get_lapack_funcs(('gesdd',),(a1,)) if gesdd.module_name[:7] == 'flapack': lwork = calc_lwork.gesdd(gesdd.prefix,m,n,compute_uv)[1] u,s,v,info = gesdd(a1,compute_uv = compute_uv, lwork = lwork, overwrite_a = overwrite_a) print u,s,v,info print lwork Please find attached my small test program. This is the output Compute singular values using svd [[-0.01064368 0.93221664 -0.35956157 0.03967781] [ 0.02760821 0.35939368 0.93265212 0.01529682] [ 0.35956157 -0.03967781 -0.01064368 0.93221664] [-0.93265212 -0.01529682 0.02760821 0.35939368]] [ 1.29446282 1.00042554 0.99970394 0.72808433] [[-0.40511624 0.91346254 -0.01377785 0.0357378 ] [ 0.02830277 0.01255214 0.93261333 0.35954662] [ 0.01552803 -0.03501285 -0.35945512 0.932376 ] [-0.91369506 -0.40521936 0.02888879 0.01113738]] 0 140 Singular values using svd [ 1.29446282 1.00042554 0.99970394 0.72808433] Compute singular values using svdvals [ [ 0.]] [ nan nan nan nan] [ [ 0.]] 0 268 Singular values using svdvals [ nan nan nan nan] Nils > > Pietro. > > On Tuesday 22 October 2002 10:17, you wrote: > > Pearu, > > > > I have removed the whole scipy installation. Then I have reinstalled > > scipy > > using latest CVS, but the problem with linalg.svdvals(A) > > > > [ nan nan nan > > nan] > > > > is still there. > > > > svdvals is defined in decomp.py and afaik it uses svd, but svd works > > well here. > > > > It is exasperating ! > > > > Any idea ? > > > > Nils > > > > > _______________________________________________ > > > SciPy-user mailing list > > > SciPy-user at scipy.net > > > http://www.scipy.net/mailman/listinfo/scipy-user > > > > _______________________________________________ > > SciPy-user mailing list > > SciPy-user at scipy.net > > http://www.scipy.net/mailman/listinfo/scipy-user > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user -------------- next part -------------- from scipy import * from scipy.linalg import * A = array(([ 0. , 0. , 1. , 0. ], [ 0. , 0. , 0. , 1. ], [-0.81, 0.15, -0.02, 0. ], [ 0.25, -1.21, 0. , -0.02])) print print 'Compute singular values using svd' print u,s,v = svd(A) print print 'Singular values using svd' print print s print print 'Compute singular values using svdvals' print s1 = svdvals(A) print print 'Singular values using svdvals' print print s1 From p.berkes at biologie.hu-berlin.de Tue Oct 22 06:03:09 2002 From: p.berkes at biologie.hu-berlin.de (Pietro Berkes) Date: Tue, 22 Oct 2002 12:03:09 +0200 Subject: [SciPy-user] Not a number in linalg.svdvals In-Reply-To: <3DB51FDD.5881565D@mecha.uni-stuttgart.de> References: <02102210561800.29403@sherrington.biologie.hu-berlin.de> <3DB51FDD.5881565D@mecha.uni-stuttgart.de> Message-ID: <02102212030901.29403@sherrington.biologie.hu-berlin.de> I think we're getting nearer... now try substituting your prints with print a, a1, overwrite_a, a1 is not a The only relevant difference I see between your and mine installation is the Python version: 2.1 vs. 2.2, although I don't see anything 2.2-specific in the code. Is there anybody using scipy with Python 2.1 who is able reproduce the bug? Pietro. > Compute singular values using svd > > [[-0.01064368 0.93221664 -0.35956157 0.03967781] > [ 0.02760821 0.35939368 0.93265212 0.01529682] > [ 0.35956157 -0.03967781 -0.01064368 0.93221664] > [-0.93265212 -0.01529682 0.02760821 0.35939368]] [ 1.29446282 > 1.00042554 0.99970394 0.72808433] [[-0.40511624 0.91346254 > -0.01377785 0.0357378 ] > [ 0.02830277 0.01255214 0.93261333 0.35954662] > [ 0.01552803 -0.03501285 -0.35945512 0.932376 ] > [-0.91369506 -0.40521936 0.02888879 0.01113738]] 0 > 140 > > Singular values using svd > > [ 1.29446282 1.00042554 0.99970394 0.72808433] > > Compute singular values using svdvals > > [ [ 0.]] [ nan nan > nan nan] [ [ 0.]] 0 > 268 > > Singular values using svdvals > > [ nan nan nan > nan] > > Nils > From pearu at cens.ioc.ee Tue Oct 22 06:06:30 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Tue, 22 Oct 2002 13:06:30 +0300 (EEST) Subject: [SciPy-user] Not a number in linalg.svdvals In-Reply-To: <3DB51FDD.5881565D@mecha.uni-stuttgart.de> Message-ID: On Tue, 22 Oct 2002, Nils Wagner wrote: > Pietro Berkes schrieb: > > > > The whole story is very strange: if the tests pass, then svdvals should be > > allright. Try inserting in svd, line 274 in decomp.py the following line: > > > > print u,s,v,info > > > > and maybe also > > > > print lwork > > > > Then call linalg.svdvals again, and look if 's' looks fine. > > I have modified decomp.py according to your suggestion, that is in > decomp.py line 274 > > overwrite_a = overwrite_a or a1 is not a > gesdd, = get_lapack_funcs(('gesdd',),(a1,)) > if gesdd.module_name[:7] == 'flapack': > lwork = calc_lwork.gesdd(gesdd.prefix,m,n,compute_uv)[1] > u,s,v,info = gesdd(a1,compute_uv = compute_uv, lwork = lwork, > overwrite_a = overwrite_a) > > > print u,s,v,info > print lwork Can you send the output of: overwrite_a = overwrite_a or a1 is not a gesdd, = get_lapack_funcs(('gesdd',),(a1,)) if gesdd.module_name[:7] == 'flapack': print 'prefix=',gesdd.prefix print 'm,n,compute_uv=',m,n,compute_uv lwork = calc_lwork.gesdd(gesdd.prefix,m,n,compute_uv)[1] print 'a1=',a1 u,s,v,info = gesdd(a1,compute_uv = compute_uv, lwork = lwork, overwrite_a = overwrite_a) print ':a1=',a1 print 'u=',u print 'v=',v print 'info,lwork=',info,lwork Try also different input arrays. E.g. A=[[1,2],[3,4]] Pearu From nwagner at mecha.uni-stuttgart.de Tue Oct 22 06:43:02 2002 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Tue, 22 Oct 2002 12:43:02 +0200 Subject: [SciPy-user] Not a number in linalg.svdvals References: Message-ID: <3DB52BB6.CE4359BE@mecha.uni-stuttgart.de> Pearu Peterson schrieb: > > Nils, > > What f2py version are you using? It is possible that update to latest will > fix the problem. > > Pearu As root /export/home/wagner/mytex # f2py -v Traceback (most recent call last): File "/usr/bin/f2py", line 3, in ? import f2py2e File "/usr/lib/python2.1/site-packages/f2py2e/f2py2e.py", line 4, in ? f2py2e.main() AttributeError: 'module' object has no attribute 'main' but as standard user everything is fine wagner at lisa:~/mytex> f2py -v 2.13.175-1250 What can I do ? BTW, I have installed different python-versions To build and install scipy I have used /usr/local/bin/python setup.py build /usr/local/bin/python setup.py install Nils From pearu at cens.ioc.ee Tue Oct 22 07:09:40 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Tue, 22 Oct 2002 14:09:40 +0300 (EEST) Subject: [SciPy-user] Not a number in linalg.svdvals In-Reply-To: <3DB52BB6.CE4359BE@mecha.uni-stuttgart.de> Message-ID: On Tue, 22 Oct 2002, Nils Wagner wrote: > Pearu Peterson schrieb: > > > > Nils, > > > > What f2py version are you using? It is possible that update to latest will > > fix the problem. > > > > Pearu > > As root > > /export/home/wagner/mytex # f2py -v > Traceback (most recent call last): > File "/usr/bin/f2py", line 3, in ? ^^^^^^^^^^^^^ > import f2py2e > File "/usr/lib/python2.1/site-packages/f2py2e/f2py2e.py", line 4, in ? > f2py2e.main() > AttributeError: 'module' object has no attribute 'main' It looks that you have some very old f2py (pre-2002) in your system, see ^^^ above. Also, when running as a root, the actual python version might be 1.5.2. > What can I do ? Remove /usr/bin/f2py (and anything else f2py specific in /usr/bin) and reinstall f2py2e. > BTW, I have installed different python-versions > To build and install scipy I have used > > /usr/local/bin/python setup.py build > /usr/local/bin/python setup.py install That's ok. f2py script should be then installed to /usr/local/bin Pearu From nwagner at mecha.uni-stuttgart.de Tue Oct 22 07:20:04 2002 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Tue, 22 Oct 2002 13:20:04 +0200 Subject: [SciPy-user] Not a number in linalg.svdvals References: Message-ID: <3DB53464.82684C8F@mecha.uni-stuttgart.de> Pearu Peterson schrieb: > > On Tue, 22 Oct 2002, Nils Wagner wrote: > > > Pietro Berkes schrieb: > > > > > > The whole story is very strange: if the tests pass, then svdvals should be > > > allright. Try inserting in svd, line 274 in decomp.py the following line: > > > > > > print u,s,v,info > > > > > > and maybe also > > > > > > print lwork > > > > > > Then call linalg.svdvals again, and look if 's' looks fine. > > > > I have modified decomp.py according to your suggestion, that is in > > decomp.py line 274 > > > > overwrite_a = overwrite_a or a1 is not a > > gesdd, = get_lapack_funcs(('gesdd',),(a1,)) > > if gesdd.module_name[:7] == 'flapack': > > lwork = calc_lwork.gesdd(gesdd.prefix,m,n,compute_uv)[1] > > u,s,v,info = gesdd(a1,compute_uv = compute_uv, lwork = lwork, > > overwrite_a = overwrite_a) > > > > > > print u,s,v,info > > print lwork > > Can you send the output of: > > overwrite_a = overwrite_a or a1 is not a > gesdd, = get_lapack_funcs(('gesdd',),(a1,)) > if gesdd.module_name[:7] == 'flapack': > print 'prefix=',gesdd.prefix > print 'm,n,compute_uv=',m,n,compute_uv > lwork = calc_lwork.gesdd(gesdd.prefix,m,n,compute_uv)[1] > print 'a1=',a1 > u,s,v,info = gesdd(a1,compute_uv = compute_uv, lwork = lwork, > overwrite_a = overwrite_a) > print ':a1=',a1 > print 'u=',u > print 'v=',v > print 'info,lwork=',info,lwork > Yes. Here it comes Compute singular values using svd prefix= d m,n,compute_uv= 4 4 1 a1= [[ 0. 0. 1. 0. ] [ 0. 0. 0. 1. ] [-0.81 0.15 -0.02 0. ] [ 0.25 -1.21 0. -0.02]] :a1= [[ 0. 0. 1. 0. ] [ 0. 0. 0. 1. ] [-0.81 0.15 -0.02 0. ] [ 0.25 -1.21 0. -0.02]] u= [[-0.01064368 0.93221664 -0.35956157 0.03967781] [ 0.02760821 0.35939368 0.93265212 0.01529682] [ 0.35956157 -0.03967781 -0.01064368 0.93221664] [-0.93265212 -0.01529682 0.02760821 0.35939368]] v= [[-0.40511624 0.91346254 -0.01377785 0.0357378 ] [ 0.02830277 0.01255214 0.93261333 0.35954662] [ 0.01552803 -0.03501285 -0.35945512 0.932376 ] [-0.91369506 -0.40521936 0.02888879 0.01113738]] info,lwork= 0 140 Singular values using svd [ 1.29446282 1.00042554 0.99970394 0.72808433] Compute singular values using svdvals prefix= d m,n,compute_uv= 4 4 0 a1= [[ 0. 0. 1. 0. ] [ 0. 0. 0. 1. ] [-0.81 0.15 -0.02 0. ] [ 0.25 -1.21 0. -0.02]] :a1= [[ 0. 0. 1. 0. ] [ 0. 0. 0. 1. ] [-0.81 0.15 -0.02 0. ] [ 0.25 -1.21 0. -0.02]] u= [ [ 0.]] v= [ [ 0.]] info,lwork= 0 268 Singular values using svdvals [ nan nan nan nan] > Try also different input arrays. E.g. A=[[1,2],[3,4]] > That is strange. It works fine in this case Compute singular values using svd prefix= d m,n,compute_uv= 2 2 1 a1= [[ 1. 2.] [ 3. 4.]] :a1= [[ 1. 2.] [ 3. 4.]] u= [[-0.40455358 -0.9145143 ] [-0.9145143 0.40455358]] v= [[-0.57604844 -0.81741556] [ 0.81741556 -0.57604844]] info,lwork= 0 70 Singular values using svd [ 5.4649857 0.36596619] Compute singular values using svdvals prefix= d m,n,compute_uv= 2 2 0 a1= [[ 1. 2.] [ 3. 4.]] :a1= [[ 1. 2.] [ 3. 4.]] u= [ [ 0.]] v= [ [ 0.]] info,lwork= 0 134 Singular values using svdvals [ 5.4649857 0.36596619] Nils > Pearu > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From pearu at cens.ioc.ee Tue Oct 22 07:44:32 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Tue, 22 Oct 2002 14:44:32 +0300 (EEST) Subject: [SciPy-user] Possible bug in linalg.svdvals In-Reply-To: <20021021183652.64EF23EAD2@www.scipy.com> Message-ID: On Mon, 21 Oct 2002, My VDI Freemail wrote: > rpm -q -i lapack > > Name : lapack Relocations: (not relocateable) > Version : 3.0 Vendor: SuSE Linux AG, Nuernberg, Germany > Release : 566 Build Date: Mit 11 Sep 2002 08:48:21 CEST > Install date: Mon 30 Sep 2002 22:00:27 CEST Build Host: x330-4.suse.de > Group : Development/Libraries/Parallel > Source RPM: lapack-3.0-566.src.rpm I am not able to locate the source for lapack-3.0-566 from Internet. It appers to be too new that many suse ftp servers don't have it yet. Pearu From nwagner at mecha.uni-stuttgart.de Tue Oct 22 08:03:56 2002 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Tue, 22 Oct 2002 14:03:56 +0200 Subject: [SciPy-user] Possible bug in linalg.svdvals References: Message-ID: <3DB53EAC.B11711E7@mecha.uni-stuttgart.de> Pearu Peterson schrieb: > > On Mon, 21 Oct 2002, My VDI Freemail wrote: > > > rpm -q -i lapack > > > > Name : lapack Relocations: (not relocateable) > > Version : 3.0 Vendor: SuSE Linux AG, Nuernberg, Germany > > Release : 566 Build Date: Mit 11 Sep 2002 08:48:21 CEST > > Install date: Mon 30 Sep 2002 22:00:27 CEST Build Host: x330-4.suse.de > > Group : Development/Libraries/Parallel > > Source RPM: lapack-3.0-566.src.rpm > > I am not able to locate the source for lapack-3.0-566 from Internet. > It appers to be too new that many suse ftp servers don't have it yet. > > Pearu > Pearu, I am not familiar with the internal naming policy of SuSE. http://www.suse.de/us/private/products/suse_linux/i386/packages_professional/lapack.html Nils > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From pearu at cens.ioc.ee Tue Oct 22 08:06:02 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Tue, 22 Oct 2002 15:06:02 +0300 (EEST) Subject: [SciPy-user] Possible bug in linalg.svdvals In-Reply-To: <3DB53EAC.B11711E7@mecha.uni-stuttgart.de> Message-ID: On Tue, 22 Oct 2002, Nils Wagner wrote: > Pearu Peterson schrieb: > > I am not able to locate the source for lapack-3.0-566 from Internet. > > It appers to be too new that many suse ftp servers don't have it yet. > I am not familiar with the internal naming policy of SuSE. > http://www.suse.de/us/private/products/suse_linux/i386/packages_professional/lapack.html That's not useful. I would like to see what changes suse made to lapack, therefore I need their sources. But since one has to buy this particular suse distribution, I might never find the sources from Internet... Pearu From nwagner at mecha.uni-stuttgart.de Tue Oct 22 08:24:40 2002 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Tue, 22 Oct 2002 14:24:40 +0200 Subject: [SciPy-user] Possible bug in linalg.svdvals References: Message-ID: <3DB54388.DD7ECDB1@mecha.uni-stuttgart.de> Pearu Peterson schrieb: > > On Tue, 22 Oct 2002, Nils Wagner wrote: > > > Pearu Peterson schrieb: > > > > I am not able to locate the source for lapack-3.0-566 from Internet. > > > It appers to be too new that many suse ftp servers don't have it yet. > > > I am not familiar with the internal naming policy of SuSE. > > http://www.suse.de/us/private/products/suse_linux/i386/packages_professional/lapack.html > > That's not useful. I would like to see what changes suse made to lapack, > therefore I need their sources. But since one has to buy this particular > suse distribution, I might never find the sources from Internet... > > Pearu > > ______________________________ Please follow the links SuSE8.0 my distribution at work ftp://ftp.mathematik.uni-bielefeld.de/pub/suse/ftp.suse.com/suse/i386/8.0/suse/beo1/ SuSE 8.1 not yet available. I obtain the svdvals error in both versions. Nils 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 Tue Oct 22 08:33:45 2002 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Tue, 22 Oct 2002 14:33:45 +0200 Subject: [SciPy-user] SuSE's LAPACK Message-ID: <3DB545A9.F3CDF03A@mecha.uni-stuttgart.de> Pearu, SuSE8.0 includes the following rpm -q -i lapack Name : lapack Relocations: (not relocateable) Version : 3.0 Vendor: SuSE AG, Nuernberg, Germany Release : 447 Build Date: Mon 25 M?r 2002 21:23:15 CET Install date: Don 08 Aug 2002 14:16:14 CEST Build Host: gee.suse.de Group : Development/Libraries/Parallel Source RPM: lapack-3.0-447.src.rpm Size : 11012233 License: Freely distributable Packager : feedback at suse.de URL : http://www.netlib.org/lapack/ Summary : Linear Algebra Package Description : LAPACK provides routines for solving systems of simultaneous linear equations, least-squares solutions of linear systems of equations, eigenvalue problems, and singular value problems. The associated matrix factorizations (LU, Cholesky, QR, SVD, Schur, generalized Schur) are also provided, as are related computations such as reordering of the Schur factorizations and estimating condition numbers. Dense and banded matrices are handled, but not general sparse matrices. In all areas, similar functionality is provided for real and complex matrices, in both single and double precision. Authors: -------- Jack Dongarra SuSE series: beo Distribution: SuSE Linux 8.0 (i386) Nils From wagner.nils at vdi.de Tue Oct 22 17:49:07 2002 From: wagner.nils at vdi.de (Nils Wagner) Date: Tue, 22 Oct 2002 23:49:07 +0200 Subject: [SciPy-user] svdvals Message-ID: <20021022215719.336C93EAD2@www.scipy.com> Hi Pearu, Did you find anything explaining the strange behaviour of svdvals ? BTW, python -c 'import atlas_version' gives ATLAS version 3.4.1 built by root on Die Jun 18 23:19:16 CEST 2002: UNAME : Linux linux 2.4.18-4GB #1 Wed Mar 27 13:57:05 UTC 2002 i686 unknown INSTFLG : MMDEF : /home/nwagner/ATLAS/CONFIG/ARCHS/ATHLON/gcc/gemm ARCHDEF : /home/nwagner/ATLAS/CONFIG/ARCHS/ATHLON/gcc/misc F2CDEFS : -DAdd__ -DStringSunStyle CACHEEDGE: 131072 F77 : /usr/bin/g77, version GNU Fortran 0.5.25 20010315 (release) F77FLAGS : -O CC : /usr/bin/gcc, version 2.95.3 CC FLAGS : -fomit-frame-pointer -O3 -funroll-all-loops MCC : /usr/bin/gcc, version 2.95.3 MCCFLAGS : -fomit-frame-pointer -O Nils From pearu at cens.ioc.ee Tue Oct 22 18:04:05 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Wed, 23 Oct 2002 01:04:05 +0300 (EEST) Subject: [SciPy-user] svdvals In-Reply-To: <20021022215719.336C93EAD2@www.scipy.com> Message-ID: On Tue, 22 Oct 2002, Nils Wagner wrote: > Hi Pearu, > > Did you find anything explaining the strange behaviour of svdvals ? No, I didn't. Since it is very difficult to fix bugs that we cannot reproduce, I suggest the following: 1) Try varying the input to svdvals to find out if there is any pattern when svdvals returns nans. Try different arrays with different contents and also with different dimensions, try also transposing arrays, etc. 2) Get lapack directly from netlib and use it for building scipy. Also, try atlas from its homepage. See INSTALL.txt for instructions. Pearu From wagner.nils at vdi.de Tue Oct 22 18:13:16 2002 From: wagner.nils at vdi.de (Nils Wagner) Date: Wed, 23 Oct 2002 00:13:16 +0200 Subject: [SciPy-user] svdvals In-Reply-To: Message-ID: <20021022222127.2566F3EAD2@www.scipy.com> ------------------- > > On Tue, 22 Oct 2002, Nils Wagner wrote: > > > Hi Pearu, > > > > Did you find anything explaining the strange behaviour of svdvals ? > > No, I didn't. > > Since it is very difficult to fix bugs that we cannot reproduce, I suggest > the following: > 1) Try varying the input to svdvals to find out if there is any pattern > when svdvals returns nans. Try different arrays with different contents > and also with different dimensions, try also transposing arrays, etc. > 2) Get lapack directly from netlib and use it for building scipy. > Also, try atlas from its homepage. See INSTALL.txt for instructions. > > Pearu > Pearu, I have installed ATLAS from its homepage https://sourceforge.net/project/showfiles.php?group_id=23725 Since svd works well for me I will use it instead of svdvals. Hopefully someone can reproduce the strange behaviour of svdvals in the near future. Cheers, Nils > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user > From nwagner at mecha.uni-stuttgart.de Wed Oct 23 02:09:37 2002 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Wed, 23 Oct 2002 08:09:37 +0200 Subject: [SciPy-user] LAPACK from Netlib Message-ID: <3DB63D21.1FA59E34@mecha.uni-stuttgart.de> Hi Pearu, Please can you give some advice concerning the installation of the gzipped LAPACK tarball http://www.netlib.org/lapack/lapack.tgz I guess it's not so convenient in comparison with the ATLAS installation. Thanks in advance Nils From pearu at cens.ioc.ee Wed Oct 23 05:00:29 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Wed, 23 Oct 2002 12:00:29 +0300 (EEST) Subject: [SciPy-user] LAPACK from Netlib In-Reply-To: <3DB63D21.1FA59E34@mecha.uni-stuttgart.de> Message-ID: On Wed, 23 Oct 2002, Nils Wagner wrote: > Hi Pearu, > > Please can you give some advice concerning the installation of the > gzipped LAPACK tarball > http://www.netlib.org/lapack/lapack.tgz > I guess it's not so convenient in comparison with the ATLAS > installation. Please, try to follow the corresponding notes from INSTALL.txt (make sure that you have the latest copy from Scipy CVS). It should explain all basic steps needed for building ATLAS+LAPACK libraries for SciPy use. If instructions are not clear, then complain (constructively if possible). Pearu From nwagner at mecha.uni-stuttgart.de Wed Oct 23 06:39:06 2002 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Wed, 23 Oct 2002 12:39:06 +0200 Subject: [SciPy-user] zlib Message-ID: <3DB67C4A.93CEBCE3@mecha.uni-stuttgart.de> Hi, Python must be build with zlib module enabled. How can I check that ? Nils From nwagner at mecha.uni-stuttgart.de Wed Oct 23 07:29:06 2002 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Wed, 23 Oct 2002 13:29:06 +0200 Subject: [SciPy-user] SuSE specific recommendations svdvals Message-ID: <3DB68802.F7A7B24D@mecha.uni-stuttgart.de> Hi Pearu, Thank you very much for all your useful hints. I have build both my own lapack library and ATLAS from scratch. However I cannot say exactly where the bug concerning svdvals was located, but now svdvals works fine ! Altogether I suggest to rebuild LAPACK in SuSE distributions. Regards, Nils From steven.robbins at videotron.ca Wed Oct 23 09:15:19 2002 From: steven.robbins at videotron.ca (Steve M. Robbins) Date: Wed, 23 Oct 2002 09:15:19 -0400 Subject: [SciPy-user] zlib In-Reply-To: <3DB67C4A.93CEBCE3@mecha.uni-stuttgart.de> References: <3DB67C4A.93CEBCE3@mecha.uni-stuttgart.de> Message-ID: <20021023131519.GB2319@nyongwa.montreal.qc.ca> On Wed, Oct 23, 2002 at 12:39:06PM +0200, Nils Wagner wrote: > Hi, > > > Python must be build with zlib module enabled. > > How can I check that ? Try: python >>> import zlib If you get an error message, it ain't there. -S From nwagner at mecha.uni-stuttgart.de Wed Oct 23 09:29:12 2002 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Wed, 23 Oct 2002 15:29:12 +0200 Subject: [SciPy-user] zlib References: <3DB67C4A.93CEBCE3@mecha.uni-stuttgart.de> <20021023131519.GB2319@nyongwa.montreal.qc.ca> Message-ID: <3DB6A428.D8BFA76E@mecha.uni-stuttgart.de> "Steve M. Robbins" schrieb: > > On Wed, Oct 23, 2002 at 12:39:06PM +0200, Nils Wagner wrote: > > Hi, > > > > > > Python must be build with zlib module enabled. > > > > How can I check that ? > > Try: > python > >>> import zlib > BTW, what is the meaning of zlib ? Nils > If you get an error message, it ain't there. > > -S > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user From josegomez at gmx.net Mon Oct 28 06:21:39 2002 From: josegomez at gmx.net (=?iso-8859-15?q?Jos=E9=20Luis=20G=F3mez=20Dans?=) Date: Mon, 28 Oct 2002 11:21:39 +0000 Subject: [SciPy-user] Way to get values which are the same on two arrays Message-ID: <20021028113022.C8B293EACE@www.scipy.com> Hi, I seem to remember a Numerical function that could produce the list of values (or array positions) which are common to two arrays. In other words: a1=[1,2,3,9,10] a2=[1,4,9,10] result is [1,9,10]. Browsing through the Numerical docs doesn't refresh my memory, so any kind souls? many thanks, Jos? -- Jos? L G?mez Dans PhD student Tel: +44 114 222 5582 Radar & Communications Group FAX; +44 870 132 2990 Department of Electronic Engineering University of Sheffield UK From nwagner at mecha.uni-stuttgart.de Mon Oct 28 07:18:30 2002 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Mon, 28 Oct 2002 13:18:30 +0100 Subject: [SciPy-user] sort complex numbers Message-ID: <3DBD2B16.5DD40101@mecha.uni-stuttgart.de> Hi, How can I emulate Matlab's sort function for complex numbers in scipy ? Nils BTW, this is Matlab's policy. When X is complex, the elements are sorted by ABS(X). Complex matches are further sorted by ANGLE(X). From wsryu at fas.harvard.edu Mon Oct 28 08:18:20 2002 From: wsryu at fas.harvard.edu (William Ryu) Date: Mon, 28 Oct 2002 08:18:20 -0500 Subject: [SciPy-user] Open source in the lab In-Reply-To: <20021023170001.4418.18181.Mailman@shaft> Message-ID: <5.1.0.14.2.20021028081710.00aa73a0@pop3.norton.antivirus> Scipy is briefly mentioned in Cameron Laird's article, "Open Source in the Lab." http://www-106.ibm.com/developerworks/library/l-oslab/?n-l-10242 -w From Kyler at Lairds.com Mon Oct 28 15:27:54 2002 From: Kyler at Lairds.com (Kyler Laird) Date: Mon, 28 Oct 2002 15:27:54 -0500 Subject: [SciPy-user] Debian package(s)? Message-ID: <20021028202754.GC6246@jowls.lairds.com> Will SciPy be a Debian package soon? I'd like to have some people start using it. Thank you. --kyler P.S. Searching for anything (including "debian") on the SciPy pages yields "hits" of what appears to be all (378) pages. From nwagner at mecha.uni-stuttgart.de Thu Oct 31 08:44:40 2002 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Thu, 31 Oct 2002 14:44:40 +0100 Subject: [SciPy-user] linalg.eig Message-ID: <3DC133C8.E2A91572@mecha.uni-stuttgart.de> Hi, How do I sort the eigenvalues and corresponding eigenvectors of w,vr = linalg.eig(A,B) in increasing order. It is assumed that all eigenvalues are real. Nils From nwagner at mecha.uni-stuttgart.de Thu Oct 31 11:33:02 2002 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Thu, 31 Oct 2002 17:33:02 +0100 Subject: [SciPy-user] Possible bug in linalg.pin2 Message-ID: <3DC15B3E.EACFCC6A@mecha.uni-stuttgart.de> Hi, I wonder, why I can use only pinv. When I use pinv2 to compute the pseudo-inverse of Z I get the following message Z [[ 3.21699578 1.47577916 -3.05873705] [-1.54994823 3.24940826 2.79976045] [-4.241916 -2.41995866 -1.40655762] [ 2.81641276 -3.34681092 2.10674418] [-0.15888331 0.24404542 -0.20391515]] Pseudo-inverse of Z using lstsq [[ 0.07522953 -0.03500246 -0.11248811 0.08017751 -0.00476346] [ 0.05183121 0.10614625 -0.07713549 -0.11648354 0.00853543] [-0.12411384 0.11106407 -0.06726151 0.10105305 -0.00939367]] Pseudo-inverse of Z using svd Traceback (most recent call last): File "huadai.py", line 101, in ? h4 = linalg.pinv2(Z) File "/usr/local/lib/python2.1/site-packages/scipy/linalg/basic.py", line 327, in pinv2 return dot(tran(conj(vh)),tran(conj(u))*s[:,NewAxis]) ValueError: frames are not aligned Any suggestion ? Nils From pearu at cens.ioc.ee Thu Oct 31 11:32:25 2002 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Thu, 31 Oct 2002 18:32:25 +0200 (EET) Subject: [SciPy-user] linalg.eig In-Reply-To: <3DC133C8.E2A91572@mecha.uni-stuttgart.de> Message-ID: On Thu, 31 Oct 2002, Nils Wagner wrote: > How do I sort the eigenvalues and corresponding eigenvectors of > > w,vr = linalg.eig(A,B) > > in increasing order. It is assumed that all eigenvalues are real. Try: l = zip(w.astype('d'),vr) l.sort(lambda x,y:cmp(x[0],y[0])) As a result, the list l contains sorted pairs (,). Pearu