From openopt at ukr.net Sun Jul 1 07:16:35 2007 From: openopt at ukr.net (dmitrey) Date: Sun, 01 Jul 2007 14:16:35 +0300 Subject: [SciPy-user] once again about zeros() and ones() Message-ID: <46878D13.10505@ukr.net> Hi all, There already was some discussion about zeros() and ones() usage, but I still can't understand some things. 1) currently ones(4,5, **kwargs) just yields error. Why it can't be translated to ones((4,5), **kwargs) ? See my example of Ones() below. ############################## from numpy import ones def Ones(*args, **kwargs): if type(args[0]) in (type(()), type([])): return ones(*args, **kwargs) else: return ones(tuple(args), **kwargs) ############################# if __name__ == '__main__': print Ones((2,2)) print 2*Ones([2,2]) print 3*Ones(2,2) print 4*Ones(2,2,2, dtype=float) print 5*Ones((2,2,2), dtype='float') print 6*Ones([2,2,2], dtype='int') print 7*Ones(3,3, dtype=int, order = 'C') print 8*Ones((3,3), dtype='int') print 9*Ones(3, dtype='int') print 10*Ones((3,), dtype='int') ############################# As one of the former MATLAB users, I'm very disappointed in using zeros((...)) instead of zeros(...), because I'm one of big number of those who should type the zeros() many times per day. Also, same to ones(), tile(), reshape(). 2) what does "order" param means? (in zeros((d1,...,dn),dtype=float,order='C') ) Currently help(zeros) just says zeros(...) zeros((d1,...,dn),dtype=float,order='C') Return a new array of shape (d1,...,dn) and type typecode with all it's entries initialized to zero. So nothing about "order" is known Maybe you have already answered it somewhere, but I guess it's better to update ones() and zeros() documentation than answer the question again and again in mailing lists. Regards, D. From fredmfp at gmail.com Sun Jul 1 07:36:21 2007 From: fredmfp at gmail.com (fred) Date: Sun, 01 Jul 2007 13:36:21 +0200 Subject: [SciPy-user] once again about zeros() and ones() In-Reply-To: <46878D13.10505@ukr.net> References: <46878D13.10505@ukr.net> Message-ID: <468791B5.1000906@gmail.com> dmitrey a ?crit : > 2) what does "order" param means? (in > zeros((d1,...,dn),dtype=float,order='C') ) > I guess it is related to how data are stored : 'C order' or 'Fortran order' which are not the same, IIRC. Try with order='C' and order='F'. My 2 cts. -- http://scipy.org/FredericPetit From matthieu.brucher at gmail.com Sun Jul 1 08:45:12 2007 From: matthieu.brucher at gmail.com (Matthieu Brucher) Date: Sun, 1 Jul 2007 14:45:12 +0200 Subject: [SciPy-user] once again about zeros() and ones() In-Reply-To: <46878D13.10505@ukr.net> References: <46878D13.10505@ukr.net> Message-ID: 2007/7/1, dmitrey : > > Hi all, > There already was some discussion about zeros() and ones() usage, but I > still can't understand some things. > 1) currently ones(4,5, **kwargs) just yields error. Why it can't be > translated to ones((4,5), **kwargs) ? > See my example of Ones() below. > ############################## > from numpy import ones > def Ones(*args, **kwargs): > if type(args[0]) in (type(()), type([])): > return ones(*args, **kwargs) > else: return ones(tuple(args), **kwargs) > ############################# > if __name__ == '__main__': > print Ones((2,2)) > print 2*Ones([2,2]) > print 3*Ones(2,2) > print 4*Ones(2,2,2, dtype=float) > print 5*Ones((2,2,2), dtype='float') > print 6*Ones([2,2,2], dtype='int') > print 7*Ones(3,3, dtype=int, order = 'C') > print 8*Ones((3,3), dtype='int') > print 9*Ones(3, dtype='int') > print 10*Ones((3,), dtype='int') > ############################# > The first argument is a shape, the second is the type of the data. Python has no way of knowing that the second argument is part of the shape and not the type. This way, the arguments are defined correctly, although you could make a wrapper *args, **kwargs and forcing people to use explicitely dtype=float, which they won't do, thus leading to a lot of trouble and errors. Matthieu -------------- next part -------------- An HTML attachment was scrubbed... URL: From openopt at ukr.net Sun Jul 1 09:10:43 2007 From: openopt at ukr.net (dmitrey) Date: Sun, 01 Jul 2007 16:10:43 +0300 Subject: [SciPy-user] once again about zeros() and ones() In-Reply-To: References: <46878D13.10505@ukr.net> Message-ID: <4687A7D3.6030605@ukr.net> I can't understand, which example of calling current numpy.zeros(...) is incompatible with mine, i.e. which one will yield other results? D. Matthieu Brucher wrote: > > > 2007/7/1, dmitrey >: > > Hi all, > There already was some discussion about zeros() and ones() usage, > but I > still can't understand some things. > 1) currently ones(4,5, **kwargs) just yields error. Why it can't be > translated to ones((4,5), **kwargs) ? > See my example of Ones() below. > ############################## > from numpy import ones > def Ones(*args, **kwargs): > if type(args[0]) in (type(()), type([])): > return ones(*args, **kwargs) > else: return ones(tuple(args), **kwargs) > ############################# > if __name__ == '__main__': > print Ones((2,2)) > print 2*Ones([2,2]) > print 3*Ones(2,2) > print 4*Ones(2,2,2, dtype=float) > print 5*Ones((2,2,2), dtype='float') > print 6*Ones([2,2,2], dtype='int') > print 7*Ones(3,3, dtype=int, order = 'C') > print 8*Ones((3,3), dtype='int') > print 9*Ones(3, dtype='int') > print 10*Ones((3,), dtype='int') > ############################# > > > The first argument is a shape, the second is the type of the data. > Python has no way of knowing that the second argument is part of the > shape and not the type. This way, the arguments are defined correctly, > although you could make a wrapper *args, **kwargs and forcing people > to use explicitely dtype=float, which they won't do, thus leading to a > lot of trouble and errors. > > Matthieu > > ------------------------------------------------------------------------ > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > From wjdandreta at att.net Sun Jul 1 09:22:51 2007 From: wjdandreta at att.net (Bill Dandreta) Date: Sun, 01 Jul 2007 09:22:51 -0400 Subject: [SciPy-user] problems with scipy in gentoo In-Reply-To: <11f4deca0706301729g123b6200xc707b1ba240b40d2@mail.gmail.com> References: <11f4deca0706301729g123b6200xc707b1ba240b40d2@mail.gmail.com> Message-ID: <4687AAAB.4050400@att.net> Angel Yanguas-Gil wrote: > the scipy package in gentoo is currently masked and cannot be > installed. The problem is not in scipy but in one of the dependencies > which, at least in my case, is blas. Does anybody know if it is > possible to install scipy with an alternative library? > Below are notes I wrote to myself to get scipy and matplotlib to install on gentoo: Put these lines in /etc/portage/package.keywords app-admin/eselect-blas ~amd64 app-admin/eselect-lapack ~amd64 dev-python/matplotlib ~amd64 dev-python/numpy ~amd64 dev-python/python-dateutil ~amd64 dev-python/pytz ~amd64 sci-libs/scipy amd64 --- emerge -av blas-reference eselect eselect-blas virtual/blas #scipy requires lapack and numpy, matplotlib requires numpy. #numpy does not require lapack but can use it. #lapack-reference requires a fortran 77 compiler. #gcc-4.X has gfortran, a fortran 95 compiler. #Need to use gcc-3.x emerge -av =sys-devel/gcc-3* #switch compilers: gcc-config -l gcc-config x86_64-pc-linux-gnu-3.4.6 source /etc/profile emerge -av virtual/lapack lapack-reference eselect-lapack #switch compilers back: gcc-config x86_64-pc-linux-gnu-4.1.2 source /etc/profile emerge -av numpy matplotlib scipy I have not gotten eselect-blas or eselect-lapack to work yet (maybe that's why they are masked ) but with blas-reference virtual/blas lapack-reference and virtual/lapack installed, portage is smart enough to use them when installing scipy. I've used blas-atlas and lapack-atlas in the past but since they take so long to compile and I don't do much linear algebra, the reference ones are OK for me. Bill -- Bill wjdandreta at att.net Gentoo Linux 2.6.20-gentoo-r8 Reclaim Your Inbox with http://www.mozilla.org/products/thunderbird/ All things cometh to he who waiteth as long as he who waiteth worketh like hell while he waiteth. From openopt at ukr.net Sun Jul 1 09:46:17 2007 From: openopt at ukr.net (dmitrey) Date: Sun, 01 Jul 2007 16:46:17 +0300 Subject: [SciPy-user] sparse stuff in numpy/scipy Message-ID: <4687B029.9070609@ukr.net> Hi all, I had heard there are some sparse matrix abilities in scipy (btw don't you think it's better to store those one in numpy?). However, neither dir(scipy), nor dir(numpy), nor http://www.scipy.org/Topical_Software doesn't tell me what should I use. Can scipy team just decide, which way sparse stuff will be implemented? Either it will be own numpy/scipy package, or some 3rd-party package will be connected, or maybe one of well-known Fortran/C sparse libraries will be connected? I didn't demand any excellent benchmark results, I need just something working + having status of common scipy/numpy users standard (like matplotlib has), that will be maintained - may be not very intensively, but at least somehow. And, of course, it's highly preferable to have OSI-approved license without copyleft. Regards, D. From matthieu.brucher at gmail.com Sun Jul 1 11:13:17 2007 From: matthieu.brucher at gmail.com (Matthieu Brucher) Date: Sun, 1 Jul 2007 17:13:17 +0200 Subject: [SciPy-user] once again about zeros() and ones() In-Reply-To: <4687A7D3.6030605@ukr.net> References: <46878D13.10505@ukr.net> <4687A7D3.6030605@ukr.net> Message-ID: numpy.zeros((2, 3, 4), float) for instance. Matthieu 2007/7/1, dmitrey : > > I can't understand, which example of calling current numpy.zeros(...) is > incompatible with mine, i.e. which one will yield other results? > D. > > Matthieu Brucher wrote: > > > > > > 2007/7/1, dmitrey >: > > > > Hi all, > > There already was some discussion about zeros() and ones() usage, > > but I > > still can't understand some things. > > 1) currently ones(4,5, **kwargs) just yields error. Why it can't be > > translated to ones((4,5), **kwargs) ? > > See my example of Ones() below. > > ############################## > > from numpy import ones > > def Ones(*args, **kwargs): > > if type(args[0]) in (type(()), type([])): > > return ones(*args, **kwargs) > > else: return ones(tuple(args), **kwargs) > > ############################# > > if __name__ == '__main__': > > print Ones((2,2)) > > print 2*Ones([2,2]) > > print 3*Ones(2,2) > > print 4*Ones(2,2,2, dtype=float) > > print 5*Ones((2,2,2), dtype='float') > > print 6*Ones([2,2,2], dtype='int') > > print 7*Ones(3,3, dtype=int, order = 'C') > > print 8*Ones((3,3), dtype='int') > > print 9*Ones(3, dtype='int') > > print 10*Ones((3,), dtype='int') > > ############################# > > > > > > The first argument is a shape, the second is the type of the data. > > Python has no way of knowing that the second argument is part of the > > shape and not the type. This way, the arguments are defined correctly, > > although you could make a wrapper *args, **kwargs and forcing people > > to use explicitely dtype=float, which they won't do, thus leading to a > > lot of trouble and errors. > > > > Matthieu > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > SciPy-user mailing list > > SciPy-user at scipy.org > > http://projects.scipy.org/mailman/listinfo/scipy-user > > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > -------------- next part -------------- An HTML attachment was scrubbed... URL: From openopt at ukr.net Sun Jul 1 13:12:12 2007 From: openopt at ukr.net (dmitrey) Date: Sun, 01 Jul 2007 20:12:12 +0300 Subject: [SciPy-user] once again about zeros() and ones() In-Reply-To: References: <46878D13.10505@ukr.net> <4687A7D3.6030605@ukr.net> Message-ID: <4687E06C.7040108@ukr.net> Matthieu Brucher wrote: > numpy.zeros((2, 3, 4), float) for instance. > > Matthieu Ok, please try the updated file. Maybe, it could be simplified. D. from numpy import ones def Ones(*args, **kwargs): if type(args[0]) in (type(()), type([])): return ones(*args, **kwargs) else: i, args2 = 1, [args[0]] while i References: <4687B029.9070609@ukr.net> Message-ID: <5486cca80707011118n4beff38ewff50cf0d8cb42730@mail.gmail.com> 2007/7/1, dmitrey : > Hi all, > I had heard there are some sparse matrix abilities in scipy (btw don't > you think it's better to store those one in numpy?). > However, neither dir(scipy), nor dir(numpy), nor > http://www.scipy.org/Topical_Software doesn't tell me what should I use. Have you tried "import scipy.sparse"? Maybe one have to know something before beginning to make requests ;) Best Regards, ~ Antonio From wbaxter at gmail.com Sun Jul 1 15:01:54 2007 From: wbaxter at gmail.com (Bill Baxter) Date: Mon, 2 Jul 2007 04:01:54 +0900 Subject: [SciPy-user] once again about zeros() and ones() In-Reply-To: <4687E06C.7040108@ukr.net> References: <46878D13.10505@ukr.net> <4687A7D3.6030605@ukr.net> <4687E06C.7040108@ukr.net> Message-ID: The main argument against allowing zeros(1,2,3) and zeros([1,2,3]) is that it complicates the implementation too much, and goes against the grain of the language. I argued to allow this sort of thing a while back also, and also posted my own versions of your wrapper function, but now I agree that it isn't really worth it just to avoid typing a few extra parentheses. Problem 1: complexity The code does become more complex, and though the added code is not rocket science, it's still not really trivial to verify by a quick glance if the code is correct or not (as you experienced first hand). It also adds to the testing burden. Every allowable call format really needs to have a unit test and this increases the number of call formats. Problem 2: transparency Argument lists for functions that do this kind of thing all become a very uninformative (*args,**kwds). You can document what the possible call formats are, but it's still not as convenient as being able to tell what the function expects right from the argument list. Moreover it becomes the burden of the docstring to make sure this information is accurate, and it's too easy for docstrings to get out of date with the code. It's harder for the parameter names themselves to become inaccurate. Problem 3: consistency To maintain consistency across the numpy API you really need to do this for ALL functions that take a shape tuple. Just adding it to ones() and zeros() and a few other "common" commands will have users constantly asking themselves "is this a common command? do I need parentheses here?" The way it is, all you have to remember is that if it's a shape, it'll be a tuple argument. Of course you can add your wrapper function to your own customization module and import that instead of numpy. I added mine to my local setup, but in the end pulling in an extra module dependency just isn't really worth the added benefit. I do think it is handy for interactive use, though. So I do load that module in my PYTHONSTARTUP. --bb On 7/2/07, dmitrey wrote: > > > Matthieu Brucher wrote: > > numpy.zeros((2, 3, 4), float) for instance. > > > > Matthieu > Ok, please try the updated file. > Maybe, it could be simplified. > D. > > from numpy import ones > def Ones(*args, **kwargs): > if type(args[0]) in (type(()), type([])): > return ones(*args, **kwargs) > else: > i, args2 = 1, [args[0]] > while i args2.append(args[i]); i+=1 > if len(args[i:]) ==0: return ones(args2, **kwargs) > elif len(args[i:]) ==1: return ones(args2, args[i], **kwargs) > elif len(args[i:]) ==2: return ones(args2, args[i], args[i+1], > **kwargs) > else: print 'ERROR!' > > if __name__ == '__main__': > print Ones((2,2)) > print 2*Ones([2,2]) > print 3*Ones(2,2) > print 4*Ones(2,2,2, dtype=float) > print 5*Ones((2,2,2), dtype='float') > print 6*Ones([2,2,2], dtype='int') > print 7*Ones(3,3, dtype=int, order = 'C') > print 8*Ones((3,3), dtype='int') > print 9*Ones(3, dtype='int') > print 10*Ones((3,), dtype='int') > > print 11*ones((2, 3, 4), float) > print 12*Ones([2, 3, 4], 'float') > print 13*Ones(2, 3, 4, float) > print 14*Ones(2, 3, 4, int, order = 'C') > print 15*Ones(2, 3, 4, float, 'F') FWIW, here's my current muti-arg ones(). Not sure if it's any better/worse than yours, but it's different at least. def ones(shape, *varg, **kwarg): """ones(shape, dtype=, order='C') ones(shape, dtype=int_) returns an array of the given dimensions which is initialized to all ones. """ if not kwarg.has_key('dtype'): kwarg['dtype']=numpy.float64 if hasattr(shape,'__getitem__'): return numpy.ones(shape,*varg,**kwarg) i = 0 for x in varg: if type(x)==types.IntType: i+=1 else: break tshape = (shape,) if i>0: tshape += tuple( varg[0:i] ) args = varg[i:] return numpy.ones(tshape, *args, **kwarg) --bb -------------- next part -------------- An HTML attachment was scrubbed... URL: From openopt at ukr.net Sun Jul 1 15:28:16 2007 From: openopt at ukr.net (dmitrey) Date: Sun, 01 Jul 2007 22:28:16 +0300 Subject: [SciPy-user] sparse stuff in numpy/scipy In-Reply-To: <5486cca80707011118n4beff38ewff50cf0d8cb42730@mail.gmail.com> References: <4687B029.9070609@ukr.net> <5486cca80707011118n4beff38ewff50cf0d8cb42730@mail.gmail.com> Message-ID: <46880050.9080905@ukr.net> Ok, thx, I hadn't noticed that one in dir(scipy) But I still think it's better include to numpy. D. Antonino Ingargiola wrote: > 2007/7/1, dmitrey : > >> Hi all, >> I had heard there are some sparse matrix abilities in scipy (btw don't >> you think it's better to store those one in numpy?). >> However, neither dir(scipy), nor dir(numpy), nor >> http://www.scipy.org/Topical_Software doesn't tell me what should I use. >> > > Have you tried "import scipy.sparse"? > > Maybe one have to know something before beginning to make requests ;) > > > Best Regards, > > ~ Antonio > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > > > > From matthieu.brucher at gmail.com Sun Jul 1 15:40:07 2007 From: matthieu.brucher at gmail.com (Matthieu Brucher) Date: Sun, 1 Jul 2007 21:40:07 +0200 Subject: [SciPy-user] sparse stuff in numpy/scipy In-Reply-To: <46880050.9080905@ukr.net> References: <4687B029.9070609@ukr.net> <5486cca80707011118n4beff38ewff50cf0d8cb42730@mail.gmail.com> <46880050.9080905@ukr.net> Message-ID: Hi, You'd better use pysparse, available on http://pysparse.sf.net It's the up-to-date package :) Matthieu 2007/7/1, dmitrey : > > Ok, thx, I hadn't noticed that one in dir(scipy) > But I still think it's better include to numpy. > D. > > Antonino Ingargiola wrote: > > 2007/7/1, dmitrey : > > > >> Hi all, > >> I had heard there are some sparse matrix abilities in scipy (btw don't > >> you think it's better to store those one in numpy?). > >> However, neither dir(scipy), nor dir(numpy), nor > >> http://www.scipy.org/Topical_Software doesn't tell me what should I > use. > >> > > > > Have you tried "import scipy.sparse"? > > > > Maybe one have to know something before beginning to make requests ;) > > > > > > Best Regards, > > > > ~ Antonio > > _______________________________________________ > > SciPy-user mailing list > > SciPy-user at scipy.org > > http://projects.scipy.org/mailman/listinfo/scipy-user > > > > > > > > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wbaxter at gmail.com Sun Jul 1 15:46:29 2007 From: wbaxter at gmail.com (Bill Baxter) Date: Mon, 2 Jul 2007 04:46:29 +0900 Subject: [SciPy-user] sparse stuff in numpy/scipy In-Reply-To: <5486cca80707011118n4beff38ewff50cf0d8cb42730@mail.gmail.com> References: <4687B029.9070609@ukr.net> <5486cca80707011118n4beff38ewff50cf0d8cb42730@mail.gmail.com> Message-ID: On 7/2/07, Antonino Ingargiola wrote: > > 2007/7/1, dmitrey : > > Hi all, > > I had heard there are some sparse matrix abilities in scipy (btw don't > > you think it's better to store those one in numpy?). > > However, neither dir(scipy), nor dir(numpy), nor > > http://www.scipy.org/Topical_Software doesn't tell me what should I use. > > Have you tried "import scipy.sparse"? Maybe one have to know something before beginning to make requests ;) Dmitrey, you didn't miss it in the dir(). It's not there. Some packages like sparse and linalg that are considered 'extra' aren't loaded by default to cut down on the load times for those that aren't using those packages. Unfortunately these packages don't show up at all under the scipy namespace until you explicitly import them. It is mentioned in the docstring for scipy itself. I think that's the only way to know it's there. Python gurus -- Is there some way that scipy can avoid hiding on-demand packages like that? It would be nice if there were some way to load a light-weight shims that would show up in the dir() and maybe just have a docstring telling you you need to import it explicity to actually load it. No idea if python can do that sort of thing, but it would be nice. Right now google As for scipy.sparse itself, it seems to be in need of some love. I tried it a while back and it seemed that many standard ndarray functions that could be implemented simply weren't. And you can't do any sort of fancy indexing, which is often a key part of assembling the system matrix for sparse linear systems (like those that arise from FEM or finite differences). I think it would be great for Numpy to gain solid sparse support. It makes sense for that to be in the core of a library for numerical computing. But the devs seem to think of numpy more as a strided memory access library than a numerical computing library. And sparse matrices are not strided memory. Hence not Numpy. --bb -------------- next part -------------- An HTML attachment was scrubbed... URL: From edschofield at gmail.com Sun Jul 1 16:09:32 2007 From: edschofield at gmail.com (Ed Schofield) Date: Sun, 1 Jul 2007 21:09:32 +0100 Subject: [SciPy-user] sparse stuff in numpy/scipy In-Reply-To: References: <4687B029.9070609@ukr.net> <5486cca80707011118n4beff38ewff50cf0d8cb42730@mail.gmail.com> <46880050.9080905@ukr.net> Message-ID: <1b5a37350707011309k720c65dev8d559e7ed4aa21b6@mail.gmail.com> On 7/1/07, Matthieu Brucher wrote: > Hi, > > You'd better use pysparse, available on http://pysparse.sf.net > It's the up-to-date package :) Scipy.sparse should be fine for modest needs, and I think it's easier to use than pysparse. It's scipy.sandbox.pysparse that's out of date ... -- Ed From edschofield at gmail.com Sun Jul 1 16:23:34 2007 From: edschofield at gmail.com (Ed Schofield) Date: Sun, 1 Jul 2007 21:23:34 +0100 Subject: [SciPy-user] sparse stuff in numpy/scipy In-Reply-To: References: <4687B029.9070609@ukr.net> <5486cca80707011118n4beff38ewff50cf0d8cb42730@mail.gmail.com> Message-ID: <1b5a37350707011323s3b533fbqc02dd0525f688560@mail.gmail.com> On 7/1/07, Bill Baxter wrote: > > On 7/2/07, Antonino Ingargiola wrote: > > 2007/7/1, dmitrey : > > > Hi all, > > > I had heard there are some sparse matrix abilities in scipy (btw don't > > > you think it's better to store those one in numpy?). > > > However, neither dir(scipy), nor dir(numpy), nor > > > http://www.scipy.org/Topical_Software doesn't tell me > what should I use. > > > > Have you tried "import scipy.sparse"? > ... > As for scipy.sparse itself, it seems to be in need of some love. I tried it > a while back and it seemed that many standard ndarray functions that could > be implemented simply weren't. And you can't do any sort of fancy indexing, > which is often a key part of assembling the system matrix for sparse linear > systems (like those that arise from FEM or finite differences). I added some fancy indexing support to lil_matrix and cs{rc}_matrix a couple of years ago. The code is a nightmare. I couldn't think of a better way to implement fancy indexing for sparse matrices, and still can't. In some of the remaining cases my conclusion was that fancy indexing couldn't be done efficiently at all, and I left these unimplemented (with, hopefully, some useful error messages) rather than implementing a slow, nasty algorithm. But ideas and patches are welcome! ;) -- Ed From strawman at astraw.com Sun Jul 1 16:59:57 2007 From: strawman at astraw.com (Andrew Straw) Date: Sun, 01 Jul 2007 13:59:57 -0700 Subject: [SciPy-user] sparse stuff in numpy/scipy In-Reply-To: References: <4687B029.9070609@ukr.net> <5486cca80707011118n4beff38ewff50cf0d8cb42730@mail.gmail.com> Message-ID: <468815CD.6040606@astraw.com> Bill Baxter wrote: > Python gurus -- Is there some way that scipy can avoid hiding on-demand > packages like that? My recollection is that Pearu(?) had implemented a module auto-loader that essentially did what you're suggesting. It was ripped out in the name of simplification, which IMO is a good thing -- it was non-trivial code, and it had non-obvious effects. For example, I seem to remember tab completion in IPython failing in the 1st attempt then working the 2nd attempt. So, if scipy sub-packages aren't in the scipy docstring, I think that should be fixed. But having a transparent auto-loader is probably something best left behind. (Many of the same arguments for and against ones taking shape without parentheses could be made for this case, too.) -Andrew From barrywark at gmail.com Sun Jul 1 20:50:40 2007 From: barrywark at gmail.com (Barry Wark) Date: Sun, 1 Jul 2007 17:50:40 -0700 Subject: [SciPy-user] Compile fails for r3123 on OS X 10.4 (Intel) In-Reply-To: References: Message-ID: I've attached the output to ticket #449 on the scipy trac, which appears to have reported the same problem. On 6/29/07, Barry Wark wrote: > I've been unable to compile scipy on OS X 10.4 (intel) from the recent > trunk. Scipy built on this machine as of r2708. The output from > > python setup.py build > > is attached. > > I have fftw3 installed via macports (in /opt/local), and it appears > that the build finds it properly, but the build fails with an error: > > building extension "scipy.fftpack._fftpack" sources > target build/src.macosx-10.3-fat-2.5/_fftpackmodule.c does not exist: > Assuming _fftpackmodule.c was generated with "build_src --inplace" command. > error: '_fftpackmodule.c' missing > > I would appreciate any advice or suggestions! > > Thanks, > Barry > > From robert.vergnes at yahoo.fr Mon Jul 2 04:58:05 2007 From: robert.vergnes at yahoo.fr (Robert VERGNES) Date: Mon, 2 Jul 2007 10:58:05 +0200 (CEST) Subject: [SciPy-user] scipy import warning - how to remove Message-ID: <20070702085805.99798.qmail@web27407.mail.ukl.yahoo.com> Hello, each time I do a from scipy import * I get a warning. How to remove it ? This has a bad result on py2exe which seems to believe it is an error and stop starting my application. Any ideas ? (how to force not to importe scipytest ?) Thanx Robert Platform - Windows - Scipy 0.5.2 from scipy import * C:\Python25\lib\site-packages\scipy\misc\__init__.py:25: DeprecationWarning: ScipyTest is now called NumpyTest; please update your code test = ScipyTest().test C:\Python25\lib\site-packages\scipy\linalg\__init__.py:32: DeprecationWarning: ScipyTest is now called NumpyTest; please update your code test = ScipyTest().test C:\Python25\lib\site-packages\scipy\ndimage\__init__.py:40: DeprecationWarning: ScipyTest is now called NumpyTest; please update your code test = ScipyTest().test C:\Python25\lib\site-packages\scipy\sparse\__init__.py:9: DeprecationWarning: ScipyTest is now called NumpyTest; please update your code test = ScipyTest().test C:\Python25\lib\site-packages\scipy\io\__init__.py:20: DeprecationWarning: ScipyTest is now called NumpyTest; please update your code test = ScipyTest().test C:\Python25\lib\site-packages\scipy\lib\__init__.py:5: DeprecationWarning: ScipyTest is now called NumpyTest; please update your code test = ScipyTest().test C:\Python25\lib\site-packages\scipy\linsolve\umfpack\__init__.py:7: DeprecationWarning: ScipyTest is now called NumpyTest; please update your code test = ScipyTest().test C:\Python25\lib\site-packages\scipy\linsolve\__init__.py:13: DeprecationWarning: ScipyTest is now called NumpyTest; please update your code test = ScipyTest().test C:\Python25\lib\site-packages\scipy\interpolate\__init__.py:15: DeprecationWarning: ScipyTest is now called NumpyTest; please update your code test = ScipyTest().test C:\Python25\lib\site-packages\scipy\optimize\__init__.py:17: DeprecationWarning: ScipyTest is now called NumpyTest; please update your code test = ScipyTest().test C:\Python25\lib\site-packages\scipy\special\__init__.py:22: DeprecationWarning: ScipyTest is now called NumpyTest; please update your code test = ScipyTest().test C:\Python25\lib\site-packages\scipy\stats\__init__.py:15: DeprecationWarning: ScipyTest is now called NumpyTest; please update your code test = ScipyTest().test C:\Python25\lib\site-packages\scipy\fftpack\__init__.py:21: DeprecationWarning: ScipyTest is now called NumpyTest; please update your code test = ScipyTest().test C:\Python25\lib\site-packages\scipy\integrate\__init__.py:16: DeprecationWarning: ScipyTest is now called NumpyTest; please update your code test = ScipyTest().test C:\Python25\lib\site-packages\scipy\signal\__init__.py:17: DeprecationWarning: ScipyTest is now called NumpyTest; please update your code test = ScipyTest().test C:\Python25\lib\site-packages\scipy\maxentropy\__init__.py:12: DeprecationWarning: ScipyTest is now called NumpyTest; please update your code test = ScipyTest().test --------------------------------- Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail -------------- next part -------------- An HTML attachment was scrubbed... URL: From david at ar.media.kyoto-u.ac.jp Mon Jul 2 04:50:04 2007 From: david at ar.media.kyoto-u.ac.jp (David Cournapeau) Date: Mon, 02 Jul 2007 17:50:04 +0900 Subject: [SciPy-user] scipy import warning - how to remove In-Reply-To: <20070702085805.99798.qmail@web27407.mail.ukl.yahoo.com> References: <20070702085805.99798.qmail@web27407.mail.ukl.yahoo.com> Message-ID: <4688BC3C.2080506@ar.media.kyoto-u.ac.jp> Robert VERGNES wrote: > Hello, > > each time I do a > from scipy import * > > I get a warning. How to remove it ? > If you can afford it, I would say the easiest is to use svn scipy, where those warnings have been "solved" David From fredmfp at gmail.com Mon Jul 2 07:36:20 2007 From: fredmfp at gmail.com (fred) Date: Mon, 02 Jul 2007 13:36:20 +0200 Subject: [SciPy-user] ndimage.convolve and NaN... Message-ID: <4688E334.1070303@gmail.com> Hi, I want to apply a convolution on a 2D array data, which has a few NaN. Works quite fine, but "holes" (ie NaN) are widened by the convolution. By the way, as edges are processed correctly, I wonder if it could possible to process the holes like the edges, ie without widening them. Any clue are welcome. TIA. Cheers, -- http://scipy.org/FredericPetit From anirudhvij at gmail.com Mon Jul 2 08:47:53 2007 From: anirudhvij at gmail.com (anirudh vij) Date: Mon, 2 Jul 2007 18:17:53 +0530 Subject: [SciPy-user] ndimage.convolve and NaN... In-Reply-To: <4688E334.1070303@gmail.com> References: <4688E334.1070303@gmail.com> Message-ID: <1aa72c450707020547h13e634cegb1f5b551623ad88f@mail.gmail.com> hi fred, this is'nt a solution,but you might try replacing NaN by 0.That would ensure that they have no effect on the surrounding pixels. Edges work fine because of padding. NaN's will always widen "holes".You might work around this,but there's no solution. On 7/2/07, fred wrote: > > Hi, > > I want to apply a convolution on a 2D array data, which has a few NaN. > > Works quite fine, but "holes" (ie NaN) are widened by the convolution. > > By the way, as edges are processed correctly, I wonder if it could > possible to process the holes > like the edges, ie without widening them. > > Any clue are welcome. > > TIA. > > > Cheers, > > -- > http://scipy.org/FredericPetit > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fredmfp at gmail.com Mon Jul 2 09:20:54 2007 From: fredmfp at gmail.com (fred) Date: Mon, 02 Jul 2007 15:20:54 +0200 Subject: [SciPy-user] ndimage.convolve and NaN... In-Reply-To: <1aa72c450707020547h13e634cegb1f5b551623ad88f@mail.gmail.com> References: <4688E334.1070303@gmail.com> <1aa72c450707020547h13e634cegb1f5b551623ad88f@mail.gmail.com> Message-ID: <4688FBB6.5050900@gmail.com> anirudh vij a ?crit : > hi fred, > this is'nt a solution,but you might try replacing NaN by 0.That would > ensure that they have no effect on the surrounding pixels. Hmm, 0 are _real_ values. > Edges work fine because of padding. Yes, but can't we think replace NaN by padding ? -- http://scipy.org/FredericPetit From daniel.wheeler at nist.gov Mon Jul 2 10:27:27 2007 From: daniel.wheeler at nist.gov (Daniel Wheeler) Date: Mon, 2 Jul 2007 14:27:27 +0000 Subject: [SciPy-user] Deleting sandbox.pysparse In-Reply-To: <46853223.1040607@gmail.com> References: <1b5a37350706290911y1a1932b2had40fded7379c9a6@mail.gmail.com> <46853223.1040607@gmail.com> Message-ID: <01315CA4-64FA-4337-84F8-6B2EB87A672A@nist.gov> On Jun 29, 2007, at 4:24 PM, Dominique Orban wrote: > Ed Schofield wrote: >> Hi everyone, >> >> The pysparse snapshot in the sandbox is old and unmaintained, and I'd >> like to remove it from the SVN tree. Is anyone using it? > > There were some messages on this list today from people using > Pysparse. Perhaps > the maintainer of Pysparse (Daniel Wheeler I believe) should be > contacted to see > if he would agree to maintain Pysparse as part of SciPy. I think it > would be a > great feature. As far as my project is concerned, I would prefer that pysparse remains at sourceforge for the time being. Our python code (fipy) relies heavily on pysparse and I believe that it is easier for users to install pysparse as a small package rather than making scipy a requirement. Having said that, I guess it wouldn't be too difficult to move pysparse into the scipy repository and still build separate snapshots of pysparse and upload then to sourceforge for users who only want pysparse. However, I believe that having two incompatible sparse matrix and linalg modules within scipy just causes confusion. Ripping pysparse code may be useful to help improve scipy's solver and linalg modules, but merely maintaining it in the sandbox separate from the scipy solvers (as it has been) just adds to the confusion. Cheers -- Daniel Wheeler From aisaac at american.edu Mon Jul 2 11:14:04 2007 From: aisaac at american.edu (Alan G Isaac) Date: Mon, 2 Jul 2007 11:14:04 -0400 Subject: [SciPy-user] Deleting sandbox.pysparse In-Reply-To: <01315CA4-64FA-4337-84F8-6B2EB87A672A@nist.gov> References: <1b5a37350706290911y1a1932b2had40fded7379c9a6@mail.gmail.com><46853223.1040607@gmail.com><01315CA4-64FA-4337-84F8-6B2EB87A672A@nist.gov> Message-ID: On Mon, 2 Jul 2007, Daniel Wheeler apparently wrote: > As far as my project is concerned, I would prefer that > pysparse remains at sourceforge for the time being. Our > python code (fipy) relies heavily on pysparse and > I believe that it is easier for users to install pysparse > as a small package rather than making scipy a requirement. > Having said that, I guess it wouldn't be too difficult to > move pysparse into the scipy repository and still build > separate snapshots of pysparse and upload then to > sourceforge for users who only want pysparse. If it were a SciKit, users could simply retrieve the package from SVN and install it as usual, without I think adding any SciPy dependency. (I am not trying to say this is the right way to go.) Cheers, Alan Isaac From eike.welk at gmx.net Mon Jul 2 12:22:12 2007 From: eike.welk at gmx.net (Eike Welk) Date: Mon, 02 Jul 2007 18:22:12 +0200 Subject: [SciPy-user] ndimage.convolve and NaN... In-Reply-To: <4688FBB6.5050900@gmail.com> References: <4688E334.1070303@gmail.com> <1aa72c450707020547h13e634cegb1f5b551623ad88f@mail.gmail.com> <4688FBB6.5050900@gmail.com> Message-ID: <200707021822.13019.eike.welk@gmx.net> On Monday 02 July 2007 15:20, fred wrote: > anirudh vij a ?crit : > > hi fred, > > this is'nt a solution,but you might try replacing NaN by 0.That > > would ensure that they have no effect on the surrounding pixels. > > Hmm, 0 are _real_ values. > > > Edges work fine because of padding. > > Yes, but can't we think replace NaN by padding ? Padding with zero is one of the possible padding modes. You could just choose this and say that the results are consistent this way. From a quick look at: http://www.scipy.org/SciPyPackages/Ndimage mode="constant", cval=0 should do it. Maybe you could use morphological operators to get an effect comparable to the nearest mode: 1. replace nan with 0 2. use dilation or closing to copy the neighboring values into the holes. 3. use the results of the morphological operators only where the holes were. Regards, Eike. From robert.kern at gmail.com Mon Jul 2 12:23:45 2007 From: robert.kern at gmail.com (Robert Kern) Date: Mon, 02 Jul 2007 11:23:45 -0500 Subject: [SciPy-user] ndimage.convolve and NaN... In-Reply-To: <4688FBB6.5050900@gmail.com> References: <4688E334.1070303@gmail.com> <1aa72c450707020547h13e634cegb1f5b551623ad88f@mail.gmail.com> <4688FBB6.5050900@gmail.com> Message-ID: <46892691.7080304@gmail.com> fred wrote: > anirudh vij a ?crit : >> hi fred, >> this is'nt a solution,but you might try replacing NaN by 0.That would >> ensure that they have no effect on the surrounding pixels. > Hmm, 0 are _real_ values. Yes, and in the context of a convolution, that's fine. >> Edges work fine because of padding. > Yes, but can't we think replace NaN by padding ? That's what replacing them with 0 does. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From fredmfp at gmail.com Mon Jul 2 13:13:47 2007 From: fredmfp at gmail.com (fred) Date: Mon, 02 Jul 2007 19:13:47 +0200 Subject: [SciPy-user] calling scipy methods from fortran code... Message-ID: <4689324B.2040008@gmail.com> Hi, I have browsed all my docs, but did not find anything relevant to my issue. How can I call scipy methods from a fortran code ? I want to call thereafter my fortran module in my python code. The reason is that I have to call a lot of linalg.solve() inside loops, but: - loops are "forbidden" in python code; - I don't want to write a standalone fortran code to solve the matrices; - I know a little about calling fortran module from python using f2py. But if you have a better idea... Any pointer, clue, docs are welcome. TIA. Cheers, -- http://scipy.org/FredericPetit From gnata at obs.univ-lyon1.fr Mon Jul 2 13:39:58 2007 From: gnata at obs.univ-lyon1.fr (Gnata Xavier) Date: Mon, 02 Jul 2007 19:39:58 +0200 Subject: [SciPy-user] calling scipy methods from fortran code... In-Reply-To: <4689324B.2040008@gmail.com> References: <4689324B.2040008@gmail.com> Message-ID: <4689386E.1070308@obs.univ-lyon1.fr> Hi, "- loops are "forbidden" in python code; " Well ok loop are slow in python but if each llinalg.solve() takes a significant amount of time, you may just want to use a python loop. Anyway, calling scipy methods from fortran looks funny because scipy is based on fortran routines. Maybe you should have a direct look at lapack. Xavier > Hi, > > I have browsed all my docs, but did not find anything relevant to my issue. > > How can I call scipy methods from a fortran code ? > I want to call thereafter my fortran module in my python code. > > The reason is that I have to call a lot of linalg.solve() inside loops, but: > - loops are "forbidden" in python code; > - I don't want to write a standalone fortran code to solve the matrices; > - I know a little about calling fortran module from python using f2py. > But if you have a better idea... > > Any pointer, clue, docs are welcome. > > > TIA. > > > Cheers, > > From fredmfp at gmail.com Mon Jul 2 13:59:09 2007 From: fredmfp at gmail.com (fred) Date: Mon, 02 Jul 2007 19:59:09 +0200 Subject: [SciPy-user] calling scipy methods from fortran code... In-Reply-To: <4689386E.1070308@obs.univ-lyon1.fr> References: <4689324B.2040008@gmail.com> <4689386E.1070308@obs.univ-lyon1.fr> Message-ID: <46893CED.5050302@gmail.com> Gnata Xavier a ?crit : > Hi, > "- loops are "forbidden" in python code; " > Well ok loop are slow in python but if each llinalg.solve() takes a > significant amount of time, you may just want to use a python loop. > Anyway, calling scipy methods from fortran looks funny because scipy is > based on fortran routines. Maybe you should have a direct look at lapack. > Ok, you're right. But I was looking for something easy & ready-to-use, so I thought about scipy calls. Anyway, I prefer to use intel MKL and its symmetric undefinite matrix solver, but this is another story... Cheers, -- http://scipy.org/FredericPetit From peridot.faceted at gmail.com Mon Jul 2 14:33:15 2007 From: peridot.faceted at gmail.com (Anne Archibald) Date: Mon, 2 Jul 2007 14:33:15 -0400 Subject: [SciPy-user] ndimage.convolve and NaN... In-Reply-To: <4688E334.1070303@gmail.com> References: <4688E334.1070303@gmail.com> Message-ID: On 02/07/07, fred wrote: > I want to apply a convolution on a 2D array data, which has a few NaN. > > Works quite fine, but "holes" (ie NaN) are widened by the convolution. This is actually unavoidable. Think of it this way: NaN means "I have no idea what value goes here". If you replaced them by 10^20, the convolution would spread this value over the nearby pixels, so if you don't know what value goes in the NaN, you don't know what value goes in the nearby pixels either. That said, some implementations of convolution widens the NaNs more than is mathematically necessary - if you pad the convolution kernel with zeros, that shouldn't change the result but will (because 0*NaN is NaN). The extreme example of this is when you do the convolution with a single FFT, where your whole array turns into NaNs. > By the way, as edges are processed correctly, I wonder if it could > possible to process the holes > like the edges, ie without widening them. There are technical solutions to this problem, but do think about definitions: mathematically, what do you want to happen? For definiteness, let's suppose your kernel is a Gaussian blur, and you've got a sizable hole full of NaNs. You can treat them as zeros, which will avoid their values being added to the neighbours, but their neighbours will become darker: the blur will distribute their value over nearby pixels, but the hole will not distribute any value into them. If you want the pixels that are unaffected by this darkening, well, that's pretty much exactly the ones that are not turned into NaNs by the current procedure. Anne From peridot.faceted at gmail.com Mon Jul 2 14:43:11 2007 From: peridot.faceted at gmail.com (Anne Archibald) Date: Mon, 2 Jul 2007 14:43:11 -0400 Subject: [SciPy-user] sparse stuff in numpy/scipy In-Reply-To: <46880050.9080905@ukr.net> References: <4687B029.9070609@ukr.net> <5486cca80707011118n4beff38ewff50cf0d8cb42730@mail.gmail.com> <46880050.9080905@ukr.net> Message-ID: On 01/07/07, dmitrey wrote: > Ok, thx, I hadn't noticed that one in dir(scipy) > But I still think it's better include to numpy. Use help(scipy). More generally, for any scipy subpackage, use help(scipy.subpackage) to see what it has and what it does. If anything is missing from these docstrings, file a bug. The fact of dir() not listing all subpackages is more or less a python fact of life, not just a scipy thing. Anne From fie.pye at atlas.cz Mon Jul 2 18:01:56 2007 From: fie.pye at atlas.cz (fie.pye at atlas.cz) Date: Mon, 02 Jul 2007 22:01:56 GMT Subject: [SciPy-user] BLAS, LAPACK, ATLAS libraries. Message-ID: <8767d3c1ef714e7abe38efc2a99fd879@664f5b6eea4d473ba43a5e9884940967> An HTML attachment was scrubbed... URL: From dominique.orban at gmail.com Mon Jul 2 18:01:44 2007 From: dominique.orban at gmail.com (Dominique Orban) Date: Mon, 02 Jul 2007 18:01:44 -0400 Subject: [SciPy-user] calling scipy methods from fortran code... In-Reply-To: <46893CED.5050302@gmail.com> References: <4689324B.2040008@gmail.com> <4689386E.1070308@obs.univ-lyon1.fr> <46893CED.5050302@gmail.com> Message-ID: <468975C8.3080306@gmail.com> fred wrote: > Gnata Xavier a ?crit : >> Hi, >> "- loops are "forbidden" in python code; " >> Well ok loop are slow in python but if each llinalg.solve() takes a >> significant amount of time, you may just want to use a python loop. >> Anyway, calling scipy methods from fortran looks funny because scipy is >> based on fortran routines. Maybe you should have a direct look at lapack. >> > Ok, you're right. > But I was looking for something easy & ready-to-use, so I thought about > scipy calls. > > Anyway, I prefer to use intel MKL and its symmetric undefinite matrix > solver, > but this is another story... Fred, The de-facto standard for solving symmetric indefinite linear systems is a package called MA27 from the Harwell Subroutine Library. This one is available for free for non-commercial and research projects (http://hsl.rl.ac.uk/archive/hslarchive.html). I interfaced MA27 to Python in my NLPy package (http://nlpy.sf.net) and wrote a nice wraparound Python class. There is an example on the NLPy website (in the 'Examples' section). The interface is with the PySparse sparse matrix package. You won't have to call Fortran from Python; I already wrote the interface. Typically, for my optimization applications, I call MA27 many times inside a outer loop. Make sure to use NumPy for all array operations and things should go well. I'm interested in any comments you might have on the package. Dominique From fie.pye at atlas.cz Mon Jul 2 18:37:00 2007 From: fie.pye at atlas.cz (fie.pye at atlas.cz) Date: Mon, 02 Jul 2007 22:37:00 GMT Subject: [SciPy-user] BLAS, LAPACK, ATLAS libraries. Message-ID: Hello. I would like to install NumPy and SciPy modules. I compiled and install BLAS, LAPACK and ATLAS libraries. After installation and importing NumPy I obtained message: >>> import numpy Traceback (most recent call last): File "", line 1, in File "/usr/local/python/python2.5.1/lib/python2.5/site-packages/numpy/__init__.py", line 43, in import linalg File "/usr/local/python/python2.5.1/lib/python2.5/site-packages/numpy/linalg/__init__.py", line 4, in from linalg import * File "/usr/local/python/python2.5.1/lib/python2.5/site-packages/numpy/linalg/linalg.py", line 25, in from numpy.linalg import lapack_lite ImportError: liblapack.so: cannot open shared object file: No such file or directory It seams to me that BLAS and LAPACK installation is OK. PC: 2x Dual-core Opteron 275 OS: CentOS 5.0, kernel 2.6.18-8.1.6.el5 compiler: gcc version 4.2.0, gfortran python2.5.1 numpy-1.0.3-2 scipy-0.5.2 #BLAS installation Make.inc file: SHELL = /bin/sh PLAT = _LINUX FORTRAN = gfortran OPTS = -O3 -fPIC DRVOPTS = $(OPTS) NOOPT = -fPIC LOADER = gfortran LOADOPTS = ARCH = ar ARCHFLAGS= cr RANLIB = ranlib BLASLIB = blas$(PLAT).a # Shared libraries gfortran -shared -Wl,-soname,libblas.so -o libblas.so *.o # LAPACK installation Make.inc PLAT = _LINUX FORTRAN = gfortran OPTS = -funroll-all-loops -O3 -fpic DRVOPTS = $(OPTS) NOOPT = LOADER = gfortran LOADOPTS = TIMER = INT_CPU_TIME ARCH = ar ARCHFLAGS= cr RANLIB = ranlib BLASLIB = /usr/local/lib64/blas/libblas.a LAPACKLIB = lapack$(PLAT).a TMGLIB = tmglib$(PLAT).a EIGSRCLIB = eigsrc$(PLAT).a LINSRCLIB = linsrc$(PLAT).a # Shared libraries gfortran -shared -Wl,-soname,liblapack.so -o liblapack.so *.o # NumPy installation # After ATLAS installation I put all libraries in # /usr/local/lib64/atlas/ BLAS=/usr/local/lib64/atlas/libfblas.a LAPACK=/usr/local/lib64/atlas/libflapack.a ATLAS=/usr/local/lib64/atlas/libatlas.a LD_LIBRARY_PATH=/usr/lib/:/usr/local/lib/:/usr/lib64/:/usr/local/lib64/:/usr/local/lib64/atlas/ export BLAS LAPACK ATLAS LD_LIBRARY_PATH python2.5.1 setup.py build python2.5.1 setup.py install Thank you for help. Fie Pye From fredmfp at gmail.com Mon Jul 2 19:02:10 2007 From: fredmfp at gmail.com (fred) Date: Tue, 03 Jul 2007 01:02:10 +0200 Subject: [SciPy-user] calling scipy methods from fortran code... In-Reply-To: <468975C8.3080306@gmail.com> References: <4689324B.2040008@gmail.com> <4689386E.1070308@obs.univ-lyon1.fr> <46893CED.5050302@gmail.com> <468975C8.3080306@gmail.com> Message-ID: <468983F2.6020502@gmail.com> Dominique Orban a ?crit : > Fred, > > The de-facto standard for solving symmetric indefinite linear systems is a > package called MA27 from the Harwell Subroutine Library. This one is available > for free for non-commercial and research projects > (http://hsl.rl.ac.uk/archive/hslarchive.html). > > I interfaced MA27 to Python in my NLPy package (http://nlpy.sf.net) and wrote a > nice wraparound Python class. There is an example on the NLPy website (in the > 'Examples' section). The interface is with the PySparse sparse matrix package. > You won't have to call Fortran from Python; I already wrote the interface. > > Typically, for my optimization applications, I call MA27 many times inside a > outer loop. Make sure to use NumPy for all array operations and things should go > well. I'm interested in any comments you might have on the package. > Hey, sounds great ! :-))) I will get it a try asap... tomorrow (or better today :-). Thanks. -- http://scipy.org/FredericPetit From david at ar.media.kyoto-u.ac.jp Mon Jul 2 22:10:12 2007 From: david at ar.media.kyoto-u.ac.jp (David Cournapeau) Date: Tue, 03 Jul 2007 11:10:12 +0900 Subject: [SciPy-user] BLAS, LAPACK, ATLAS libraries. In-Reply-To: References: Message-ID: <4689B004.3060900@ar.media.kyoto-u.ac.jp> fie.pye at atlas.cz wrote: > Hello. > > I would like to install NumPy and SciPy modules. I compiled and install BLAS, LAPACK and ATLAS libraries. After installation and importing NumPy I obtained message: > >>>> import numpy > Traceback (most recent call last): > File "", line 1, in > File "/usr/local/python/python2.5.1/lib/python2.5/site-packages/numpy/__init__.py", line 43, in > import linalg > File "/usr/local/python/python2.5.1/lib/python2.5/site-packages/numpy/linalg/__init__.py", line 4, in > from linalg import * > File "/usr/local/python/python2.5.1/lib/python2.5/site-packages/numpy/linalg/linalg.py", line 25, in > from numpy.linalg import lapack_lite > ImportError: liblapack.so: cannot open shared object file: No such file or directory > It seams to me that BLAS and LAPACK installation is OK. Well, it may not be :) If you do (once you exported LD_LIBRARY_PATH): ldd /usr/local/python/python2.5.1/lib/python2.5/site-packages/numpy/linalg/lapack_lite.so What do you get ? The most useful information, actually, is to give us the log of python setup.py config &> log when building numpy and scipy. > > # LAPACK installation Make.inc > PLAT = _LINUX > FORTRAN = gfortran > OPTS = -funroll-all-loops -O3 -fpic > DRVOPTS = $(OPTS) > NOOPT = Here you forgot NOOPT = -fpic. Then, how did you compile atlas ? You should try first without atlas at all, I think: compile blas, lapack, and check that python setup.py config picks up the libraries. As a note, there are source rpms available for blas/lapack/atlas/scipy: the binary rpms do not support CENTOS, but I think building the rpm on CENTOS should not be too difficult. Everything is taken care of in the rpms: options, compatible fortran ABI, full pic version of liblapack to build complete LAPACK based on ATLAS, etc... http://software.opensuse.org/download/home:/ashigabou/ (pick up source rpm for FC 6 or 7, this should be the more similar to centos). If this does not work, I would like to hear about it, David From fredmfp at gmail.com Tue Jul 3 04:35:45 2007 From: fredmfp at gmail.com (fred) Date: Tue, 03 Jul 2007 10:35:45 +0200 Subject: [SciPy-user] calling scipy methods from fortran code... In-Reply-To: <468975C8.3080306@gmail.com> References: <4689324B.2040008@gmail.com> <4689386E.1070308@obs.univ-lyon1.fr> <46893CED.5050302@gmail.com> <468975C8.3080306@gmail.com> Message-ID: <468A0A61.6020303@gmail.com> Dominique Orban a ?crit : > Fred, > > The de-facto standard for solving symmetric indefinite linear systems is a > package called MA27 from the Harwell Subroutine Library. This one is available > for free for non-commercial and research projects > (http://hsl.rl.ac.uk/archive/hslarchive.html). > > Dominique, I read on the nlpy page that MA27 is for sparse matrices. My matrices are not sparse, but dense. Should I still use it ? Cheers, -- http://scipy.org/FredericPetit From nwagner at iam.uni-stuttgart.de Tue Jul 3 05:20:33 2007 From: nwagner at iam.uni-stuttgart.de (Nils Wagner) Date: Tue, 03 Jul 2007 11:20:33 +0200 Subject: [SciPy-user] calling scipy methods from fortran code... In-Reply-To: <468A0A61.6020303@gmail.com> References: <4689324B.2040008@gmail.com> <4689386E.1070308@obs.univ-lyon1.fr> <46893CED.5050302@gmail.com> <468975C8.3080306@gmail.com> <468A0A61.6020303@gmail.com> Message-ID: <468A14E1.4090509@iam.uni-stuttgart.de> fred wrote: > Dominique Orban a ?crit : > >> Fred, >> >> The de-facto standard for solving symmetric indefinite linear systems is a >> package called MA27 from the Harwell Subroutine Library. This one is available >> for free for non-commercial and research projects >> (http://hsl.rl.ac.uk/archive/hslarchive.html). >> >> >> > Dominique, > > I read on the nlpy page that MA27 is for sparse matrices. > My matrices are not sparse, but dense. > Should I still use it ? > > > Cheers, > > In that case I suggest CVXOPT which comes with a LAPACK interface (LDL^T factorization is included as opposed to scipy). See >>> help (cvxopt.lapack.sytrf) >>> help (cvxopt.lapack.sytrs) Nils From fredmfp at gmail.com Tue Jul 3 05:35:39 2007 From: fredmfp at gmail.com (fred) Date: Tue, 03 Jul 2007 11:35:39 +0200 Subject: [SciPy-user] calling scipy methods from fortran code... In-Reply-To: <468A14E1.4090509@iam.uni-stuttgart.de> References: <4689324B.2040008@gmail.com> <4689386E.1070308@obs.univ-lyon1.fr> <46893CED.5050302@gmail.com> <468975C8.3080306@gmail.com> <468A0A61.6020303@gmail.com> <468A14E1.4090509@iam.uni-stuttgart.de> Message-ID: <468A186B.3080207@gmail.com> Nils Wagner a ?crit : > fred wrote: > >> Dominique Orban a ?crit : >> >> >>> Fred, >>> >>> The de-facto standard for solving symmetric indefinite linear systems is a >>> package called MA27 from the Harwell Subroutine Library. This one is available >>> for free for non-commercial and research projects >>> (http://hsl.rl.ac.uk/archive/hslarchive.html). >>> >>> >>> >>> >> Dominique, >> >> I read on the nlpy page that MA27 is for sparse matrices. >> My matrices are not sparse, but dense. >> Should I still use it ? >> >> >> Cheers, >> >> >> > In that case I suggest CVXOPT which comes with a LAPACK interface (LDL^T > factorization is included as opposed to scipy). > See > >>>> help (cvxopt.lapack.sytrf) >>>> help (cvxopt.lapack.sytrs) >>>> Thanks. -- http://scipy.org/FredericPetit From tritemio at gmail.com Tue Jul 3 06:02:42 2007 From: tritemio at gmail.com (Antonino Ingargiola) Date: Tue, 3 Jul 2007 12:02:42 +0200 Subject: [SciPy-user] sparse stuff in numpy/scipy In-Reply-To: References: <4687B029.9070609@ukr.net> <5486cca80707011118n4beff38ewff50cf0d8cb42730@mail.gmail.com> <46880050.9080905@ukr.net> Message-ID: <5486cca80707030302s79e4cf04tc935b77a39dd1556@mail.gmail.com> 2007/7/2, Anne Archibald : > On 01/07/07, dmitrey wrote: > > Ok, thx, I hadn't noticed that one in dir(scipy) > > But I still think it's better include to numpy. > > Use help(scipy). More generally, for any scipy subpackage, use > help(scipy.subpackage) to see what it has and what it does. If > anything is missing from these docstrings, file a bug. > > The fact of dir() not listing all subpackages is more or less a python > fact of life, not just a scipy thing. I agree. I usually find very handy to look at the documentation using pydoc. It creates html pages from the docstring on-fly (when queried), its really amazing. Here you can find a quick explanation how to use it: http://pyplotsuite.sourceforge.net/NumericalPythonHowto.html Regards, ~ Antonio From dominique.orban at gmail.com Tue Jul 3 11:14:07 2007 From: dominique.orban at gmail.com (Dominique Orban) Date: Tue, 03 Jul 2007 11:14:07 -0400 Subject: [SciPy-user] calling scipy methods from fortran code... In-Reply-To: <468A0A61.6020303@gmail.com> References: <4689324B.2040008@gmail.com> <4689386E.1070308@obs.univ-lyon1.fr> <46893CED.5050302@gmail.com> <468975C8.3080306@gmail.com> <468A0A61.6020303@gmail.com> Message-ID: <468A67BF.7090804@gmail.com> fred wrote: > Dominique Orban a ?crit : >> Fred, >> >> The de-facto standard for solving symmetric indefinite linear systems is a >> package called MA27 from the Harwell Subroutine Library. This one is available >> for free for non-commercial and research projects >> (http://hsl.rl.ac.uk/archive/hslarchive.html). >> >> > Dominique, > > I read on the nlpy page that MA27 is for sparse matrices. > My matrices are not sparse, but dense. > Should I still use it ? If they are not too large, you certainly can use it. Otherwise, you can try Lapack routines that perform a Bunch-Parlett (or Bunch-Kaufmann) factorization. That factorization is often written L B L^T, by contrast with L D L^T which is the Cholesky factorization. The differences between the two are that 1) there is no sense trying to compute the L D L^T factorization of a symmetric indefinite matrix. This Cholesky factorization is only defined for symmetric positive definite matrices. 2) The B differs from the D in that it is block diagonal with blocks of order at most 2 along the diagonal. Dominique From fredmfp at gmail.com Tue Jul 3 12:20:29 2007 From: fredmfp at gmail.com (fred) Date: Tue, 03 Jul 2007 18:20:29 +0200 Subject: [SciPy-user] calling scipy methods from fortran code... In-Reply-To: <468A67BF.7090804@gmail.com> References: <4689324B.2040008@gmail.com> <4689386E.1070308@obs.univ-lyon1.fr> <46893CED.5050302@gmail.com> <468975C8.3080306@gmail.com> <468A0A61.6020303@gmail.com> <468A67BF.7090804@gmail.com> Message-ID: <468A774D.9080403@gmail.com> Dominique Orban a ?crit : > fred wrote: > >> Dominique Orban a ??crit : >> >>> Fred, >>> >>> The de-facto standard for solving symmetric indefinite linear systems is a >>> package called MA27 from the Harwell Subroutine Library. This one is available >>> for free for non-commercial and research projects >>> (http://hsl.rl.ac.uk/archive/hslarchive.html). >>> >>> >>> >> Dominique, >> >> I read on the nlpy page that MA27 is for sparse matrices. >> My matrices are not sparse, but dense. >> Should I still use it ? >> > > If they are not too large, you certainly can use it. Otherwise, you can try > Lapack routines that perform a Bunch-Parlett (or Bunch-Kaufmann) factorization. > That factorization is often written L B L^T, by contrast with L D L^T which is > the Cholesky factorization. The differences between the two are that > > 1) there is no sense trying to compute the L D L^T factorization of a symmetric > indefinite matrix. This Cholesky factorization is only defined for symmetric > positive definite matrices. > Yes, I know that. I have initiated a thread about it a few months ago. The Cholesky factorization is faster (~<2 times) than the LU, but does not work for my symmetric indefinite matrices. So I kept my code with the LU version, until now. The cvxopt is faster than LU (2 times) and work fine on my matrices. So I'm quite happy. Thanks to Nils. Anyway, I got an issue. cvxopt.lapack.sytr? only work on float64 matrices. Mine are generally float32. So I got a try with foo = asarray(self.KM, dtype='d') KM = matrix(foo) but it complains about my matrices are not contiguous. What's wrong ? -- http://scipy.org/FredericPetit From barrywark at gmail.com Tue Jul 3 15:54:28 2007 From: barrywark at gmail.com (Barry Wark) Date: Tue, 3 Jul 2007 12:54:28 -0700 Subject: [SciPy-user] Compile fails for r3123 on OS X 10.4 (Intel) In-Reply-To: References: Message-ID: I know this isn't anyone's top priority on the list, but I'd really appreciate a pointer (or a dope slap): I've successfully compiled previous revisions ( from numpy.distutils.misc_util import get_path, Configuration, dot_join ImportError: cannot import name get_path I assume this is because numpy has been updated and removed get_path. Besides ticket #449, I haven't been able to find mention of the problem described earlier in the thread in the list archives or online. Obviously, not many other people are having this problem, so I assume it's a stupid mistake on my part. It's holding up deployment of software to our lab, however, so I would be eternally grateful for any help. Thanks, Barry On 7/1/07, Barry Wark wrote: > I've attached the output to ticket #449 on the scipy trac, which > appears to have reported the same problem. > > On 6/29/07, Barry Wark wrote: > > I've been unable to compile scipy on OS X 10.4 (intel) from the recent > > trunk. Scipy built on this machine as of r2708. The output from > > > > python setup.py build > > > > is attached. > > > > I have fftw3 installed via macports (in /opt/local), and it appears > > that the build finds it properly, but the build fails with an error: > > > > building extension "scipy.fftpack._fftpack" sources > > target build/src.macosx-10.3-fat-2.5/_fftpackmodule.c does not exist: > > Assuming _fftpackmodule.c was generated with "build_src --inplace" command. > > error: '_fftpackmodule.c' missing > > > > I would appreciate any advice or suggestions! > > > > Thanks, > > Barry > > > > > From robert.kern at gmail.com Tue Jul 3 16:03:16 2007 From: robert.kern at gmail.com (Robert Kern) Date: Tue, 03 Jul 2007 15:03:16 -0500 Subject: [SciPy-user] Compile fails for r3123 on OS X 10.4 (Intel) In-Reply-To: References: Message-ID: <468AAB84.4080004@gmail.com> Barry Wark wrote: > I know this isn't anyone's top priority on the list, but I'd really > appreciate a pointer (or a dope slap): > > I've successfully compiled previous revisions ( this system (OSX Intel) before. However, after checking out an older > version, the build fails with > > File "Lib/odr/setup.py", line 9, in > from numpy.distutils.misc_util import get_path, Configuration, dot_join > ImportError: cannot import name get_path > > I assume this is because numpy has been updated and removed get_path. > > Besides ticket #449, I haven't been able to find mention of the > problem described earlier in the thread in the list archives or > online. Obviously, not many other people are having this problem, so I > assume it's a stupid mistake on my part. It's holding up deployment of > software to our lab, however, so I would be eternally grateful for any > help. No, it was a stupid mistake on my part. I needed to refactor that bit of code in numpy.distutils, and I thought the function was only used internally. The current SVN of scipy/odr/setup.py uses the correct idiom for building with numpy.distutils. While I shouldn't have removed get_path(), it is a holdover from the days of scipy_distutils. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From cookedm at physics.mcmaster.ca Tue Jul 3 16:04:23 2007 From: cookedm at physics.mcmaster.ca (David M. Cooke) Date: Tue, 3 Jul 2007 16:04:23 -0400 Subject: [SciPy-user] Compile fails for r3123 on OS X 10.4 (Intel) In-Reply-To: References: Message-ID: <20070703200423.GA5477@arbutus.physics.mcmaster.ca> On Fri, Jun 29, 2007 at 10:33:24AM -0700, Barry Wark wrote: > I've been unable to compile scipy on OS X 10.4 (intel) from the recent > trunk. Scipy built on this machine as of r2708. The output from > > python setup.py build > > is attached. > > I have fftw3 installed via macports (in /opt/local), and it appears > that the build finds it properly, but the build fails with an error: > > building extension "scipy.fftpack._fftpack" sources > target build/src.macosx-10.3-fat-2.5/_fftpackmodule.c does not exist: > Assuming _fftpackmodule.c was generated with "build_src --inplace" > command. > error: '_fftpackmodule.c' missing > > I would appreciate any advice or suggestions! I've got pretty much the same setup, and no problems. Did you delete the build directory first (rm -rf build)? -- |>|\/|< /--------------------------------------------------------------------------\ |David M. Cooke http://arbutus.physics.mcmaster.ca/dmc/ |cookedm at physics.mcmaster.ca From barrywark at gmail.com Tue Jul 3 16:14:12 2007 From: barrywark at gmail.com (Barry Wark) Date: Tue, 3 Jul 2007 13:14:12 -0700 Subject: [SciPy-user] Compile fails for r3123 on OS X 10.4 (Intel) In-Reply-To: <20070703200423.GA5477@arbutus.physics.mcmaster.ca> References: <20070703200423.GA5477@arbutus.physics.mcmaster.ca> Message-ID: Yes, I'm using a clean checkout from SVN. Just to double check against your setup, I'm using fftw-3 installed via macports as my fftw library Barry On 7/3/07, David M. Cooke wrote: > On Fri, Jun 29, 2007 at 10:33:24AM -0700, Barry Wark wrote: > > I've been unable to compile scipy on OS X 10.4 (intel) from the recent > > trunk. Scipy built on this machine as of r2708. The output from > > > > python setup.py build > > > > is attached. > > > > I have fftw3 installed via macports (in /opt/local), and it appears > > that the build finds it properly, but the build fails with an error: > > > > building extension "scipy.fftpack._fftpack" sources > > target build/src.macosx-10.3-fat-2.5/_fftpackmodule.c does not exist: > > Assuming _fftpackmodule.c was generated with "build_src --inplace" > > command. > > error: '_fftpackmodule.c' missing > > > > I would appreciate any advice or suggestions! > > I've got pretty much the same setup, and no problems. Did you delete the > build directory first (rm -rf build)? > > -- > |>|\/|< > /--------------------------------------------------------------------------\ > |David M. Cooke http://arbutus.physics.mcmaster.ca/dmc/ > |cookedm at physics.mcmaster.ca > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > From lorrmann at physik.uni-wuerzburg.de Tue Jul 3 18:18:23 2007 From: lorrmann at physik.uni-wuerzburg.de (Volker Lorrmann) Date: Wed, 04 Jul 2007 00:18:23 +0200 Subject: [SciPy-user] optimization question Message-ID: <468ACB2F.8030309@physik.uni-wuerzburg.de> Hello list, i wanna fit a function to some measured datapoints T_m(x_i). The function i wanna fit is something like that,T_fit(a,b,c,d,x_i), where a,b,c are the fitting-parameters. Fitting this with scipy.optimize.leastsq would be easy (btw. is there anoterh way to fit this, like fmin, fmin_powell, ...?). The problem is, that a is a and b are _fixed_ scalar parameters. But c and d are variables, that depend on x_i, c=c(x_i) and d=d(x_i). And in fact, c(x_i) and d(x_i) are the variables i?m mainly interested in. (a and b are nearly exactly known, so i can reduce the fitting_function to T(c(x_i),d(x_i),x_i)). I hope you can see what my problem is, its late here and i?m tired, so maybe i haven?t explained very well. Maybe the following will help --- \ 2 minimize | {T_meas(x_i) - T(a,b,c(x_i),d(x_i),x_i)} / --- i is what i?m lookig for. Is this possible with scipy.optimize.leastsq, or should i use some other routine therefor? And if so, which on? Thanks so far Volker From shao at msg.ucsf.edu Tue Jul 3 18:34:33 2007 From: shao at msg.ucsf.edu (Lin Shao) Date: Tue, 3 Jul 2007 15:34:33 -0700 Subject: [SciPy-user] optimization question In-Reply-To: <468ACB2F.8030309@physik.uni-wuerzburg.de> References: <468ACB2F.8030309@physik.uni-wuerzburg.de> Message-ID: Can't you express c(x) and d(x) as functions in terms of x? If so, then I assume you'll get a bunch of scalar parameters c1,c2... for c(x) and d1,d2,... for d(x). Then what you need is to fit (a,b,c1,c2...,d1,d2...) using your measured data and known x_i. scipy.optimize.leastsq is a good choice. But for some reason, the Jacobian matrix has to be "column major" (each column represents one observation point) and set col_deriv to 1. Otherwise it won't work. I reported this bug weeks ago, but nobody seems to have answered with authority that if it's a bug or not. From robert.kern at gmail.com Tue Jul 3 18:35:18 2007 From: robert.kern at gmail.com (Robert Kern) Date: Tue, 03 Jul 2007 17:35:18 -0500 Subject: [SciPy-user] optimization question In-Reply-To: <468ACB2F.8030309@physik.uni-wuerzburg.de> References: <468ACB2F.8030309@physik.uni-wuerzburg.de> Message-ID: <468ACF26.8090306@gmail.com> Volker Lorrmann wrote: > Hello list, > > i wanna fit a function to some measured datapoints T_m(x_i). The > function i wanna fit is something like that,T_fit(a,b,c,d,x_i), where > a,b,c are the fitting-parameters. Fitting this with > scipy.optimize.leastsq would be easy (btw. is there anoterh way to fit > this, like fmin, fmin_powell, ...?). All leastsq() really adds to fmin*() is that you return the residuals instead of summing up the squares of the residuals. You can do that manually and use whichever minimizer you need. > The problem is, that a is a and b are _fixed_ scalar parameters. But c > and d are variables, that depend on x_i, c=c(x_i) and d=d(x_i). And in > fact, c(x_i) and d(x_i) are the variables i?m mainly interested in. (a > and b are nearly exactly known, so i can reduce the fitting_function to > T(c(x_i),d(x_i),x_i)). Well, that's a big problem. You have twice as many variables to fit as you have datapoints. There are possibly an infinite number of solutions that exactly(!) fit your data. Is it possible that you can reparameterize your problem? Perhaps c(.) and d(.) could be formulated as functions that depend on some small number of parameters besides x_i in order to smooth things out. You would then do least-squares to optimize those parameters. You might also be interested in some non-parametric inverse theory techniques, but that requires a reasonably substantial investment in reading up on the topic and examining your model. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From cookedm at physics.mcmaster.ca Tue Jul 3 19:36:37 2007 From: cookedm at physics.mcmaster.ca (David M. Cooke) Date: Tue, 3 Jul 2007 19:36:37 -0400 Subject: [SciPy-user] Compile fails for r3123 on OS X 10.4 (Intel) In-Reply-To: References: <20070703200423.GA5477@arbutus.physics.mcmaster.ca> Message-ID: <20070703233637.GA9394@arbutus.physics.mcmaster.ca> On Tue, Jul 03, 2007 at 01:14:12PM -0700, Barry Wark wrote: > Yes, I'm using a clean checkout from SVN. Just to double check against > your setup, I'm using fftw-3 installed via macports as my fftw library > > Barry Still don't have your problem. Scipy is r3143, numpy is r3880. OS X 10.4.10 (Intel MacBook), Python 2.5 and 2.4. I'm using gfortran from macports, but that shouldn't affect this. One thing I can think of is checking your numpy install, as the _fortranmodule.c is generated by f2py. (in general, the latest svn scipy usually needs a recent svn numpy) > On 7/3/07, David M. Cooke wrote: > > On Fri, Jun 29, 2007 at 10:33:24AM -0700, Barry Wark wrote: > > > I've been unable to compile scipy on OS X 10.4 (intel) from the recent > > > trunk. Scipy built on this machine as of r2708. The output from > > > > > > python setup.py build > > > > > > is attached. > > > > > > I have fftw3 installed via macports (in /opt/local), and it appears > > > that the build finds it properly, but the build fails with an error: > > > > > > building extension "scipy.fftpack._fftpack" sources > > > target build/src.macosx-10.3-fat-2.5/_fftpackmodule.c does not exist: > > > Assuming _fftpackmodule.c was generated with "build_src --inplace" > > > command. > > > error: '_fftpackmodule.c' missing > > > > > > I would appreciate any advice or suggestions! > > > > I've got pretty much the same setup, and no problems. Did you delete the > > build directory first (rm -rf build)? > > > > -- > > |>|\/|< > > /--------------------------------------------------------------------------\ > > |David M. Cooke http://arbutus.physics.mcmaster.ca/dmc/ > > |cookedm at physics.mcmaster.ca > > _______________________________________________ > > SciPy-user mailing list > > SciPy-user at scipy.org > > http://projects.scipy.org/mailman/listinfo/scipy-user > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > -- |>|\/|< /--------------------------------------------------------------------------\ |David M. Cooke http://arbutus.physics.mcmaster.ca/dmc/ |cookedm at physics.mcmaster.ca From matthieu.brucher at gmail.com Wed Jul 4 01:51:21 2007 From: matthieu.brucher at gmail.com (Matthieu Brucher) Date: Wed, 4 Jul 2007 07:51:21 +0200 Subject: [SciPy-user] optimization question In-Reply-To: <468ACB2F.8030309@physik.uni-wuerzburg.de> References: <468ACB2F.8030309@physik.uni-wuerzburg.de> Message-ID: > > i wanna fit a function to some measured datapoints T_m(x_i). The > function i wanna fit is something like that,T_fit(a,b,c,d,x_i), where > a,b,c are the fitting-parameters. Fitting this with > scipy.optimize.leastsq would be easy (btw. is there anoterh way to fit > this, like fmin, fmin_powell, ...?). Yes, you can define a cost function and use it fmin, ... or the generic optimizers (although such helper functions will be made in the near future) The problem is, that a is a and b are _fixed_ scalar parameters. But c > and d are variables, that depend on x_i, c=c(x_i) and d=d(x_i). And in > fact, c(x_i) and d(x_i) are the variables i?m mainly interested in. (a > and b are nearly exactly known, so i can reduce the fitting_function to > T(c(x_i),d(x_i),x_i)). Then it's a vector of parameters you have to fit ? Create your own cost function, it's probably the easiest. Matthieu -------------- next part -------------- An HTML attachment was scrubbed... URL: From lorrmann at physik.uni-wuerzburg.de Wed Jul 4 02:51:55 2007 From: lorrmann at physik.uni-wuerzburg.de (Volker Lorrmann) Date: Wed, 04 Jul 2007 08:51:55 +0200 Subject: [SciPy-user] optimization question Message-ID: <468B438B.4080303@physik.uni-wuerzburg.de> > Yes, you can define a cost function and use it fmin, ... or the generic > optimizers (although such helper functions will be made in the near future) > > Then it's a vector of parameters you have to fit ? Create your own cost > function, it's probably the easiest. > Matthieu Hi Matthieu, thanks for your answer, but can u be little bit more exactly please. What do you mean by a costfunction? Maybe you can give a short example, if its not to much work. volker From robert.kern at gmail.com Wed Jul 4 02:58:22 2007 From: robert.kern at gmail.com (Robert Kern) Date: Wed, 04 Jul 2007 01:58:22 -0500 Subject: [SciPy-user] optimization question In-Reply-To: <468B438B.4080303@physik.uni-wuerzburg.de> References: <468B438B.4080303@physik.uni-wuerzburg.de> Message-ID: <468B450E.6010604@gmail.com> Volker Lorrmann wrote: >> Yes, you can define a cost function and use it fmin, ... or the generic >> optimizers (although such helper functions will be made in the near future) >> >> Then it's a vector of parameters you have to fit ? Create your own cost >> function, it's probably the easiest. > >> Matthieu > > Hi Matthieu, > > thanks for your answer, but can u be little bit more exactly please. What do you mean by a costfunction? > Maybe you can give a short example, if its not to much work. --- \ 2 | {T_meas(x_i) - T(a,b,c(x_i),d(x_i),x_i)} / --- i -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From gael.varoquaux at normalesup.org Wed Jul 4 03:01:10 2007 From: gael.varoquaux at normalesup.org (Gael Varoquaux) Date: Wed, 4 Jul 2007 09:01:10 +0200 Subject: [SciPy-user] optimization question In-Reply-To: <468B438B.4080303@physik.uni-wuerzburg.de> References: <468B438B.4080303@physik.uni-wuerzburg.de> Message-ID: <20070704070110.GA28716@clipper.ens.fr> On Wed, Jul 04, 2007 at 08:51:55AM +0200, Volker Lorrmann wrote: > thanks for your answer, but can u be little bit more exactly please. What do you mean by a costfunction? > Maybe you can give a short example, if its not to much work. http://scipy.org/Cookbook/FittingData HTH, Ga?l From zunzun at zunzun.com Wed Jul 4 03:19:52 2007 From: zunzun at zunzun.com (zunzun at zunzun.com) Date: Wed, 4 Jul 2007 03:19:52 -0400 Subject: [SciPy-user] optimization question In-Reply-To: <468B438B.4080303@physik.uni-wuerzburg.de> References: <468B438B.4080303@physik.uni-wuerzburg.de> Message-ID: <20070704071952.GB1572@zunzun.com> On Wed, Jul 04, 2007 at 08:51:55AM +0200, Volker Lorrmann wrote: > > What do you mean by a costfunction? If I want to minimize the sum of squared errors for some data as inputs to an equation, my "cost function" will calculate the sum of square derrors. If I want to minimize the inverse sum of absolute errors for the same data and equation, my "cost function" would calculate that instead. The cost function calculates whatever it is your minimizer will be minimizing. > Maybe you can give a short example, if its not to much work. Some badly written pseudocode to illustrate; First define a cost function, this returns a value to be minimized - here the sum of squared error. function SSQ_cost_func(data, equation_function) { calculate and return the sum of squared error } now pass this to the minimizer: minimize(SSQ_cost_func, data, equation_function) BTW, don't people on this mailing list ever sleep? It's 2:00 AM here in Birmingham, Alabama. James Phillips http://zunzun.com From lorrmann at physik.uni-wuerzburg.de Wed Jul 4 03:20:16 2007 From: lorrmann at physik.uni-wuerzburg.de (Volker Lorrmann) Date: Wed, 04 Jul 2007 09:20:16 +0200 Subject: [SciPy-user] optimization question Message-ID: <468B4A30.2060408@physik.uni-wuerzburg.de> Hi Robert, > All leastsq() really adds to fmin*() is that you return the residuals > instead of summing up the squares of the residuals. You can do that > manually and use whichever minimizer you need. Can you give me a short example, how to do so? I?ve asked this also Matthieu, so if he will answer, you probably don?t need to. But two examples would be better than one ;) > Well, that's a big problem. You have twice as many variables to fit as > you have datapoints. There are possibly an infinite number of > solutions that exactly(!) fit your data. I see, indeed i need as many datapoints (equations) as variables, to solve the problem. > Is it possible that you can reparameterize your problem? Perhaps c(.) > and d(.) > could be formulated as functions that depend on some small number of > parameters > besides x_i in order to smooth things out. You would then do > least-squares to optimize those parameters. I think i can do that. There are some physical constraints for c(x_i) and d(x_i), which should make it possible to reparameterize c an d. volker From openopt at ukr.net Wed Jul 4 03:28:44 2007 From: openopt at ukr.net (dmitrey) Date: Wed, 04 Jul 2007 10:28:44 +0300 Subject: [SciPy-user] optimization question In-Reply-To: <468B4A30.2060408@physik.uni-wuerzburg.de> References: <468B4A30.2060408@physik.uni-wuerzburg.de> Message-ID: <468B4C2C.8050402@ukr.net> Volker Lorrmann wrote: > Hi Robert, > > > All leastsq() really adds to fmin*() is that you return the residuals > > instead of summing up the squares of the residuals. You can do that > > manually and use whichever minimizer you need. > > Can you give me a short example, how to do so? I?ve asked this also > Matthieu, so if he will answer, you probably don?t need to. But two > examples would be better than one ;) > > > Well, that's a big problem. You have twice as many variables to fit > as > you have datapoints. There are possibly an infinite number of > > solutions that exactly(!) fit your data. > > I see, indeed i need as many datapoints (equations) as variables, to > solve the problem. > > > Is it possible that you can reparameterize your problem? Perhaps c(.) > > and d(.) > > could be formulated as functions that depend on some small number of > > parameters > > besides x_i in order to smooth things out. You would then do > > least-squares to optimize those parameters. > > I think i can do that. There are some physical constraints for c(x_i) > and d(x_i), which should make it possible to reparameterize c an d. > > volker > > as one more solution, for constrained NLP problem you can try "lincher" solver from scikits.openopt toolkit (free, BSD license). There is also a ralg solver that is good for both NLP and non-smooth problems, but it's currently suitable for unconstrained problems only. See example of lincher usage here: http://openopt.blogspot.com/2007/06/constrained-nlp-example-with-gradients.html >BTW, don't people on this mailing list ever sleep? >It's 2:00 AM here in Birmingham, Alabama. > James Phillips > http://zunzun.com Here in Ukraine it's 10.27AM, time to work :) Regards, Dmitrey. From david at ar.media.kyoto-u.ac.jp Wed Jul 4 03:26:18 2007 From: david at ar.media.kyoto-u.ac.jp (David Cournapeau) Date: Wed, 04 Jul 2007 16:26:18 +0900 Subject: [SciPy-user] optimization question In-Reply-To: <20070704071952.GB1572@zunzun.com> References: <468B438B.4080303@physik.uni-wuerzburg.de> <20070704071952.GB1572@zunzun.com> Message-ID: <468B4B9A.1010705@ar.media.kyoto-u.ac.jp> zunzun at zunzun.com wrote: > BTW, don't people on this mailing list ever sleep? > It's 2:00 AM here in Birmingham, Alabama. Well, it is 4 p.m here in Japan :) David From matthieu.brucher at gmail.com Wed Jul 4 03:40:39 2007 From: matthieu.brucher at gmail.com (Matthieu Brucher) Date: Wed, 4 Jul 2007 09:40:39 +0200 Subject: [SciPy-user] optimization question In-Reply-To: <20070704071952.GB1572@zunzun.com> References: <468B438B.4080303@physik.uni-wuerzburg.de> <20070704071952.GB1572@zunzun.com> Message-ID: > > BTW, don't people on this mailing list ever sleep? > It's 2:00 AM here in Birmingham, Alabama. > It's 09:40 AM in France ;) Matthieu -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthieu.brucher at gmail.com Wed Jul 4 03:48:03 2007 From: matthieu.brucher at gmail.com (Matthieu Brucher) Date: Wed, 4 Jul 2007 09:48:03 +0200 Subject: [SciPy-user] optimization question In-Reply-To: <468B4A30.2060408@physik.uni-wuerzburg.de> References: <468B4A30.2060408@physik.uni-wuerzburg.de> Message-ID: 2007/7/4, Volker Lorrmann : > > Hi Robert, > > > All leastsq() really adds to fmin*() is that you return the residuals > > instead of summing up the squares of the residuals. You can do that > > manually and use whichever minimizer you need. > > Can you give me a short example, how to do so? I?ve asked this also > Matthieu, so if he will answer, you probably don?t need to. But two > examples would be better than one ;) My view is heavily influenced by my own optimizers, but here is the thing : you have points y (possibly multidimensional) and points x (multidimensional too) and a fitting function f(x, parameters) You construct a new class (for instance) that take x and y as parameters : class cost_fun(object: def __init__(self, x, y): self.x = x self.y = y and you define a call method that will be used by fmin, for instance : def __call__(self, parameters): cost = 0 for (xi, yi) in (x, y): cost += numpy.sum((yi - f(xi, parameters))**2) # you can use some parameters instead of all parameters, just iterate over the part you need return cost And voil?, your basic cost function is created. Here a quadratic cost is used (this is what leastsq may do), but you can use a robust cost instead. I hope I was clear. Matthieu -------------- next part -------------- An HTML attachment was scrubbed... URL: From subscriptions at smart-knowhow.de Wed Jul 4 05:23:04 2007 From: subscriptions at smart-knowhow.de (Andrew Smart) Date: Wed, 4 Jul 2007 11:23:04 +0200 Subject: [SciPy-user] How to "move" data within an array Message-ID: <0ML21M-1I614g2fqj-0000xv@mrelayeu.kundenserver.de> Hi folks, I'm using numpy arrays for storing data which is generated within an engine. I'm using the topmost dimension as time axis: every row represents a full set of data created by the engine while one round. Say: i have an array for storing prices (e.g. 10 different prices are generated within one engine round). I'm storing/using the last 5 rounds, so I get an array with the dimensions (5,10). If the engine runs longer than 5 rounds I have to "remove" the oldest record and move the younger records one position back. Since I've a lot of such arrays I would like to use the most efficient method avaiable in numpy. On a pure memory-orientated view this would be just to copy ("move") the memory blocks from the younger 4 rows one row further, thus having the first row for the new data. In the C API I see some functions like copyswap() and memmove() which indicate that such operations are possible at the C API level. But I'm not sure the correct approach on the Python level. Taking slices may be one options - but the new slice will then occupy new memory, causing memory fragmentation... Looping over all data items, all rows is time consuming and surely wasting resources... Any pointers/ideas? Thanks, Andrew From lbolla at gmail.com Wed Jul 4 05:33:29 2007 From: lbolla at gmail.com (lorenzo bolla) Date: Wed, 4 Jul 2007 11:33:29 +0200 Subject: [SciPy-user] How to "move" data within an array In-Reply-To: <0ML21M-1I614g2fqj-0000xv@mrelayeu.kundenserver.de> References: <0ML21M-1I614g2fqj-0000xv@mrelayeu.kundenserver.de> Message-ID: <80c99e790707040233s3593f4d9g769d9814e7366dcb@mail.gmail.com> why not using a list of 1D arrays? but why do you want to physically move your rows? you can simply use an integer as a pointer to the row of the "current time": then you update this integer every timestep (+1), taking its "modulo 5" to cycle through the rows. my two cents. lorenzo. On 7/4/07, Andrew Smart wrote: > > Hi folks, > > I'm using numpy arrays for storing data which is generated within an > engine. > I'm using the topmost dimension as time axis: every row represents a full > set of data created by the engine while one round. > > Say: i have an array for storing prices (e.g. 10 different prices are > generated within one engine round). I'm storing/using the last 5 rounds, > so > I get an array with the dimensions (5,10). > > If the engine runs longer than 5 rounds I have to "remove" the oldest > record > and move the younger records one position back. > > Since I've a lot of such arrays I would like to use the most efficient > method avaiable in numpy. On a pure memory-orientated view this would be > just to copy ("move") the memory blocks from the younger 4 rows one row > further, thus having the first row for the new data. > > In the C API I see some functions like copyswap() and memmove() which > indicate that such operations are possible at the C API level. But I'm not > sure the correct approach on the Python level. > > Taking slices may be one options - but the new slice will then occupy new > memory, causing memory fragmentation... > Looping over all data items, all rows is time consuming and surely wasting > resources... > > Any pointers/ideas? > > Thanks, > Andrew > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > -------------- next part -------------- An HTML attachment was scrubbed... URL: From subscriptions at smart-knowhow.de Wed Jul 4 05:44:59 2007 From: subscriptions at smart-knowhow.de (Andrew Smart) Date: Wed, 4 Jul 2007 11:44:59 +0200 Subject: [SciPy-user] How to "move" data within an array In-Reply-To: <80c99e790707040233s3593f4d9g769d9814e7366dcb@mail.gmail.com> Message-ID: <0ML2xA-1I61Pt1N7i-0003mi@mrelayeu.kundenserver.de> Hi Lorenzo, thanks for your 2cents. The pointer method isn't practical for my purposes: I want to have the ability to access the "historical" data within the engine on various ways, e.g. "price average of the last 3 periods", where the array itself stores still 5 periods. The pointer method would require to re-calculate the time axis and especially to manage the "wrap", like: current time row is 3, so "3 periods back" would be rows 2, 1 and 5. I would like to use the numpy functions as sum(), avg() etc. on the arrays, so having single 1d arrays (one row = one array) does not really make sense. But thanks for the idea, Andrew ________________________________ Von: scipy-user-bounces at scipy.org [mailto:scipy-user-bounces at scipy.org] Im Auftrag von lorenzo bolla Gesendet: Mittwoch, 4. Juli 2007 11:33 An: SciPy Users List Betreff: Re: [SciPy-user] How to "move" data within an array why not using a list of 1D arrays? but why do you want to physically move your rows? you can simply use an integer as a pointer to the row of the "current time": then you update this integer every timestep (+1), taking its "modulo 5" to cycle through the rows. my two cents. lorenzo. On 7/4/07, Andrew Smart wrote: Hi folks, I'm using numpy arrays for storing data which is generated within an engine. I'm using the topmost dimension as time axis: every row represents a full set of data created by the engine while one round. Say: i have an array for storing prices (e.g. 10 different prices are generated within one engine round). I'm storing/using the last 5 rounds, so I get an array with the dimensions (5,10). If the engine runs longer than 5 rounds I have to "remove" the oldest record and move the younger records one position back. Since I've a lot of such arrays I would like to use the most efficient method avaiable in numpy. On a pure memory-orientated view this would be just to copy ("move") the memory blocks from the younger 4 rows one row further, thus having the first row for the new data. In the C API I see some functions like copyswap() and memmove() which indicate that such operations are possible at the C API level. But I'm not sure the correct approach on the Python level. Taking slices may be one options - but the new slice will then occupy new memory, causing memory fragmentation... Looping over all data items, all rows is time consuming and surely wasting resources... Any pointers/ideas? Thanks, Andrew _______________________________________________ SciPy-user mailing list SciPy-user at scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user From lbolla at gmail.com Wed Jul 4 07:21:38 2007 From: lbolla at gmail.com (lorenzo bolla) Date: Wed, 4 Jul 2007 13:21:38 +0200 Subject: [SciPy-user] How to "move" data within an array In-Reply-To: <0ML2xA-1I61Pt1N7i-0003mi@mrelayeu.kundenserver.de> References: <80c99e790707040233s3593f4d9g769d9814e7366dcb@mail.gmail.com> <0ML2xA-1I61Pt1N7i-0003mi@mrelayeu.kundenserver.de> Message-ID: <80c99e790707040421l62aee169p2fff8b4611415e90@mail.gmail.com> gotcha. you could use numpy.roll, then. In [10]: x = numpy.array([[1,2,3],[4,5,6]]) In [11]: x Out[11]: array([[1, 2, 3], [4, 5, 6]]) In [12]: numpy.roll(x,1) Out[12]: array([[6, 1, 2], [3, 4, 5]]) In [13]: numpy.roll(x,2) Out[13]: array([[5, 6, 1], [2, 3, 4]]) In [14]: numpy.roll(x,3) Out[14]: array([[4, 5, 6], [1, 2, 3]]) lorenzo. On 7/4/07, Andrew Smart wrote: > > Hi Lorenzo, > > thanks for your 2cents. > > The pointer method isn't practical for my purposes: I want to have the > ability to access the "historical" data within the engine on various ways, > e.g. "price average of the last 3 periods", where the array itself stores > still 5 periods. The pointer method would require to re-calculate the time > axis and especially to manage the "wrap", like: current time row is 3, so > "3 > periods back" would be rows 2, 1 and 5. > > I would like to use the numpy functions as sum(), avg() etc. on the > arrays, > so having single 1d arrays (one row = one array) does not really make > sense. > > But thanks for the idea, > Andrew > ________________________________ > > Von: scipy-user-bounces at scipy.org > [mailto:scipy-user-bounces at scipy.org] Im Auftrag von lorenzo bolla > Gesendet: Mittwoch, 4. Juli 2007 11:33 > An: SciPy Users List > Betreff: Re: [SciPy-user] How to "move" data within an array > > > why not using a list of 1D arrays? > but why do you want to physically move your rows? you can simply > use > an integer as a pointer to the row of the "current time": then you update > this integer every timestep (+1), taking its "modulo 5" to cycle through > the > rows. > > my two cents. > lorenzo. > > On 7/4/07, Andrew Smart wrote: > > Hi folks, > > I'm using numpy arrays for storing data which is generated > within an engine. > I'm using the topmost dimension as time axis: every row > represents a full > set of data created by the engine while one round. > > Say: i have an array for storing prices (e.g. 10 different > prices are > generated within one engine round). I'm storing/using the > last 5 rounds, so > I get an array with the dimensions (5,10). > > If the engine runs longer than 5 rounds I have to "remove" > the oldest record > and move the younger records one position back. > > Since I've a lot of such arrays I would like to use the > most > efficient > method avaiable in numpy. On a pure memory-orientated view > this would be > just to copy ("move") the memory blocks from the younger 4 > rows one row > further, thus having the first row for the new data. > > In the C API I see some functions like copyswap() and > memmove() which > indicate that such operations are possible at the C API > level. But I'm not > sure the correct approach on the Python level. > > Taking slices may be one options - but the new slice will > then occupy new > memory, causing memory fragmentation... > Looping over all data items, all rows is time consuming and > surely wasting > resources... > > Any pointers/ideas? > > Thanks, > Andrew > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > > > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lbolla at gmail.com Wed Jul 4 07:23:35 2007 From: lbolla at gmail.com (lorenzo bolla) Date: Wed, 4 Jul 2007 13:23:35 +0200 Subject: [SciPy-user] How to "move" data within an array In-Reply-To: <80c99e790707040421l62aee169p2fff8b4611415e90@mail.gmail.com> References: <80c99e790707040233s3593f4d9g769d9814e7366dcb@mail.gmail.com> <0ML2xA-1I61Pt1N7i-0003mi@mrelayeu.kundenserver.de> <80c99e790707040421l62aee169p2fff8b4611415e90@mail.gmail.com> Message-ID: <80c99e790707040423s532a42afwf1882bc8a78b3572@mail.gmail.com> it's better to specify the axis, though: In [20]: numpy.roll(x,1,axis = 1) Out[20]: array([[3, 1, 2], [6, 4, 5]]) In [21]: numpy.roll(x,1) Out[21]: array([[6, 1, 2], [3, 4, 5]]) lorenzo. On 7/4/07, lorenzo bolla wrote: > > gotcha. you could use numpy.roll, then. > > > In [10]: x = numpy.array([[1,2,3],[4,5,6]]) > > In [11]: x > Out[11]: > array([[1, 2, 3], > [4, 5, 6]]) > > In [12]: numpy.roll(x,1) > Out[12]: > array([[6, 1, 2], > [3, 4, 5]]) > > In [13]: numpy.roll(x,2) > Out[13]: > array([[5, 6, 1], > [2, 3, 4]]) > > In [14]: numpy.roll(x,3) > Out[14]: > array([[4, 5, 6], > [1, 2, 3]]) > > > lorenzo. > > > On 7/4/07, Andrew Smart wrote: > > > > Hi Lorenzo, > > > > thanks for your 2cents. > > > > The pointer method isn't practical for my purposes: I want to have the > > ability to access the "historical" data within the engine on various > > ways, > > e.g. "price average of the last 3 periods", where the array itself > > stores > > still 5 periods. The pointer method would require to re-calculate the > > time > > axis and especially to manage the "wrap", like: current time row is 3, > > so "3 > > periods back" would be rows 2, 1 and 5. > > > > I would like to use the numpy functions as sum(), avg() etc. on the > > arrays, > > so having single 1d arrays (one row = one array) does not really make > > sense. > > > > But thanks for the idea, > > Andrew > > ________________________________ > > > > Von: scipy-user-bounces at scipy.org > > [mailto:scipy-user-bounces at scipy.org] Im Auftrag von lorenzo bolla > > Gesendet: Mittwoch, 4. Juli 2007 11:33 > > An: SciPy Users List > > Betreff: Re: [SciPy-user] How to "move" data within an array > > > > > > why not using a list of 1D arrays? > > but why do you want to physically move your rows? you can simply > > use > > an integer as a pointer to the row of the "current time": then you > > update > > this integer every timestep (+1), taking its "modulo 5" to cycle through > > the > > rows. > > > > my two cents. > > lorenzo. > > > > On 7/4/07, Andrew Smart < subscriptions at smart-knowhow.de> wrote: > > > > Hi folks, > > > > I'm using numpy arrays for storing data which is > > generated > > within an engine. > > I'm using the topmost dimension as time axis: every row > > represents a full > > set of data created by the engine while one round. > > > > Say: i have an array for storing prices (e.g. 10 > > different > > prices are > > generated within one engine round). I'm storing/using the > > > > last 5 rounds, so > > I get an array with the dimensions (5,10). > > > > If the engine runs longer than 5 rounds I have to > > "remove" > > the oldest record > > and move the younger records one position back. > > > > Since I've a lot of such arrays I would like to use the > > most > > efficient > > method avaiable in numpy. On a pure memory-orientated > > view > > this would be > > just to copy ("move") the memory blocks from the younger > > 4 > > rows one row > > further, thus having the first row for the new data. > > > > In the C API I see some functions like copyswap() and > > memmove() which > > indicate that such operations are possible at the C API > > level. But I'm not > > sure the correct approach on the Python level. > > > > Taking slices may be one options - but the new slice will > > then occupy new > > memory, causing memory fragmentation... > > Looping over all data items, all rows is time consuming > > and > > surely wasting > > resources... > > > > Any pointers/ideas? > > > > Thanks, > > Andrew > > > > > > _______________________________________________ > > SciPy-user mailing list > > SciPy-user at scipy.org > > http://projects.scipy.org/mailman/listinfo/scipy-user > > > > > > > > > > _______________________________________________ > > SciPy-user mailing list > > SciPy-user at scipy.org > > http://projects.scipy.org/mailman/listinfo/scipy-user > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From subscriptions at smart-knowhow.de Wed Jul 4 10:50:35 2007 From: subscriptions at smart-knowhow.de (Andrew Smart) Date: Wed, 4 Jul 2007 16:50:35 +0200 Subject: [SciPy-user] How to "move" data within an array In-Reply-To: <80c99e790707040423s532a42afwf1882bc8a78b3572@mail.gmail.com> Message-ID: <0MKwpI-1I66Be08GV-00044o@mrelayeu.kundenserver.de> I found roll() in the meantime also as one option. It's a feasible approach, but still may cause memory fragmentation. I'll take roll() for the time being - and some time later I'll see if someone makes me a C based function which does the same without copying the array... But thanks for your answers! Andrew smart:elligence Unternehmensberatung Goethestr. 55 40237 D?sseldorf Tel.: 0211 6015 699 Mob: 0170 223 4440 VERTRAULICHKEITSHINWEIS: Der Inhalt dieser E-Mail ist vertraulich und f?r den Nutzer der E-Mail Adresse bestimmt, an den die Nachricht geschickt wurde; sie kann dar?ber hinaus durch besondere Bestimmungen gesch?tzt sein. Wenn Sie nicht der Adressat dieser E-Mail sind, d?rfen Sie diese nicht kopieren, weiterleiten, weitergeben oder sie ganz oder teilweise in irgendeiner Weise nutzen. Wenn Sie diese E-Mail f?lschlicherweise erhalten haben, benachrichtigen Sie bitte den Absender, indem Sie auf diese Nachricht antworten. _____ Von: scipy-user-bounces at scipy.org [mailto:scipy-user-bounces at scipy.org] Im Auftrag von lorenzo bolla Gesendet: Mittwoch, 4. Juli 2007 13:24 An: SciPy Users List Betreff: Re: [SciPy-user] How to "move" data within an array it's better to specify the axis, though: In [20]: numpy.roll(x,1,axis = 1) Out[20]: array([[3, 1, 2], [6, 4, 5]]) In [21]: numpy.roll(x,1) Out[21]: array([[6, 1, 2], [3, 4, 5]]) lorenzo. On 7/4/07, lorenzo bolla wrote: gotcha. you could use numpy.roll, then. In [10]: x = numpy.array([[1,2,3],[4,5,6]]) In [11]: x Out[11]: array([[1, 2, 3], [4, 5, 6]]) In [12]: numpy.roll(x,1) Out[12]: array([[6, 1, 2], [3, 4, 5]]) In [13]: numpy.roll(x,2) Out[13]: array([[5, 6, 1], [2, 3, 4]]) In [14]: numpy.roll(x,3) Out[14]: array([[4, 5, 6], [1, 2, 3]]) lorenzo. On 7/4/07, Andrew Smart > wrote: Hi Lorenzo, thanks for your 2cents. The pointer method isn't practical for my purposes: I want to have the ability to access the "historical" data within the engine on various ways, e.g. "price average of the last 3 periods", where the array itself stores still 5 periods. The pointer method would require to re-calculate the time axis and especially to manage the "wrap", like: current time row is 3, so "3 periods back" would be rows 2, 1 and 5. I would like to use the numpy functions as sum(), avg() etc. on the arrays, so having single 1d arrays (one row = one array) does not really make sense. But thanks for the idea, Andrew ________________________________ Von: scipy-user-bounces at scipy.org [mailto:scipy-user-bounces at scipy.org] Im Auftrag von lorenzo bolla Gesendet: Mittwoch, 4. Juli 2007 11:33 An: SciPy Users List Betreff: Re: [SciPy-user] How to "move" data within an array why not using a list of 1D arrays? but why do you want to physically move your rows? you can simply use an integer as a pointer to the row of the "current time": then you update this integer every timestep (+1), taking its "modulo 5" to cycle through the rows. my two cents. lorenzo. On 7/4/07, Andrew Smart < subscriptions at smart-knowhow.de> wrote: Hi folks, I'm using numpy arrays for storing data which is generated within an engine. I'm using the topmost dimension as time axis: every row represents a full set of data created by the engine while one round. Say: i have an array for storing prices (e.g. 10 different prices are generated within one engine round). I'm storing/using the last 5 rounds, so I get an array with the dimensions (5,10). If the engine runs longer than 5 rounds I have to "remove" the oldest record and move the younger records one position back. Since I've a lot of such arrays I would like to use the most efficient method avaiable in numpy. On a pure memory-orientated view this would be just to copy ("move") the memory blocks from the younger 4 rows one row further, thus having the first row for the new data. In the C API I see some functions like copyswap() and memmove() which indicate that such operations are possible at the C API level. But I'm not sure the correct approach on the Python level. Taking slices may be one options - but the new slice will then occupy new memory, causing memory fragmentation... Looping over all data items, all rows is time consuming and surely wasting resources... Any pointers/ideas? Thanks, Andrew _______________________________________________ SciPy-user mailing list SciPy-user at scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user _______________________________________________ SciPy-user mailing list SciPy-user at scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user -------------- next part -------------- An HTML attachment was scrubbed... URL: From peridot.faceted at gmail.com Wed Jul 4 11:49:52 2007 From: peridot.faceted at gmail.com (Anne Archibald) Date: Wed, 4 Jul 2007 11:49:52 -0400 Subject: [SciPy-user] How to "move" data within an array In-Reply-To: <0MKwpI-1I66Be08GV-00044o@mrelayeu.kundenserver.de> References: <80c99e790707040423s532a42afwf1882bc8a78b3572@mail.gmail.com> <0MKwpI-1I66Be08GV-00044o@mrelayeu.kundenserver.de> Message-ID: On 04/07/07, Andrew Smart wrote: > I found roll() in the meantime also as one option. It's a feasible approach, > but still may cause memory fragmentation. I'll take roll() for the time > being - and some time later I'll see if someone makes me a C based function > which does the same without copying the array... I don't think memory fragmentation should be a concern. For one thing, as you've described the problem, the array size isn't changing, so it will almost certainly be copied back and forth between two memory blocks. For another, for an array big enough for you to care about, malloc() will request a new hunk of memory from the OS, and then free it back to the OS when you're done with it. (Well, on Linux anyway.) If you do want to move the array in place, you could try A[:-1]=A[1:] I don't know if that is smart enough to use memmove() if the copy is of a contiguous block, but at the least it will be done in place by C code. (The implementation of that optimization is complicated by the semantics of that operation - since source and destination overlap, the order of the indexing matters.) A true in-place roll() is tricky and might have very poor cache behaviour (because roll() tries to preserve all the array elements, so rolling a 7-element array only has to loop around once, skipping by 3, while rolling a 9-element array has to loop around nine times, skipping by three). Memory allocation is cheap and efficient, so eliminating temporaries is less helpful than it might seem. In particular, it's worth knowing that numpy array memory is a leaf with respect to the python garbage collector - it doesn't need to be traversed, it just disappears when the array objects pointing to it go. Also, as I said above, at least on Linux, big monolithic allocations like numpy's go on fresh pages from the OS, and are given back to it when done. Is this actually the slowdown in your application? Anne From subscriptions at smart-knowhow.de Wed Jul 4 13:14:27 2007 From: subscriptions at smart-knowhow.de (Andrew Smart) Date: Wed, 4 Jul 2007 19:14:27 +0200 Subject: [SciPy-user] How to "move" data within an array In-Reply-To: Message-ID: <0ML25U-1I68Qr40eI-0006EF@mrelayeu.kundenserver.de> Hi Anne, thanks for your very helpful input. Currently I don't have any slowdowns since I'm working on the first version of the software. I just tried to prevent mistakes by design. I already know that I will have very large arrays - and since I'm new to numpy I thoughed "ask the pro's". Better ask than to have to refactor the software later because I took the wrong approach. Numpy is definitivly a very sophisticated package with lots of power - but this implies also that there may be facts very important for good performance "hidden" below. I'll take the roll() approach and test it with lots of data. The target plattform is primarily Linux/Unix, but I'll have to make showcases on Windows too... We'll see. Thanks a lot, Andrew > -----Urspr?ngliche Nachricht----- > Von: scipy-user-bounces at scipy.org > [mailto:scipy-user-bounces at scipy.org] Im Auftrag von Anne Archibald > Gesendet: Mittwoch, 4. Juli 2007 17:50 > An: SciPy Users List > Betreff: Re: [SciPy-user] How to "move" data within an array > > On 04/07/07, Andrew Smart wrote: > > > I found roll() in the meantime also as one option. It's a feasible > > approach, but still may cause memory fragmentation. I'll > take roll() > > for the time being - and some time later I'll see if > someone makes me > > a C based function which does the same without copying the array... > > I don't think memory fragmentation should be a concern. For > one thing, as you've described the problem, the array size > isn't changing, so it will almost certainly be copied back > and forth between two memory blocks. For another, for an > array big enough for you to care about, > malloc() will request a new hunk of memory from the OS, and > then free it back to the OS when you're done with it. (Well, > on Linux anyway.) > > If you do want to move the array in place, you could try > A[:-1]=A[1:] I don't know if that is smart enough to use > memmove() if the copy is of a contiguous block, but at the > least it will be done in place by C code. (The implementation > of that optimization is complicated by the semantics of that > operation - since source and destination overlap, the order > of the indexing matters.) > > A true in-place roll() is tricky and might have very poor > cache behaviour (because roll() tries to preserve all the > array elements, so rolling a 7-element array only has to loop > around once, skipping by 3, while rolling a 9-element array > has to loop around nine times, skipping by three). > > Memory allocation is cheap and efficient, so eliminating > temporaries is less helpful than it might seem. In > particular, it's worth knowing that numpy array memory is a > leaf with respect to the python garbage collector - it > doesn't need to be traversed, it just disappears when the > array objects pointing to it go. Also, as I said above, at > least on Linux, big monolithic allocations like numpy's go on > fresh pages from the OS, and are given back to it when done. > > Is this actually the slowdown in your application? > > Anne > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > From lorrmann at physik.uni-wuerzburg.de Wed Jul 4 13:26:23 2007 From: lorrmann at physik.uni-wuerzburg.de (Volker Lorrmann) Date: Wed, 04 Jul 2007 19:26:23 +0200 Subject: [SciPy-user] optimization question In-Reply-To: <468B438B.4080303@physik.uni-wuerzburg.de> References: <468B438B.4080303@physik.uni-wuerzburg.de> Message-ID: <468BD83F.9050502@physik.uni-wuerzburg.de> So many answers. :) Thanks to all authors volker From strawman at astraw.com Wed Jul 4 15:05:28 2007 From: strawman at astraw.com (Andrew Straw) Date: Wed, 04 Jul 2007 12:05:28 -0700 Subject: [SciPy-user] How to "move" data within an array In-Reply-To: <0ML2xA-1I61Pt1N7i-0003mi@mrelayeu.kundenserver.de> References: <0ML2xA-1I61Pt1N7i-0003mi@mrelayeu.kundenserver.de> Message-ID: <468BEF78.6090101@astraw.com> Another way to use a list of arrays is to it as a FIFO (First In First Out): (However, I realize this won't work with your other requirements such as sum()). LoA = [] for new_array in new_array_source(): LoA.append(new_array) if len(LoA) > 5: old_array = LoA.pop(0) Andrew Smart wrote: > Hi Lorenzo, > > thanks for your 2cents. > > The pointer method isn't practical for my purposes: I want to have the > ability to access the "historical" data within the engine on various ways, > e.g. "price average of the last 3 periods", where the array itself stores > still 5 periods. The pointer method would require to re-calculate the time > axis and especially to manage the "wrap", like: current time row is 3, so "3 > periods back" would be rows 2, 1 and 5. > > I would like to use the numpy functions as sum(), avg() etc. on the arrays, > so having single 1d arrays (one row = one array) does not really make sense. > > But thanks for the idea, > Andrew > ________________________________ > > Von: scipy-user-bounces at scipy.org > [mailto:scipy-user-bounces at scipy.org] Im Auftrag von lorenzo bolla > Gesendet: Mittwoch, 4. Juli 2007 11:33 > An: SciPy Users List > Betreff: Re: [SciPy-user] How to "move" data within an array > > > why not using a list of 1D arrays? > but why do you want to physically move your rows? you can simply use > an integer as a pointer to the row of the "current time": then you update > this integer every timestep (+1), taking its "modulo 5" to cycle through the > rows. > > my two cents. > lorenzo. > > On 7/4/07, Andrew Smart wrote: > > Hi folks, > > I'm using numpy arrays for storing data which is generated > within an engine. > I'm using the topmost dimension as time axis: every row > represents a full > set of data created by the engine while one round. > > Say: i have an array for storing prices (e.g. 10 different > prices are > generated within one engine round). I'm storing/using the > last 5 rounds, so > I get an array with the dimensions (5,10). > > If the engine runs longer than 5 rounds I have to "remove" > the oldest record > and move the younger records one position back. > > Since I've a lot of such arrays I would like to use the most > efficient > method avaiable in numpy. On a pure memory-orientated view > this would be > just to copy ("move") the memory blocks from the younger 4 > rows one row > further, thus having the first row for the new data. > > In the C API I see some functions like copyswap() and > memmove() which > indicate that such operations are possible at the C API > level. But I'm not > sure the correct approach on the Python level. > > Taking slices may be one options - but the new slice will > then occupy new > memory, causing memory fragmentation... > Looping over all data items, all rows is time consuming and > surely wasting > resources... > > Any pointers/ideas? > > Thanks, > Andrew > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > > > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user From lev at columbia.edu Wed Jul 4 16:56:25 2007 From: lev at columbia.edu (Lev Givon) Date: Wed, 4 Jul 2007 16:56:25 -0400 Subject: [SciPy-user] scipy code contribution question Message-ID: <20070704205625.GC28755@localhost.ee.columbia.edu> I recently had occasion to translate one of the functions in Matlab's signal processing toolkit not currently available in scipy into Python for my own nefarious purposes (i.e., reworking some extant Matlab code in Python). Might there be any copyright obstacles to my contributing it to scipy? I personally suspect not because - Mathworks' copyright specifically protects its Matlab code and cannot constrain one from reimplementing non-patented and/or publicly available algorithms in other languages; - my reimplementation is not an exact translation of said Matlab code; and - the code of several scipy functions seems to have been directly inspired by that of corresponding functions included in Matlab. Please feel free to disabuse me of any misconceptions I may have expressed above. L.G. From edschofield at gmail.com Wed Jul 4 18:33:19 2007 From: edschofield at gmail.com (Ed Schofield) Date: Wed, 4 Jul 2007 23:33:19 +0100 Subject: [SciPy-user] scipy code contribution question In-Reply-To: <20070704205625.GC28755@localhost.ee.columbia.edu> References: <20070704205625.GC28755@localhost.ee.columbia.edu> Message-ID: <1b5a37350707041533q1db2d939oe95de76f01782455@mail.gmail.com> On 7/4/07, Lev Givon wrote: > I recently had occasion to translate one of the functions in Matlab's > signal processing toolkit not currently available in scipy into Python > for my own nefarious purposes (i.e., reworking some extant Matlab code > in Python). Might there be any copyright obstacles to my contributing > it to scipy? I personally suspect not because > > - Mathworks' copyright specifically protects its Matlab code and > cannot constrain one from reimplementing non-patented and/or publicly > available algorithms in other languages; > - my reimplementation is not an exact translation of said Matlab code; > and > - the code of several scipy functions seems to have been directly > inspired by that of corresponding functions included in Matlab. I think a translation of software into a different language would be considered a "derivative work": http://www.copyright.gov/circs/circ14.html http://ec.europa.eu/internal_market/copyright/documents/documents_en.htm This definition applies to a motion picture based on a play, so it would also cover a less-than-exact translation. If several scipy functions were "directly inspired by" functions from Matlab (or Numerical Recipes, or other sources), this would pose us no problem -- but if there are any that look like they might be "derivative works", and therefore infringing, let us know so we can root them out. I think that we should err on the side of caution, with a zero-tolerance policy for contaminated code. Back to your original question, then: I'd suggest that you post some documentation here about what steps the code takes, using your judgment about how detailed to make it, and ask for a volunteer to write a clean-room implementation. Sorry that this requires more work, but I think it's important for the legitimacy of the project. -- Ed From lev at columbia.edu Wed Jul 4 20:14:21 2007 From: lev at columbia.edu (Lev Givon) Date: Wed, 4 Jul 2007 20:14:21 -0400 Subject: [SciPy-user] scipy code contribution question In-Reply-To: <1b5a37350707041533q1db2d939oe95de76f01782455@mail.gmail.com> References: <20070704205625.GC28755@localhost.ee.columbia.edu> <1b5a37350707041533q1db2d939oe95de76f01782455@mail.gmail.com> Message-ID: <20070705001420.GB30029@localhost.ee.columbia.edu> Received from Ed Schofield on Wed, Jul 04, 2007 at 06:33:19PM EDT: > On 7/4/07, Lev Givon wrote: > > I recently had occasion to translate one of the functions in Matlab's > > signal processing toolkit not currently available in scipy into Python > > for my own nefarious purposes (i.e., reworking some extant Matlab code > > in Python). Might there be any copyright obstacles to my contributing > > it to scipy? I personally suspect not because > > > > - Mathworks' copyright specifically protects its Matlab code and > > cannot constrain one from reimplementing non-patented and/or publicly > > available algorithms in other languages; > > - my reimplementation is not an exact translation of said Matlab code; > > and > > - the code of several scipy functions seems to have been directly > > inspired by that of corresponding functions included in Matlab. > > > I think a translation of software into a different language would be > considered a "derivative work": > > http://www.copyright.gov/circs/circ14.html > http://ec.europa.eu/internal_market/copyright/documents/documents_en.htm > > This definition applies to a motion picture based on a play, so it > would also cover a less-than-exact translation. If several scipy > functions were "directly inspired by" functions from Matlab (or > Numerical Recipes, or other sources), this would pose us no problem -- > but if there are any that look like they might be "derivative works", > and therefore infringing, let us know so we can root them out. I think > that we should err on the side of caution, with a zero-tolerance > policy for contaminated code. > > Back to your original question, then: I'd suggest that you post some > documentation here about what steps the code takes, using your > judgment about how detailed to make it, and ask for a volunteer to > write a clean-room implementation. Sorry that this requires more work, > but I think it's important for the legitimacy of the project. > > -- Ed Perhaps I am reading too deeply into the code, but it seems that a few (but not all) of the scipy filter design functions (e.g., buttord, cheb1ord) bear more than a passing similarity to their Matlab counterparts insofar as their internal structure or logical flow are concerned. (On the other hand, perhaps the published descriptions of the filter design techniques in question are sufficiently explicit as to lead to structural similarity in most independent implementations.) Insofar as the item that prompted my first message, I desire a filter design function similar to others currently available in scipy to facilitate the construction of FIR filters with the Remez algorithm (i.e., something similar to the remezord or firpmord functions in Matlab) given some typical design parameters (e.g., band cutoff frequencies, ripple constraints, etc.). As the relevant algorithms needed by such a filter design function are not overly complicated, I could look them up an appropriate DSP text or paper and try implementing them completely from scratch (unless some generous soul reading this list has already done so :-) L.G. From david at ar.media.kyoto-u.ac.jp Thu Jul 5 01:33:33 2007 From: david at ar.media.kyoto-u.ac.jp (David Cournapeau) Date: Thu, 05 Jul 2007 14:33:33 +0900 Subject: [SciPy-user] scipy code contribution question In-Reply-To: <20070705001420.GB30029@localhost.ee.columbia.edu> References: <20070704205625.GC28755@localhost.ee.columbia.edu> <1b5a37350707041533q1db2d939oe95de76f01782455@mail.gmail.com> <20070705001420.GB30029@localhost.ee.columbia.edu> Message-ID: <468C82AD.9090104@ar.media.kyoto-u.ac.jp> Lev Givon wrote: > > Perhaps I am reading too deeply into the code, but it seems that a few > (but not all) of the scipy filter design functions (e.g., buttord, > cheb1ord) bear more than a passing similarity to their Matlab > counterparts insofar as their internal structure or logical flow are > concerned. (On the other hand, perhaps the published descriptions of > the filter design techniques in question are sufficiently explicit as > to lead to structural similarity in most independent implementations.) As everybody here I guess, IANAL, but the safest thing to do is to explicitely ask the mathworks. What is derivative work is a gray area, and there is no way to be sure before going to court; implementing something by reading source code is certainly not a good idea, and is explictely forbidden in most open source projects which "copy" known softwares (ReactOS and Wine for windows, samba, etc...); reverse engineering is more or less acceptable, but not always, and not in the same way in every country. > > Insofar as the item that prompted my first message, I desire a filter > design function similar to others currently available in scipy to > facilitate the construction of FIR filters with the Remez algorithm > (i.e., something similar to the remezord or firpmord functions in > Matlab) given some typical design parameters (e.g., band cutoff > frequencies, ripple constraints, etc.). As the relevant algorithms > needed by such a filter design function are not overly complicated, I > could look them up an appropriate DSP text or paper and try > implementing them completely from scratch (unless some generous soul > reading this list has already done so :-) > That would be the best thing to do. When you reimplement something for scipy, but coming from open source software, you can also ask with the copyright holders if this is Ok to copy some parts (eg rereleasing them under BSD; that way, it can be incorporated in scipy, and the original authors can still use GPL). Even if there is a strong focus on the law in the licenses, open source is really about what's considered fair and not fair, and at least in my experience, I had no difficulty in taking some part of matlab scripts under the GPL, adapt them for scipy and put them under the BSD (eg getting the explicit consent of the GPL code to release the parts I used under the BSD). David From wbaxter at gmail.com Thu Jul 5 02:18:32 2007 From: wbaxter at gmail.com (Bill Baxter) Date: Thu, 5 Jul 2007 15:18:32 +0900 Subject: [SciPy-user] scipy code contribution question In-Reply-To: <468C82AD.9090104@ar.media.kyoto-u.ac.jp> References: <20070704205625.GC28755@localhost.ee.columbia.edu> <1b5a37350707041533q1db2d939oe95de76f01782455@mail.gmail.com> <20070705001420.GB30029@localhost.ee.columbia.edu> <468C82AD.9090104@ar.media.kyoto-u.ac.jp> Message-ID: On 7/5/07, David Cournapeau wrote: > > Lev Givon wrote: > > > As everybody here I guess, IANAL, but the safest thing to do is to > explicitely ask the mathworks. The license I got with my copy of Matlab is pretty clear: """ Except as expressly provided by this Agreement, including the attached Addendum, Licensee may not adapt, translate, or convert "M-files", "MDL-files" or "P-code" contained in the Programs in order to create software, a principal purpose of which is to perform the same or similar functions as Programs licensed by MathWorks or which is intended to replace any component of the Programs. The Licensee may not incorporate or use "M-files", "P-code", source code, or any other part of the Programs in or as part of another computer program without the consent of MathWorks. """ You can contact them and try, but I don't expect they'd be willing to give you explicit consent to translate their M-files in this case, since is precisely for the purpose of creating software that does the same thing as Matlab. And even worse it's for creating *free* software that does the same thing as Matlab. On the other hand, if Octave has an implementation of this particular function you're after, then you are much more likely to get the developers permission to translate it to Python and put it under BSD. --bb -------------- next part -------------- An HTML attachment was scrubbed... URL: From wbaxter at gmail.com Thu Jul 5 02:24:12 2007 From: wbaxter at gmail.com (Bill Baxter) Date: Thu, 5 Jul 2007 15:24:12 +0900 Subject: [SciPy-user] scipy code contribution question In-Reply-To: References: <20070704205625.GC28755@localhost.ee.columbia.edu> <1b5a37350707041533q1db2d939oe95de76f01782455@mail.gmail.com> <20070705001420.GB30029@localhost.ee.columbia.edu> <468C82AD.9090104@ar.media.kyoto-u.ac.jp> Message-ID: On 7/5/07, Bill Baxter wrote: > > On 7/5/07, David Cournapeau wrote: > > > > Lev Givon wrote: > > > > > As everybody here I guess, IANAL, but the safest thing to do is to > > explicitely ask the mathworks. > > > The license I got with my copy of Matlab is pretty clear: > > """ > Except as expressly provided by this Agreement, including the > attached Addendum, Licensee may not adapt, translate, or convert > "M-files", "MDL-files" or "P-code" contained in the Programs in > order to create software, a principal purpose of which is to > perform the same or similar functions as Programs licensed by > MathWorks or which is intended to replace any component of the > Programs. The Licensee may not incorporate or use "M-files", > "P-code", source code, or any other part of the Programs in or > as part of another computer program without the consent of > MathWorks. > """ > > You can contact them and try, but I don't expect they'd be willing to give > you explicit consent to translate their M-files in this case, since is > precisely for the purpose of creating software that does the same thing as > Matlab. And even worse it's for creating *free* software that does the same > thing as Matlab. > > On the other hand, if Octave has an implementation of this particular > function you're after, then you are much more likely to get the developers > permission to translate it to Python and put it under BSD. > And here appears to be just such a beast: http://velveeta.che.wisc.edu/octave/lists/archive//octave-sources.2001/msg00011.html ---bb -------------- next part -------------- An HTML attachment was scrubbed... URL: From icy.flame.gm at gmail.com Thu Jul 5 03:36:24 2007 From: icy.flame.gm at gmail.com (iCy-fLaME) Date: Thu, 5 Jul 2007 08:36:24 +0100 Subject: [SciPy-user] How does concatenate work? Message-ID: If I have a (m, n) array, is concatenate is right way to go about making it a (m+1, n) or (m, n+1) array? I tried the following, couldn't figure out how to do it correctly. Any helps are greatly appreciated. >>> from numpy import linspace, zeros >>> from numpy import concatenate >>> >>> a = linspace(1, 20, 20).reshape((5,4)) >>> a array([[ 1., 2., 3., 4.], [ 5., 6., 7., 8.], [ 9., 10., 11., 12.], [ 13., 14., 15., 16.], [ 17., 18., 19., 20.]]) >>> >>> b = zeros(4) >>> b array([ 0., 0., 0., 0.]) >>> >>> concatenate((a,b), axis=0) Traceback (most recent call last): File "", line 1, in ? ValueError: arrays must have same number of dimensions >>> >>> concatenate((a,b), axis=1) Traceback (most recent call last): File "", line 1, in ? ValueError: arrays must have same number of dimensions icy From openopt at ukr.net Thu Jul 5 03:43:09 2007 From: openopt at ukr.net (dmitrey) Date: Thu, 05 Jul 2007 10:43:09 +0300 Subject: [SciPy-user] How does concatenate work? In-Reply-To: References: Message-ID: <468CA10D.3010608@ukr.net> try b = zeros((1,4)) concatenate((a,b), 0) array([[ 1., 2., 3., 4.], [ 5., 6., 7., 8.], [ 9., 10., 11., 12.], [ 13., 14., 15., 16.], [ 17., 18., 19., 20.], [ 0., 0., 0., 0.]]) you may use also concatenate((a,b.reshape(1,4)), 0) or concatenate((a,b.reshape(1,4))) or numpy.hstack((a,b.reshape(1,4))) HTH,D iCy-fLaME wrote: > If I have a (m, n) array, is concatenate is right way to go about > making it a (m+1, n) or (m, n+1) array? > > I tried the following, couldn't figure out how to do it correctly. Any > helps are greatly appreciated. > > >>>> from numpy import linspace, zeros >>>> from numpy import concatenate >>>> >>>> a = linspace(1, 20, 20).reshape((5,4)) >>>> a >>>> > array([[ 1., 2., 3., 4.], > [ 5., 6., 7., 8.], > [ 9., 10., 11., 12.], > [ 13., 14., 15., 16.], > [ 17., 18., 19., 20.]]) > >>>> b = zeros(4) >>>> b >>>> > array([ 0., 0., 0., 0.]) > >>>> concatenate((a,b), axis=0) >>>> > Traceback (most recent call last): > File "", line 1, in ? > ValueError: arrays must have same number of dimensions > >>>> concatenate((a,b), axis=1) >>>> > Traceback (most recent call last): > File "", line 1, in ? > ValueError: arrays must have same number of dimensions > > > > > > icy > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > > > > From icy.flame.gm at gmail.com Thu Jul 5 03:55:30 2007 From: icy.flame.gm at gmail.com (iCy-fLaME) Date: Thu, 5 Jul 2007 08:55:30 +0100 Subject: [SciPy-user] How does concatenate work? In-Reply-To: <468CA10D.3010608@ukr.net> References: <468CA10D.3010608@ukr.net> Message-ID: Aha.. that works. I see they both have to have the same number of dimensions for it to work, thanks a lot dmitrey. On 7/5/07, dmitrey wrote: > try > b = zeros((1,4)) > > concatenate((a,b), 0) > array([[ 1., 2., 3., 4.], > [ 5., 6., 7., 8.], > [ 9., 10., 11., 12.], > [ 13., 14., 15., 16.], > [ 17., 18., 19., 20.], > [ 0., 0., 0., 0.]]) > you may use also > concatenate((a,b.reshape(1,4)), 0) > or concatenate((a,b.reshape(1,4))) > or numpy.hstack((a,b.reshape(1,4))) > HTH,D > > iCy-fLaME wrote: > > If I have a (m, n) array, is concatenate is right way to go about > > making it a (m+1, n) or (m, n+1) array? > > > > I tried the following, couldn't figure out how to do it correctly. Any > > helps are greatly appreciated. > > > > > >>>> from numpy import linspace, zeros > >>>> from numpy import concatenate > >>>> > >>>> a = linspace(1, 20, 20).reshape((5,4)) > >>>> a > >>>> > > array([[ 1., 2., 3., 4.], > > [ 5., 6., 7., 8.], > > [ 9., 10., 11., 12.], > > [ 13., 14., 15., 16.], > > [ 17., 18., 19., 20.]]) > > > >>>> b = zeros(4) > >>>> b > >>>> > > array([ 0., 0., 0., 0.]) > > > >>>> concatenate((a,b), axis=0) > >>>> > > Traceback (most recent call last): > > File "", line 1, in ? > > ValueError: arrays must have same number of dimensions > > > >>>> concatenate((a,b), axis=1) > >>>> > > Traceback (most recent call last): > > File "", line 1, in ? > > ValueError: arrays must have same number of dimensions > > > > > > > > > > > > icy > > _______________________________________________ > > SciPy-user mailing list > > SciPy-user at scipy.org > > http://projects.scipy.org/mailman/listinfo/scipy-user > > > > > > > > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > -- iCy-fLaME ------------------------------------------------ The body maybe wounded, but it is the mind that hurts. From ryanlists at gmail.com Thu Jul 5 08:36:28 2007 From: ryanlists at gmail.com (Ryan Krauss) Date: Thu, 5 Jul 2007 07:36:28 -0500 Subject: [SciPy-user] scipy code contribution question In-Reply-To: References: <20070704205625.GC28755@localhost.ee.columbia.edu> <1b5a37350707041533q1db2d939oe95de76f01782455@mail.gmail.com> <20070705001420.GB30029@localhost.ee.columbia.edu> <468C82AD.9090104@ar.media.kyoto-u.ac.jp> Message-ID: I certainly don't claim to be an expert on derivative work, but it seems like you aren't creating a derivative work if Mathworks never showed you the source code - which I assume they didn't. It seems like an overly literal interpretation of the license snippet that Bill posted would say that if I ever used Matlab, then I can never write code that does the same things as Matlab or any of its toolboxes. If that is legally defended, then I can't contribute anything to scipy. I appreciate that we want to be careful, but it doesn't make sense that we could get in trouble by creating functions with the same names as Matlab functions if we've never seen their source code. I mean, can they copyright plot(x,y)? If so, than matplotlib is in trouble (unless John had never used Matlab when he came up with that syntax). What about fft(x)? The link that Bill posted with the GPL code poses as big a problem in my mind. If any of us looks at that code, then any similar algorithm would need to be GPL'ed as a derivative work. So, don't open that link :) FWIW, Ryan On 7/5/07, Bill Baxter wrote: > > > > On 7/5/07, Bill Baxter wrote: > > On 7/5/07, David Cournapeau wrote: > > > > > Lev Givon wrote: > > > > > > > As everybody here I guess, IANAL, but the safest thing to do is to > > > explicitely ask the mathworks. > > > > > > The license I got with my copy of Matlab is pretty clear: > > > > """ > > Except as expressly provided by this Agreement, including the > > attached Addendum, Licensee may not adapt, translate, or convert > > "M-files", "MDL-files" or "P-code" contained in the Programs in > > order to create software, a principal purpose of which is to > > perform the same or similar functions as Programs licensed by > > MathWorks or which is intended to replace any component of the > > Programs. The Licensee may not incorporate or use "M-files", > > "P-code", source code, or any other part of the Programs in or > > as part of another computer program without the consent of > > MathWorks. > > """ > > > > You can contact them and try, but I don't expect they'd be willing to give > you explicit consent to translate their M-files in this case, since is > precisely for the purpose of creating software that does the same thing as > Matlab. And even worse it's for creating *free* software that does the same > thing as Matlab. > > > > On the other hand, if Octave has an implementation of this particular > function you're after, then you are much more likely to get the developers > permission to translate it to Python and put it under BSD. > > And here appears to be just such a beast: > > http://velveeta.che.wisc.edu/octave/lists/archive//octave-sources.2001/msg00011.html > > > ---bb > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > > From giovanni.samaey at cs.kuleuven.be Thu Jul 5 09:25:01 2007 From: giovanni.samaey at cs.kuleuven.be (Giovanni Samaey) Date: Thu, 5 Jul 2007 15:25:01 +0200 Subject: [SciPy-user] installation problems on Mac OS X Message-ID: <13A99D27-BD5E-4D53-86C1-770507B6C1BF@cs.kuleuven.be> Hi all, I am trying to install scipy on my shiny new macbook: I followed instructions as on www.scipy.org/Installing_SciPy/Mac_OS_X/. Installation of vecLib was done when the computer shipped (I found a vecLib). The link to the vecLib on the instruction page is dead and I couldn't find a download on apple.com, so I don't know if that installation is complete, as the instructions ask. Installation goes smoothly, byt scipy.test() gives 2 errors. I tried both python 2.4.4 and python 2.5.1; no difference. I have the most recent gfortran and I use gcc 4.0. Scipy is taken from svn. ====================================================================== FAIL: check_dot (scipy.lib.tests.test_blas.test_fblas1_simple) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/scipy/lib/blas/tests/test_blas.py", line 76, in check_dot assert_almost_equal(f([3j,-4,3-4j],[2,3,1]),-9+2j) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/numpy/testing/utils.py", line 156, in assert_almost_equal assert round(abs(desired - actual),decimal) == 0, msg AssertionError: Items are not equal: ACTUAL: 3.4625784615075479e-37j DESIRED: (-9+2j) ====================================================================== FAIL: check_dot (scipy.linalg.tests.test_blas.test_fblas1_simple) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/scipy/linalg/tests/test_blas.py", line 75, in check_dot assert_almost_equal(f([3j,-4,3-4j],[2,3,1]),-9+2j) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/numpy/testing/utils.py", line 156, in assert_almost_equal assert round(abs(desired - actual),decimal) == 0, msg AssertionError: Items are not equal: ACTUAL: 3.4782945282523978e-37j DESIRED: (-9+2j) ---------------------------------------------------------------------- Ran 1632 tests in 3.592s FAILED (failures=2) From lev at columbia.edu Thu Jul 5 09:55:18 2007 From: lev at columbia.edu (Lev Givon) Date: Thu, 5 Jul 2007 09:55:18 -0400 Subject: [SciPy-user] scipy code contribution question In-Reply-To: References: <20070704205625.GC28755@localhost.ee.columbia.edu> <1b5a37350707041533q1db2d939oe95de76f01782455@mail.gmail.com> <20070705001420.GB30029@localhost.ee.columbia.edu> <468C82AD.9090104@ar.media.kyoto-u.ac.jp> Message-ID: <20070705135518.GD30029@localhost.ee.columbia.edu> Received from Ryan Krauss on Thu, Jul 05, 2007 at 08:36:28AM EDT: > I certainly don't claim to be an expert on derivative work, but it > seems like you aren't creating a derivative work if Mathworks never > showed you the source code - which I assume they didn't. > > It seems like an overly literal interpretation of the license snippet > that Bill posted would say that if I ever used Matlab, then I can > never write code that does the same things as Matlab or any of its > toolboxes. If that is legally defended, then I can't contribute > anything to scipy. > > I appreciate that we want to be careful, but it doesn't make sense > that we could get in trouble by creating functions with the same names > as Matlab functions if we've never seen their source code. I mean, > can they copyright plot(x,y)? If so, than matplotlib is in trouble > (unless John had never used Matlab when he came up with that syntax). > What about fft(x)? > I agree with your view regarding the implementation of Matlab-like interfaces; in my previous messages, I was specifically alluding to functions included in Matlab whose source is visible (i.e., most of the toolkit functions). > The link that Bill posted with the GPL code poses as big a problem in > my mind. If any of us looks at that code, then any similar algorithm > would need to be GPL'ed as a derivative work. So, don't open that > link :) > No need to worry; one side effect of prolonged scipy use is that scientific C code begins to take on a marked resemblance to Greek (at least in the eyes of barbaroi such as myself :-) L.G. From ryanlists at gmail.com Thu Jul 5 10:15:39 2007 From: ryanlists at gmail.com (Ryan Krauss) Date: Thu, 5 Jul 2007 09:15:39 -0500 Subject: [SciPy-user] scipy code contribution question In-Reply-To: <20070705135518.GD30029@localhost.ee.columbia.edu> References: <20070704205625.GC28755@localhost.ee.columbia.edu> <1b5a37350707041533q1db2d939oe95de76f01782455@mail.gmail.com> <20070705001420.GB30029@localhost.ee.columbia.edu> <468C82AD.9090104@ar.media.kyoto-u.ac.jp> <20070705135518.GD30029@localhost.ee.columbia.edu> Message-ID: Thanks for the clarification. If you had access to their source, then I don't see how you could contribute this to scipy. I can't imagine them giving you permision. On 7/5/07, Lev Givon wrote: > Received from Ryan Krauss on Thu, Jul 05, 2007 at 08:36:28AM EDT: > > I certainly don't claim to be an expert on derivative work, but it > > seems like you aren't creating a derivative work if Mathworks never > > showed you the source code - which I assume they didn't. > > > > It seems like an overly literal interpretation of the license snippet > > that Bill posted would say that if I ever used Matlab, then I can > > never write code that does the same things as Matlab or any of its > > toolboxes. If that is legally defended, then I can't contribute > > anything to scipy. > > > > I appreciate that we want to be careful, but it doesn't make sense > > that we could get in trouble by creating functions with the same names > > as Matlab functions if we've never seen their source code. I mean, > > can they copyright plot(x,y)? If so, than matplotlib is in trouble > > (unless John had never used Matlab when he came up with that syntax). > > What about fft(x)? > > > > I agree with your view regarding the implementation of Matlab-like > interfaces; in my previous messages, I was specifically alluding to > functions included in Matlab whose source is visible (i.e., most of > the toolkit functions). > > > The link that Bill posted with the GPL code poses as big a problem in > > my mind. If any of us looks at that code, then any similar algorithm > > would need to be GPL'ed as a derivative work. So, don't open that > > link :) > > > > No need to worry; one side effect of prolonged scipy use is that > scientific C code begins to take on a marked resemblance to Greek (at > least in the eyes of barbaroi such as myself :-) > > L.G. > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > From barrywark at gmail.com Thu Jul 5 14:57:57 2007 From: barrywark at gmail.com (Barry Wark) Date: Thu, 5 Jul 2007 11:57:57 -0700 Subject: [SciPy-user] Compile fails for r3123 on OS X 10.4 (Intel) In-Reply-To: <20070703233637.GA9394@arbutus.physics.mcmaster.ca> References: <20070703200423.GA5477@arbutus.physics.mcmaster.ca> <20070703233637.GA9394@arbutus.physics.mcmaster.ca> Message-ID: OK. This is a weird one for me... numpy r3881 builds fine. Scipy r3145 (a fresh checkout) does not build still. It looks like the scipy setup/config can't find many of the sources in sub-packages. Most relevant may be these lines from the build log: non-existing path in 'scipy/fftpack': 'tests' could not resolve pattern in 'scipy/fftpack': 'dfftpack/*.f' non-existing path in 'scipy/fftpack': 'fftpack.pyf' non-existing path in 'scipy/fftpack': 'src/zfft.c' non-existing path in 'scipy/fftpack': 'src/drfft.c' non-existing path in 'scipy/fftpack': 'src/zrfft.c' non-existing path in 'scipy/fftpack': 'src/zfftnd.c' non-existing path in 'scipy/fftpack': 'src/zfft_djbfft.c' non-existing path in 'scipy/fftpack': 'src/zfft_fftpack.c' non-existing path in 'scipy/fftpack': 'src/zfft_fftw.c' non-existing path in 'scipy/fftpack': 'src/zfft_fftw3.c' non-existing path in 'scipy/fftpack': 'src/zfft_mkl.c' non-existing path in 'scipy/fftpack': 'convolve.pyf' non-existing path in 'scipy/fftpack': 'src/convolve.c' Similar lines for many other packages are printed as well. Obviously none of these lines appear on a machine that does build scipy correctly. Can any of the numpy.distutils gurus point me in a helpful direction? Thanks! Barry On 7/3/07, David M. Cooke wrote: > On Tue, Jul 03, 2007 at 01:14:12PM -0700, Barry Wark wrote: > > Yes, I'm using a clean checkout from SVN. Just to double check against > > your setup, I'm using fftw-3 installed via macports as my fftw library > > > > Barry > > Still don't have your problem. Scipy is r3143, numpy is r3880. OS X > 10.4.10 (Intel MacBook), Python 2.5 and 2.4. I'm using gfortran from > macports, but that shouldn't affect this. > > One thing I can think of is checking your numpy install, as the > _fortranmodule.c is generated by f2py. > > (in general, the latest svn scipy usually needs a recent svn numpy) > > > On 7/3/07, David M. Cooke wrote: > > > On Fri, Jun 29, 2007 at 10:33:24AM -0700, Barry Wark wrote: > > > > I've been unable to compile scipy on OS X 10.4 (intel) from the recent > > > > trunk. Scipy built on this machine as of r2708. The output from > > > > > > > > python setup.py build > > > > > > > > is attached. > > > > > > > > I have fftw3 installed via macports (in /opt/local), and it appears > > > > that the build finds it properly, but the build fails with an error: > > > > > > > > building extension "scipy.fftpack._fftpack" sources > > > > target build/src.macosx-10.3-fat-2.5/_fftpackmodule.c does not exist: > > > > Assuming _fftpackmodule.c was generated with "build_src --inplace" > > > > command. > > > > error: '_fftpackmodule.c' missing > > > > > > > > I would appreciate any advice or suggestions! > > > > > > I've got pretty much the same setup, and no problems. Did you delete the > > > build directory first (rm -rf build)? > > > > > > -- > > > |>|\/|< > > > /--------------------------------------------------------------------------\ > > > |David M. Cooke http://arbutus.physics.mcmaster.ca/dmc/ > > > |cookedm at physics.mcmaster.ca > > > _______________________________________________ > > > SciPy-user mailing list > > > SciPy-user at scipy.org > > > http://projects.scipy.org/mailman/listinfo/scipy-user > > > > > _______________________________________________ > > SciPy-user mailing list > > SciPy-user at scipy.org > > http://projects.scipy.org/mailman/listinfo/scipy-user > > > > -- > |>|\/|< > /--------------------------------------------------------------------------\ > |David M. Cooke http://arbutus.physics.mcmaster.ca/dmc/ > |cookedm at physics.mcmaster.ca > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > From fredmfp at gmail.com Thu Jul 5 16:15:20 2007 From: fredmfp at gmail.com (fred) Date: Thu, 05 Jul 2007 22:15:20 +0200 Subject: [SciPy-user] [f2py] f90 format file... Message-ID: <468D5158.6070304@gmail.com> Hi, I wrote my fortran code in F90 format (I guess called "free" ?), and it seems that f2py can understand it. But how can I enable it ? If I wrote subroutine foo() at column 0, f2py complains. Any clue ? TIA. Cheers, -- http://scipy.org/FredericPetit From fredmfp at gmail.com Thu Jul 5 16:29:13 2007 From: fredmfp at gmail.com (fred) Date: Thu, 05 Jul 2007 22:29:13 +0200 Subject: [SciPy-user] [f2py] f90 format file... In-Reply-To: <468D5158.6070304@gmail.com> References: <468D5158.6070304@gmail.com> Message-ID: <468D5499.3030200@gmail.com> Hmm, renaming file from *.f to *.f90 seems to fix it. Sorry. Cheers, -- http://scipy.org/FredericPetit From steveire at gmail.com Thu Jul 5 17:52:53 2007 From: steveire at gmail.com (Stephen Kelly) Date: Thu, 05 Jul 2007 22:52:53 +0100 Subject: [SciPy-user] Fraction representation Message-ID: <468d6837.1401420a.34d7.0973@mx.google.com> Hi. I wonder if it is possible to add a fraction representation. My casio calculator has a feature to display a real number as a fraction (eg, 0.1 as 1,10. The delimiter is not a comma though). Would it be possible to add such a feature to scipy? Thanks Steve. From fredmfp at gmail.com Thu Jul 5 18:35:41 2007 From: fredmfp at gmail.com (fred) Date: Fri, 06 Jul 2007 00:35:41 +0200 Subject: [SciPy-user] [f2py] f90 format file... In-Reply-To: <468D5499.3030200@gmail.com> References: <468D5158.6070304@gmail.com> <468D5499.3030200@gmail.com> Message-ID: <468D723D.1010900@gmail.com> fred a ?crit : > Hmm, renaming file from *.f to *.f90 seems to fix it. > I still have issue with this, in fact. I use intel fortran compiler. If fortran file are named *.f, my code works really fine. But I don't like the "fixed format", I prefer the "free" one. So I renamed my fortran files to *.f90, and indented the lines as I like. But in this case, my code does not work any more. Typically, I use in my python code something like: KM = calc_KM(KM,...) With *.f files, KM is the right matrix. With *.f90 files, KM is None. Any clue ? TIA. Cheers, -- http://scipy.org/FredericPetit From labbuhl at hotmail.com Thu Jul 5 19:32:06 2007 From: labbuhl at hotmail.com (Lee Abbuhl) Date: Thu, 05 Jul 2007 19:32:06 -0400 Subject: [SciPy-user] [f2py] f90 format file... In-Reply-To: <468D723D.1010900@gmail.com> Message-ID: >From: fred >Reply-To: SciPy Users List >To: SciPy Users List >Subject: Re: [SciPy-user] [f2py] f90 format file... >Date: Fri, 06 Jul 2007 00:35:41 +0200 > >fred a ?crit : > > Hmm, renaming file from *.f to *.f90 seems to fix it. > > >I still have issue with this, in fact. > >I use intel fortran compiler. > >If fortran file are named *.f, my code works really fine. >But I don't like the "fixed format", I prefer the "free" one. >So I renamed my fortran files to *.f90, and indented the lines as I like. >But in this case, my code does not work any more. > >Typically, I use in my python code something like: > >KM = calc_KM(KM,...) > >With *.f files, KM is the right matrix. >With *.f90 files, KM is None. > > >Any clue ? > >TIA. > > >Cheers, > >-- >http://scipy.org/FredericPetit > >_______________________________________________ >SciPy-user mailing list >SciPy-user at scipy.org >http://projects.scipy.org/mailman/listinfo/scipy-user _________________________________________________________________ Don't get caught with egg on your face. Play Chicktionary!? http://club.live.com/chicktionary.aspx?icid=chick_hotmailtextlink2 From lbolla at gmail.com Fri Jul 6 02:53:49 2007 From: lbolla at gmail.com (lorenzo bolla) Date: Fri, 6 Jul 2007 08:53:49 +0200 Subject: [SciPy-user] [f2py] f90 format file... In-Reply-To: <468D723D.1010900@gmail.com> References: <468D5158.6070304@gmail.com> <468D5499.3030200@gmail.com> <468D723D.1010900@gmail.com> Message-ID: <80c99e790707052353s6d68e966h5ba3a181bcc07a38@mail.gmail.com> I use f2py with .f90 files and the intel compiler, and it works fine for me... can you submit a piece of .f90 code? by the way, I specify the intel compiler by this command line: f2py -c -m --fcompiler=intele --compiler=intel lorenzo. On 7/6/07, fred wrote: > > fred a ?crit : > > Hmm, renaming file from *.f to *.f90 seems to fix it. > > > I still have issue with this, in fact. > > I use intel fortran compiler. > > If fortran file are named *.f, my code works really fine. > But I don't like the "fixed format", I prefer the "free" one. > So I renamed my fortran files to *.f90, and indented the lines as I like. > But in this case, my code does not work any more. > > Typically, I use in my python code something like: > > KM = calc_KM(KM,...) > > With *.f files, KM is the right matrix. > With *.f90 files, KM is None. > > > Any clue ? > > TIA. > > > Cheers, > > -- > http://scipy.org/FredericPetit > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fredmfp at gmail.com Fri Jul 6 05:25:46 2007 From: fredmfp at gmail.com (fred) Date: Fri, 06 Jul 2007 11:25:46 +0200 Subject: [SciPy-user] [f2py] f90 format file... In-Reply-To: <80c99e790707052353s6d68e966h5ba3a181bcc07a38@mail.gmail.com> References: <468D5158.6070304@gmail.com> <468D5499.3030200@gmail.com> <468D723D.1010900@gmail.com> <80c99e790707052353s6d68e966h5ba3a181bcc07a38@mail.gmail.com> Message-ID: <468E0A9A.90804@gmail.com> lorenzo bolla a ?crit : > I use f2py with .f90 files and the intel compiler, and it works fine > for me... can you submit a piece of .f90 code? > by the way, I specify the intel compiler by this command line: > f2py -c -m --fcompiler=intele --compiler=intel No problem. Please see the attached files. TIA. -- http://scipy.org/FredericPetit -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Makefile URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: test.py Type: text/x-python Size: 318 bytes Desc: not available URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: test.f URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: test.f90 URL: From fredmfp at gmail.com Fri Jul 6 05:33:52 2007 From: fredmfp at gmail.com (fred) Date: Fri, 06 Jul 2007 11:33:52 +0200 Subject: [SciPy-user] [f2py] f90 format file... In-Reply-To: <80c99e790707052353s6d68e966h5ba3a181bcc07a38@mail.gmail.com> References: <468D5158.6070304@gmail.com> <468D5499.3030200@gmail.com> <468D723D.1010900@gmail.com> <80c99e790707052353s6d68e966h5ba3a181bcc07a38@mail.gmail.com> Message-ID: <468E0C80.4000005@gmail.com> lorenzo bolla a ?crit : > I use f2py with .f90 files and the intel compiler, and it works fine > for me... can you submit a piece of .f90 code? > by the way, I specify the intel compiler by this command line: > f2py -c -m --fcompiler=intele --compiler=intel PS: I use two debian etch boxes, i686 & x86_64. I get the same issue on both. PS2: f2py 2_3649, scipy 0.5.2, numpy 1.0.2 Cheers, -- http://scipy.org/FredericPetit From nwagner at iam.uni-stuttgart.de Fri Jul 6 05:45:32 2007 From: nwagner at iam.uni-stuttgart.de (Nils Wagner) Date: Fri, 06 Jul 2007 11:45:32 +0200 Subject: [SciPy-user] B-orthogonal complement of the null space of A Message-ID: <468E0F3C.4070502@iam.uni-stuttgart.de> Hi all, Consider two symmetric matrices A and B, where B is positive definite and A is positive semidefinite. How can I compute the B-orthogonal complement of the null space of A with scipy.linalg ? Any hint would be appreciated. Nils From lbolla at gmail.com Fri Jul 6 05:52:47 2007 From: lbolla at gmail.com (lorenzo bolla) Date: Fri, 6 Jul 2007 11:52:47 +0200 Subject: [SciPy-user] [f2py] f90 format file... In-Reply-To: <468E0C80.4000005@gmail.com> References: <468D5158.6070304@gmail.com> <468D5499.3030200@gmail.com> <468D723D.1010900@gmail.com> <80c99e790707052353s6d68e966h5ba3a181bcc07a38@mail.gmail.com> <468E0C80.4000005@gmail.com> Message-ID: <80c99e790707060252t1094f83cn253d9b9f36965e63@mail.gmail.com> quite strange. it doesn't happen to me. here is what I get ---------------------- > f2py --fcompiler=intele -c test.f90 -m test running build running config_fc running build_src building extension "test" sources f2py options: [] f2py:> /tmp/tmpkQ6dXv/src.linux-ia64-2.5/testmodule.c creating /tmp/tmpkQ6dXv creating /tmp/tmpkQ6dXv/src.linux-ia64-2.5 Reading fortran codes... Reading file 'test.f90' (format:free) Post-processing... Block: test Block: calc_km Post-processing (stage 2)... Building modules... Building module "test"... Constructing wrapper function "calc_km"... km = calc_km(km) Wrote C/API module "test" to file "/tmp/tmpkQ6dXv/src.linux-ia64-2.5 /testmodule.c" adding '/tmp/tmpkQ6dXv/src.linux-ia64-2.5/fortranobject.c' to sources. adding '/tmp/tmpkQ6dXv/src.linux-ia64-2.5' to include_dirs. copying /xlv1/labsoi_devices/bollalo001/lib/python2.5/site-packages/numpy/f2py/src/fortranobject.c -> /tmp/tmpkQ6dXv/src.linux-ia64-2.5 copying /xlv1/labsoi_devices/bollalo001/lib/python2.5/site-packages/numpy/f2py/src/fortranobject.h -> /tmp/tmpkQ6dXv/src.linux-ia64-2.5 running build_ext customize UnixCCompiler customize UnixCCompiler using build_ext Could not locate executable ifc Could not locate executable efort Could not locate executable efort customize IntelItaniumFCompiler customize IntelItaniumFCompiler using build_ext building 'test' extension compiling C sources C compiler: gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC creating /tmp/tmpkQ6dXv/tmp creating /tmp/tmpkQ6dXv/tmp/tmpkQ6dXv creating /tmp/tmpkQ6dXv/tmp/tmpkQ6dXv/src.linux-ia64-2.5 compile options: '-I/tmp/tmpkQ6dXv/src.linux-ia64-2.5-I/xlv1/labsoi_devices/bollalo001/lib/python2.5/site-packages/numpy/core/include -I/xlv1/labsoi_devices/bollalo001/include/python2.5 -c' gcc: /tmp/tmpkQ6dXv/src.linux-ia64-2.5/fortranobject.c gcc: /tmp/tmpkQ6dXv/src.linux-ia64-2.5/testmodule.c compiling Fortran sources Fortran f77 compiler: /opt/intel/fc/bin/ifort -FI -w90 -w95 -KPIC -cm -O3 -unroll Fortran f90 compiler: /opt/intel/fc/bin/ifort -FR -KPIC -cm -O3 -unroll Fortran fix compiler: /opt/intel/fc/bin/ifort -FI -KPIC -cm -O3 -unroll compile options: '-I/tmp/tmpkQ6dXv/src.linux-ia64-2.5-I/xlv1/labsoi_devices/bollalo001/lib/python2.5/site-packages/numpy/core/include -I/xlv1/labsoi_devices/bollalo001/include/python2.5 -c' ifort:f90: test.f90 ifort: Command line warning: ignoring option '-u'; no argument required /opt/intel/fc/bin/ifort -shared -nofor_main /tmp/tmpkQ6dXv/tmp/tmpkQ6dXv/src.linux-ia64-2.5/testmodule.o /tmp/tmpkQ6dXv/tmp/tmpkQ6dXv/src.linux-ia64-2.5/fortranobject.o /tmp/tmpkQ6dXv/test.o -o ./test.so Removing build directory /tmp/tmpkQ6dXv ---------------------- what is the exact error message you get? lorenzo On 7/6/07, fred wrote: > > lorenzo bolla a ?crit : > > I use f2py with .f90 files and the intel compiler, and it works fine > > for me... can you submit a piece of .f90 code? > > by the way, I specify the intel compiler by this command line: > > f2py -c -m --fcompiler=intele --compiler=intel > PS: I use two debian etch boxes, i686 & x86_64. > I get the same issue on both. > > PS2: f2py 2_3649, scipy 0.5.2, numpy 1.0.2 > > Cheers, > > -- > http://scipy.org/FredericPetit > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fredmfp at gmail.com Fri Jul 6 06:02:30 2007 From: fredmfp at gmail.com (fred) Date: Fri, 06 Jul 2007 12:02:30 +0200 Subject: [SciPy-user] [f2py] f90 format file... In-Reply-To: <80c99e790707060252t1094f83cn253d9b9f36965e63@mail.gmail.com> References: <468D5158.6070304@gmail.com> <468D5499.3030200@gmail.com> <468D723D.1010900@gmail.com> <80c99e790707052353s6d68e966h5ba3a181bcc07a38@mail.gmail.com> <468E0C80.4000005@gmail.com> <80c99e790707060252t1094f83cn253d9b9f36965e63@mail.gmail.com> Message-ID: <468E1336.5090507@gmail.com> lorenzo bolla a ?crit : > quite strange. it doesn't happen to me. here is what I get > I notice you use python 2.5. I use python 2.4. > what is the exact error message you get? I don't get error message. With test_f90, I get KM = None. With test_f, I get the right result. -- http://scipy.org/FredericPetit From lbolla at gmail.com Fri Jul 6 06:13:58 2007 From: lbolla at gmail.com (lorenzo bolla) Date: Fri, 6 Jul 2007 12:13:58 +0200 Subject: [SciPy-user] [f2py] f90 format file... In-Reply-To: <468E1336.5090507@gmail.com> References: <468D5158.6070304@gmail.com> <468D5499.3030200@gmail.com> <468D723D.1010900@gmail.com> <80c99e790707052353s6d68e966h5ba3a181bcc07a38@mail.gmail.com> <468E0C80.4000005@gmail.com> <80c99e790707060252t1094f83cn253d9b9f36965e63@mail.gmail.com> <468E1336.5090507@gmail.com> Message-ID: <80c99e790707060313m3b9d59ecl144686735d8eab5c@mail.gmail.com> gotcha. I suspect you are using the wrong "comment" in the .f90 file, then. you use: !!!f2py and you should use: !f2py with !!!f2py the directive is not read and KM is not "intent(out)", i.e., the subroutine returns None. see the signature of the subroutine below, as parsed by f2py: ------ Building modules... Building module "test"... Constructing wrapper function "calc_km"... calc_km(km,[nx,ny,nz]) Wrote C/API module "test" to file "/tmp/tmp0yiO43/src.linux-ia64-2.5 /testmodule.c" ------ with !f2py the directive intent(out) is read and the function is correctly parsed, and returns KM: ------ Building modules... Building module "test"... Constructing wrapper function "calc_km"... km = calc_km(km) Wrote C/API module "test" to file "/tmp/tmpDYUhc6/src.linux-ia64-2.5 /testmodule.c" ------ lorenzo On 7/6/07, fred wrote: > > lorenzo bolla a ?crit : > > quite strange. it doesn't happen to me. here is what I get > > > I notice you use python 2.5. > I use python 2.4. > > what is the exact error message you get? > I don't get error message. > With test_f90, I get KM = None. > With test_f, I get the right result. > > -- > http://scipy.org/FredericPetit > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fredmfp at gmail.com Fri Jul 6 06:16:52 2007 From: fredmfp at gmail.com (fred) Date: Fri, 06 Jul 2007 12:16:52 +0200 Subject: [SciPy-user] [f2py] f90 format file... In-Reply-To: <80c99e790707060252t1094f83cn253d9b9f36965e63@mail.gmail.com> References: <468D5158.6070304@gmail.com> <468D5499.3030200@gmail.com> <468D723D.1010900@gmail.com> <80c99e790707052353s6d68e966h5ba3a181bcc07a38@mail.gmail.com> <468E0C80.4000005@gmail.com> <80c99e790707060252t1094f83cn253d9b9f36965e63@mail.gmail.com> Message-ID: <468E1694.3020102@gmail.com> lorenzo bolla a ?crit : > quite strange. it doesn't happen to me. here is what I get I have attached the compilation log file. I can see (at least) one difference. test_f: Building module "test_f" ...-> km = calc_km(km) test_f90: Building module "test_f90" ...-> calc_km(km) You have the same case as in the first case... Any clue, f2py dev ? TIA. -- http://scipy.org/FredericPetit -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: log URL: From fredmfp at gmail.com Fri Jul 6 06:21:14 2007 From: fredmfp at gmail.com (fred) Date: Fri, 06 Jul 2007 12:21:14 +0200 Subject: [SciPy-user] [f2py] f90 format file... In-Reply-To: <80c99e790707060313m3b9d59ecl144686735d8eab5c@mail.gmail.com> References: <468D5158.6070304@gmail.com> <468D5499.3030200@gmail.com> <468D723D.1010900@gmail.com> <80c99e790707052353s6d68e966h5ba3a181bcc07a38@mail.gmail.com> <468E0C80.4000005@gmail.com> <80c99e790707060252t1094f83cn253d9b9f36965e63@mail.gmail.com> <468E1336.5090507@gmail.com> <80c99e790707060313m3b9d59ecl144686735d8eab5c@mail.gmail.com> Message-ID: <468E179A.1050909@gmail.com> lorenzo bolla a ?crit : > gotcha. I suspect you are using the wrong "comment" in the .f90 file, > then. > you use: > !!!f2py > and you should use: > !f2py Damn ! Thanks a lot ! Cheers, -- http://scipy.org/FredericPetit From travis at enthought.com Fri Jul 6 08:09:41 2007 From: travis at enthought.com (Travis Vaught) Date: Fri, 6 Jul 2007 07:09:41 -0500 Subject: [SciPy-user] ANN: SciPy Conference Early Registration Reminder Message-ID: <5A9C5264-C85B-4DD8-836D-E63582058720@enthought.com> Greetings, The *SciPy 2007 Conference on Scientific Computing with Python* early registration deadline is July 15, 2007. After this date, the price for registration will increase from $150 to $200. More information on the Conference is here: http://www.scipy.org/ SciPy2007 The registration page is here: https://www.enthought.com/scipy07/ The Conference is to be held on August 16-17. Tutorial Sessions are being offered on August 14-15 (http://www.scipy.org/SciPy2007/ Tutorials). The price to attend Tutorials is $75. The Saturday following the Conference will hold a Sprint session for those interested in pitching in on particular development efforts. (suggestions welcome: http://www.scipy.org/SciPy2007/Sprints) Today is the deadline for abstract submissions for those wanting to present at the conference. Please email to abstracts at scipy.org by midnight US Central Time. From the conference web page: "If you are using Python in Scientific Computing, we'd love to hear from you. If you are interested in presenting at the conference, you may submit an abstract in Plain Text, PDF or MS Word formats to abstracts at scipy.org -- the deadline for abstract submission is July 6, 2007. Papers and/or presentation slides are acceptable and are due by August 3, 2007. Presentations will be allowed 30-35 minutes, depending on the final schedule." We're looking forward to another great gathering. Best, Travis From cookedm at physics.mcmaster.ca Fri Jul 6 08:58:32 2007 From: cookedm at physics.mcmaster.ca (David M. Cooke) Date: Fri, 6 Jul 2007 08:58:32 -0400 Subject: [SciPy-user] installation problems on Mac OS X In-Reply-To: <13A99D27-BD5E-4D53-86C1-770507B6C1BF@cs.kuleuven.be> References: <13A99D27-BD5E-4D53-86C1-770507B6C1BF@cs.kuleuven.be> Message-ID: On Jul 5, 2007, at 09:25 , Giovanni Samaey wrote: > Hi all, > > I am trying to install scipy on my shiny new macbook: > I followed instructions as on www.scipy.org/Installing_SciPy/ > Mac_OS_X/. > Installation of vecLib was done when the computer shipped (I found a > vecLib). The link to the vecLib on the instruction page is dead and > I couldn't find a download on apple.com, so I don't know if that > installation is complete, as the instructions ask. vecLib ships with OS X, so you don't need to install it (vecLib itself may be deprecated, I think it's suggested to use the Accelerate framework, which includes vecLib as a subframework). I think the page is wrong; it's part of the OS, not of the Developer Tools. > Installation goes smoothly, byt scipy.test() gives 2 errors. I tried > both python 2.4.4 and python 2.5.1; no difference. I have the most > recent gfortran and I use gcc 4.0. Scipy is taken from svn. > > ====================================================================== > FAIL: check_dot (scipy.lib.tests.test_blas.test_fblas1_simple) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ > python2.4/site-packages/scipy/lib/blas/tests/test_blas.py", line 76, > in check_dot > assert_almost_equal(f([3j,-4,3-4j],[2,3,1]),-9+2j) > File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ > python2.4/site-packages/numpy/testing/utils.py", line 156, in > assert_almost_equal > assert round(abs(desired - actual),decimal) == 0, msg > AssertionError: > Items are not equal: > ACTUAL: 3.4625784615075479e-37j > DESIRED: (-9+2j) > > ====================================================================== > FAIL: check_dot (scipy.linalg.tests.test_blas.test_fblas1_simple) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ > python2.4/site-packages/scipy/linalg/tests/test_blas.py", line 75, in > check_dot > assert_almost_equal(f([3j,-4,3-4j],[2,3,1]),-9+2j) > File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ > python2.4/site-packages/numpy/testing/utils.py", line 156, in > assert_almost_equal > assert round(abs(desired - actual),decimal) == 0, msg > AssertionError: > Items are not equal: > ACTUAL: 3.4782945282523978e-37j > DESIRED: (-9+2j) > > ---------------------------------------------------------------------- > Ran 1632 tests in 3.592s > > FAILED (failures=2) Don't worry, I get these too. There's a bug there, but no one's been bothered enough to find it. I doubt it'll impact you unless you call those wrapped BLAS routines directly. -- |>|\/|< /------------------------------------------------------------------\ |David M. Cooke http://arbutus.physics.mcmaster.ca/dmc/ |cookedm at physics.mcmaster.ca From lorenzo.isella at gmail.com Fri Jul 6 10:29:00 2007 From: lorenzo.isella at gmail.com (Lorenzo Isella) Date: Fri, 6 Jul 2007 16:29:00 +0200 Subject: [SciPy-user] Moving Grid in SciPy Message-ID: Dear All, A question which I hope will not look too general for this mailing list. I do quite a lot of work of population equations, which generally are a set of 1st order ODE's: dn_k/dt=f_k(t,....) for k=1....N where n_k is the population of the k-th level. Now, in my specific problem the levels at low kappa get progressively empty as the population moves toward high k. This means that, after a certain time, formulating the problem as a "fixed" (hope you understand what I mean here) set of ODE's, I am waisting cpu time on empty levels. It would be better to "recycle" them e.g. by sending levels with k=1,2 into levels with k=N+1, N+2 and so on. This method is called "moving grid" and has been used for quite a while in my field, but before diving into the (maybe too) abundant literature, I would like to find out if there is such a tool already implemented in Python or SciPy directly or whose implementation is rather trivial. At the moment I am using integrate.odeint for my calculations (of course still on a fixed grid). Any suggestions are really welcome. Many thanks Lorenzo From peridot.faceted at gmail.com Fri Jul 6 10:50:45 2007 From: peridot.faceted at gmail.com (Anne Archibald) Date: Fri, 6 Jul 2007 10:50:45 -0400 Subject: [SciPy-user] B-orthogonal complement of the null space of A In-Reply-To: <468E0F3C.4070502@iam.uni-stuttgart.de> References: <468E0F3C.4070502@iam.uni-stuttgart.de> Message-ID: On 06/07/07, Nils Wagner wrote: > Hi all, > > Consider two symmetric matrices A and B, where B is positive definite > and A is positive semidefinite. > How can I compute the B-orthogonal complement of the null space of A > with scipy.linalg ? Find the nullspace of A - which is numerically tricky, of course - using eig or svd; the B-orthogonal complement of a set of vectors is the nullspace of a rectangular matrix VB, where V has a row for each vector in the nullspace. svd should find that nullspace for you. This is not a particularly numerically stable operation. I suspect that the question itself is ill-conditioned, so that no algorithm can reliably solve it, but there may be a better approach. The svd is fairly reliable, though, and lets you make your own decisions about when a linear combination is zero enough. Anne From giovanni.samaey at cs.kuleuven.be Fri Jul 6 11:09:44 2007 From: giovanni.samaey at cs.kuleuven.be (Giovanni Samaey) Date: Fri, 6 Jul 2007 17:09:44 +0200 Subject: [SciPy-user] installation problems on Mac OS X In-Reply-To: References: <13A99D27-BD5E-4D53-86C1-770507B6C1BF@cs.kuleuven.be> Message-ID: <3D69D48E-A4D6-4C39-8AD7-5D326C330FC9@cs.kuleuven.be> > I > think the page is wrong; it's part of the OS, not of the Developer > Tools. Thanks ! I will try to update the wiki next week. >> > > Don't worry, I get these too. There's a bug there, but no one's been > bothered enough to find it. I doubt it'll impact you unless you call > those wrapped BLAS routines directly. thanks! Do you mean that calling scipy.dot is OK? It looks to be, in any case. Best, Giovanni > > -- > |>|\/|< > /------------------------------------------------------------------\ > |David M. Cooke http://arbutus.physics.mcmaster.ca/dmc/ > |cookedm at physics.mcmaster.ca > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user -------------- next part -------------- An HTML attachment was scrubbed... URL: From gary.pajer at gmail.com Mon Jul 9 13:00:00 2007 From: gary.pajer at gmail.com (Gary Pajer) Date: Mon, 9 Jul 2007 13:00:00 -0400 Subject: [SciPy-user] Fraction representation In-Reply-To: <468d6837.1401420a.34d7.0973@mx.google.com> References: <468d6837.1401420a.34d7.0973@mx.google.com> Message-ID: <88fe22a0707091000p5e7054d1uace1ea9bb4fd51d8@mail.gmail.com> On 7/5/07, Stephen Kelly wrote: > Hi. I wonder if it is possible to add a fraction representation. > > My casio calculator has a feature to display a real number as a fraction > (eg, 0.1 as 1,10. The delimiter is not a comma though). Would it be > possible to add such a feature to scipy? I believe that SAGE has a rational data type and it has scipy (I think!), but I don't know anything about how things play together in SAGE. In fact, I don't know much about SAGE at all, so you should check for yourself. http://modular.math.washington.edu/sage/ -gary > > Thanks > > Steve. > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > From fredmfp at gmail.com Mon Jul 9 14:32:12 2007 From: fredmfp at gmail.com (fred) Date: Mon, 9 Jul 2007 20:32:12 +0200 Subject: [SciPy-user] LU: linalg.solve vs. dgetrf/dgetrs fortran subroutines Message-ID: <18066.32556.432189.679611@gargle.gargle.HOWL> Hi, I want to compare execution times between linalg.solve from scipy and dgetrf/dgetrs fortran subroutines (before using cvxopt...) Here my functions: def calc_KW_LU(self, KV): from scipy.linalg import solve from sys import stdout t0 = time.time() print 'Computing kriging weights (scipy LU version)...', stdout.flush() KW = solve(self.KM, KV) self.KW = KW[:-1].squeeze() print '('+str(time.time()-t0)+' s)', print 'done !' stdout.flush() subroutine calc_KW(KW, KM, KV, nbx, nby, nbz) implicit none !f2py real intent(in, out) :: KW !f2py real*8 intent(in) :: KM, KV !f2py integer intent(in) :: nbx, nby, nbz integer :: nbx, nby, nbz real :: KW((2*nbx+1)*(2*nby+1)*(2*nbz+1)) real*8 :: KM((2*nbx+1)*(2*nby+1)*(2*nbz+1)+1, (2*nbx+1)*(2*nby+1)*(2*nbz+1)+1) real*8 :: KV((2*nbx+1)*(2*nby+1)*(2*nbz+1)+1) integer :: ndim integer :: info integer, dimension(:), allocatable :: ipvt ndim = (2*nbx+1)*(2*nby+1)*(2*nbz+1)+1 allocate(ipvt(ndim)) call dgetrf(ndim, ndim, KM, ndim, ipvt, info) call dgetrs('N', ndim, 1, KM, ndim, ipvt, KV, ndim, info) KW = KV(1:size(KV)-1) end subroutine calc_KW This last is called by my python method: def calc_KW_LU_Fmodule(self, KV): from scipy import float32, zeros from sys import stdout from calc_KW_LU import calc_kw t0 = time.time() nbx, nby, nbz = self.nbx, self.nby, self.nbz ndx, ndy, ndz = (2*nbx+1), (2*nby+1), (2*nbz+1) ndt = ndx*ndy*ndz KM, KV = self.KM, self.KV print 'Computing kriging weights (LU Fortran module version)...', stdout.flush() KW = zeros((ndt,1), dtype=float32) KW = calc_kw(KW, KM, KV, nbx, nby, nbz) self.KW = KW.squeeze() print '('+str(time.time()-t0)+' s)', print 'done !' stdout.flush() The execution times are very different: 1) On my Core 2 Duo T7200 (i686, Debian etch): Computing kriging weights (LU version)... (142.409274817 s) done ! Computing kriging weights (LU Fortran module version)... (157.362993002 s) done ! 2) On my Pentium 930 D (x86_64, Debian etch), differences are bigger: Computing kriging weights (LU version)... (283.214334011 s) done ! Computing kriging weights (LU Fortran module version)... (583.182439089 s) done ! Could someone give me any clues ? TIA. Cheers, -- http://scipy.org/FredericPetit From rshepard at appl-ecosys.com Mon Jul 9 14:34:57 2007 From: rshepard at appl-ecosys.com (Rich Shepard) Date: Mon, 9 Jul 2007 11:34:57 -0700 (PDT) Subject: [SciPy-user] NumPy Informational Message Message-ID: When I run the application I'm developing, python responds with: Overwriting info= from scipy.misc (was from numpy.lib.utils) Don't recall having seen this before, and I've not changed numpy or scipy so I do not know why I'm getting this message. Clarification would be appreciated. Rich -- Richard B. Shepard, Ph.D. | The Environmental Permitting Applied Ecosystem Services, Inc. | Accelerator(TM) Voice: 503-667-4517 Fax: 503-667-8863 From rmay at ou.edu Mon Jul 9 17:05:36 2007 From: rmay at ou.edu (Ryan May) Date: Mon, 09 Jul 2007 16:05:36 -0500 Subject: [SciPy-user] SciPy 2007 Message-ID: <4692A320.5010302@ou.edu> Hi, I was curious if anyone had any recommendations for a hotel to stay at for the SciPy 2007 conference. I saw the link to local lodging on CalTech's site, but I was curious if anyone had some place they'd recommend based on experience (or even _not_ recommend). Also, would anyone have any idea how long things would go on Friday? I'm trying to figure out when I should fly back. Thanks, Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma From robert.kern at gmail.com Mon Jul 9 17:51:36 2007 From: robert.kern at gmail.com (Robert Kern) Date: Mon, 09 Jul 2007 16:51:36 -0500 Subject: [SciPy-user] SciPy 2007 In-Reply-To: <4692A320.5010302@ou.edu> References: <4692A320.5010302@ou.edu> Message-ID: <4692ADE8.4090704@gmail.com> Ryan May wrote: > Hi, > > I was curious if anyone had any recommendations for a hotel to stay at > for the SciPy 2007 conference. I saw the link to local lodging on > CalTech's site, but I was curious if anyone had some place they'd > recommend based on experience (or even _not_ recommend). I like the Saga Motor Hotel. No frills, but cheap and close. It's website is down currently, but here are their address and phone number. www.thesagamotorhotel.com 1633 E Colorado Blvd Pasadena, CA 91106 (626) 795-0431 I'm not a fan of the Vagabond Inn although it is also cheap and close. > Also, would anyone have any idea how long things would go on Friday? > I'm trying to figure out when I should fly back. The talks will end around 5. It's okay to shuffle out early to catch a flight. However, people do get together for dinner afterwards. There is also a sprint day on Saturday, so I imagine there will be some hacking on Friday night, too. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From rmay at ou.edu Mon Jul 9 14:57:19 2007 From: rmay at ou.edu (Ryan May) Date: Mon, 09 Jul 2007 13:57:19 -0500 Subject: [SciPy-user] SciPy 2007 Lodging Message-ID: <4692850F.6010204@ou.edu> Hi, I was curious if anyone had any recommendations for a hotel to stay at for the SciPy 2007 conference. I saw the link to local lodging on CalTech's site, but I was curious if anyone had some place they'd recommend based on experience (or even _not_ recommend). Thanks, Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma From kmaheswaran at hotmail.com Mon Jul 9 18:13:56 2007 From: kmaheswaran at hotmail.com (Krishnan Maheswaran) Date: Mon, 09 Jul 2007 22:13:56 +0000 Subject: [SciPy-user] TimeSeriesPackage Message-ID: Hi All, I would appreciate any help on installing the scipy timeseries module ( I had no problem installing the maskedarray package). Please see errors below. Many Thanks, KM Tasks: i - Show python/platform/machine information ie - Show environment information c - Show C compilers information c - Set C compiler (current:None) f - Show Fortran compilers information f - Set Fortran compiler (current:None) e - Edit proposed sys.argv[1:]. Task aliases: 0 - Configure 1 - Build 2 - Install 2 - Install with prefix. 3 - Inplace build 4 - Source distribution 5 - Binary distribution Proposed sys.argv = ['C:\\Python25\\Lib\\site-packages\\timeseries\\setup.py'] Tasks: i - Show python/platform/machine information ie - Show environment information c - Show C compilers information c - Set C compiler (current:None) f - Show Fortran compilers information f - Set Fortran compiler (current:None) e - Edit proposed sys.argv[1:]. Task aliases: 0 - Configure 1 - Build 2 - Install 2 - Install with prefix. 3 - Inplace build 4 - Source distribution 5 - Binary distribution Proposed sys.argv = ['C:\\Python25\\Lib\\site-packages\\timeseries\\setup.py', 'install'] ------------------------------------------------------------------------ running install running build running config_cc unifing config_cc, config, build_clib, build_ext, build commands --compiler options running config_fc unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options running build_src building extension "timeseries.cseries" sources running build_py creating build creating build\lib.win32-2.5 creating build\lib.win32-2.5\timeseries copying .\const.py -> build\lib.win32-2.5\timeseries copying .\parser.py -> build\lib.win32-2.5\timeseries copying .\reportlib.py -> build\lib.win32-2.5\timeseries copying .\tcore.py -> build\lib.win32-2.5\timeseries copying .\tdates.py -> build\lib.win32-2.5\timeseries copying .\tmulti.py -> build\lib.win32-2.5\timeseries copying .\tseries.py -> build\lib.win32-2.5\timeseries copying .\__init__.py -> build\lib.win32-2.5\timeseries creating build\lib.win32-2.5\timeseries\lib copying .\lib\filters.py -> build\lib.win32-2.5\timeseries\lib copying .\lib\interpolate.py -> build\lib.win32-2.5\timeseries\lib copying .\lib\moving_funcs.py -> build\lib.win32-2.5\timeseries\lib copying .\lib\__init__.py -> build\lib.win32-2.5\timeseries\lib creating build\lib.win32-2.5\timeseries\io copying .\io\__init__.py -> build\lib.win32-2.5\timeseries\io creating build\lib.win32-2.5\timeseries\plotlib copying .\plotlib\mpl_timeseries.py -> build\lib.win32-2.5\timeseries\plotlib copying .\plotlib\__init__.py -> build\lib.win32-2.5\timeseries\plotlib running build_ext No module named msvccompiler in numpy.distutils, trying from distutils, trying from distutils. The .net framework sdk needs to be installed before building extension for python. _________________________________________________________________ Advertisement: New jobsjobsjobs.com.au. Find thousands of jobs online now! http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fad%2Eau%2Edoubleclick%2Enet%2Fclk%3B114014868%3B17770752%3Bi%3Fhttp%3A%2F%2Fwww%2Ejobsjobsjobs%2Ecom%2Eau&_t=762242361&_r=Hotmail_email_tagline_July07&_m=EXT From pgmdevlist at gmail.com Mon Jul 9 18:32:22 2007 From: pgmdevlist at gmail.com (Pierre GM) Date: Mon, 9 Jul 2007 18:32:22 -0400 Subject: [SciPy-user] TimeSeriesPackage In-Reply-To: References: Message-ID: <200707091832.23670.pgmdevlist@gmail.com> On Monday 09 July 2007 18:13:56 Krishnan Maheswaran wrote: > Hi All, Hello ! > I would appreciate any help on installing the scipy timeseries module Yay, another user ! More feedback ! > ( I > had no problem installing the maskedarray package). Please see errors > below. So, looks like you're trying to install the package on Windows. Here's an excerpt from the archives (from Matt Knox, the codeveloper of TimeSeries): """ cygwin works pretty seamlessly on windows with python 2.5, so I'd recommend that approach. It doesn't require any special witchcraft that used to be needed for compiling extensions on windows with earlier versions of python. Here are some good general instructions for compiling extensions with cygwin and python 2.5: ?http://boodebr.org/main/python/build-windows-extensions Once you've followed the setup steps there, just open the cygwin shell and you can do "python setup.py build_ext -i" to build the extension in place in that same directory. Or I *believe* "python setup.py install" will compile the extension and install it in your site-packages directory if memory serves me correctly... but I haven't tried that in a while and don't have the necessary stuff setup on my pc here to test. You can even create a nice binary installer by doing "python setup.py bdist_wininst" if you want to pass it around to your friends and family :) """ I remember following this method when I had to install the package on my boss' computer (a Windows machine), and that did work seamlessly indeed when you have Python 2.5. Let us know how it goes. Sincerely, P. From matthieu.brucher at gmail.com Tue Jul 10 02:18:10 2007 From: matthieu.brucher at gmail.com (Matthieu Brucher) Date: Tue, 10 Jul 2007 08:18:10 +0200 Subject: [SciPy-user] TimeSeriesPackage In-Reply-To: References: Message-ID: Hi, What compiler are you using ? The problem with Python for Windows out of the box is that it requires Visual Studio 2003 and not Visual Studio 2005. So you must find the free toolkit from Microsoft, but Microsoft does not support anymore (moved to 2005 which is perfectly logical, gcc does not support the old 3.x series as well) or compile Python with VS 2005. What is more, for the Express version of VS 2005 (the free one, contrary to what Pierre's link says, Microsoft provides a free compiler), you have to install the platform SDK. Matthieu 2007/7/10, Krishnan Maheswaran : > > Hi All, > I would appreciate any help on installing the scipy timeseries module ( I > had no problem installing the maskedarray package). Please see errors > below. > > Many Thanks, > KM > > > > > > Tasks: > i - Show python/platform/machine information > ie - Show environment information > c - Show C compilers information > c - Set C compiler (current:None) > f - Show Fortran compilers information > f - Set Fortran compiler (current:None) > e - Edit proposed sys.argv[1:]. > > Task aliases: > 0 - Configure > 1 - Build > 2 - Install > 2 - Install with prefix. > 3 - Inplace build > 4 - Source distribution > 5 - Binary distribution > > Proposed sys.argv = > ['C:\\Python25\\Lib\\site-packages\\timeseries\\setup.py'] > > > > Tasks: > i - Show python/platform/machine information > ie - Show environment information > c - Show C compilers information > c - Set C compiler (current:None) > f - Show Fortran compilers information > f - Set Fortran compiler (current:None) > e - Edit proposed sys.argv[1:]. > > Task aliases: > 0 - Configure > 1 - Build > 2 - Install > 2 - Install with prefix. > 3 - Inplace build > 4 - Source distribution > 5 - Binary distribution > > Proposed sys.argv = > ['C:\\Python25\\Lib\\site-packages\\timeseries\\setup.py', 'install'] > > ------------------------------------------------------------------------ > running install > running build > running config_cc > unifing config_cc, config, build_clib, build_ext, build commands > --compiler > options > running config_fc > unifing config_fc, config, build_clib, build_ext, build commands > --fcompiler > options > running build_src > building extension "timeseries.cseries" sources > running build_py > creating build > creating build\lib.win32-2.5 > creating build\lib.win32-2.5\timeseries > copying .\const.py -> build\lib.win32-2.5\timeseries > copying .\parser.py -> build\lib.win32-2.5\timeseries > copying .\reportlib.py -> build\lib.win32-2.5\timeseries > copying .\tcore.py -> build\lib.win32-2.5\timeseries > copying .\tdates.py -> build\lib.win32-2.5\timeseries > copying .\tmulti.py -> build\lib.win32-2.5\timeseries > copying .\tseries.py -> build\lib.win32-2.5\timeseries > copying .\__init__.py -> build\lib.win32-2.5\timeseries > creating build\lib.win32-2.5\timeseries\lib > copying .\lib\filters.py -> build\lib.win32-2.5\timeseries\lib > copying .\lib\interpolate.py -> build\lib.win32-2.5\timeseries\lib > copying .\lib\moving_funcs.py -> build\lib.win32-2.5\timeseries\lib > copying .\lib\__init__.py -> build\lib.win32-2.5\timeseries\lib > creating build\lib.win32-2.5\timeseries\io > copying .\io\__init__.py -> build\lib.win32-2.5\timeseries\io > creating build\lib.win32-2.5\timeseries\plotlib > copying .\plotlib\mpl_timeseries.py -> > build\lib.win32-2.5\timeseries\plotlib > copying .\plotlib\__init__.py -> build\lib.win32-2.5\timeseries\plotlib > running build_ext > No module named msvccompiler in numpy.distutils, trying from distutils, > trying from distutils. The .net framework sdk needs to be installed before > building extension for python. > > _________________________________________________________________ > Advertisement: New jobsjobsjobs.com.au. Find thousands of jobs online now! > > http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fad%2Eau%2Edoubleclick%2Enet%2Fclk%3B114014868%3B17770752%3Bi%3Fhttp%3A%2F%2Fwww%2Ejobsjobsjobs%2Ecom%2Eau&_t=762242361&_r=Hotmail_email_tagline_July07&_m=EXT > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kmaheswaran at hotmail.com Tue Jul 10 10:35:28 2007 From: kmaheswaran at hotmail.com (Krishnan Maheswaran) Date: Tue, 10 Jul 2007 14:35:28 +0000 Subject: [SciPy-user] TimeSeriesPackage In-Reply-To: <200707091832.23670.pgmdevlist@gmail.com> Message-ID: Thanks. I built the binaries using MinGW. >From: Pierre GM >Reply-To: SciPy Users List >To: SciPy Users List >Subject: Re: [SciPy-user] TimeSeriesPackage >Date: Mon, 9 Jul 2007 18:32:22 -0400 > >On Monday 09 July 2007 18:13:56 Krishnan Maheswaran wrote: > > Hi All, >Hello ! > > > I would appreciate any help on installing the scipy timeseries module >Yay, another user ! More feedback ! > > > ( I > > had no problem installing the maskedarray package). Please see errors > > below. > >So, looks like you're trying to install the package on Windows. Here's an >excerpt from the archives (from Matt Knox, the codeveloper of TimeSeries): > >""" >cygwin works pretty seamlessly on windows with python 2.5, so I'd recommend >that approach. It doesn't require any special witchcraft that used to be >needed for compiling extensions on windows with earlier versions of python. >Here are some good general instructions for compiling extensions with >cygwin >and python 2.5: http://boodebr.org/main/python/build-windows-extensions > >Once you've followed the setup steps there, just open the cygwin shell and >you >can do "python setup.py build_ext -i" to build the extension in place in >that >same directory. Or I *believe* "python setup.py install" will compile the >extension and install it in your site-packages directory if memory serves >me >correctly... but I haven't tried that in a while and don't have the >necessary >stuff setup on my pc here to test. You can even create a nice binary >installer >by doing "python setup.py bdist_wininst" if you want to pass it around to >your >friends and family :) >""" > >I remember following this method when I had to install the package on my >boss' >computer (a Windows machine), and that did work seamlessly indeed when you >have Python 2.5. Let us know how it goes. > >Sincerely, >P. >_______________________________________________ >SciPy-user mailing list >SciPy-user at scipy.org >http://projects.scipy.org/mailman/listinfo/scipy-user _________________________________________________________________ Advertisement: Are you paid what you're worth? Find out: SEEK Salary Centre http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fninemsn%2Eseek%2Ecom%2Eau%2Fcareer%2Dresources%2Fsalary%2Dcentre%2F%3Ftracking%3Dsk%3Ahet%3Asc%3Anine%3A0%3Ahot%3Atext&_t=764565661&_r=july07_endtext_salary&_m=EXT From jakobsybren at gmail.com Wed Jul 4 13:59:09 2007 From: jakobsybren at gmail.com (Jakob van Bethlehem) Date: Wed, 4 Jul 2007 17:59:09 +0000 (UTC) Subject: [SciPy-user] scipy import warning - how to remove References: <20070702085805.99798.qmail@web27407.mail.ukl.yahoo.com> Message-ID: Robert VERGNES yahoo.fr> writes: > > > Hello,each time I do a from scipy import * I get a warning. How to remove it ?This has a bad result on py2exe which seems to believe it is an error and stop starting my application.Any ideas ?(how to force not to importe scipytest ?)ThanxRobertPlatform - Windows - Scipy 0.5.2from scipy import I'm not sure whether it is possible to prevent the module from loading. You can however prevent the message quite easily (on Linux anyway) by going to the packages-dir of your scipy installation (...../site-packages/scipy) In this directory give the following command: find . -name "*.py" -exec sed -i -e "s/ScipyTest/NumpyTest/g" "{}" \; This will replace the deprecated definitions/calls of ScipyTest by the new NumpyTest, including the also deprecated class ScipyTestCase. (I suppose this is precisely what has been done in the svn-version) From openopt at ukr.net Wed Jul 11 03:11:13 2007 From: openopt at ukr.net (dmitrey) Date: Wed, 11 Jul 2007 10:11:13 +0300 Subject: [SciPy-user] matlab isequal equivalent in python or numpy Message-ID: <46948291.1040301@ukr.net> I need check does array1 equal to array2 or no, lots of times. In MATLAB I just used if isequal(array1, array2) ... I guess it uses binary code comparison, w/o translating to numbers, because isequal works with any types of objects, not only numeric ones in python I use if array1.shape==array2.shape and all(array1==array2):... is it possible to use something more faster and/or better? D. From lbolla at gmail.com Wed Jul 11 06:03:06 2007 From: lbolla at gmail.com (lorenzo bolla) Date: Wed, 11 Jul 2007 12:03:06 +0200 Subject: [SciPy-user] matlab isequal equivalent in python or numpy In-Reply-To: <46948291.1040301@ukr.net> References: <46948291.1040301@ukr.net> Message-ID: <80c99e790707110303q75b7002u44cee56b30b7804f@mail.gmail.com> can't you use "numpy.all" instead of "all"? In [786]: x = numpy.arange(10) In [787]: y = numpy.arange(10) In [788]: z = numpy.arange(11) In [789]: all(x==y) Out[789]: True In [790]: all(x==z) ------------------------------------ In [791]: numpy.all(x==y) Out[791]: True In [792]: numpy.all(x==z) Out[792]: False hth, lorenzo On 7/11/07, dmitrey wrote: > > I need check does array1 equal to array2 or no, lots of times. > In MATLAB I just used > > if isequal(array1, array2) ... > > I guess it uses binary code comparison, w/o translating to numbers, > because isequal works with any types of objects, not only numeric ones > > in python I use > > if array1.shape==array2.shape and all(array1==array2):... > > is it possible to use something more faster and/or better? > D. > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nwagner at iam.uni-stuttgart.de Wed Jul 11 11:00:24 2007 From: nwagner at iam.uni-stuttgart.de (Nils Wagner) Date: Wed, 11 Jul 2007 17:00:24 +0200 Subject: [SciPy-user] B-orthogonal complement of the null space of A In-Reply-To: References: <468E0F3C.4070502@iam.uni-stuttgart.de> Message-ID: <4694F088.5020503@iam.uni-stuttgart.de> Anne Archibald wrote: > On 06/07/07, Nils Wagner wrote: > >> Hi all, >> >> Consider two symmetric matrices A and B, where B is positive definite >> and A is positive semidefinite. >> How can I compute the B-orthogonal complement of the null space of A >> with scipy.linalg ? >> > > Find the nullspace of A - which is numerically tricky, of course - > using eig or svd; the B-orthogonal complement of a set of vectors is > the nullspace of a rectangular matrix VB, where V has a row for each > vector in the nullspace. svd should find that nullspace for you. > > This is not a particularly numerically stable operation. I suspect > that the question itself is ill-conditioned, so that no algorithm can > reliably solve it, but there may be a better approach. The svd is > fairly reliable, though, and lets you make your own decisions about > when a linear combination is zero enough. > > Anne > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > Hi Anne, Thank you very much for your detailed information ! I have enclosed a small script (which is hopefully correct) illustrating the computation of the B-orthogonal complement of the null space of A for dense matrices. How can I extend it to sparse matrices ? I mean what can be used instead of linalg.qr and linalg.svd ? Nils From nwagner at iam.uni-stuttgart.de Wed Jul 11 11:03:23 2007 From: nwagner at iam.uni-stuttgart.de (Nils Wagner) Date: Wed, 11 Jul 2007 17:03:23 +0200 Subject: [SciPy-user] B-orthogonal complement of the null space of A In-Reply-To: <4694F088.5020503@iam.uni-stuttgart.de> References: <468E0F3C.4070502@iam.uni-stuttgart.de> <4694F088.5020503@iam.uni-stuttgart.de> Message-ID: <4694F13B.9050009@iam.uni-stuttgart.de> Nils Wagner wrote: > Anne Archibald wrote: > >> On 06/07/07, Nils Wagner wrote: >> >> >>> Hi all, >>> >>> Consider two symmetric matrices A and B, where B is positive definite >>> and A is positive semidefinite. >>> How can I compute the B-orthogonal complement of the null space of A >>> with scipy.linalg ? >>> >>> >> Find the nullspace of A - which is numerically tricky, of course - >> using eig or svd; the B-orthogonal complement of a set of vectors is >> the nullspace of a rectangular matrix VB, where V has a row for each >> vector in the nullspace. svd should find that nullspace for you. >> >> This is not a particularly numerically stable operation. I suspect >> that the question itself is ill-conditioned, so that no algorithm can >> reliably solve it, but there may be a better approach. The svd is >> fairly reliable, though, and lets you make your own decisions about >> when a linear combination is zero enough. >> >> Anne >> _______________________________________________ >> SciPy-user mailing list >> SciPy-user at scipy.org >> http://projects.scipy.org/mailman/listinfo/scipy-user >> >> > Hi Anne, > > Thank you very much for your detailed information ! > I have enclosed a small script (which is hopefully correct) > illustrating the computation of the B-orthogonal complement of the null > space of A for dense matrices. > How can I extend it to sparse matrices ? I mean what can be used instead > of linalg.qr and linalg.svd ? > > Nils > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > > Oops, I missed out the attachment. Nils -------------- next part -------------- A non-text attachment was scrubbed... Name: orthogonalcomplement.py Type: text/x-python Size: 674 bytes Desc: not available URL: From fie.pye at atlas.cz Wed Jul 11 15:18:00 2007 From: fie.pye at atlas.cz (fie.pye at atlas.cz) Date: Wed, 11 Jul 2007 19:18:00 GMT Subject: [SciPy-user] BLAS, LAPACK, ATLAS libraries. Message-ID: >--------------------------------------------------------- >Od: David Cournapeau >P?ijato: 3.7.2007 4:16:32 >P?edm?t: Re: [SciPy-user] BLAS, LAPACK, ATLAS libraries. > >fie.pye at atlas.cz wrote: > >> Hello. > >> > >> I would like to install NumPy and SciPy modules. I compiled and install BLAS, LAPACK and ATLAS libraries. After installation and importing NumPy I obtained message: > >> > >>>>> import numpy > >> Traceback (most recent call last): > >> File "", line 1, in > >> File "/usr/local/python/python2.5.1/lib/python2.5/site-packages/numpy/__init__.py", line 43, in > >> import linalg > >> File "/usr/local/python/python2.5.1/lib/python2.5/site-packages/numpy/linalg/__init__.py", line 4, in > >> from linalg import * > >> File "/usr/local/python/python2.5.1/lib/python2.5/site-packages/numpy/linalg/linalg.py", line 25, in > >> from numpy.linalg import lapack_lite > >> ImportError: liblapack.so: cannot open shared object file: No such file or directory > >> It seams to me that BLAS and LAPACK installation is OK. > >Well, it may not be :) If you do (once you exported LD_LIBRARY_PATH): > > > >ldd > >/usr/local/python/python2.5.1/lib/python2.5/site-packages/numpy/linalg/lapack_lite.so > > > >What do you get ? The most useful information, actually, is to give us > >the log of python setup.py config &> log when building numpy and scipy. > >> > >> # LAPACK installation Make.inc > >> PLAT = _LINUX > >> FORTRAN = gfortran > >> OPTS = -funroll-all-loops -O3 -fpic > >> DRVOPTS = $(OPTS) > >> NOOPT = > >Here you forgot NOOPT = -fpic. Then, how did you compile atlas ? You > >should try first without atlas at all, I think: compile blas, lapack, > >and check that python setup.py config picks up the libraries. > > > >As a note, there are source rpms available for blas/lapack/atlas/scipy: > >the binary rpms do not support CENTOS, but I think building the rpm on > >CENTOS should not be too difficult. Everything is taken care of in the > >rpms: options, compatible fortran ABI, full pic version of liblapack to > >build complete LAPACK based on ATLAS, etc... > > > >http://software.opensuse.org/download/home:/ashigabou/ (pick up source > >rpm for FC 6 or 7, this should be the more similar to centos). > > > >If this does not work, I would like to hear about it, > > > >David > >_______________________________________________ > >SciPy-user mailing list > >SciPy-user at scipy.org > >http://projects.scipy.org/mailman/listinfo/scipy-user > > > Hi David. Thank you for your response. Based on your notes I recompiled BLAS and LAPACK libraries and build and installed python2.5.1 and numpy again. Unfortunately the error appears again >>> import numpy Traceback (most recent call last): File "", line 1, in File "/usr/local/python/python2.5.1/lib/python2.5/site-packages/numpy/__init__.py", line 43, in import linalg File "/usr/local/python/python2.5.1/lib/python2.5/site-packages/numpy/linalg/__init__.py", line 4, in from linalg import * File "/usr/local/python/python2.5.1/lib/python2.5/site-packages/numpy/linalg/linalg.py", line 25, in from numpy.linalg import lapack_lite ImportError: /usr/local/python/python2.5.1/lib/python2.5/site-packages/numpy/linalg/lapack_lite.so: undefined symbol: _gfortran_concat_string Installation information: # ldd /usr/local/python/python2.5.1/lib/python2.5/site-packages/numpy/linalg/lapack_lite.so libg2c.so.0 => /usr/lib64/libg2c.so.0 (0x00002aaaaae52000) libm.so.6 => /lib64/libm.so.6 (0x00002aaaab073000) libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00002aaaab2f6000) libc.so.6 => /lib64/libc.so.6 (0x00002aaaab504000) /lib64/ld-linux-x86-64.so.2 (0x0000555555554000) # /usr/local/lib64/blas -rw-r--r-- 1 root root 612242 Jul 10 23:25 libblas.a -rwxr-xr-x 1 root root 358087 Jul 10 23:25 libblas.so lrwxrwxrwx 1 root root 9 Jul 10 23:27 libfblas.a -> libblas.a # /usr/local/lib64/lapack lrwxrwxrwx 1 root root 11 Jul 10 23:36 libflapack.a -> liblapack.a -rw-r--r-- 1 root root 10938922 Jul 10 23:34 liblapack.a -rwxr-xr-x 1 root root 6948895 Jul 10 23:38 liblapack.so for python2.5.1 configuration see attached file: python_config.log.gz for numpy building and installation see attached files: numpy_build.log.gz, numpy_install.log.gz fie pye -------------- next part -------------- A non-text attachment was scrubbed... Name: python_config.log.gz Type: application/x-gzip Size: 22512 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: numpy_build.log.gz Type: application/x-gzip Size: 3747 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: numpy_install.log.gz Type: application/x-gzip Size: 6180 bytes Desc: not available URL: From david at ar.media.kyoto-u.ac.jp Thu Jul 12 00:05:53 2007 From: david at ar.media.kyoto-u.ac.jp (David Cournapeau) Date: Thu, 12 Jul 2007 13:05:53 +0900 Subject: [SciPy-user] BLAS, LAPACK, ATLAS libraries. In-Reply-To: References: Message-ID: <4695A8A1.9030204@ar.media.kyoto-u.ac.jp> > Hi David. > > Thank you for your response. Based on your notes I recompiled BLAS and LAPACK libraries and build and installed python2.5.1 and numpy again. Unfortunately the error appears again > >>>> import numpy > Traceback (most recent call last): > File "", line 1, in > File "/usr/local/python/python2.5.1/lib/python2.5/site-packages/numpy/__init__.py", line 43, in > import linalg > File "/usr/local/python/python2.5.1/lib/python2.5/site-packages/numpy/linalg/__init__.py", line 4, in > from linalg import * > File "/usr/local/python/python2.5.1/lib/python2.5/site-packages/numpy/linalg/linalg.py", line 25, in > from numpy.linalg import lapack_lite > ImportError: /usr/local/python/python2.5.1/lib/python2.5/site-packages/numpy/linalg/lapack_lite.so: undefined symbol: _gfortran_concat_string > This is typically because you did not use the same fortran compiler everywhere (g77 vs gfortran): the default fortran compiler on fedora core (at least since 5) is gfortran, but this is not the default for numpy or scipy. Again, this is exactly for this kind of things that I packaged blas/lapack/atlas/numpy/scipy. Did you try building the source rpms instead of building everything from sources ? cheers, David From rhc28 at cornell.edu Thu Jul 12 01:14:38 2007 From: rhc28 at cornell.edu (Rob Clewley) Date: Thu, 12 Jul 2007 01:14:38 -0400 Subject: [SciPy-user] ANN: PyDSTool 0.85 released Message-ID: We have released an update to the PyDSTool dynamical systems and modeling package at http://sourceforge.net/projects/pydstool. There are lots of minor improvements and fixes in this version, but a powerful new feature is the support for user-defined functions for continuation using PyCont. We have also added some tools for basic phase-plane analysis, calculation of phase response curves for oscillators, and support for some special math functions. Please see the release notes for more details, and the documentation at http://pydstool.sourceforge.net. We plan to continue to add features and improve our code over the coming months, and we look forward to hearing feedback on our progress. In particular, contributions are very welcome. Thanks again to the Scipy, Numpy, Matplotlib, and SWIG developers for facilitating our work! -- The PyDSTool developers From v.vauchey at gmail.com Thu Jul 12 03:08:03 2007 From: v.vauchey at gmail.com (vincent vauchey) Date: Thu, 12 Jul 2007 09:08:03 +0200 Subject: [SciPy-user] BLAS, LAPACK, ATLAS libraries. In-Reply-To: <4695A8A1.9030204@ar.media.kyoto-u.ac.jp> References: <4695A8A1.9030204@ar.media.kyoto-u.ac.jp> Message-ID: <36fdacbc0707120008v1142067ap2e126aeac2326d6a@mail.gmail.com> Hello, there are many time I obtain the same problem because fortran compiler used was not the good, like you i tried to install lapack and other libraries, but that failed. Now i used following line to install numpy ans scipy and on many different computer with rh3, and i haven't problem. " python setup.py build build_ext -lg2c install " It is maybe useless, but try that. Regards. Vincent 2007/7/12, David Cournapeau : > > > > Hi David. > > > > Thank you for your response. Based on your notes I recompiled BLAS and > LAPACK libraries and build and installed python2.5.1 and numpy again. > Unfortunately the error appears again > > > >>>> import numpy > > Traceback (most recent call last): > > File "", line 1, in > > File > "/usr/local/python/python2.5.1/lib/python2.5/site-packages/numpy/__init__.py", > line 43, in > > import linalg > > File > "/usr/local/python/python2.5.1/lib/python2.5/site-packages/numpy/linalg/__init__.py", > line 4, in > > from linalg import * > > File > "/usr/local/python/python2.5.1/lib/python2.5/site-packages/numpy/linalg/linalg.py", > line 25, in > > from numpy.linalg import lapack_lite > > ImportError: > /usr/local/python/python2.5.1/lib/python2.5/site-packages/numpy/linalg/lapack_lite.so: > undefined symbol: _gfortran_concat_string > > > This is typically because you did not use the same fortran compiler > everywhere (g77 vs gfortran): the default fortran compiler on fedora > core (at least since 5) is gfortran, but this is not the default for > numpy or scipy. Again, this is exactly for this kind of things that I > packaged blas/lapack/atlas/numpy/scipy. Did you try building the source > rpms instead of building everything from sources ? > > cheers, > > David > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > -------------- next part -------------- An HTML attachment was scrubbed... URL: From asefu at fooie.net Thu Jul 12 21:12:21 2007 From: asefu at fooie.net (Fahd Sultan) Date: Thu, 12 Jul 2007 21:12:21 -0400 Subject: [SciPy-user] scipy fblas.so functions not found In-Reply-To: <467CF54A.1080406@ar.media.kyoto-u.ac.jp> References: <20070614134122.GB21936@localhost.ee.columbia.edu> <20070614140423.GC21936@localhost.ee.columbia.edu> <20070614193211.GG14029@avicenna.cc.columbia.edu> <467B68B4.1060903@fooie.net> <467B6908.70901@ar.media.kyoto-u.ac.jp> <467C4F2A.2010206@fooie.net> <467CF54A.1080406@ar.media.kyoto-u.ac.jp> Message-ID: <4696D175.4060900@fooie.net> Hi, I figured out the issues. I had to alter the spec files for redhat 4 AS. for instance I had to add to each spec file: %define is_redhat %(test -e /etc/redhat-release && echo 1 || echo 0) I had to add a condition BuildRequires and requires to use gcc4-gfortan and lapack as opposed to gcc-fortran and lapack3 --from python-numpy.spec %if %is_redhat BuildRequires: gcc4-gfortran python python-devel lapack-devel > 3.0 refblas3-devel requires: gcc4-gfortran lapack > 3.0 refblas3 %endif "--record=INSTALLED_FILES" gave me an error when I tested manually so I also added: %if %is_redhat python setup.py install --root=$RPM_BUILD_ROOT \ --prefix=/usr %endif and %if %is_redhat %define NUMPY_EGG 0 %endif David Cournapeau wrote: > Fahd Sultan wrote: > >> I had to recompile the rpms from your src rpms since the rpms dont >> install on Redhat AS 4.4. >> > Mmmh, this distribution is not supported by the build system, so if > package convention differ, it may cause problems I see unnoticed, since > every rpm distribution decides it is a good idea to change conventions. > I assumed wrongly that you used fedora core, not the official RH thing. > > The distribution I am supporting for now are FC (5, 6, and 7) on x86 and > x86_64 and opensuse (both x86 and x86_64). That does not mean I am not > interested in improving the rpm for AS support, of course; it will just > be trickier because I do not have access to such a distribution, and > packaging is highly distribution dependent. > >> during the build of python-numpy I get this error: >> (any ideas?) >> I couldn't find an aborted install anywhere, not sure whats going on >> with this RPM. >> >> > Do you use 32 or 64 bits arch ? The problem seems to be related to the > library location. What would be useful for me is a complete log of the > rpm building (rpmbuild -ba python-numpy.spec &> build.log). Below are a > more detailed explanation on the problem: > > If you do not know anything about rpm packaging, here is the problem: > build rpm from sources involve a series of steps, the last one being > install, where you list the files to be installed. For example, all > python2.4 files are installed in /usr/lib/python2.4/site-packages/ > (/usr/lib64/python2.4/site-packages for 64 bits arch). You can see in > the python-numpy.spec file: > > %files > %defattr(-,root,root,-) > %{_bindir}/* > # the following does not work on 64 bits arch. > #%{py_sitedir}/* > # I shamelessly copied the install from official fedora core numeric. > %{_libdir}/python*/site-packages/numpy/ > # the egg is not produced on fedora 7 (something to do with different > # configuration wrt setuptools on the build farm ?) > %if 0%{?fedora_version} > %define NUMPY_EGG 0 > %else > %define NUMPY_EGG 1 > %endif > > %if %{NUMPY_EGG} > %{_libdir}/python*/site-packages/numpy*.egg-info > %endif > # Why the following are installed ??? > %{_libdir}/python*/site-packages/COMPATIBILITY > %{_libdir}/python*/site-packages/scipy_compatibility > %{_libdir}/python*/site-packages/site.cfg.example > > Now, in your case, it seems like there is nothing in > > /var/tmp/python-numpy-1.0.3-build/usr/lib64/python*/site-packages/numpy > > which is a bit strange... As I don't have access to redhat AS, it would be useful for me to know which files are where, to see if the fs layout is different. > > David > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > > From david.warde.farley at utoronto.ca Fri Jul 13 00:40:27 2007 From: david.warde.farley at utoronto.ca (David Warde-Farley) Date: Fri, 13 Jul 2007 00:40:27 -0400 Subject: [SciPy-user] (Mac) Close a plot window, crash IPython? Message-ID: Hi folks, I've recently acquired myself a shiny new Mac and have vowed not to install Matlab on it, so I've been investigating going to SciPy entirely for my scientific computing needs. I installed MacPython 2.5 and the SciPy Superpack listed on the SciPy website. My problem is this: if I start IPython with ipython -pylab, and say, plot(arange(0,9),arange(0,9)**2) then close the plot window, and repeat the same command, IPython crashes completely. Is this normal behaviour? The obvious solution is "don't close plot windows" but that seems rather unsatisfactory. Any ideas, hints, fixes, workarounds? Thanks, David From david at ar.media.kyoto-u.ac.jp Fri Jul 13 00:30:09 2007 From: david at ar.media.kyoto-u.ac.jp (David Cournapeau) Date: Fri, 13 Jul 2007 13:30:09 +0900 Subject: [SciPy-user] (Mac) Close a plot window, crash IPython? In-Reply-To: References: Message-ID: <4696FFD1.9020504@ar.media.kyoto-u.ac.jp> David Warde-Farley wrote: > Hi folks, > > I've recently acquired myself a shiny new Mac and have vowed not to > install Matlab on it, so I've been investigating going to SciPy > entirely for my scientific computing needs. I installed MacPython 2.5 > and the SciPy Superpack listed on the SciPy website. > > My problem is this: if I start IPython with ipython -pylab, and say, > > plot(arange(0,9),arange(0,9)**2) > > then close the plot window, and repeat the same command, IPython > crashes completely. Is this normal behaviour? A crash is never a normal behaviour :) > The obvious solution is > "don't close plot windows" but that seems rather unsatisfactory. > Indeed. The first thing would be to check whether the problem is matplotlib, ipython or scipy: If you repeat arange with the same arguments as given to the plot command, do you have any crash ? If you plot several times the same figure but in a script run by python instead of ipython, does it crash to ? David From david.warde.farley at utoronto.ca Fri Jul 13 00:57:55 2007 From: david.warde.farley at utoronto.ca (David Warde-Farley) Date: Fri, 13 Jul 2007 00:57:55 -0400 Subject: [SciPy-user] (Mac) Close a plot window, crash IPython? In-Reply-To: <4696FFD1.9020504@ar.media.kyoto-u.ac.jp> References: <4696FFD1.9020504@ar.media.kyoto-u.ac.jp> Message-ID: <35104B3E-45F8-450F-A2AB-D9FCB80BEB16@utoronto.ca> On 13-Jul-07, at 12:30 AM, David Cournapeau wrote: > A crash is never a normal behaviour :) Eh, by normal I mean "documented" I guess :) > Indeed. The first thing would be to check whether the problem is > matplotlib, ipython or scipy: If you repeat arange with the same > arguments as given to the plot command, do you have any crash ? If you > plot several times the same figure but in a script run by python > instead > of ipython, does it crash to ? Plotting several times in the same figure isn't a problem, even at the interpreter. The problem seems to be closing the plot window, and issuing a command that tries to communicate with it i.e. using clf() will cause a crash as well. I've been able to reproduce this at a normal python interpreter with from pylab import * ion() # interactive mode, accomplished with -pylab in ipython plot(arange(0,9),arange(0,9)**2) # Close the window when the plot appears plot(arange(0,9),arange(0,9)) # or any other plotting command like clf (), I've also tried hist() David From fperez.net at gmail.com Fri Jul 13 01:29:13 2007 From: fperez.net at gmail.com (Fernando Perez) Date: Thu, 12 Jul 2007 23:29:13 -0600 Subject: [SciPy-user] (Mac) Close a plot window, crash IPython? In-Reply-To: <35104B3E-45F8-450F-A2AB-D9FCB80BEB16@utoronto.ca> References: <4696FFD1.9020504@ar.media.kyoto-u.ac.jp> <35104B3E-45F8-450F-A2AB-D9FCB80BEB16@utoronto.ca> Message-ID: On 7/12/07, David Warde-Farley wrote: > On 13-Jul-07, at 12:30 AM, David Cournapeau wrote: > > > A crash is never a normal behaviour :) > > Eh, by normal I mean "documented" I guess :) No, not really. We'll need a bit more info to try and figure out what's going on: 1. Versions of IPython, Python and Matplotlib you're running. I'm not an OSX user, so I'm not exactly sure what the 'superpack' ships. 2. What mpl backend are you running? And what's the version of the underlying toolkit for python (tk, wx, pygtk, qt...)? This should most certainly NOT be happening. Cheers, f From faltet at carabos.com Fri Jul 13 07:34:46 2007 From: faltet at carabos.com (Francesc Altet) Date: Fri, 13 Jul 2007 13:34:46 +0200 Subject: [SciPy-user] [ANN] PyTables and PyTables Pro 2.0 released Message-ID: <200707131334.47121.faltet@carabos.com> ======================================== Announcing PyTables & PyTables Pro 2.0 ======================================== PyTables is a library for managing hierarchical datasets and designed to efficiently cope with extremely large amounts of data with support for full 64-bit file addressing. PyTables runs on top of the HDF5 library and NumPy package for achieving maximum throughput and convenient use. After more than one year of continuous development and about five months of alpha, beta and release candidates, we are very happy to announce that the PyTables and PyTables Pro 2.0 are here. We are pretty confident that the 2.0 versions are ready to be used in production scenarios, bringing higher performance, better portability (specially in 64-bit environments) and more stability than the 1.x series. You can download a source package of the PyTables 2.0 with generated PDF and HTML docs and binaries for Windows from http://www.pytables.org/download/stable/ For an on-line version of the manual, visit: http://www.pytables.org/docs/manual-2.0 In case you want to know more in detail what has changed in this version, have a look at ``RELEASE_NOTES.txt``. Find the HTML version for this document at: http://www.pytables.org/moin/ReleaseNotes/Release_2.0 If you are a user of PyTables 1.x, probably it is worth for you to look at ``MIGRATING_TO_2.x.txt`` file where you will find directions on how to migrate your existing PyTables 1.x apps to the 2.0 version. You can find an HTML version of this document at http://www.pytables.org/moin/ReleaseNotes/Migrating_To_2.x Introducing PyTables Pro 2.0 ============================ The main difference between PyTables Pro and regular PyTables is that the Pro version includes OPSI, a new indexing technology, allowing to perform data lookups in tables exceeding 10 gigarows (10**10 rows) in less than 1 tenth of a second. Wearing more than 15000 tests and having passed the complete test suite in the most common platforms (Windows, Mac OS X, Linux 32-bit and Linux 64-bit), we are pretty confident that PyTables Pro 2.0 is ready to be used in production scenarios, bringing maximum stability and top performance to those users who need it. For more info about PyTables Pro, see: http://www.carabos.com/products/pytables-pro For the operational details and benchmarks see the OPSI white paper: http://www.carabos.com/docs/OPSI-indexes.pdf Coinciding with the publication of PyTables Pro we are introducing an innovative liberation process that will allow to ultimate release the PyTables Pro 2.x series as open source. You may want to know that, by buying a PyTables Pro license, you are contributing to this process. For details, see: http://www.carabos.com/liberation New features of PyTables 2.0 series =================================== - A complete refactoring of many, many modules in PyTables. With this, the different parts of the code are much better integrated and code redundancy is kept under a minimum. A lot of new optimizations have been included as well, making working with it a smoother experience than ever before. - NumPy is finally at the core! That means that PyTables no longer needs numarray in order to operate, although it continues to be supported (as well as Numeric). This also means that you should be able to run PyTables in scenarios combining Python 2.5 and 64-bit platforms (these are a source of problems with numarray/Numeric because they don't support this combination as of this writing). - Most of the operations in PyTables have experimented noticeable speed-ups (sometimes up to 2x, like in regular Python table selections). This is a consequence of both using NumPy internally and a considerable effort in terms of refactorization and optimization of the new code. - Combined conditions are finally supported for in-kernel selections. So, now it is possible to perform complex selections like:: result = [ row['var3'] for row in table.where('(var2 < 20) | (var1 == "sas")') ] or:: complex_cond = '((%s <= col5) & (col2 <= %s)) ' \ '| (sqrt(col1 + 3.1*col2 + col3*col4) > 3)' result = [ row['var3'] for row in table.where(complex_cond % (inf, sup)) ] and run them at full C-speed (or perhaps more, due to the cache-tuned computing kernel of Numexpr, which has been integrated into PyTables). - Now, it is possible to get fields of the ``Row`` iterator by specifying their position, or even ranges of positions (extended slicing is supported). For example, you can do:: result = [ row[4] for row in table # fetch field #4 if row[1] < 20 ] result = [ row[:] for row in table # fetch all fields if row['var2'] < 20 ] result = [ row[1::2] for row in # fetch odd fields table.iterrows(2, 3000, 3) ] in addition to the classical:: result = [row['var3'] for row in table.where('var2 < 20')] - ``Row`` has received a new method called ``fetch_all_fields()`` in order to easily retrieve all the fields of a row in situations like:: [row.fetch_all_fields() for row in table.where('column1 < 0.3')] The difference between ``row[:]`` and ``row.fetch_all_fields()`` is that the former will return all the fields as a tuple, while the latter will return the fields in a NumPy void type and should be faster. Choose whatever fits better to your needs. - Now, all data that is read from disk is converted, if necessary, to the native byteorder of the hosting machine (before, this only happened with ``Table`` objects). This should help to accelerate applications that have to do computations with data generated in platforms with a byteorder different than the user machine. - The modification of values in ``*Array`` objects (through __setitem__) now doesn't make a copy of the value in the case that the shape of the value passed is the same as the slice to be overwritten. This results in considerable memory savings when you are modifying disk objects with big array values. - All leaf constructors (except for ``Array``) have received a new ``chunkshape`` argument that lets the user explicitly select the chunksizes for the underlying HDF5 datasets (only for advanced users). - All leaf constructors have received a new parameter called ``byteorder`` that lets the user specify the byteorder of their data *on disk*. This effectively allows to create datasets in other byteorders than the native platform. - Native HDF5 datasets with ``H5T_ARRAY`` datatypes are fully supported for reading now. - The test suites for the different packages are installed now, so you don't need a copy of the PyTables sources to run the tests. Besides, you can run the test suite from the Python console by using:: >>> tables.tests() Resources ========= Go to the PyTables web site for more details: http://www.pytables.org/ Go to the PyTables Pro web page for more details: http://www.carabos.com/products/pytables-pro About the HDF5 library: http://hdfgroup.org/HDF5/ About NumPy: http://numpy.scipy.org/ To know more about the company behind the development of PyTables, see: http://www.carabos.com/ Acknowledgments =============== Thanks to many users who provided feature improvements, patches, bug reports, support and suggestions. See the ``THANKS`` file in the distribution package for a (incomplete) list of contributors. Many thanks also to SourceForge who have helped to make and distribute this package! And last, but not least thanks a lot to the HDF5 and NumPy (and numarray!) makers. Without them PyTables simply would not exist. Share your experience ===================== Let us know of any bugs, suggestions, gripes, kudos, etc. you may have. ---- **Enjoy data!** -- The PyTables Team -- >0,0< Francesc Altet ? ? http://www.carabos.com/ V V C?rabos Coop. V. ??Enjoy Data "-" From david.warde.farley at utoronto.ca Fri Jul 13 14:51:41 2007 From: david.warde.farley at utoronto.ca (David Warde-Farley) Date: Fri, 13 Jul 2007 14:51:41 -0400 Subject: [SciPy-user] (Mac) Close a plot window, crash IPython? In-Reply-To: References: <4696FFD1.9020504@ar.media.kyoto-u.ac.jp> <35104B3E-45F8-450F-A2AB-D9FCB80BEB16@utoronto.ca> Message-ID: On 13-Jul-07, at 1:29 AM, Fernando Perez wrote: > On 7/12/07, David Warde-Farley wrote: >> On 13-Jul-07, at 12:30 AM, David Cournapeau wrote: >> >>> A crash is never a normal behaviour :) >> >> Eh, by normal I mean "documented" I guess :) > > No, not really. We'll need a bit more info to try and figure out > what's going on: > > 1. Versions of IPython, Python and Matplotlib you're running. I'm not > an OSX user, so I'm not exactly sure what the 'superpack' ships. IPython 0.8.2 svnr2445, Python 2.5.1(r251:54869), matplotlib.__version__ = 0.90.1 > 2. What mpl backend are you running? And what's the version of the > underlying toolkit for python (tk, wx, pygtk, qt...)? This was with TkAgg. My Tkinter module says it's version is Rev. 50704. > This should most certainly NOT be happening. So, I installed wxPython 2.6 from http://pythonmac.org/packages/py25- fat/index.html and tried my luck with "backend : WXAgg" in ~/.matplotlib/.matplotlibrc , and this behaviour does not occur (there is another small bug but it's far less annoying). So I'm guessing it's specific to the TK-based backends. The question is, does it happen on other platforms, or is it something to do with the Mac (or MacPython) bindings to Tk, or is it some unexpected condition that matplotlib isn't handling correctly. I think we can at least rule out IPython being at fault. With the WXAgg backend, issuing a Cmd+Q (quit) command while a plot window is active will not only not close it but cause all further plot-related commands to lock up the interpreter. However, you can close plot windows and replot using the same figure # just fine using WXAgg, while it would crash you in TkAgg. I should probably also note that I'm using the Intel version of the Superpack; the same issue might affect the PowerPC version, or it might not. David From robert.kern at gmail.com Fri Jul 13 14:57:39 2007 From: robert.kern at gmail.com (Robert Kern) Date: Fri, 13 Jul 2007 13:57:39 -0500 Subject: [SciPy-user] (Mac) Close a plot window, crash IPython? In-Reply-To: References: <4696FFD1.9020504@ar.media.kyoto-u.ac.jp> <35104B3E-45F8-450F-A2AB-D9FCB80BEB16@utoronto.ca> Message-ID: <4697CB23.80305@gmail.com> David Warde-Farley wrote: > So, I installed wxPython 2.6 from http://pythonmac.org/packages/py25- > fat/index.html and tried my luck with "backend : WXAgg" in > ~/.matplotlib/.matplotlibrc , and this behaviour does not occur > (there is another small bug but it's far less annoying). So I'm > guessing it's specific to the TK-based backends. The question is, > does it happen on other platforms, or is it something to do with the > Mac (or MacPython) bindings to Tk, or is it some unexpected condition > that matplotlib isn't handling correctly. I think we can at least > rule out IPython being at fault. This looks like a matplotlib problem rather than one with numpy or scipy. You might have better luck asking on the matplotlib list. https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From fperez.net at gmail.com Fri Jul 13 15:01:03 2007 From: fperez.net at gmail.com (Fernando Perez) Date: Fri, 13 Jul 2007 13:01:03 -0600 Subject: [SciPy-user] (Mac) Close a plot window, crash IPython? In-Reply-To: <4697CB23.80305@gmail.com> References: <4696FFD1.9020504@ar.media.kyoto-u.ac.jp> <35104B3E-45F8-450F-A2AB-D9FCB80BEB16@utoronto.ca> <4697CB23.80305@gmail.com> Message-ID: On 7/13/07, Robert Kern wrote: > This looks like a matplotlib problem rather than one with numpy or scipy. You > might have better luck asking on the matplotlib list. > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users Indeed. In fact, just this morning there was a thread form another user seeing similar crashes, and they seem to have pinned it down to a mistake in a recent commit that indeed was bad. Have a look at the archives on matplotlib-devel for today with subject line: Bus error using interactive plotting commands It seems that by now they've committed a fix into SVN, so an update may be all you need. And if you have further issues, then Robert is right in suggesting that this be continued on the mpl lists so that we don't create unnecessary noise on the scipy ones. It's important to keep each list on topic for many reasons. Cheers, f From david.warde.farley at utoronto.ca Fri Jul 13 15:15:43 2007 From: david.warde.farley at utoronto.ca (David Warde-Farley) Date: Fri, 13 Jul 2007 15:15:43 -0400 Subject: [SciPy-user] (Mac) Close a plot window, crash IPython? In-Reply-To: References: <4696FFD1.9020504@ar.media.kyoto-u.ac.jp> <35104B3E-45F8-450F-A2AB-D9FCB80BEB16@utoronto.ca> <4697CB23.80305@gmail.com> Message-ID: On 13-Jul-07, at 3:01 PM, Fernando Perez wrote: > And if you have further issues, then Robert is right in suggesting > that this be continued on the mpl lists so that we don't create > unnecessary noise on the scipy ones. It's important to keep each list > on topic for many reasons. Indeed, though I wasn't really sure where to start. I viewed it as a problem with the SciPy "environment", which sort of comprise IPython/ MPL/Numpy/Scipy/etc., so I posted here. For future reference, is the intended topic of this list only the packages that comprise the "scipy" tarball? Regards, David From robert.kern at gmail.com Fri Jul 13 15:22:01 2007 From: robert.kern at gmail.com (Robert Kern) Date: Fri, 13 Jul 2007 14:22:01 -0500 Subject: [SciPy-user] (Mac) Close a plot window, crash IPython? In-Reply-To: References: <4696FFD1.9020504@ar.media.kyoto-u.ac.jp> <35104B3E-45F8-450F-A2AB-D9FCB80BEB16@utoronto.ca> <4697CB23.80305@gmail.com> Message-ID: <4697D0D9.8020803@gmail.com> David Warde-Farley wrote: > On 13-Jul-07, at 3:01 PM, Fernando Perez wrote: > >> And if you have further issues, then Robert is right in suggesting >> that this be continued on the mpl lists so that we don't create >> unnecessary noise on the scipy ones. It's important to keep each list >> on topic for many reasons. > > Indeed, though I wasn't really sure where to start. I viewed it as a > problem with the SciPy "environment", which sort of comprise IPython/ > MPL/Numpy/Scipy/etc., so I posted here. For future reference, is the > intended topic of this list only the packages that comprise the > "scipy" tarball? Not strictly, no. However, once we've narrowed down the problem to matplotlib, there are more users and developers of matplotlib that hang out on the matplotlib list to help you than there are here. Don't worry about breaching etiquette; you didn't. It's perfectly acceptable to start here. I'm just trying to get you the best help for your problem. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From fperez.net at gmail.com Fri Jul 13 15:27:31 2007 From: fperez.net at gmail.com (Fernando Perez) Date: Fri, 13 Jul 2007 13:27:31 -0600 Subject: [SciPy-user] (Mac) Close a plot window, crash IPython? In-Reply-To: <4697D0D9.8020803@gmail.com> References: <4696FFD1.9020504@ar.media.kyoto-u.ac.jp> <35104B3E-45F8-450F-A2AB-D9FCB80BEB16@utoronto.ca> <4697CB23.80305@gmail.com> <4697D0D9.8020803@gmail.com> Message-ID: On 7/13/07, Robert Kern wrote: > David Warde-Farley wrote: > > On 13-Jul-07, at 3:01 PM, Fernando Perez wrote: > > > >> And if you have further issues, then Robert is right in suggesting > >> that this be continued on the mpl lists so that we don't create > >> unnecessary noise on the scipy ones. It's important to keep each list > >> on topic for many reasons. > > > > Indeed, though I wasn't really sure where to start. I viewed it as a > > problem with the SciPy "environment", which sort of comprise IPython/ > > MPL/Numpy/Scipy/etc., so I posted here. For future reference, is the > > intended topic of this list only the packages that comprise the > > "scipy" tarball? > > Not strictly, no. However, once we've narrowed down the problem to matplotlib, > there are more users and developers of matplotlib that hang out on the > matplotlib list to help you than there are here. > > Don't worry about breaching etiquette; you didn't. It's perfectly acceptable to > start here. I'm just trying to get you the best help for your problem. And sorry if it sounded like I was chastising you (David), that was most certainly NOT my intention! I fully agree with Robert that it was perfectly reasonable to start here, I just worded poorly my suggestion to continue on the mpl list at this point in the bug hunt. I really don't want to appear as creating a hostile atmosphere for anyone to report bugs or ask for help when they aren't 100% sure of where the problem is coming from (ipython/numpy/scipy/mpl/etc). Regards, f From david.warde.farley at utoronto.ca Fri Jul 13 15:36:59 2007 From: david.warde.farley at utoronto.ca (David Warde-Farley) Date: Fri, 13 Jul 2007 15:36:59 -0400 Subject: [SciPy-user] (Mac) Close a plot window, crash IPython? In-Reply-To: References: <4696FFD1.9020504@ar.media.kyoto-u.ac.jp> <35104B3E-45F8-450F-A2AB-D9FCB80BEB16@utoronto.ca> <4697CB23.80305@gmail.com> <4697D0D9.8020803@gmail.com> Message-ID: <295CC612-77F6-4243-B80B-5910ACD4A435@utoronto.ca> On 13-Jul-07, at 3:27 PM, Fernando Perez wrote: > I really don't want to appear as creating a hostile atmosphere for > anyone to report bugs or ask for help when they aren't 100% sure of > where the problem is coming from (ipython/numpy/scipy/mpl/etc). Not a problem; I just honestly wasn't sure. There is a bit of a fuzzy aura surrounding what 'scipy' is or isn't in my head, as I'm sure is the case with many. It does seem as though the *exact* same bug was reported today on matplotlib-devel (what are the odds?), I shall checkout the svn version and see if that fixes it, and make them aware of the other WX- related bug as well. Many thanks, David From jdh2358 at gmail.com Fri Jul 13 16:10:35 2007 From: jdh2358 at gmail.com (John Hunter) Date: Fri, 13 Jul 2007 15:10:35 -0500 Subject: [SciPy-user] (Mac) Close a plot window, crash IPython? In-Reply-To: <295CC612-77F6-4243-B80B-5910ACD4A435@utoronto.ca> References: <35104B3E-45F8-450F-A2AB-D9FCB80BEB16@utoronto.ca> <4697CB23.80305@gmail.com> <4697D0D9.8020803@gmail.com> <295CC612-77F6-4243-B80B-5910ACD4A435@utoronto.ca> Message-ID: <88e473830707131310w57f2c3d3lce09a2f481c48c80@mail.gmail.com> On 7/13/07, David Warde-Farley wrote: > It does seem as though the *exact* same bug was reported today on > matplotlib-devel (what are the odds?), I shall checkout the svn > version and see if that fixes it, and make them aware of the other WX- > related bug as well. I hope this does fix your problem, but the bug that was fixed was also recently introduced (in a svn commit after the 0.90.1 release) so it may not be your problem. But if you can update from svn and see if the problem is still there, that would be a great start. See you on the matplotlib-devel side :-) JDH From novak at ucolick.org Sat Jul 14 19:31:59 2007 From: novak at ucolick.org (Greg Novak) Date: Sat, 14 Jul 2007 16:31:59 -0700 Subject: [SciPy-user] vectorizing methods? Message-ID: Is there a preferred way to vectorize methods, rather than functions? The obvious thing doesn't work: class foo: def bar(self, x): pass bar = vectorize(bar) I came up with this: class foo: __vectorMethods = ('bar', ) def __init__(self, n): for name in self.__vectorMethods: setattr(self, name, vectorize(getattr(self, name))) def bar(self, x): pass which works fine but it doesn't seem like it should be necessary to do it in the initialization of every instance. Thanks, Greg From gael.varoquaux at normalesup.org Sun Jul 15 05:32:44 2007 From: gael.varoquaux at normalesup.org (Gael Varoquaux) Date: Sun, 15 Jul 2007 11:32:44 +0200 Subject: [SciPy-user] vectorizing methods? In-Reply-To: References: Message-ID: <20070715093244.GA28109@clipper.ens.fr> On Sat, Jul 14, 2007 at 04:31:59PM -0700, Greg Novak wrote: > Is there a preferred way to vectorize methods, rather than functions? > The obvious thing doesn't work: > class foo: > def bar(self, x): pass > bar = vectorize(bar) This cannot work, as you are applying "vectorize" before the class is built, so the function is still unbound. The binding process, which happens during the building of the class, will not like what you have done to the function to vectorize it, mainly the fact that it is no longer a plain function. > class foo: > __vectorMethods = ('bar', ) > def __init__(self, n): > for name in self.__vectorMethods: > setattr(self, name, vectorize(getattr(self, name))) > def bar(self, x): pass There you are vectorizing after the construction of the instance, so the method is already bound. > which works fine but it doesn't seem like it should be necessary to do > it in the initialization of every instance. Well, if your methods don't really refer to the object (they don't use self at all in the body of the function), you could do something like: class Foo(object): @staticmethod @vectorize def bar(x): return x In the static method there is no reference to the object. The problem is that when the class is binding the method (making a call in which the first argument is already assigned to the instance) it is really modifying it. If you could apply vectorize to only part of the argument, and get a curry of the original function you could than transform bar(self, *args) in baz(self, *args), where *args can be vectors, and this might work. Is can see two ways out of this: 1) Do some heavy magic with a metaclass and modify the binding process (I am talking about things I don't know, so it may not be feasible). 2.a) Use a static method that you vectorize, and pass it the instance as the first argument using a convention bound method: class Foo(object): @staticmethod @vectorize def bar(self, x): return self.a + x def baz(self, x): return self.bar(self, x) a = 1 2.b) IMHO it would be even cleaner to only pass interesting vectors to the vectorize staticmethod, as it has been vectorized relatively to "self", but self cannot be a vector: class Foo(object): @staticmethod @vectorize def bar(a, x): return a + x def baz(self, x): return self.bar(self.a, x) a = 1 Basically this is similar to using a standard function instead of a method, but lets face it, the notions of bound method and vectorized function seem mutually incompatible as they both want to modify a function. It might be possible to implement a decorator similar to staticmethod that does the proces presented in 2.a) but hiddes it from the user, but to do this, you would need to understand how staticmethod works, and I suspect there is some cooperation of the class building mechanisme (so we are back to 1), I think). I hope 2.a) or 2.b) suit you, elsewhere maybe some one has a better idea ? Cheers, Ga?l From travis at enthought.com Sun Jul 15 13:40:42 2007 From: travis at enthought.com (Travis Vaught) Date: Sun, 15 Jul 2007 12:40:42 -0500 Subject: [SciPy-user] ANN: SciPy 2007 Conference Updates Message-ID: <95D2E93A-0102-4BBF-BEDA-2BAE0CC20654@enthought.com> Greetings, We're excited to have *Ivan Krsti?*, the director of security architecture for the One Laptop Per Child project as our Keynote Speaker this year. The planning for the SciPy 2007 Conference is moving along. Please see below for some important updates. Schedule Available ------------------ The full schedule of talks has been posted here: http://www.scipy.org/SciPy2007/ConferenceSchedule Early Registration Extended --------------------------- If you haven't yet registered for the conference, the early registration deadline has been extended to Wednesday, July 18th, 2007. For more information on the conference see: http://www.scipy.org/SciPy2007 Student Sponsorship ------------------- Enthought, Inc. (http://www.enthought.com) is sponsoring the registration fees for up to 5 college or graduate students to attend the conference. To apply, please send a short description of what you are studying and why you'd like to attend to info at enthought.com. Please include telephone contact information. BOFs & Sprints -------------- If you're planning to attend and are interested in selecting BOF or Sprint Session topics, please weigh in at: BOFs: http://www.scipy.org/SciPy2007/BoFs Sprints: http://www.scipy.org/SciPy2007/Sprints We're looking forward to a great conference this year! Best, Travis From lev at columbia.edu Sun Jul 15 15:31:47 2007 From: lev at columbia.edu (Lev Givon) Date: Sun, 15 Jul 2007 15:31:47 -0400 Subject: [SciPy-user] scipy code contribution question In-Reply-To: <20070705001420.GB30029@localhost.ee.columbia.edu> References: <20070704205625.GC28755@localhost.ee.columbia.edu> <1b5a37350707041533q1db2d939oe95de76f01782455@mail.gmail.com> <20070705001420.GB30029@localhost.ee.columbia.edu> Message-ID: <20070715193147.GA19666@avicenna.cc.columbia.edu> Received from Lev Givon on Wed, Jul 04, 2007 at 08:14:21PM EDT: (snip) > Insofar as the item that prompted my first message is concerned, I > desire a filter design function similar to others currently > available in scipy to facilitate the construction of FIR filters > with the Remez algorithm (i.e., something similar to the remezord or > firpmord functions in Matlab) given some typical design parameters > (e.g., band cutoff frequencies, ripple constraints, etc.). As the > relevant algorithms needed by such a filter design function are not > overly complicated, I could look them up an appropriate DSP text or > paper and try implementing them completely from scratch (unless some > generous soul reading this list has already done so :-) > > L.G. I finished implementing and testing the aforementioned filter design algorithms. May I add the code directly to Lib/signal/filter_design.py (where similar functions are defined)? Or can I create my own corner in the sandbox and put the functions in there for folks to examine and test before they are moved into the aforementioned file? L.G. From robert.kern at gmail.com Sun Jul 15 17:35:09 2007 From: robert.kern at gmail.com (Robert Kern) Date: Sun, 15 Jul 2007 16:35:09 -0500 Subject: [SciPy-user] scipy code contribution question In-Reply-To: <20070715193147.GA19666@avicenna.cc.columbia.edu> References: <20070704205625.GC28755@localhost.ee.columbia.edu> <1b5a37350707041533q1db2d939oe95de76f01782455@mail.gmail.com> <20070705001420.GB30029@localhost.ee.columbia.edu> <20070715193147.GA19666@avicenna.cc.columbia.edu> Message-ID: <469A930D.4000509@gmail.com> Lev Givon wrote: > Received from Lev Givon on Wed, Jul 04, 2007 at 08:14:21PM EDT: > > (snip) > >> Insofar as the item that prompted my first message is concerned, I >> desire a filter design function similar to others currently >> available in scipy to facilitate the construction of FIR filters >> with the Remez algorithm (i.e., something similar to the remezord or >> firpmord functions in Matlab) given some typical design parameters >> (e.g., band cutoff frequencies, ripple constraints, etc.). As the >> relevant algorithms needed by such a filter design function are not >> overly complicated, I could look them up an appropriate DSP text or >> paper and try implementing them completely from scratch (unless some >> generous soul reading this list has already done so :-) >> >> L.G. > > I finished implementing and testing the aforementioned filter design > algorithms. May I add the code directly to Lib/signal/filter_design.py > (where similar functions are defined)? Or can I create my own corner > in the sandbox and put the functions in there for folks to examine and > test before they are moved into the aforementioned file? To clarify, did you implement them from scratch, or did you use the Matlab source? The final location should be filter_design.py, but please submit it in the form of a patch to the Trac. Thanks. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From s.mientki at mailbox.kun.nl Sun Jul 15 18:03:00 2007 From: s.mientki at mailbox.kun.nl (stef mientki) Date: Mon, 16 Jul 2007 00:03:00 +0200 Subject: [SciPy-user] scipy code contribution question In-Reply-To: <469A930D.4000509@gmail.com> References: <20070704205625.GC28755@localhost.ee.columbia.edu> <1b5a37350707041533q1db2d939oe95de76f01782455@mail.gmail.com> <20070705001420.GB30029@localhost.ee.columbia.edu> <20070715193147.GA19666@avicenna.cc.columbia.edu> <469A930D.4000509@gmail.com> Message-ID: <469A9994.5040503@gmail.com> Robert Kern wrote: > Lev Givon wrote: > >> Received from Lev Givon on Wed, Jul 04, 2007 at 08:14:21PM EDT: >> >> (snip) >> >> >>> Insofar as the item that prompted my first message is concerned, I >>> desire a filter design function similar to others currently >>> available in scipy to facilitate the construction of FIR filters >>> with the Remez algorithm (i.e., something similar to the remezord or >>> firpmord functions in Matlab) given some typical design parameters >>> (e.g., band cutoff frequencies, ripple constraints, etc.). As the >>> relevant algorithms needed by such a filter design function are not >>> overly complicated, I could look them up an appropriate DSP text or >>> paper and try implementing them completely from scratch (unless some >>> generous soul reading this list has already done so :-) >>> >>> L.G. >>> very good, although not very efficient, FIR filters are my favorits. >> I finished implementing and testing the aforementioned filter design >> algorithms. May I add the code directly to Lib/signal/filter_design.py >> (where similar functions are defined)? Or can I create my own corner >> in the sandbox and put the functions in there for folks to examine and >> test before they are moved into the aforementioned file? >> > > To clarify, did you implement them from scratch, or did you use the Matlab > source? Although I don't know the MatLab sources, but I bet MatLab used th? Fortran source code already known for many decades ;-) For the record: The Remez algorithm (Remez 1934), and Parks and McClellan (1972) were the first who described and implemented the algorithm. cheers, Stef Mientki From lev at columbia.edu Sun Jul 15 18:46:19 2007 From: lev at columbia.edu (Lev Givon) Date: Sun, 15 Jul 2007 18:46:19 -0400 Subject: [SciPy-user] scipy code contribution question In-Reply-To: <469A930D.4000509@gmail.com> References: <20070704205625.GC28755@localhost.ee.columbia.edu> <1b5a37350707041533q1db2d939oe95de76f01782455@mail.gmail.com> <20070705001420.GB30029@localhost.ee.columbia.edu> <20070715193147.GA19666@avicenna.cc.columbia.edu> <469A930D.4000509@gmail.com> Message-ID: <20070715224619.GA23329@avicenna.cc.columbia.edu> Received from Robert Kern on Sun, Jul 15, 2007 at 05:35:09PM EDT: > Lev Givon wrote: > > Received from Lev Givon on Wed, Jul 04, 2007 at 08:14:21PM EDT: > > > > (snip) > > > >> Insofar as the item that prompted my first message is concerned, I > >> desire a filter design function similar to others currently > >> available in scipy to facilitate the construction of FIR filters > >> with the Remez algorithm (i.e., something similar to the remezord or > >> firpmord functions in Matlab) given some typical design parameters > >> (e.g., band cutoff frequencies, ripple constraints, etc.). As the > >> relevant algorithms needed by such a filter design function are not > >> overly complicated, I could look them up an appropriate DSP text or > >> paper and try implementing them completely from scratch (unless some > >> generous soul reading this list has already done so :-) > >> > >> L.G. > > > > I finished implementing and testing the aforementioned filter design > > algorithms. May I add the code directly to Lib/signal/filter_design.py > > (where similar functions are defined)? Or can I create my own corner > > in the sandbox and put the functions in there for folks to examine and > > test before they are moved into the aforementioned file? > > To clarify, did you implement them from scratch, or did you use the > Matlab source? The final location should be filter_design.py, but > please submit it in the form of a patch to the Trac. Thanks. > > -- > Robert Kern I implemented them by reading a relatively recent paper on FIR filter length estimation that describes several such algorithms; the default algorithm is ostensibly superior to that employed in Matlab. I'll include a reference to the paper in the source code. L.G. From lev at columbia.edu Sun Jul 15 18:54:36 2007 From: lev at columbia.edu (Lev Givon) Date: Sun, 15 Jul 2007 18:54:36 -0400 Subject: [SciPy-user] scipy code contribution question In-Reply-To: <469A9994.5040503@gmail.com> References: <20070704205625.GC28755@localhost.ee.columbia.edu> <1b5a37350707041533q1db2d939oe95de76f01782455@mail.gmail.com> <20070705001420.GB30029@localhost.ee.columbia.edu> <20070715193147.GA19666@avicenna.cc.columbia.edu> <469A930D.4000509@gmail.com> <469A9994.5040503@gmail.com> Message-ID: <20070715225436.GB23329@avicenna.cc.columbia.edu> Received from stef mientki on Sun, Jul 15, 2007 at 06:03:00PM EDT: > Robert Kern wrote: > > Lev Givon wrote: > > > >> Received from Lev Givon on Wed, Jul 04, 2007 at 08:14:21PM EDT: > >> > >> (snip) > >> > >> > >>> Insofar as the item that prompted my first message is concerned, I > >>> desire a filter design function similar to others currently > >>> available in scipy to facilitate the construction of FIR filters > >>> with the Remez algorithm (i.e., something similar to the remezord or > >>> firpmord functions in Matlab) given some typical design parameters > >>> (e.g., band cutoff frequencies, ripple constraints, etc.). As the > >>> relevant algorithms needed by such a filter design function are not > >>> overly complicated, I could look them up an appropriate DSP text or > >>> paper and try implementing them completely from scratch (unless some > >>> generous soul reading this list has already done so :-) > >>> > >>> L.G. > >>> > very good, although not very efficient, FIR filters are my favorits. > >> I finished implementing and testing the aforementioned filter design > >> algorithms. May I add the code directly to Lib/signal/filter_design.py > >> (where similar functions are defined)? Or can I create my own corner > >> in the sandbox and put the functions in there for folks to examine and > >> test before they are moved into the aforementioned file? > >> > > > > To clarify, did you implement them from scratch, or did you use the Matlab > > source? > Although I don't know the MatLab sources, > but I bet MatLab used th? Fortran source code already known for many > decades ;-) > For the record: The Remez algorithm (Remez 1934), > and Parks and McClellan (1972) were the first who described and > implemented the algorithm. > > cheers, > Stef Mientki Matlab uses an empirically determined approximation algorithm developed by Herrmann and others in the 1970s. The paper I consulted while writing my code describes Herrmann's method, a method developed by Kaiser, and a third that supposedly is better than either. For the sake of comparison, I implemented all three :-) L.G. From robert.kern at gmail.com Sun Jul 15 19:21:55 2007 From: robert.kern at gmail.com (Robert Kern) Date: Sun, 15 Jul 2007 18:21:55 -0500 Subject: [SciPy-user] scipy code contribution question In-Reply-To: <20070715224619.GA23329@avicenna.cc.columbia.edu> References: <20070704205625.GC28755@localhost.ee.columbia.edu> <1b5a37350707041533q1db2d939oe95de76f01782455@mail.gmail.com> <20070705001420.GB30029@localhost.ee.columbia.edu> <20070715193147.GA19666@avicenna.cc.columbia.edu> <469A930D.4000509@gmail.com> <20070715224619.GA23329@avicenna.cc.columbia.edu> Message-ID: <469AAC13.4060909@gmail.com> Lev Givon wrote: > I implemented them by reading a relatively recent paper on FIR filter > length estimation that describes several such algorithms; the default > algorithm is ostensibly superior to that employed in Matlab. I'll > include a reference to the paper in the source code. Fantastic! I look forward to seeing the code. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From amcmorl at gmail.com Mon Jul 16 01:45:27 2007 From: amcmorl at gmail.com (Angus McMorland) Date: Mon, 16 Jul 2007 17:45:27 +1200 Subject: [SciPy-user] Numerical Recipes robust fit implementation Message-ID: Hi all, I'm in need of a robust linear-fit algorithm- Numerical Recipes (in C) medfit routine will do nicely. I've had a quick look and don't see any similar routines in scipy. Is there one I'm missing? If not, I'd lke to implement the NR routine for use with my numpy-arrayed data. What are my options? Obviously I could translate the routine into python, but I realise a potentially easier alternative is to interface the existing NR C code. Having never done that before, can someone give me some pointers/tips on how to start - there's quite a range of linking tools listed on http://www.scipy.org/Topical_Software. Thanks, Angus. -- AJC McMorland, PhD Student Physiology, University of Auckland From strawman at astraw.com Mon Jul 16 02:37:03 2007 From: strawman at astraw.com (Andrew Straw) Date: Sun, 15 Jul 2007 23:37:03 -0700 Subject: [SciPy-user] Numerical Recipes robust fit implementation In-Reply-To: References: Message-ID: <469B120F.6000006@astraw.com> Hi Angus, I don't know if the MEDFIT algorithm is something you really want, but I wrote a simple implementation of the RANSAC algorithm: http://www.scipy.org/Cookbook/RANSAC This is not to say I recommend the use of such algorithms as RANSAC! :) -Andrew PS There seems to be some criticism of the MEDFIT algorithm in general and as implemented in NR in particular online. Angus McMorland wrote: > Hi all, > > I'm in need of a robust linear-fit algorithm- Numerical Recipes (in C) > medfit routine will do nicely. I've had a quick look and don't see any > similar routines in scipy. Is there one I'm missing? > > If not, I'd lke to implement the NR routine for use with my > numpy-arrayed data. What are my options? Obviously I could translate > the routine into python, but I realise a potentially easier > alternative is to interface the existing NR C code. Having never done > that before, can someone give me some pointers/tips on how to start - > there's quite a range of linking tools listed on > http://www.scipy.org/Topical_Software. > > Thanks, > > Angus. From amcmorl at gmail.com Mon Jul 16 07:01:16 2007 From: amcmorl at gmail.com (Angus McMorland) Date: Mon, 16 Jul 2007 23:01:16 +1200 Subject: [SciPy-user] Numerical Recipes robust fit implementation In-Reply-To: <469B120F.6000006@astraw.com> References: <469B120F.6000006@astraw.com> Message-ID: Hi Andrew et al., > Angus McMorland wrote: > > I'm in need of a robust linear-fit algorithm- Numerical Recipes (in C) > > medfit routine will do nicely. I've had a quick look and don't see any > > similar routines in scipy. Is there one I'm missing? On 16/07/07, Andrew Straw wrote: > I don't know if the MEDFIT algorithm is something you really want, but I > wrote a simple implementation of the RANSAC algorithm: > http://www.scipy.org/Cookbook/RANSAC > > This is not to say I recommend the use of such algorithms as RANSAC! :) > > -Andrew > > PS There seems to be some criticism of the MEDFIT algorithm in general > and as implemented in NR in particular online. Thanks for the heads up on those issues. I've had a quick google on this myself now and found this (http://www.lysator.liu.se/c/num-recipes-in-c.html) comment verbatim several times on different websites - someincluding mention that the discussion refers to the first edition and some not. According to NR (http://www.nr.com/bug-rebutt.htm - seems a little melodramatically worded in places) in the second edition they've addressed issues raised about medfit. I'm going to have to think a bit more what I want to achieve to see if RANSAC is useful. Ultimately I hope to determine the probability of a a given data set being exponentially distributed, by comparing the raw frequency distribution to an expected distribution based on a linear fit to the log transform of the raw one. It seems a bit like basing my 'expected' distribution on a subset of data from which outliers have been completely excluded is self-fulfilling, and having some other criterion for weighting of the error term (as medfit does) seems more appropriate. This is however very much just a gut feeling rather than an educated assessment, so any other comments are welcome. It certainly is useful to know the RANSAC algorithm exists, so thanks for that. Thanks again, Angus. -- AJC McMorland, PhD Student Physiology, University of Auckland From matthieu.brucher at gmail.com Mon Jul 16 07:30:32 2007 From: matthieu.brucher at gmail.com (Matthieu Brucher) Date: Mon, 16 Jul 2007 13:30:32 +0200 Subject: [SciPy-user] Numerical Recipes robust fit implementation In-Reply-To: References: <469B120F.6000006@astraw.com> Message-ID: Hi, Ultimately I hope to determine the probability of a > a given data set being exponentially distributed, In this case, you could use a non quadratic fit function, with a pseudo norm1 cost ( for instance sqrt(eps + (y-f(x))?) with a small eps so that the cost is derivable and a gradient descent should do the trick). Matthieu -------------- next part -------------- An HTML attachment was scrubbed... URL: From openopt at ukr.net Mon Jul 16 07:41:06 2007 From: openopt at ukr.net (dmitrey) Date: Mon, 16 Jul 2007 14:41:06 +0300 Subject: [SciPy-user] Numerical Recipes robust fit implementation In-Reply-To: References: <469B120F.6000006@astraw.com> Message-ID: <469B5952.6050100@ukr.net> my 2 cents: openopt ralg solver works good to (currently unconstrained only) problems like F(x) = sum(abs(f[i](x))) (or other non-smooth funcs; convexity is highly preferable) and it can use F(x) 1st derive if provided by user however, ralg is intended for medium-scale problems only (nVars up to 1000), and it is missing patterns yet, I guess it could be nice for your problem HTH, D. Matthieu Brucher wrote: > Hi, > > > Ultimately I hope to determine the probability of a > a given data set being exponentially distributed, > > > > > In this case, you could use a non quadratic fit function, with a > pseudo norm1 cost ( for instance sqrt(eps + (y-f(x))?) with a small > eps so that the cost is derivable and a gradient descent should do the > trick). > > Matthieu > ------------------------------------------------------------------------ > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > From peridot.faceted at gmail.com Mon Jul 16 07:54:28 2007 From: peridot.faceted at gmail.com (Anne Archibald) Date: Mon, 16 Jul 2007 07:54:28 -0400 Subject: [SciPy-user] Numerical Recipes robust fit implementation In-Reply-To: References: <469B120F.6000006@astraw.com> Message-ID: On 16/07/07, Angus McMorland wrote: > I'm going to have to think a bit more what I want to achieve to see if > RANSAC is useful. Ultimately I hope to determine the probability of a > a given data set being exponentially distributed, by comparing the raw > frequency distribution to an expected distribution based on a linear > fit to the log transform of the raw one. It seems a bit like basing my > 'expected' distribution on a subset of data from which outliers have > been completely excluded is self-fulfilling, and having some other > criterion for weighting of the error term (as medfit does) seems more > appropriate. This is however very much just a gut feeling rather than > an educated assessment, so any other comments are welcome. If what you're trying to do is test whether your data points are likely to have been drawn from a given distribution, you may be able to do much better by not putting them in a histogram first, and using something like the Kolmogorov-Smirnov test (scipy.stats.kstest). If you have outliers you may have a problem. (It's feasible to fit parameters so they maximize the kstest p value, although of course the p value you get at the end is no longer an actual probability.) I suspect if you look in the statistical literature you'll find other tricks for fitting distributions directly (rather than fitting histograms). Anne From fdu.xiaojf at gmail.com Mon Jul 16 08:18:10 2007 From: fdu.xiaojf at gmail.com (fdu.xiaojf at gmail.com) Date: Mon, 16 Jul 2007 20:18:10 +0800 Subject: [SciPy-user] Questions about scipy.optimize.fmin_cobyla Message-ID: <469B6202.6020002@gmail.com> Hi all, I'm trying to minimize a function f(X) = f(x1,x2,...,xn) using cobyla. In my minimization, all variables should be larger than 0, so I define constraint functions like this: cons = [] for i in range(n): # n is the number of variables c =lambda x: x[i] - 1e-10 cons.append(c) And then I use fmin_cobyla(func=f, x0=[0.1]*n, cons=cons) to minimize the function. There are two problems: 1) In the constrain functions, I expected the value of i to be bounded to the specific constrain function, but it doesn't work as I expected. Here is a demonstration: In [14]: a = [] In [15]: for i in range(4): b = lambda : i**2 a.append(b) ....: ....: In [18]: for f in a: print f() ....: ....: 9 9 9 9 What I want is that every function in list a should print different values. The value of a[0](), a[1](), a[2](), a[3]() should be 0, 1, 4, 9. How to achieve this? 2) In function f(X), there are item of log(xi). Although I have constrained the value of xi in the constrain functions, xi still may be equal or less than 0 during minimization, then "math domain error" occurred. What should I do ? My method is when "math domain error" occurred, catch it and set the return value of f to a very large number. Should this work or not? Thanks a lot! Xiao Jianfeng From openopt at ukr.net Mon Jul 16 08:30:39 2007 From: openopt at ukr.net (dmitrey) Date: Mon, 16 Jul 2007 15:30:39 +0300 Subject: [SciPy-user] Questions about scipy.optimize.fmin_cobyla In-Reply-To: <469B6202.6020002@gmail.com> References: <469B6202.6020002@gmail.com> Message-ID: <469B64EF.2080401@ukr.net> fdu.xiaojf at gmail.com wrote: > Hi all, > > I'm trying to minimize a function f(X) = f(x1,x2,...,xn) using cobyla. > > In my minimization, all variables should be larger than 0, so I define > constraint functions like this: > > cons = [] > for i in range(n): # n is the number of variables > c =lambda x: x[i] - 1e-10 > cons.append(c) > > And then I use fmin_cobyla(func=f, x0=[0.1]*n, cons=cons) to minimize the > function. > > There are two problems: > > 1) In the constrain functions, I expected the value of i to be bounded > to the specific constrain function, but it doesn't work as I expected. > > Here is a demonstration: > In [14]: a = [] > > In [15]: for i in range(4): > b = lambda : i**2 > a.append(b) > ....: > ....: > > In [18]: for f in a: > print f() > ....: > ....: > 9 > 9 > 9 > 9 > > What I want is that every function in list a should print different > values. The value of a[0](), a[1](), a[2](), a[3]() should be 0, 1, 4, > 9. > > How to achieve this? > > 2) In function f(X), there are item of log(xi). Although I have > constrained the value of xi in the constrain functions, xi still may be > equal or less than 0 during minimization, then "math domain error" > occurred. > > What should I do ? > I would replace xi and log(xi) by exp(xi) and xi You can try also free (BSD lic) OpenOpt solver lincher, it should handle your problem well something like from scikits.openopt import NLP p = NLP(f, x0, lb = zeros(x0.size)) r = p.solve('lincher') however, currently lincher requires QP solver, and the only one connected is CVXOPT one, so you should have cvxopt installed (GPL). BTW cvxopt is capable of solving your problem, it has appropriate NLP solver Also, take a look at tnc http://www.scipy.org/doc/api_docs/scipy.optimize.tnc.html - afaik it allows to handle lb - ub bounds > My method is when "math domain error" occurred, catch it and set the > return value of f to a very large number. Should this work or not? > This will not work with any NLP or Nonsmooth solver, that calls for gradient/subgradient this will work for some global solvers like anneal, but they are capable of small-scaled problems only (nVars up to 10) HTH, D. > > > Thanks a lot! > > Xiao Jianfeng > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > > > > From openopt at ukr.net Mon Jul 16 08:52:14 2007 From: openopt at ukr.net (dmitrey) Date: Mon, 16 Jul 2007 15:52:14 +0300 Subject: [SciPy-user] Questions about scipy.optimize.fmin_cobyla In-Reply-To: <469B6202.6020002@gmail.com> References: <469B6202.6020002@gmail.com> Message-ID: <469B69FE.4040305@ukr.net> fdu.xiaojf at gmail.com wrote: > There are two problems: > > 1) In the constrain functions, I expected the value of i to be bounded > to the specific constrain function, but it doesn't work as I expected. > > Here is a demonstration: > In [14]: a = [] > > In [15]: for i in range(4): > b = lambda : i**2 > a.append(b) > ....: > ....: > > In [18]: for f in a: > print f() > ....: > ....: > 9 > 9 > 9 > 9 > > What I want is that every function in list a should print different > values. The value of a[0](), a[1](), a[2](), a[3]() should be 0, 1, 4, > 9. > > How to achieve this? > if your b[i] are funcs from x, you should use b = lambda x: x **2 (for example) however, NLP solvers can't handle these constraints as lb-ub bounds (fixed float numbers are required), you should describe them as non-linear constraints c[i](x)<=0 HTH, D. From massimo.sandal at unibo.it Mon Jul 16 09:04:15 2007 From: massimo.sandal at unibo.it (massimo sandal) Date: Mon, 16 Jul 2007 15:04:15 +0200 Subject: [SciPy-user] [OT] advice about publishing a scientific software Message-ID: <469B6CCF.8090506@unibo.it> Hi, I am currently developing a (Python-and-Scipy based, of course!) data analysis software (more precisely, a single molecule force spectroscopy data analysis sw). It has been thought to be not the usual quick-and-dirty in house script, but to be an actual application that can be used in general by different labs. In fact, it actually features an easy and working (even if slightly unpolished) plugin API, and most functionality is implemented by mean of independent plugin. Now, I would like to release it as free software (probably LGPL, but still thinking about it) online, however there are two concerns blocking me: - Major one: I would like to publish a peer-reviewed paper about this software. If I want this, do I need *first* to write the paper, get it accepted, *then* to publish the software online? Or, given that functionality is plugin-driven, can I publish the software backbone and later publish a paper that presents the software and some (new, to release) nifty plugin that does some clever kind of data analysis? Or what? What are the usual requirements of journals about this? - Minor one: Where to publish it? I am used to think about SourceForge as THE place for publishing open source software, however a number of people told me about Google Code. Basically what I want, if possible, is no-nonsense SVN access and some integrated mailing list/forum. Google Code seems good at that -it also gives automatically Wiki space, which is a major plus for me. What do you think about? Drawbacks? Licence issues (i.e. something like "since you publish it on Google Code the code is also owned by Google" tiny-letters clause?) Is there some other alternative? Moreover, I'd like to know your opinions about the degree of "polishness" and other requirements for initial publication of a scientific software. As for documentation, I am working on actual, user manual and hacking (mainly but not only focused on plugin writing) manual with tutorials etc.. The sw still lacks an installer but "installation" is braindead (provided that you have all the correct dependencies): put all the files in the same directory and run "python software.py" from where: do you think an installer is absolutely necessary or it is OK to let it go this way, and add the installer later? Thanks a lot, Massimo -- Massimo Sandal University of Bologna Department of Biochemistry "G.Moruzzi" snail mail: Via Irnerio 48, 40126 Bologna, Italy email: massimo.sandal at unibo.it tel: +39-051-2094388 fax: +39-051-2094387 -------------- next part -------------- A non-text attachment was scrubbed... Name: massimo.sandal.vcf Type: text/x-vcard Size: 274 bytes Desc: not available URL: From gael.varoquaux at normalesup.org Mon Jul 16 09:01:41 2007 From: gael.varoquaux at normalesup.org (Gael Varoquaux) Date: Mon, 16 Jul 2007 15:01:41 +0200 Subject: [SciPy-user] [OT] advice about publishing a scientific software In-Reply-To: <469B6CCF.8090506@unibo.it> References: <469B6CCF.8090506@unibo.it> Message-ID: <20070716130140.GH23143@clipper.ens.fr> On Mon, Jul 16, 2007 at 03:04:15PM +0200, massimo sandal wrote: > The sw still lacks an installer but > "installation" is braindead (provided that you have all the correct > dependencies): put all the files in the same directory and run "python > software.py" from where: do you think an installer is absolutely > necessary or it is OK to let it go this way, and add the installer later? My 2 cents: Use eggs for distribution. It just makes life so much easier for everbody, its standard in the Python world, and it deals with dependancies. Ga?l From fdu.xiaojf at gmail.com Mon Jul 16 09:02:15 2007 From: fdu.xiaojf at gmail.com (fdu.xiaojf at gmail.com) Date: Mon, 16 Jul 2007 21:02:15 +0800 Subject: [SciPy-user] Questions about scipy.optimize.fmin_cobyla In-Reply-To: <469B69FE.4040305@ukr.net> References: <469B6202.6020002@gmail.com> <469B69FE.4040305@ukr.net> Message-ID: <469B6C57.4010603@gmail.com> dmitrey wrote: > fdu.xiaojf at gmail.com wrote: >> There are two problems: >> >> 1) In the constrain functions, I expected the value of i to be bounded >> to the specific constrain function, but it doesn't work as I expected. >> >> Here is a demonstration: >> In [14]: a = [] >> >> In [15]: for i in range(4): >> b = lambda : i**2 >> a.append(b) >> ....: >> ....: >> >> In [18]: for f in a: >> print f() >> ....: >> ....: >> 9 >> 9 >> 9 >> 9 >> >> What I want is that every function in list a should print different >> values. The value of a[0](), a[1](), a[2](), a[3]() should be 0, 1, 4, >> 9. >> >> How to achieve this? >> > if your b[i] are funcs from x, you should use b = lambda x: x **2 (for > example) > however, NLP solvers can't handle these constraints as lb-ub bounds > (fixed float numbers are required), you should describe them as > non-linear constraints > c[i](x)<=0 > HTH, D. Yes, b[i] are functions from X, and X is a list. I want to constrain every xi in X to be larger than 0, so I tried to create the constrain function like this: cons = [] for i in range(N): # N is the length of X, or the number of variables f = lambda x: x[i] - 1e-10 cons.append(f) But it didn't work as expected :( According to the demands of fmin_cobyla, the parameter of cons should be a list of functions that all must be >=0. Regards From massimo.sandal at unibo.it Mon Jul 16 09:13:39 2007 From: massimo.sandal at unibo.it (massimo sandal) Date: Mon, 16 Jul 2007 15:13:39 +0200 Subject: [SciPy-user] [OT] advice about publishing a scientific software In-Reply-To: <20070716130140.GH23143@clipper.ens.fr> References: <469B6CCF.8090506@unibo.it> <20070716130140.GH23143@clipper.ens.fr> Message-ID: <469B6F03.3070606@unibo.it> Gael Varoquaux ha scritto: > On Mon, Jul 16, 2007 at 03:04:15PM +0200, massimo sandal wrote: >> The sw still lacks an installer but >> "installation" is braindead (provided that you have all the correct >> dependencies): put all the files in the same directory and run "python >> software.py" from where: do you think an installer is absolutely >> necessary or it is OK to let it go this way, and add the installer later? > > My 2 cents: > > Use eggs for distribution. It just makes life so much easier for > everbody, its standard in the Python world, and it deals with > dependancies. I haven't heard nothing but harsh criticism around "eggs", but I must admit I have never used them. Most Python software I've seen is distributed via the usual setup.py / *nix packages / Windows installers. All three are easy and standard. What are the advantages of eggs? Where can I find info about them? Can a software redistributed with eggs play well (i.e. be repackaged) with Linux packaging or Windows installers? m. -- Massimo Sandal University of Bologna Department of Biochemistry "G.Moruzzi" snail mail: Via Irnerio 48, 40126 Bologna, Italy email: massimo.sandal at unibo.it tel: +39-051-2094388 fax: +39-051-2094387 -------------- next part -------------- A non-text attachment was scrubbed... Name: massimo.sandal.vcf Type: text/x-vcard Size: 274 bytes Desc: not available URL: From openopt at ukr.net Mon Jul 16 09:18:24 2007 From: openopt at ukr.net (dmitrey) Date: Mon, 16 Jul 2007 16:18:24 +0300 Subject: [SciPy-user] Questions about scipy.optimize.fmin_cobyla In-Reply-To: <469B6C57.4010603@gmail.com> References: <469B6202.6020002@gmail.com> <469B69FE.4040305@ukr.net> <469B6C57.4010603@gmail.com> Message-ID: <469B7020.3060803@ukr.net> fdu.xiaojf at gmail.com wrote: > Yes, b[i] are functions from X, and X is a list. > > I want to constrain every xi in X to be larger than 0, so I tried to create > the constrain function like this: > > cons = [] > for i in range(N): # N is the length of X, or the number of variables > f = lambda x: x[i] - 1e-10 > cons.append(f) > > But it didn't work as expected :( > > According to the demands of fmin_cobyla, the parameter of cons should be a > list of functions that all must be >=0. > > Regards > > so if you have only x >= 0 constraints, it's better to use tnc or openopt lincher than fmin_cobyla if you have to use cobyla anyway, try this: a = [] for i in range(5): a.append(lambda x: x[i]**2) x = [1,2,3,4,5] for i in range(5): print a[i](x) 1 4 9 16 25 If you will replace xi by exp(xi), don't forget to replace lb[i]=0 by lb[i]=1 HTH, d From fdu.xiaojf at gmail.com Mon Jul 16 09:16:30 2007 From: fdu.xiaojf at gmail.com (fdu.xiaojf at gmail.com) Date: Mon, 16 Jul 2007 21:16:30 +0800 Subject: [SciPy-user] Questions about scipy.optimize.fmin_cobyla In-Reply-To: <469B64EF.2080401@ukr.net> References: <469B6202.6020002@gmail.com> <469B64EF.2080401@ukr.net> Message-ID: <469B6FAE.1070807@gmail.com> dmitrey wrote: > fdu.xiaojf at gmail.com wrote: >> >> 2) In function f(X), there are item of log(xi). Although I have >> constrained the value of xi in the constrain functions, xi still may be >> equal or less than 0 during minimization, then "math domain error" >> occurred. >> >> What should I do ? >> > I would replace xi and log(xi) by exp(xi) and xi > You can try also free (BSD lic) OpenOpt solver lincher, it should handle > your problem well > something like > from scikits.openopt import NLP > p = NLP(f, x0, lb = zeros(x0.size)) > r = p.solve('lincher') > however, currently lincher requires QP solver, and the only one > connected is CVXOPT one, so you should have cvxopt installed (GPL). BTW > cvxopt is capable of solving your problem, it has appropriate NLP solver > Also, take a look at tnc > http://www.scipy.org/doc/api_docs/scipy.optimize.tnc.html > - afaik it allows to handle lb - ub bounds > cvxopt can only handle convex functions, but my function is too complicated to get the expression of derivate easily, so according to a previous post from Joachim Dahl(dahl.joachim at gmail.com) in this list, it is probably non-convex. Can openopt handle non-convex functions? My function is too complex to compute derivate, so I can't use tnc to do the job. > >> My method is when "math domain error" occurred, catch it and set the >> return value of f to a very large number. Should this work or not? >> > This will not work with any NLP or Nonsmooth solver, that calls for > gradient/subgradient this will work for some global solvers like > anneal, but they are capable of small-scaled problems only (nVars up > to 10) HTH, D. The number of variables is less than 15, does this make any sense? Regards, From gael.varoquaux at normalesup.org Mon Jul 16 09:20:14 2007 From: gael.varoquaux at normalesup.org (Gael Varoquaux) Date: Mon, 16 Jul 2007 15:20:14 +0200 Subject: [SciPy-user] [OT] advice about publishing a scientific software In-Reply-To: <469B6F03.3070606@unibo.it> References: <469B6CCF.8090506@unibo.it> <20070716130140.GH23143@clipper.ens.fr> <469B6F03.3070606@unibo.it> Message-ID: <20070716132014.GI23143@clipper.ens.fr> On Mon, Jul 16, 2007 at 03:13:39PM +0200, massimo sandal wrote: > I haven't heard nothing but harsh criticism around "eggs", I have never heard any criticism. I much just be hidding in a hole to deep :->. > Most Python software I've seen is > distributed via the usual setup.py / *nix packages / Windows installers. > All three are easy and standard. Well, I would call Unix package easy to develop. And they are distribution specific. Windows installers... I must admit I don't have a clue how to develop one of these, and I can't learn, I don't have a Windows box lying around (and I am not to interested). setup.py... well, yes, that's pretty much what eggs are, with some sugar over it. > What are the advantages of eggs? Do you know apt, or yum ? Well aggs are pretty much that for Python (like debs or rpm): an egg is versions, the "easy_install" script used to install eggs knows where to place them automatically, it can put your scripts in the path, deal with dependencies (eg by downloading eggs from pypi). Of course eggs are not perfect, they are no where as nice as debs, but they are easier to create. > Where can I find info about them? Can a software redistributed with > eggs play well (i.e. be repackaged) with Linux packaging or Windows > installers? There are projects doing this (http://stdeb.python-hosting.com to makes debs. I don't use windows, so I never tried this out, but it seems possible to make a windows installer (using the "bdist_wininst" to the setup.py script, that also can be used to generate the eggs). Info can be found at http://peak.telecommunity.com/DevCenter/setuptools . Try it out, it feels a bit strange in the beginning, as it looks like you have written no code, so nothing can happen, but its quite handy. Ga?l From fdu.xiaojf at gmail.com Mon Jul 16 09:25:42 2007 From: fdu.xiaojf at gmail.com (fdu.xiaojf at gmail.com) Date: Mon, 16 Jul 2007 21:25:42 +0800 Subject: [SciPy-user] Questions about scipy.optimize.fmin_cobyla In-Reply-To: <469B7020.3060803@ukr.net> References: <469B6202.6020002@gmail.com> <469B69FE.4040305@ukr.net> <469B6C57.4010603@gmail.com> <469B7020.3060803@ukr.net> Message-ID: <469B71D6.7030601@gmail.com> Hi dmitrey, Thank you so much for your kindness! dmitrey wrote: > so if you have only x >= 0 constraints, it's better to use tnc or > openopt lincher than fmin_cobyla Unfortunately, the function I want to minimize still has equality constraints. The reason why I chose cobyla is that cobyla can handle inequality and equality constraints, and it doesn't require derivate information. > > if you have to use cobyla anyway, try this: > > > a = [] > for i in range(5): > a.append(lambda x: x[i]**2) > x = [1,2,3,4,5] > for i in range(5): > print a[i](x) > > 1 > 4 > 9 > 16 > 25 The constrain functions are called by fmin_cobyla, so I couldn't make sure "for i ...." are used when the constrain functions are called. In your example, if I use "for j in range(5): print a[j](x)", it will not work as expected. > > If you will replace xi by exp(xi), don't forget to replace lb[i]=0 by > lb[i]=1 I'm trying this. > > HTH, d From openopt at ukr.net Mon Jul 16 09:35:00 2007 From: openopt at ukr.net (dmitrey) Date: Mon, 16 Jul 2007 16:35:00 +0300 Subject: [SciPy-user] Questions about scipy.optimize.fmin_cobyla In-Reply-To: <469B6FAE.1070807@gmail.com> References: <469B6202.6020002@gmail.com> <469B64EF.2080401@ukr.net> <469B6FAE.1070807@gmail.com> Message-ID: <469B7404.6040507@ukr.net> fdu.xiaojf at gmail.com wrote: > dmitrey wrote: > > fdu.xiaojf at gmail.com wrote: > > >> > >> 2) In function f(X), there are item of log(xi). Although I have > >> constrained the value of xi in the constrain functions, xi still may be > >> equal or less than 0 during minimization, then "math domain error" > >> occurred. > >> > >> What should I do ? > >> > > I would replace xi and log(xi) by exp(xi) and xi > > You can try also free (BSD lic) OpenOpt solver lincher, it should handle > > your problem well > > something like > > from scikits.openopt import NLP > > p = NLP(f, x0, lb = zeros(x0.size)) > > r = p.solve('lincher') > > however, currently lincher requires QP solver, and the only one > > connected is CVXOPT one, so you should have cvxopt installed (GPL). BTW > > cvxopt is capable of solving your problem, it has appropriate NLP solver > > Also, take a look at tnc > > http://www.scipy.org/doc/api_docs/scipy.optimize.tnc.html > > - afaik it allows to handle lb - ub bounds > > > cvxopt can only handle convex functions, but my function is too > complicated to get the expression of derivate easily, so according to > a previous post from Joachim Dahl(dahl.joachim at gmail.com) in this list, > it is probably non-convex. > > Can openopt handle non-convex functions? > this is incorrect question. For any NLP solver (w/o global ones of course) I can construct a non-convex func that will failed to be solved. Moreover, I can construct *convex* func, which one will be very, very hard to solve (for the solver chose). So I can only talk about "this solver is more or less suitable for solving non-convex funcs". Fortunately, lincher is rather suitable for solving non-convex funcs, but let me remember you once again - it requires cvxopt qp solver yet, no other ones are connected or are written (I hope till the end of summer openopt will have it own QP/QPCP solver). > My function is too complex to compute derivate, so I can't use tnc to do > the job. > if derivatives are not provided to tnc, it will calculate that ones by itself via finite-differences, as any other NLP solver. > > > >> My method is when "math domain error" occurred, catch it and set the > >> return value of f to a very large number. Should this work or not? > >> > > This will not work with any NLP or Nonsmooth solver, that calls for > > gradient/subgradient this will work for some global solvers like > > anneal, but they are capable of small-scaled problems only (nVars up > > to 10) HTH, D. > > The number of variables is less than 15, does this make any sense? > Very unlikely. 10 is already a big problem. >The reason why I chose cobyla is that cobyla can handle inequality and equality constraints, and it doesn't require derivate information. lincher is capable of handling equality constraints. However, there can be some difficult cases (for example, when constraints form a linear-dependent system in xk - point from iter k) But for rather small nVars = 15 I guess no problems will be obtained. HTH, D. > > Regards, > > From c.j.lee at tnw.utwente.nl Mon Jul 16 09:54:26 2007 From: c.j.lee at tnw.utwente.nl (Chris Lee) Date: Mon, 16 Jul 2007 15:54:26 +0200 Subject: [SciPy-user] [OT] advice about publishing a scientific software In-Reply-To: <469B6CCF.8090506@unibo.it> References: <469B6CCF.8090506@unibo.it> Message-ID: On Jul 16, 2007, at 3:04 PM, massimo sandal wrote: > I am currently developing a (Python-and-Scipy based, of course!) > data analysis software (more precisely, a single molecule force > spectroscopy data analysis sw). It has been thought to be not the > usual quick-and-dirty in house script, but to be an actual > application that can be used in general by different labs. In fact, > it actually features an easy and working (even if slightly > unpolished) plugin API, and most functionality is implemented by > mean of independent plugin. I would think that you could write a paper to the appropriate methods journal and its review would be independent of the release to open source as long as you clearly stated in the paper that the authors were the sole developers up to the x.yz release. Which also answers the question about which Journal. Every field has either specialist methods/instrumentation journals or journals with sections devoted to that. I would aim for one of those. Cheers Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: From fdu.xiaojf at gmail.com Mon Jul 16 10:00:36 2007 From: fdu.xiaojf at gmail.com (fdu.xiaojf at gmail.com) Date: Mon, 16 Jul 2007 22:00:36 +0800 Subject: [SciPy-user] Questions about scipy.optimize.fmin_cobyla In-Reply-To: <469B7404.6040507@ukr.net> References: <469B6202.6020002@gmail.com> <469B64EF.2080401@ukr.net> <469B6FAE.1070807@gmail.com> <469B7404.6040507@ukr.net> Message-ID: <469B7A04.50102@gmail.com> dmitrey wrote: > fdu.xiaojf at gmail.com wrote: >> > >> cvxopt can only handle convex functions, but my function is too >> complicated to get the expression of derivate easily, so according to >> a previous post from Joachim Dahl(dahl.joachim at gmail.com) in this list, >> it is probably non-convex. >> >> Can openopt handle non-convex functions? >> > this is incorrect question. For any NLP solver (w/o global ones of > course) I can construct a non-convex func that will failed to be solved. > Moreover, I can construct *convex* func, which one will be very, very > hard to solve (for the solver chose). So I can only talk about "this > solver is more or less suitable for solving non-convex funcs". > Fortunately, lincher is rather suitable for solving non-convex funcs, > but let me remember you once again - it requires cvxopt qp solver yet, > no other ones are connected or are written (I hope till the end of > summer openopt will have it own QP/QPCP solver). Thanks. >> My function is too complex to compute derivate, so I can't use tnc to do >> the job. >> > > if derivatives are not provided to tnc, it will calculate that ones by > itself via finite-differences, as any other NLP solver. Oh, yes, tnc can calculate derivatives if the parameter approx_grad is True. >> > >> >> My method is when "math domain error" occurred, catch it and set the >> >> return value of f to a very large number. Should this work or not? >> >> >> > This will not work with any NLP or Nonsmooth solver, that calls for >> > gradient/subgradient this will work for some global solvers like >> > anneal, but they are capable of small-scaled problems only (nVars up >> > to 10) HTH, D. >> >> The number of variables is less than 15, does this make any sense? >> > Very unlikely. > 10 is already a big problem. > >> The reason why I chose cobyla is that cobyla can handle inequality and equality constraints, and it doesn't require derivate information. > > lincher is capable of handling equality constraints. However, there can > be some difficult cases (for example, when constraints form a > linear-dependent system in xk - point from iter k) > But for rather small nVars = 15 I guess no problems will be obtained. Can linear avoid the "math domain error" prolbem in cobyla ? In my function, there are items like log(xi*R*T/V) (R,T,V are positive variables too). Regards From openopt at ukr.net Mon Jul 16 10:09:49 2007 From: openopt at ukr.net (dmitrey) Date: Mon, 16 Jul 2007 17:09:49 +0300 Subject: [SciPy-user] Questions about scipy.optimize.fmin_cobyla In-Reply-To: <469B7A04.50102@gmail.com> References: <469B6202.6020002@gmail.com> <469B64EF.2080401@ukr.net> <469B6FAE.1070807@gmail.com> <469B7404.6040507@ukr.net> <469B7A04.50102@gmail.com> Message-ID: <469B7C2D.9090805@ukr.net> fdu.xiaojf at gmail.com wrote: > Can linear avoid the "math domain error" prolbem in cobyla ? In my > function, there are items like log(xi*R*T/V) (R,T,V are positive > variables too). > do you mean "lincher" instead of "linear"? no, at least for now (but some solvers, usually commercial, can handle NaN in objfun). if R, T, V are constants I would replace zi = log(xi*R*T/V) hence xi = exp(xi)*V/(R*T) hth, D > Regards > > > From aisaac at american.edu Mon Jul 16 10:23:27 2007 From: aisaac at american.edu (Alan G Isaac) Date: Mon, 16 Jul 2007 10:23:27 -0400 Subject: [SciPy-user] [OT] advice about publishing a scientific software In-Reply-To: References: <469B6CCF.8090506@unibo.it> Message-ID: This is the kind of thing that would be good for the projected SciPy journal. It might be appropriate for JStatSoft http://www.jstatsoft.org/, although that has traditionally had a bias toward R. fwiw, Alan Isaac From massimo.sandal at unibo.it Mon Jul 16 10:50:33 2007 From: massimo.sandal at unibo.it (massimo sandal) Date: Mon, 16 Jul 2007 16:50:33 +0200 Subject: [SciPy-user] [OT] advice about publishing a scientific software In-Reply-To: References: <469B6CCF.8090506@unibo.it> Message-ID: <469B85B9.9010502@unibo.it> Alan G Isaac ha scritto: > This is the kind of thing that would be good for the > projected SciPy journal. It might be appropriate for > JStatSoft http://www.jstatsoft.org/, although that has > traditionally had a bias toward R. Well, its peculiarity is surely not in being a strong statistical package, but in being one of the few software packages for force spectroscopy analysis (and most probably the first one being both open source and plugin-capable). I don't feel J.Stat.Soft. would be right, but maybe I'm wrong. m. -- Massimo Sandal University of Bologna Department of Biochemistry "G.Moruzzi" snail mail: Via Irnerio 48, 40126 Bologna, Italy email: massimo.sandal at unibo.it tel: +39-051-2094388 fax: +39-051-2094387 -------------- next part -------------- A non-text attachment was scrubbed... Name: massimo.sandal.vcf Type: text/x-vcard Size: 274 bytes Desc: not available URL: From robert.kern at gmail.com Mon Jul 16 11:51:30 2007 From: robert.kern at gmail.com (Robert Kern) Date: Mon, 16 Jul 2007 10:51:30 -0500 Subject: [SciPy-user] [OT] advice about publishing a scientific software In-Reply-To: <469B6CCF.8090506@unibo.it> References: <469B6CCF.8090506@unibo.it> Message-ID: <469B9402.5070403@gmail.com> massimo sandal wrote: > - Minor one: Where to publish it? I am used to think about SourceForge > as THE place for publishing open source software, however a number of > people told me about Google Code. Basically what I want, if possible, is > no-nonsense SVN access and some integrated mailing list/forum. Google > Code seems good at that -it also gives automatically Wiki space, which > is a major plus for me. What do you think about? Drawbacks? Licence > issues (i.e. something like "since you publish it on Google Code the > code is also owned by Google" tiny-letters clause?) Is there some other > alternative? If you want "no-nonsense," use Google Code. Sourceforge is a lot of nonsense. I get incredibly frustrated trying to use the Sourceforge website or any of its spawn on either side (downloader or developer). I don't believe there are any IP issues; you own your code, not Google. > Moreover, I'd like to know your opinions about the degree of > "polishness" and other requirements for initial publication of a > scientific software. Meh. Release early and often. Having the code public is a good way to motivate polish. Your code may crash or miss features, but it's code that wasn't available before. You are making a positive contribution regardless. > As for documentation, I am working on actual, user > manual and hacking (mainly but not only focused on plugin writing) > manual with tutorials etc.. The sw still lacks an installer but > "installation" is braindead (provided that you have all the correct > dependencies): put all the files in the same directory and run "python > software.py" from where: do you think an installer is absolutely > necessary or it is OK to let it go this way, and add the installer later? For a Python project, you really should be using distutils, even if it is just the simplest possible setup.py. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From massimo.sandal at unibo.it Mon Jul 16 12:33:09 2007 From: massimo.sandal at unibo.it (massimo sandal) Date: Mon, 16 Jul 2007 18:33:09 +0200 Subject: [SciPy-user] [OT] advice about publishing a scientific software In-Reply-To: <469B9402.5070403@gmail.com> References: <469B6CCF.8090506@unibo.it> <469B9402.5070403@gmail.com> Message-ID: <469B9DC5.7050301@unibo.it> Robert Kern ha scritto: > massimo sandal wrote: > If you want "no-nonsense," use Google Code. Sourceforge is a lot of nonsense. I > get incredibly frustrated trying to use the Sourceforge website or any of its > spawn on either side (downloader or developer). I don't believe there are any IP > issues; you own your code, not Google. OK, thanks. >> Moreover, I'd like to know your opinions about the degree of >> "polishness" and other requirements for initial publication of a >> scientific software. > > Meh. Release early and often. Having the code public is a good way to motivate > polish. Your code may crash or miss features, but it's code that wasn't > available before. You are making a positive contribution regardless. Yes, but as stated before, I want to publish something about this code. So I expect that it must have some minimum standard of quality. m. -- Massimo Sandal University of Bologna Department of Biochemistry "G.Moruzzi" snail mail: Via Irnerio 48, 40126 Bologna, Italy email: massimo.sandal at unibo.it tel: +39-051-2094388 fax: +39-051-2094387 -------------- next part -------------- A non-text attachment was scrubbed... Name: massimo.sandal.vcf Type: text/x-vcard Size: 274 bytes Desc: not available URL: From robert.kern at gmail.com Mon Jul 16 12:42:37 2007 From: robert.kern at gmail.com (Robert Kern) Date: Mon, 16 Jul 2007 11:42:37 -0500 Subject: [SciPy-user] [OT] advice about publishing a scientific software In-Reply-To: <469B9DC5.7050301@unibo.it> References: <469B6CCF.8090506@unibo.it> <469B9402.5070403@gmail.com> <469B9DC5.7050301@unibo.it> Message-ID: <469B9FFD.5070008@gmail.com> massimo sandal wrote: > Robert Kern ha scritto: >> massimo sandal wrote: >>> Moreover, I'd like to know your opinions about the degree of >>> "polishness" and other requirements for initial publication of a >>> scientific software. >> >> Meh. Release early and often. Having the code public is a good way to >> motivate >> polish. Your code may crash or miss features, but it's code that wasn't >> available before. You are making a positive contribution regardless. > > Yes, but as stated before, I want to publish something about this code. > So I expect that it must have some minimum standard of quality. I would think that the only time that would matter is on submission of your paper, not before. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From massimo.sandal at unibo.it Mon Jul 16 13:32:18 2007 From: massimo.sandal at unibo.it (massimo sandal) Date: Mon, 16 Jul 2007 19:32:18 +0200 Subject: [SciPy-user] [OT] advice about publishing a scientific software In-Reply-To: <469B9FFD.5070008@gmail.com> References: <469B6CCF.8090506@unibo.it> <469B9402.5070403@gmail.com> <469B9DC5.7050301@unibo.it> <469B9FFD.5070008@gmail.com> Message-ID: <469BABA2.4030608@unibo.it> Robert Kern ha scritto: > massimo sandal wrote: >> Robert Kern ha scritto: > I would think that the only time that would matter is on submission of your > paper, not before. That's exactly what I feared. m. -- Massimo Sandal University of Bologna Department of Biochemistry "G.Moruzzi" snail mail: Via Irnerio 48, 40126 Bologna, Italy email: massimo.sandal at unibo.it tel: +39-051-2094388 fax: +39-051-2094387 -------------- next part -------------- A non-text attachment was scrubbed... Name: massimo.sandal.vcf Type: text/x-vcard Size: 274 bytes Desc: not available URL: From aisaac at american.edu Mon Jul 16 13:51:58 2007 From: aisaac at american.edu (Alan G Isaac) Date: Mon, 16 Jul 2007 13:51:58 -0400 Subject: [SciPy-user] [OT] advice about publishing a scientific software In-Reply-To: <469BABA2.4030608@unibo.it> References: <469B6CCF.8090506@unibo.it><469B9402.5070403@gmail.com> <469B9DC5.7050301@unibo.it><469B9FFD.5070008@gmail.com><469BABA2.4030608@unibo.it> Message-ID: > Robert Kern ha scritto: >> I would think that the only time that would matter is on >> submission of your paper, not before. On Mon, 16 Jul 2007, massimo sandal apparently wrote: > That's exactly what I feared. I think Robert was suggesting that early release is a good way to quickly get to the code quality you need for a useful pulbication, not that it would count against you at the time of publication. Cheers, Alan Isaac From peridot.faceted at gmail.com Mon Jul 16 14:00:24 2007 From: peridot.faceted at gmail.com (Anne Archibald) Date: Mon, 16 Jul 2007 14:00:24 -0400 Subject: [SciPy-user] Questions about scipy.optimize.fmin_cobyla In-Reply-To: <469B6202.6020002@gmail.com> References: <469B6202.6020002@gmail.com> Message-ID: On 16/07/07, fdu.xiaojf at gmail.com wrote: > 2) In function f(X), there are item of log(xi). Although I have > constrained the value of xi in the constrain functions, xi still may be > equal or less than 0 during minimization, then "math domain error" > occurred. > > What should I do ? > > My method is when "math domain error" occurred, catch it and set the > return value of f to a very large number. Should this work or not? This problem happens because while fmin_cobyla is able to handle constraints, it nevertheless evaluates the objective function outside those constraints. I think this is a very serious bug, which limits the usefulness of fmin_cobyla. Unfortunately, I do not have a general solution. In your specific case, where you have positive numbers, I would recommend (as another poster did) that you reparameterize: any positive number xi can be written as exp(yi). If you write it this way, yi may take any value and xi will still be positive. If you're lucky, this may allow you to dispense with constraints entirely. For a simple example: Suppose we want to do least-squares fitting of an exponential to some data points: yvals = A*exp(b*xvals) + noise Suppose further that we want to ensure A is positive. We could minimize sum((yvals-A*exp(b*xvals))**2) subject to the constraint A>0. But this will be tricky. Instead, write A=exp(a), and minimize sum((yvals-exp(a)*exp(b*xvals))**2). Anne From dominique.orban at gmail.com Mon Jul 16 14:14:20 2007 From: dominique.orban at gmail.com (Dominique Orban) Date: Mon, 16 Jul 2007 14:14:20 -0400 Subject: [SciPy-user] Questions about scipy.optimize.fmin_cobyla In-Reply-To: References: <469B6202.6020002@gmail.com> Message-ID: <469BB57C.6010809@gmail.com> Anne Archibald wrote: > On 16/07/07, fdu.xiaojf at gmail.com wrote: > >> 2) In function f(X), there are item of log(xi). Although I have >> constrained the value of xi in the constrain functions, xi still may be >> equal or less than 0 during minimization, then "math domain error" >> occurred. >> >> What should I do ? >> >> My method is when "math domain error" occurred, catch it and set the >> return value of f to a very large number. Should this work or not? > > This problem happens because while fmin_cobyla is able to handle > constraints, it nevertheless evaluates the objective function outside > those constraints. I think this is a very serious bug, which limits > the usefulness of fmin_cobyla. Unfortunately, I do not have a general > solution. This behavior of Cobyla is not a bug. There are two kinds of methods for constrained problems in optimization: feasible and infeasible methods. The iterates generated in a feasible method will all satisfy the constraints. In an infeasible method, they may or may not satisfy the constraints but, if convergence happens and if all goes well, the iterates converge to a point which is (approximately) feasible. Cobyla is an infeasible method. The fact that your objective function is not defined everywhere (because of the log terms) suggests that you should not be using an infeasible method. Instead, you could look into feasible interior-point methods (beware, there also are infeasible interior-point methods... in fact, most of them are). NLPy features one such method, albeit a simple one, under the name TRIP (for 'trust-region interior-point method'). For those who care about this sort of thing, it is a purely primal method at the moment. I mostly implemented it as a proof of concept in the NLPy framework, and plan to upgrade it in the future. It will not treat equality constraints, but the inequalities can be as nonlinear as you please, as long as they are twice differentiable. You can give it a try and let me know what happens. In addition to the constraints you already have, add new constraints stating that the arguments of the logs must be >= 0. Interior-point methods ensure that at each iteration, those quantities remain > 0 (strictly). If the constraints you end up with are *only bound constraints*, you can also look into L-BFGS-B (which I believe is interfaced in SciPy), a projected quasi-Newton method, or TRON (www.mcs.anl.gov/~more/tron which I don't think is interfaced in SciPy), a projected Newton method. NLPy also contains a gradient-projection method which I find surprisingly efficient, but also only applies to bound constraints. Re-parametrizing your problem is, of course, another option. Good luck, Dominique From robert.kern at gmail.com Mon Jul 16 17:03:55 2007 From: robert.kern at gmail.com (Robert Kern) Date: Mon, 16 Jul 2007 16:03:55 -0500 Subject: [SciPy-user] [OT] advice about publishing a scientific software In-Reply-To: References: <469B6CCF.8090506@unibo.it><469B9402.5070403@gmail.com> <469B9DC5.7050301@unibo.it><469B9FFD.5070008@gmail.com><469BABA2.4030608@unibo.it> Message-ID: <469BDD3B.3060008@gmail.com> Alan G Isaac wrote: >> Robert Kern ha scritto: >>> I would think that the only time that would matter is on >>> submission of your paper, not before. > > On Mon, 16 Jul 2007, massimo sandal apparently wrote: >> That's exactly what I feared. > > I think Robert was suggesting that early release is a good > way to quickly get to the code quality you need for a > useful pulbication, not that it would count against you > at the time of publication. Indeed. To rephrase a little bit more clearly: "I would think that only the quality of the code at the time of submission of your paper would be important." I don't think reviewers will be going back through your SVN logs. Sharing code before publication is expected, I think. As Chris Lee suggests, though, you have to be very careful about keeping track of contributions, more so than with other open source projects. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From wbaxter at gmail.com Mon Jul 16 17:07:54 2007 From: wbaxter at gmail.com (Bill Baxter) Date: Tue, 17 Jul 2007 06:07:54 +0900 Subject: [SciPy-user] [OT] advice about publishing a scientific software In-Reply-To: <469B9402.5070403@gmail.com> References: <469B6CCF.8090506@unibo.it> <469B9402.5070403@gmail.com> Message-ID: On 7/17/07, Robert Kern wrote: > massimo sandal wrote: > > If you want "no-nonsense," use Google Code. The only issue I've heard with Google Code is that they only allow you to choose from a fixed list of licenses. But most of the usual suspects are there, so that probably won't be a problem for you, unless you are determined to use some obscure/homebrew license. What it does stop is mature projects (like wxPython) with pre-existing licenses that happen not to be on Google's list. --bb From amcmorl at gmail.com Mon Jul 16 18:07:22 2007 From: amcmorl at gmail.com (Angus McMorland) Date: Tue, 17 Jul 2007 10:07:22 +1200 Subject: [SciPy-user] Numerical Recipes robust fit implementation In-Reply-To: References: <469B120F.6000006@astraw.com> Message-ID: Hi all, On 16/07/07, Anne Archibald wrote: > On 16/07/07, Angus McMorland wrote: > > > I'm going to have to think a bit more what I want to achieve to see if > > RANSAC is useful. Ultimately I hope to determine the probability of a > > a given data set being exponentially distributed, by comparing the raw > > frequency distribution to an expected distribution based on a linear > > fit to the log transform of the raw one. It seems a bit like basing my > > 'expected' distribution on a subset of data from which outliers have > > been completely excluded is self-fulfilling, and having some other > > criterion for weighting of the error term (as medfit does) seems more > > appropriate. This is however very much just a gut feeling rather than > > an educated assessment, so any other comments are welcome. > > If what you're trying to do is test whether your data points are > likely to have been drawn from a given distribution, you may be able > to do much better by not putting them in a histogram first, and using > something like the Kolmogorov-Smirnov test (scipy.stats.kstest). If > you have outliers you may have a problem. (It's feasible to fit > parameters so they maximize the kstest p value, although of course the > p value you get at the end is no longer an actual probability.) I > suspect if you look in the statistical literature you'll find other > tricks for fitting distributions directly (rather than fitting > histograms). Kolmogorov-Smirnov is the way I had intended originally to go (there's a variant that approximates the probability for grouped (read: frequency) data). But, as Anne rightly points out I can apply it to the individual variates since I have them--- my earlier approach arose mainly from how I was looking at the data, and I need to get away from that. I still need an expected cdf based on my hypothesized distribution, parameters for which I want to estimate from my data: that's where the fitting comes in. My only remaining decision is whether a robust or least-squares fitting approach is more appropriate for deriving the expected distribution. The former is inherently self-fulfilling, in that it excludes from the estimation of the expected distribution the outliers that are likely the important deviations, and the latter will include all the data, but fit none of it very well. Time to play around and see how much difference there is, I think. Thanks for all your suggestions, they've been very useful. Angus. -- AJC McMorland, PhD Student Physiology, University of Auckland From peridot.faceted at gmail.com Mon Jul 16 19:32:06 2007 From: peridot.faceted at gmail.com (Anne Archibald) Date: Mon, 16 Jul 2007 19:32:06 -0400 Subject: [SciPy-user] Numerical Recipes robust fit implementation In-Reply-To: References: <469B120F.6000006@astraw.com> Message-ID: On 16/07/07, Angus McMorland wrote: > Kolmogorov-Smirnov is the way I had intended originally to go (there's > a variant that approximates the probability for grouped (read: > frequency) data). But, as Anne rightly points out I can apply it to > the individual variates since I have them--- my earlier approach arose > mainly from how I was looking at the data, and I need to get away from > that. > > I still need an expected cdf based on my hypothesized distribution, > parameters for which I want to estimate from my data: that's where the > fitting comes in. My only remaining decision is whether a robust or > least-squares fitting approach is more appropriate for deriving the > expected distribution. The former is inherently self-fulfilling, in > that it excludes from the estimation of the expected distribution the > outliers that are likely the important deviations, and the latter will > include all the data, but fit none of it very well. Time to play > around and see how much difference there is, I think. > > Thanks for all your suggestions, they've been very useful. I don't know why I didn't think of this before, I've been working with them, but if you want to estimate a PDF (and therefore a CDF), kernel density estimators are a very reasonable approach. Scipy implements one, but if you want to include outliers you may find using a kernel with bigger tails than a Gaussian useful. I don't know of a robust kernel density estimator, but they've seen extensive work in the statistical literature. Anne From amcmorl at gmail.com Mon Jul 16 23:41:14 2007 From: amcmorl at gmail.com (Angus McMorland) Date: Tue, 17 Jul 2007 15:41:14 +1200 Subject: [SciPy-user] Numerical Recipes robust fit implementation In-Reply-To: References: <469B120F.6000006@astraw.com> Message-ID: Hi Anne et al., On 17/07/07, Anne Archibald wrote: > On 16/07/07, Angus McMorland wrote: > I don't know why I didn't think of this before, I've been working with > them, but if you want to estimate a PDF (and therefore a CDF), kernel > density estimators are a very reasonable approach. Scipy implements > one, but if you want to include outliers you may find using a kernel > with bigger tails than a Gaussian useful. I don't know of a robust > kernel density estimator, but they've seen extensive work in the > statistical literature. I may be misunderstanding, but it looks like KDEs generate generic pdfs based on the distribution of the observed values and not any particular standard distribution form. I specifically need an estimated exponential distribution to test against using the KS, since this addresses the underlying mechanism generating the data. Regardless, thanks for the suggestion. I'm picking up new tools left, right and centre. Angus. -- AJC McMorland, PhD Student Physiology, University of Auckland From fdu.xiaojf at gmail.com Tue Jul 17 02:13:57 2007 From: fdu.xiaojf at gmail.com (fdu.xiaojf at gmail.com) Date: Tue, 17 Jul 2007 14:13:57 +0800 Subject: [SciPy-user] Questions about scipy.optimize.fmin_cobyla In-Reply-To: <469BB57C.6010809@gmail.com> References: <469B6202.6020002@gmail.com> <469BB57C.6010809@gmail.com> Message-ID: <469C5E25.4060709@gmail.com> Dominique Orban wrote: >> This problem happens because while fmin_cobyla is able to handle >> constraints, it nevertheless evaluates the objective function outside >> those constraints. I think this is a very serious bug, which limits >> the usefulness of fmin_cobyla. Unfortunately, I do not have a general >> solution. > > This behavior of Cobyla is not a bug. > > There are two kinds of methods for constrained problems in optimization: > feasible and infeasible methods. The iterates generated in a feasible method > will all satisfy the constraints. In an infeasible method, they may or may not > satisfy the constraints but, if convergence happens and if all goes well, the > iterates converge to a point which is (approximately) feasible. Cobyla is an > infeasible method. > > The fact that your objective function is not defined everywhere (because of the > log terms) suggests that you should not be using an infeasible method. Instead, > you could look into feasible interior-point methods (beware, there also are > infeasible interior-point methods... in fact, most of them are). > > NLPy features one such method, albeit a simple one, under the name TRIP (for > 'trust-region interior-point method'). For those who care about this sort of > thing, it is a purely primal method at the moment. I mostly implemented it as a > proof of concept in the NLPy framework, and plan to upgrade it in the future. It > will not treat equality constraints, but the inequalities can be as nonlinear as > you please, as long as they are twice differentiable. You can give it a try and > let me know what happens. I couldn't find proper documents for TRIP method from NLPY. There are only 3 small examples in the website of NLPY, and when I tried to get the source code of NLPY: $ svn co https://nlpy.svn.sourceforge.net/svnroot/nlpy/trunk/nlpy ./ svn: Can't convert string from native encoding to 'UTF-8': svn: ?\208?\194?\189?\168 ?\206?\196?\177?\190?\206?\196?\181?\181.txt I have tried to fix this problem, but with no success. So could you point me some links that give a detailed explanation of how to use TRIP? > > In addition to the constraints you already have, add new constraints stating > that the arguments of the logs must be >= 0. Interior-point methods ensure that > at each iteration, those quantities remain > 0 (strictly). > > If the constraints you end up with are *only bound constraints*, you can also > look into L-BFGS-B (which I believe is interfaced in SciPy), a projected > quasi-Newton method, or TRON (www.mcs.anl.gov/~more/tron which I don't think is > interfaced in SciPy), a projected Newton method. NLPy also contains a > gradient-projection method which I find surprisingly efficient, but also only > applies to bound constraints. > > Re-parametrizing your problem is, of course, another option. > > Good luck, > Dominique Thanks a lot. From fdu.xiaojf at gmail.com Tue Jul 17 03:08:01 2007 From: fdu.xiaojf at gmail.com (fdu.xiaojf at gmail.com) Date: Tue, 17 Jul 2007 15:08:01 +0800 Subject: [SciPy-user] Questions about scipy.optimize.fmin_cobyla In-Reply-To: <469BB57C.6010809@gmail.com> References: <469B6202.6020002@gmail.com> <469BB57C.6010809@gmail.com> Message-ID: <469C6AD1.4050603@gmail.com> Hi, Dominique Orban wrote: > Anne Archibald wrote: > > Re-parametrizing your problem is, of course, another option. > I have reparameterized my problem, fmin_cobyla can run with out "math domain error". But I get following message during minimization: #--------begin of message--------------- Tolerance of 3.5527136788e-015 reached Tolerance of 3.5527136788e-015 reached Tolerance of 3.5527136788e-015 reached Tolerance of 3.5527136788e-015 reached Tolerance of -3.5527136788e-015 reached Tolerance of -3.5527136788e-015 reached Return from subroutine COBYLA because the MAXFUN limit has been reached. NFVALS = 1000 F =-2.111828E+06 MAXCV = 6.311133E-07 X = 8.497382E-01 -5.764801E+00 -7.701660E+00 5.986411E-01 -3.959199E+00 -9.925761E-01 -6.380951E+00 1.034551E+00 -2.976923E+00 1.046551E-01 #--------end of message--------------- What does "Tolerance of 3.5527136788e-015 reached" mean ? Does it mean some error occured or fmin_cobyla doesn't perform minimization well ? Regards, Xiao Jianfeng From koepsell at gmail.com Tue Jul 17 03:21:46 2007 From: koepsell at gmail.com (killian koepsell) Date: Tue, 17 Jul 2007 00:21:46 -0700 Subject: [SciPy-user] (Mac) Close a plot window, crash IPython? In-Reply-To: <3F008727-2F29-43D2-9E9E-B9A830211787@koepsell.de> References: <88e473830707131310w57f2c3d3lce09a2f481c48c80@mail.gmail.com> <3F008727-2F29-43D2-9E9E-B9A830211787@koepsell.de> Message-ID: hi, i observed a similar problem that persists in matplotlib 0.90.1 (python 2.5, numpy 1.0.1, ipython 0.7.3). the problem occurs when a window is closed and it seems to be specific to the non-interactive mode using the GTK or GTKAgg backend. the following short script runs ok once, but when i try to run it a second time, python hangs: # start script import pylab as P P.ioff() P.figure() P.close() # stop script this is probably a problem of matplotlib and we should continue this thread on the matplotlib email list. cheers, kilian > From: "John Hunter" > > Date: July 13, 2007 1:10:35 PM PDT > > To: "SciPy Users List" < scipy-user at scipy.org> > > Subject: Re: [SciPy-user] (Mac) Close a plot window, crash IPython? > > Reply-To: SciPy Users List < scipy-user at scipy.org> > > > > On 7/13/07, David Warde-Farley wrote: > > > >> It does seem as though the *exact* same bug was reported today on > >> matplotlib-devel (what are the odds?), I shall checkout the svn > >> version and see if that fixes it, and make them aware of the other > >> WX- > >> related bug as well. > > > > I hope this does fix your problem, but the bug that was fixed was also > > recently introduced (in a svn commit after the 0.90.1 release) so it > > may not be your problem. But if you can update from svn and see if > > the problem is still there, that would be a great start. See you on > > the matplotlib-devel side :-) > > > > JDH > > _______________________________________________ > > SciPy-user mailing list > > SciPy-user at scipy.org > > http://projects.scipy.org/mailman/listinfo/scipy-user > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From massimo.sandal at unibo.it Tue Jul 17 08:11:33 2007 From: massimo.sandal at unibo.it (massimo sandal) Date: Tue, 17 Jul 2007 14:11:33 +0200 Subject: [SciPy-user] [OT] advice about publishing a scientific software In-Reply-To: <469BDD3B.3060008@gmail.com> References: <469B6CCF.8090506@unibo.it><469B9402.5070403@gmail.com> <469B9DC5.7050301@unibo.it><469B9FFD.5070008@gmail.com><469BABA2.4030608@unibo.it> <469BDD3B.3060008@gmail.com> Message-ID: <469CB1F5.7050907@unibo.it> Robert Kern ha scritto: > Indeed. To rephrase a little bit more clearly: "I would think that only the > quality of the code at the time of submission of your paper would be important." > I don't think reviewers will be going back through your SVN logs. Sharing code > before publication is expected, I think. As Chris Lee suggests, though, you have > to be very careful about keeping track of contributions, more so than with other > open source projects. Oh, ok. This makes me happier. Of course yes, every contributor should give me name and address etc. for name in publication. Thanks for your answers, they're clarifying a lot of things to me. m. -- Massimo Sandal University of Bologna Department of Biochemistry "G.Moruzzi" snail mail: Via Irnerio 48, 40126 Bologna, Italy email: massimo.sandal at unibo.it tel: +39-051-2094388 fax: +39-051-2094387 -------------- next part -------------- A non-text attachment was scrubbed... Name: massimo.sandal.vcf Type: text/x-vcard Size: 274 bytes Desc: not available URL: From mathias.wagner at physik.tu-darmstadt.de Tue Jul 17 09:27:30 2007 From: mathias.wagner at physik.tu-darmstadt.de (Mathias Wagner) Date: Tue, 17 Jul 2007 15:27:30 +0200 Subject: [SciPy-user] Finding a point where a function becomes constant Message-ID: <200707171527.32059.mathias.wagner@physik.tu-darmstadt.de> Hi, I have a numerical function defined f(x) that is zero for x < x_0 and f(x)>0 for x > x_0. I have to find x_0. The problem with conventional root finding is that if the algorithm evaluates the function for any x < x_0 it will return this as a solution. Does anyone know whether there is some suitable algorithm for this problem or do I have to modify an existing method like bisection for my needs? Mathias -- // *************************************************************** // ** Mathias Wagner ** // ** Institut fuer Kernphysik, TU Darmstadt ** // ** Schlossgartenstr. 9, 64289 Darmstadt, Germany ** // ** ** // ** email: mathias.wagner at physik.tu-darmstadt.de ** // ** www : http://crunch.ikp.physik.tu-darmstadt.de/~wagner ** // *************************************************************** From aisaac at american.edu Tue Jul 17 09:46:17 2007 From: aisaac at american.edu (Alan G Isaac) Date: Tue, 17 Jul 2007 09:46:17 -0400 Subject: [SciPy-user] Finding a point where a function becomes constant In-Reply-To: <200707171527.32059.mathias.wagner@physik.tu-darmstadt.de> References: <200707171527.32059.mathias.wagner@physik.tu-darmstadt.de> Message-ID: On Tue, 17 Jul 2007, Mathias Wagner apparently wrote: > I have a numerical function defined f(x) that is zero for x < x_0 and f(x)>0 > for x > x_0. I have to find x_0. > The problem with conventional root finding is that if the algorithm evaluates > the function for any x < x_0 it will return this as a solution. > Does anyone know whether there is some suitable algorithm for this problem or > do I have to modify an existing method like bisection for my needs? This one does not require any modification at all, I think. (License: MIT.) Cheers, Alan Isaac def bisect(f, x1, x2, eps=1e-8): f1, f2 = f(x1), f(x2) if f1*f2 > 0: raise ValueError #initialize xneg, xpos xneg, xpos = (x1,x2) if(f2>0) else (x2,x1) while xpos-xneg > eps: xmid = (xneg+xpos)/2 if f(xmid) > 0: xpos = xmid else: xneg = xmid return (xneg+xpos)/2 From fie.pye at atlas.cz Tue Jul 17 16:53:31 2007 From: fie.pye at atlas.cz (fie.pye at atlas.cz) Date: Tue, 17 Jul 2007 20:53:31 GMT Subject: [SciPy-user] BLAS, LAPACK, ATLAS libraries. Message-ID: <96133d6a05de4caa883a0724251e98a5@b68193df7bb044b79da5716a3035062c> Hi David, hi Vincent, thank you for your response. On my computer I have three gcc compilers: gcc4.1, gcc4.2 and gcc3.4.6. Since you mentioned possible problem with gfortran I decided to compile BLAS, LAPACK, python2.5 and numpy again with gcc3.4.6 and f77. For numpy installation I used both python2.5 setup.py build python2.5 setup.py install or python2.5 setup.py build build_ext -libg2c install but when importing numpy I got the same message >>> import numpy Traceback (most recent call last): File "", line 1, in File "/usr/local/python/python2.5.1/lib/python2.5/site-packages/numpy/__init__.py", line 43, in import linalg File "/usr/local/python/python2.5.1/lib/python2.5/site-packages/numpy/linalg/__init__.py", line 4, in from linalg import * File "/usr/local/python/python2.5.1/lib/python2.5/site-packages/numpy/linalg/linalg.py", line 25, in from numpy.linalg import lapack_lite ImportError: /usr/local/lib64/lapack/liblapack.so: undefined symbol: slamch_ I included all installation scripts and log files to enclosed file. I also began to install from source rpm but I am not familiar with that installation therefore I stopped after building. What does it mean refblas. http://software.opensuse.org/download/home:/ashigabou/Fedora_Extras_6/src/ Installation information ldd /usr/local/python/python2.5.1/lib/python2.5/site-packages/numpy/linalg/lapack_lite.so liblapack.so => /usr/local/lib64/lapack/liblapack.so (0x00002aaaaacb4000) libblas.so => /usr/local/lib64/blas/libblas.so (0x00002aaaab636000) libg2c.so.0 => /usr/lib64/libg2c.so.0 (0x00002aaaab88a000) libm.so.6 => /lib64/libm.so.6 (0x00002aaaabada000) libgcc_s.so.1 => /usr/local/lib64/libgcc_s.so.1 (0x00002aaaabd5d000) libc.so.6 => /lib64/libc.so.6 (0x00002aaaabf6a000) /lib64/ld-linux-x86-64.so.2 (0x0000555555554000) Best regards. Fie Pye PS: I always replay to e-mail. Why my respons does not append a tree and starts new contribution? >--------------------------------------------------------- >Od: David Cournapeau >P?ijato: 12.7.2007 6:12:47 >P?edm?t: Re: [SciPy-user] BLAS, LAPACK, ATLAS libraries. > > > >> Hi David. > >> > >> Thank you for your response. Based on your notes I recompiled BLAS and LAPACK libraries and build and installed python2.5.1 and numpy again. Unfortunately the error appears again > >> > >>>>> import numpy > >> Traceback (most recent call last): > >> File "", line 1, in > >> File "/usr/local/python/python2.5.1/lib/python2.5/site-packages/numpy/__init__.py", line 43, in > >> import linalg > >> File "/usr/local/python/python2.5.1/lib/python2.5/site-packages/numpy/linalg/__init__.py", line 4, in > >> from linalg import * > >> File "/usr/local/python/python2.5.1/lib/python2.5/site-packages/numpy/linalg/linalg.py", line 25, in > >> from numpy.linalg import lapack_lite > >> ImportError: /usr/local/python/python2.5.1/lib/python2.5/site-packages/numpy/linalg/lapack_lite.so: undefined symbol: _gfortran_concat_string > >> > >This is typically because you did not use the same fortran compiler > >everywhere (g77 vs gfortran): the default fortran compiler on fedora > >core (at least since 5) is gfortran, but this is not the default for > >numpy or scipy. Again, this is exactly for this kind of things that I > >packaged blas/lapack/atlas/numpy/scipy. Did you try building the source > >rpms instead of building everything from sources ? > > > >cheers, > > > >David > >_______________________________________________ > >SciPy-user mailing list > >SciPy-user at scipy.org > >http://projects.scipy.org/mailman/listinfo/scipy-user > > > > > > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: numpy_install.tar.gz Type: application/x-gzip Size: 54364 bytes Desc: not available URL: From david at ar.media.kyoto-u.ac.jp Tue Jul 17 21:47:26 2007 From: david at ar.media.kyoto-u.ac.jp (David Cournapeau) Date: Wed, 18 Jul 2007 10:47:26 +0900 Subject: [SciPy-user] BLAS, LAPACK, ATLAS libraries. In-Reply-To: <96133d6a05de4caa883a0724251e98a5@b68193df7bb044b79da5716a3035062c> References: <96133d6a05de4caa883a0724251e98a5@b68193df7bb044b79da5716a3035062c> Message-ID: <469D712E.6060303@ar.media.kyoto-u.ac.jp> fie.pye at atlas.cz wrote: > Hi David, hi Vincent, > > thank you for your response. > On my computer I have three gcc compilers: gcc4.1, gcc4.2 and gcc3.4.6. Since you mentioned possible problem with gfortran I decided to compile BLAS, LAPACK, python2.5 and numpy again with gcc3.4.6 and f77. To be precise, what is problematic is mixing fortran compilers (for example using gfortran for BLAS and g77 for LAPACK). gfortran by itself is not that problematic. > > Traceback (most recent call last): > File "", line 1, in > File "/usr/local/python/python2.5.1/lib/python2.5/site-packages/numpy/__init__.py", line 43, in > import linalg > File "/usr/local/python/python2.5.1/lib/python2.5/site-packages/numpy/linalg/__init__.py", line 4, in > from linalg import * > File "/usr/local/python/python2.5.1/lib/python2.5/site-packages/numpy/linalg/linalg.py", line 25, in > from numpy.linalg import lapack_lite > ImportError: /usr/local/lib64/lapack/liblapack.so: undefined symbol: slamch_ The problem is the way you build the shared library is wrong: you cannot just use g77 -shared -o soname *.o, because LAPACK object files are in several directories. One correct way is to use the static library .a, uncompress it in a directory, and build the shared library from that. There is a problem when several object files have the same name (because you cannot have several files with the same name in a directory), though, so extra care must be taken. > > I included all installation scripts and log files to enclosed file. > > I also began to install from source rpm but I am not familiar with that installation therefore I stopped after building. What does it mean refblas. I cannot use blas and lapack from officiel repository because they do not work very well, and I use a different name to avoid name clashes. You should build the following srpms in this order: - refblas - lapack3 - python-numpy - python-scipy Building them is not really different than any other source rpms. Since you are using a distribution I've never tested, there is a good chance it does not work out of the box, but I would rather help you solving those problems so that everybody can benefit from them rather than explaining how to build blas and lapack properly (which is really error prone and non trivial). David From sransom at nrao.edu Tue Jul 17 22:18:41 2007 From: sransom at nrao.edu (Scott Ransom) Date: Tue, 17 Jul 2007 22:18:41 -0400 Subject: [SciPy-user] BLAS, LAPACK, ATLAS libraries. In-Reply-To: <469D712E.6060303@ar.media.kyoto-u.ac.jp> References: <96133d6a05de4caa883a0724251e98a5@b68193df7bb044b79da5716a3035062c> <469D712E.6060303@ar.media.kyoto-u.ac.jp> Message-ID: <20070718021840.GA28479@ssh.cv.nrao.edu> > The problem is the way you build the shared library is wrong: you cannot > just use g77 -shared -o soname *.o, because LAPACK object files are in > several directories. > > One correct way is to use the static library .a, uncompress it in a > directory, and build the shared library from that. There is a problem > when several object files have the same name (because you cannot have > several files with the same name in a directory), though, so extra care > must be taken. You might be able to do something like this. It has worked for me in the past (with GNU ld): ld -shared -o libfoo.so --whole-archive libfoo.a Scott -- Scott M. Ransom Address: NRAO Phone: (434) 296-0320 520 Edgemont Rd. email: sransom at nrao.edu Charlottesville, VA 22903 USA GPG Fingerprint: 06A9 9553 78BE 16DB 407B FFCA 9BFA B6FF FFD3 2989 From openopt at ukr.net Wed Jul 18 05:11:48 2007 From: openopt at ukr.net (dmitrey) Date: Wed, 18 Jul 2007 12:11:48 +0300 Subject: [SciPy-user] changes in scipy.optimization.tnc (v 1.2 to 1.3) Message-ID: <469DD954.4030208@ukr.net> Hi all, (excuse my English) I was asked to connect tnc 1.3 instead of the v 1.2 that is present in scipy svn for now (ticket 296). Let me remember you that tnc is a routine for solving box-bounded non-linear optimization problems f(x)->min subjected to lb <=x <= ub (you should use None if some lb-ub coords are absent) Before closing the ticket I want to note that it will not provide backward compability (and hear your suggestions if they will be obtained), because some things had been changed in tnc, see below some statements from /tnc/HISTORY (please pay attention to the lines "Warning: API changes"): # TNC Release History # $Jeannot: HISTORY,v 1.15 2005/01/28 18:27:31 js Exp $ 01/28/2005, V1.3 : Fix a bug in the anti-zigzaging mechanism (many thanks to S.G. NASH). Warning: API changes: refined stopping criterions (xtol, pgtol). ftol is no more relative to the value of f. new parameter offset to translate the coordinates 04/18/2004, V1.2.5 : n==0 is now valid 04/14/2004, V1.2.4 : Fix a potential bug in the Python interface (infinity==0) 04/14/2004, V1.2.3 : Fix a bug in the Python interface (reference counting) 04/13/2004, V1.2.2 : Fix a bug in the Python interface (memory allocation) 04/13/2004, V1.2.1 : Fix a bug in the Python interface (scaling ignored) 04/03/2004, V1.2 : Memory allocation checks HTH, Dmitrey. From aisaac at american.edu Wed Jul 18 08:22:38 2007 From: aisaac at american.edu (Alan G Isaac) Date: Wed, 18 Jul 2007 08:22:38 -0400 Subject: [SciPy-user] changes in scipy.optimization.tnc (v 1.2 to 1.3) In-Reply-To: <469DD954.4030208@ukr.net> References: <469DD954.4030208@ukr.net> Message-ID: On Wed, 18 Jul 2007, dmitrey apparently wrote: > I want to note that it will not provide backward > compability (and hear your suggestions > Warning: API changes: refined > stopping criterions > (xtol, > pgtol). ftol is no more relative to the value of f. > new parameter offset to translate the coordinates Hi Dmitrey, Regarding http://projects.scipy.org/scipy/scipy/ticket/296 Thanks for working on this. Is your question the following? Should you implement any warnings etc. if someone appears to be using the old API? Jarrod, any commments? Anyone else? Cheers, Alan Isaac From scipy-pma at agapow.net Wed Jul 18 11:09:45 2007 From: scipy-pma at agapow.net (Paul-Michael Agapow) Date: Wed, 18 Jul 2007 16:09:45 +0100 Subject: [SciPy-user] Weave woes Message-ID: I've got errors installing and using weave, that persist across different installations and Python versions. My google-fu has failed me and an identical error reported on the mailing list some time ago went unanswered. Symptoms: First I installed weave from svn into Python2.5 and ran weave.test(): Found 1 tests for weave.ast_tools [...snip...] Found 26 tests for weave.catalog building extensions here: /Users/agapow/.python25_compiled/m3 [...snip...] Found 3 tests for weave.standard_array_spec /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ site-packages/weave/tests/test_wx_spec.py:16: DeprecationWarning: The wxPython compatibility package is no longer automatically generated or activly maintained. Please switch to the wx package as soon as possible. import wxPython Found 0 tests for weave.wx_spec Found 0 tests for __main__ ...warning: specified build_dir '_bad_path_' does not exist or is not writable. Trying default locations .....warning: specified build_dir '_bad_path_' does not exist or is not writable. Trying default locations ............................removing '/tmp/ tmptBN1Qxcat_test' (and everything under it) .removing '/tmp/tmpY2WiLfcat_test' (and everything under it) ..............................F..F.................................. ........................... ====================================================================== FAIL: check_1d_3 (weave.tests.test_size_check.test_dummy_array_indexing) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/weave/tests/test_size_check.py", line 168, in check_1d_3 self.generic_1d('a[-11:]') File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/weave/tests/test_size_check.py", line 135, in generic_1d self.generic_wrap(a,expr) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/weave/tests/test_size_check.py", line 127, in generic_wrap self.generic_test(a,expr,desired) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/weave/tests/test_size_check.py", line 123, in generic_test assert_array_equal(actual,desired, expr) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/numpy/testing/utils.py", line 223, in assert_array_equal verbose=verbose, header='Arrays are not equal') File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/numpy/testing/utils.py", line 215, in assert_array_compare assert cond, msg AssertionError: Arrays are not equal a[-11:] (mismatch 100.0%) x: array([1]) y: array([10]) ====================================================================== FAIL: check_1d_6 (weave.tests.test_size_check.test_dummy_array_indexing) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/weave/tests/test_size_check.py", line 174, in check_1d_6 self.generic_1d('a[:-11]') File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/weave/tests/test_size_check.py", line 135, in generic_1d self.generic_wrap(a,expr) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/weave/tests/test_size_check.py", line 127, in generic_wrap self.generic_test(a,expr,desired) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/weave/tests/test_size_check.py", line 123, in generic_test assert_array_equal(actual,desired, expr) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/numpy/testing/utils.py", line 223, in assert_array_equal verbose=verbose, header='Arrays are not equal') File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/numpy/testing/utils.py", line 215, in assert_array_compare assert cond, msg AssertionError: Arrays are not equal a[:-11] (mismatch 100.0%) x: array([9]) y: array([0]) I'm uncertain if the "__bad_path__" message is important, but the two errors may relfect issues with numpy (v1.0.1). I installed weave into Python2.4 for identical symptoms. I then installed the whole Scipy package just to be sure (weave 0.4.9, numpy 1.0.4.dev3882). No change. Along the way - mindful that maybe the tests were broken - I tried out a simple line of weave:: >>> a = 1; weave.inline('printf("%d\\n",a);',['a']) which gave:: Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/weave/inline_tools.py", line 325, in inline results = attempt_function_call(code,local_dict,global_dict) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/weave/inline_tools.py", line 375, in attempt_function_call function_list = function_catalog.get_functions(code,module_dir) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/weave/catalog.py", line 611, in get_functions function_list = self.get_cataloged_functions(code) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/weave/catalog.py", line 524, in get_cataloged_functions cat = get_catalog(path,mode) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/weave/catalog.py", line 294, in get_catalog or os.path.exists(catalog_file): File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/posixpath.py", line 171, in exists st = os.stat(path) TypeError: coercing to Unicode: need string or buffer, NoneType found Any ideas on what to try next? (Technical details: MacOSX 10.4.10 Intel macBook, gcc 4.0.1.) -- Dr Paul-Michael Agapow: VieDigitale / Inst. for Animal Health pma at viedigitale.com / paul-michael.agapow at bbsrc.ac.uk -------------- next part -------------- An HTML attachment was scrubbed... URL: From nwagner at iam.uni-stuttgart.de Wed Jul 18 11:15:13 2007 From: nwagner at iam.uni-stuttgart.de (Nils Wagner) Date: Wed, 18 Jul 2007 17:15:13 +0200 Subject: [SciPy-user] Weave woes In-Reply-To: References: Message-ID: <469E2E81.9060900@iam.uni-stuttgart.de> Paul-Michael Agapow wrote: > > I've got errors installing and using weave, that persist across > different installations and Python versions. My google-fu has failed > me and an identical error reported on the mailing list some time ago > went unanswered. > > Symptoms: First I installed weave from svn into Python2.5 and ran > weave.test(): > > Found 1 tests for weave.ast_tools > [...snip...] > Found 26 tests for weave.catalog > building extensions here: /Users/agapow/.python25_compiled/m3 > [...snip...] > Found 3 tests for weave.standard_array_spec > > /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/weave/tests/test_wx_spec.py:16: > DeprecationWarning: The wxPython compatibility package is no longer > automatically generated or activly maintained. Please switch to the > wx package as soon as possible. > import wxPython > Found 0 tests for weave.wx_spec > Found 0 tests for __main__ > ...warning: specified build_dir '_bad_path_' does not exist or is > not writable. Trying default locations > .....warning: specified build_dir '_bad_path_' does not exist or is > not writable. Trying default locations > ............................removing '/tmp/tmptBN1Qxcat_test' (and > everything under it) > .removing '/tmp/tmpY2WiLfcat_test' (and everything under it) > > ..............................F..F............................................................. > ====================================================================== > FAIL: check_1d_3 > (weave.tests.test_size_check.test_dummy_array_indexing) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/weave/tests/test_size_check.py", > line 168, in check_1d_3 > self.generic_1d('a[-11:]') > File > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/weave/tests/test_size_check.py", > line 135, in generic_1d > self.generic_wrap(a,expr) > File > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/weave/tests/test_size_check.py", > line 127, in generic_wrap > self.generic_test(a,expr,desired) > File > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/weave/tests/test_size_check.py", > line 123, in generic_test > assert_array_equal(actual,desired, expr) > File > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy/testing/utils.py", > line 223, in assert_array_equal > verbose=verbose, header='Arrays are not equal') > File > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy/testing/utils.py", > line 215, in assert_array_compare > assert cond, msg > AssertionError: > Arrays are not equal > a[-11:] > (mismatch 100.0%) > x: array([1]) > y: array([10]) > > ====================================================================== > FAIL: check_1d_6 > (weave.tests.test_size_check.test_dummy_array_indexing) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/weave/tests/test_size_check.py", > line 174, in check_1d_6 > self.generic_1d('a[:-11]') > File > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/weave/tests/test_size_check.py", > line 135, in generic_1d > self.generic_wrap(a,expr) > File > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/weave/tests/test_size_check.py", > line 127, in generic_wrap > self.generic_test(a,expr,desired) > File > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/weave/tests/test_size_check.py", > line 123, in generic_test > assert_array_equal(actual,desired, expr) > File > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy/testing/utils.py", > line 223, in assert_array_equal > verbose=verbose, header='Arrays are not equal') > File > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy/testing/utils.py", > line 215, in assert_array_compare > assert cond, msg > AssertionError: > Arrays are not equal > a[:-11] > (mismatch 100.0%) > x: array([9]) > y: array([0]) > > I'm uncertain if the "__bad_path__" message is important, but the two > errors may relfect issues with numpy (v1.0.1). I installed weave into > Python2.4 for identical symptoms. I then installed the whole Scipy > package just to be sure (weave 0.4.9, numpy 1.0.4.dev3882). No change. > > Along the way - mindful that maybe the tests were broken - I tried out > a simple line of weave:: > > >>> a = 1; weave.inline('printf("%d\\n",a);',['a']) > > which gave:: > > Traceback (most recent call last): > File "", line 1, in > File > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/weave/inline_tools.py", > line 325, in inline > results = attempt_function_call(code,local_dict,global_dict) > File > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/weave/inline_tools.py", > line 375, in attempt_function_call > function_list = function_catalog.get_functions(code,module_dir) > File > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/weave/catalog.py", > line 611, in get_functions > function_list = self.get_cataloged_functions(code) > File > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/weave/catalog.py", > line 524, in get_cataloged_functions > cat = get_catalog(path,mode) > File > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/weave/catalog.py", > line 294, in get_catalog > or os.path.exists(catalog_file): > File > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/posixpath.py", > line 171, in exists > st = os.stat(path) > TypeError: coercing to Unicode: need string or buffer, NoneType found > > > Any ideas on what to try next? (Technical details: MacOSX 10.4.10 > Intel macBook, gcc 4.0.1.) > > -- > Dr Paul-Michael Agapow: VieDigitale / Inst. for Animal Health > pma at viedigitale.com / > paul-michael.agapow at bbsrc.ac.uk > > > > ------------------------------------------------------------------------ > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > I can confirm failures on SuSE 64-bit (latest svn) python -i /usr/lib64/python2.4/site-packages/scipy/weave/tests/test_size_check.py Found 74 tests for weave.size_check Found 0 tests for __main__ ............................F..F.......................................... ====================================================================== FAIL: check_1d_3 (weave.tests.test_size_check.test_dummy_array_indexing) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib64/python2.4/site-packages/scipy/weave/tests/test_size_check.py", line 168, in check_1d_3 self.generic_1d('a[-11:]') File "/usr/lib64/python2.4/site-packages/scipy/weave/tests/test_size_check.py", line 135, in generic_1d self.generic_wrap(a,expr) File "/usr/lib64/python2.4/site-packages/scipy/weave/tests/test_size_check.py", line 127, in generic_wrap self.generic_test(a,expr,desired) File "/usr/lib64/python2.4/site-packages/scipy/weave/tests/test_size_check.py", line 123, in generic_test assert_array_equal(actual,desired, expr) File "/usr/lib64/python2.4/site-packages/numpy/testing/utils.py", line 223, in assert_array_equal verbose=verbose, header='Arrays are not equal') File "/usr/lib64/python2.4/site-packages/numpy/testing/utils.py", line 215, in assert_array_compare assert cond, msg AssertionError: Arrays are not equal a[-11:] (mismatch 100.0%) x: array([1]) y: array([10]) ====================================================================== FAIL: check_1d_6 (weave.tests.test_size_check.test_dummy_array_indexing) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib64/python2.4/site-packages/scipy/weave/tests/test_size_check.py", line 174, in check_1d_6 self.generic_1d('a[:-11]') File "/usr/lib64/python2.4/site-packages/scipy/weave/tests/test_size_check.py", line 135, in generic_1d self.generic_wrap(a,expr) File "/usr/lib64/python2.4/site-packages/scipy/weave/tests/test_size_check.py", line 127, in generic_wrap self.generic_test(a,expr,desired) File "/usr/lib64/python2.4/site-packages/scipy/weave/tests/test_size_check.py", line 123, in generic_test assert_array_equal(actual,desired, expr) File "/usr/lib64/python2.4/site-packages/numpy/testing/utils.py", line 223, in assert_array_equal verbose=verbose, header='Arrays are not equal') File "/usr/lib64/python2.4/site-packages/numpy/testing/utils.py", line 215, in assert_array_compare assert cond, msg AssertionError: Arrays are not equal a[:-11] (mismatch 100.0%) x: array([9]) y: array([0]) ---------------------------------------------------------------------- Ran 74 tests in 0.248s FAILED (failures=2) Nils From rmay at ou.edu Wed Jul 18 14:14:50 2007 From: rmay at ou.edu (Ryan May) Date: Wed, 18 Jul 2007 13:14:50 -0500 Subject: [SciPy-user] pynetcdf crashing on Python 2.5 Message-ID: <469E589A.9080202@ou.edu> Hi, I've been using Travis's pynetcdf package (0.7) for doing NetCDF IO for a lot of my code. I recently updated my Gentoo install to use Python 2.5, and now previously working code crashes (segmentation fault, no python exception) when I try to access an array of data. A GDB backtrace puts the error inside _netcdf.so. I haven't recompiled with debugging symbols to try to track this down any further. Has anyone else had any problems with pynetcdf and python 2.5? I'm aware of the other options (scipy.sandbox.netcdf, Scientific.IO.NetCDF, and pycdf). Is there an accepted package for NetCDF in python? Thanks, Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma From wjdandreta at att.net Wed Jul 18 15:34:15 2007 From: wjdandreta at att.net (Bill Dandreta) Date: Wed, 18 Jul 2007 15:34:15 -0400 Subject: [SciPy-user] pynetcdf crashing on Python 2.5 In-Reply-To: <469E589A.9080202@ou.edu> References: <469E589A.9080202@ou.edu> Message-ID: <469E6B37.6030602@att.net> I don't know if this has any bearing on your problem but Python 2.5 is hard masked on Gentoo do to problems on 64 bit systems with packages depending on numeric. Ryan May wrote: > Hi, > > I've been using Travis's pynetcdf package (0.7) for doing NetCDF IO for > a lot of my code. I recently updated my Gentoo install to use Python > 2.5, and now previously working code crashes (segmentation fault, no > python exception) when I try to access an array of data. A GDB > backtrace puts the error inside _netcdf.so. I haven't recompiled with > debugging symbols to try to track this down any further. > > Has anyone else had any problems with pynetcdf and python 2.5? > > I'm aware of the other options (scipy.sandbox.netcdf, > Scientific.IO.NetCDF, and pycdf). Is there an accepted package for > NetCDF in python? > > Thanks, > > Ryan > -- Bill wjdandreta at att.net Gentoo Linux X86_64 2.6.20-gentoo-r8 Reclaim Your Inbox with http://www.mozilla.org/products/thunderbird/ All things cometh to he who waiteth as long as he who waiteth worketh like hell while he waiteth. From rmay at ou.edu Wed Jul 18 15:41:39 2007 From: rmay at ou.edu (Ryan May) Date: Wed, 18 Jul 2007 14:41:39 -0500 Subject: [SciPy-user] pynetcdf crashing on Python 2.5 In-Reply-To: <469E6B37.6030602@att.net> References: <469E589A.9080202@ou.edu> <469E6B37.6030602@att.net> Message-ID: <469E6CF3.1070800@ou.edu> Bill Dandreta wrote: > I don't know if this has any bearing on your problem but Python 2.5 is > hard masked on Gentoo do to problems on 64 bit systems with packages > depending on numeric. > Thanks, but, yeah, I am aware of that. (I did my research before unmasking it. It's driven me nuts that a stable python release has been waiting 10+ months to get into my "cutting edge" distro.) There weren't any bugs against the packages I use, though I have found that plugins for gedit 2.16 don't like python, but this has been fixed in 2.18. One of the reasons I originally chose pynetcdf was its support for numpy, not Numeric, so that's not the issue here. Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma From emanuelez at gmail.com Wed Jul 18 15:44:03 2007 From: emanuelez at gmail.com (Emanuele Zattin) Date: Wed, 18 Jul 2007 21:44:03 +0200 Subject: [SciPy-user] leastsq and fitting quality Message-ID: Hello, i've been looking over the net and in the archives of this mailing list, but without any conclusive result so here i am asking it again :-P i'm using leastsq many times to perform star detection over an astronomical image. i can see that usually the result is very satisfying, but sometimes some bad result comes out. i would like to be able to find those cases so that i can handle the situation. i tried analysing the residuals, or their sum, but it does not seem to be a particularly good solution. maybe the covariance matrix in the extended output contains some useful information, but so far i was not able to use it properly. do u have any hint? From dwf at cs.toronto.edu Wed Jul 18 16:41:55 2007 From: dwf at cs.toronto.edu (David Warde-Farley) Date: Wed, 18 Jul 2007 16:41:55 -0400 Subject: [SciPy-user] Fastest way to save/load fairly large (sparse) matrices Message-ID: Hi folks, I've been wrestling with this problem for some time now. Essentially I'm using Numpy/Scipy as the backend in a python-based web application and need a way of serializing the contents of a fairly large, but sparsely populated, symmetric matrix to disk. So far I've experimented with just ASCII dumps and pickling, but neither really has the kind of speed that I'm looking for (and is kind of necessary for an interactive web application). Is there some better way? To give you an idea of the scale, I'm hoping to get this to work with 20000x20000 matrices that are about 1% full. Thanks, David From rmay at ou.edu Wed Jul 18 16:45:37 2007 From: rmay at ou.edu (Ryan May) Date: Wed, 18 Jul 2007 15:45:37 -0500 Subject: [SciPy-user] pynetcdf crashing on Python 2.5 In-Reply-To: <469E589A.9080202@ou.edu> References: <469E589A.9080202@ou.edu> Message-ID: <469E7BF1.7020409@ou.edu> Ryan May wrote: > Hi, > > I've been using Travis's pynetcdf package (0.7) for doing NetCDF IO for > a lot of my code. I recently updated my Gentoo install to use Python > 2.5, and now previously working code crashes (segmentation fault, no > python exception) when I try to access an array of data. A GDB > backtrace puts the error inside _netcdf.so. I haven't recompiled with > debugging symbols to try to track this down any further. > If anyone knows a bit about this code, GDB points the crash down to a SIGFPE at line 1435: dims[d] = (indices[i].stop-indices[i].start-1)/indices[i].stride+1; According to GDB, indices[i].stride is 0, which causes the crash. Anybody have a suggestion of what to look at next? Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma From strawman at astraw.com Wed Jul 18 16:59:06 2007 From: strawman at astraw.com (Andrew Straw) Date: Wed, 18 Jul 2007 13:59:06 -0700 Subject: [SciPy-user] Fastest way to save/load fairly large (sparse) matrices In-Reply-To: References: Message-ID: <469E7F1A.9010800@astraw.com> Dear David, this code works for me. It's not the most elegant, but at least you get the idea. See the test() function for the example usage. David Warde-Farley wrote: > Hi folks, > > I've been wrestling with this problem for some time now. Essentially > I'm using Numpy/Scipy as the backend in a python-based web > application and need a way of serializing the contents of a fairly > large, but sparsely populated, symmetric matrix to disk. So far I've > experimented with just ASCII dumps and pickling, but neither really > has the kind of speed that I'm looking for (and is kind of necessary > for an interactive web application). Is there some better way? > > To give you an idea of the scale, I'm hoping to get this to work with > 20000x20000 matrices that are about 1% full. > > Thanks, > > David > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user -------------- next part -------------- A non-text attachment was scrubbed... Name: ashelf.py Type: text/x-python Size: 3201 bytes Desc: not available URL: From strawman at astraw.com Wed Jul 18 17:03:36 2007 From: strawman at astraw.com (Andrew Straw) Date: Wed, 18 Jul 2007 14:03:36 -0700 Subject: [SciPy-user] Fastest way to save/load fairly large (sparse) matrices In-Reply-To: <469E7F1A.9010800@astraw.com> References: <469E7F1A.9010800@astraw.com> Message-ID: <469E8028.1020502@astraw.com> Whoops the file I sent said "all rights reserved". I hereby un-reserve some rights and release that module under the MIT license. I have updated my copy of the file to include the following: > Copyright (c) 2005-2007, California Institute of Technology > > Permission is hereby granted, free of charge, to any person obtaining a copy > of this software and associated documentation files (the "Software"), to deal > in the Software without restriction, including without limitation the rights > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell > copies of the Software, and to permit persons to whom the Software is > furnished to do so, subject to the following conditions: > > The above copyright notice and this permission notice shall be included in > all copies or substantial portions of the Software. > > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN > THE SOFTWARE. From strawman at astraw.com Wed Jul 18 17:06:34 2007 From: strawman at astraw.com (Andrew Straw) Date: Wed, 18 Jul 2007 14:06:34 -0700 Subject: [SciPy-user] Fastest way to save/load fairly large (sparse) matrices In-Reply-To: <469E7F1A.9010800@astraw.com> References: <469E7F1A.9010800@astraw.com> Message-ID: <469E80DA.305@astraw.com> I'm not doing so well today. The file I attached was outdated (with no test() function). I attach the correct file here. -Andrew "working on too many computers at once for his own good" Straw -------------- next part -------------- A non-text attachment was scrubbed... Name: ashelf.py Type: text/x-python Size: 5178 bytes Desc: not available URL: From dwf at cs.toronto.edu Wed Jul 18 17:16:19 2007 From: dwf at cs.toronto.edu (David Warde-Farley) Date: Wed, 18 Jul 2007 17:16:19 -0400 Subject: [SciPy-user] Fastest way to save/load fairly large (sparse) matrices In-Reply-To: <469E80DA.305@astraw.com> References: <469E7F1A.9010800@astraw.com> <469E80DA.305@astraw.com> Message-ID: Hi Andrew, This is exactly what I needed. Thanks so much! David On 18-Jul-07, at 5:06 PM, Andrew Straw wrote: > I'm not doing so well today. The file I attached was outdated (with > no test() function). I attach the correct file here. > > -Andrew "working on too many computers at once for his own good" Straw > # Author: Andrew D. Straw > # Copyright (C) 2005-2007, California Institute of Technology > # > # Permission is hereby granted, free of charge, to any person > obtaining a copy > # of this software and associated documentation files (the > "Software"), to deal > # in the Software without restriction, including without limitation > the rights > # to use, copy, modify, merge, publish, distribute, sublicense, and/ > or sell > # copies of the Software, and to permit persons to whom the > Software is > # furnished to do so, subject to the following conditions: > # > # The above copyright notice and this permission notice shall be > included in > # all copies or substantial portions of the Software. > # > # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, > EXPRESS OR > # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF > MERCHANTABILITY, > # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT > SHALL THE > # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR > OTHER > # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, > ARISING FROM, > # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER > DEALINGS IN > # THE SOFTWARE. > > > > import os > import numpy > import scipy > import scipy.sparse > from cgtypes import vec3 # HACK > > # include this in files: > # import os > # ashelf_datadir = os.path.split(__file__)[0] > > def save_as_python(fd, var, varname, fname_extra=None): > if fname_extra is None: > fname_extra = '' > fname_prefix = varname + fname_extra > buf = get_code_for_var( varname, fname_prefix, var) > fd.write(buf) > > def get_code_for_var( name, fname_prefix, var): > if type(var)==numpy.ndarray: > fname = fname_prefix + '.ashelf' > var.tofile( fname ) > > shape = var.shape > > bufs = [] > bufs.append( > '%s = numpy.fromfile(file=os.path.join(ashelf_datadir,"% > s"),dtype=numpy.dtype(%s))'%(name,fname,repr(var.dtype.str))) > bufs.append( > '%s.shape = %s'%(name,repr(shape,))) > return '\n'.join(bufs)+'\n' > > if isinstance(var,scipy.sparse.csc_matrix): > bufs = [] > bufs.append( > get_code_for_var( '%s_tmp_sparse_data'%name, > fname_prefix+'_data', var.data )[:-1]) > bufs.append( > get_code_for_var( '%s_tmp_sparse_indices'%name, > fname_prefix+'_indices', var.indices )[:-1]) > bufs.append( > get_code_for_var( '%s_tmp_sparse_indptr'%name, > fname_prefix+'_indptr', var.indptr )[:-1]) > bufs.append( > '%s = scipy.sparse.csc_matrix((%s,%s,%s))'%( > name, > '%s_tmp_sparse_data'%name, > '%s_tmp_sparse_indices'%name, > '%s_tmp_sparse_indptr'%name, > )) > bufs.append( > '%s.shape = %s'%(name,repr(var.shape))) > bufs.append( > 'del %s_tmp_sparse_data'%name) > bufs.append( > 'del %s_tmp_sparse_indices'%name) > bufs.append( > 'del %s_tmp_sparse_indptr'%name) > return '\n'.join(bufs)+'\n' > > if isinstance(var,scipy.sparse.csr_matrix): > bufs = [] > bufs.append( > get_code_for_var( '%s_tmp_sparse_data'%name, > fname_prefix+'_data', var.data )[:-1]) > bufs.append( > get_code_for_var( '%s_tmp_sparse_colind'%name, > fname_prefix+'_colind', var.colind )[:-1]) > bufs.append( > get_code_for_var( '%s_tmp_sparse_indptr'%name, > fname_prefix+'_indptr', var.indptr )[:-1]) > bufs.append( > '%s = scipy.sparse.csr_matrix((%s,%s,%s))'%( > name, > '%s_tmp_sparse_data'%name, > '%s_tmp_sparse_colind'%name, > '%s_tmp_sparse_indptr'%name, > )) > bufs.append( > '%s.shape = %s'%(name,repr(var.shape))) > bufs.append( > 'del %s_tmp_sparse_data'%name) > bufs.append( > 'del %s_tmp_sparse_colind'%name) > bufs.append( > 'del %s_tmp_sparse_indptr'%name) > return '\n'.join(bufs)+'\n' > if 1: > ra = repr(var) > try: > cmp = eval(ra) > except: > raise RuntimeError("eval failed") > else: > if cmp==var: > return '%s = '%(name,)+ra+'\n' > else: > raise RuntimeError("failed conversion") > > def test(): > bigmat = numpy.zeros( (2000, 20000), dtype=numpy.float64 ) > for i in range(20): > for j in range(200,300): > bigmat[i,j]=i*j > spmat = scipy.sparse.csc_matrix(bigmat) > fname = 'test_ashelf_data.py' > fd = open(fname,'wb') > fd.write( '# Automatically generated by ashelf.py\n') > fd.write( 'import numpy\n') > fd.write( 'import scipy.sparse\n') > fd.write( 'import os\n') > fd.write( 'ashelf_datadir = os.path.split(__file__)[0]\n') > save_as_python(fd, spmat, 'test_spmat') > fd.close() > > locals = {'__file__':fname} > execfile(fname,{},locals) # loads test_spmat > assert numpy.allclose( spmat.data, locals['test_spmat'].data ) > assert numpy.allclose( spmat.indices, locals > ['test_spmat'].indices ) > assert numpy.allclose( spmat.indptr, locals['test_spmat'].indptr ) > print 'sparse matrix saved and loaded OK' > > if __name__=='__main__': > test() > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user From cmac at MIT.EDU Wed Jul 18 17:26:58 2007 From: cmac at MIT.EDU (Christopher W. MacMinn) Date: Wed, 18 Jul 2007 17:26:58 -0400 Subject: [SciPy-user] SciPy install error (MacPorts) Message-ID: <5191A80C-4EA0-4D43-AFBA-3D21EBA8A4F8@mit.edu> Hey folks - I'm trying to install SciPy via MacPorts, and I'm getting a weird error (below). Anyone have any idea what might be causing this? I'm using MacPorts 1.5 on an Intel MacBook running OS X 10.4.10. I'm using Python 2.4.4 (although I have others on my system) and I installed NumPy 1.0.3 via MacPorts last night without a problem. Any help or suggestions would be greatly appreciated. Thanks! Best - Chris ---> Building py-scipy with target build Error: Target org.macports.build returned: shell command " cd "/opt/ local/var/macports/build/ _opt_local_var_macports_sources_rsync.macports.org_release_ports_python_ py-scipy/work/scipy-0.5.2" && /opt/local/bin/python2.4 setup.py build " returned error 1 Command output: _PyImport_ImportModule _PyInt_Type _PyModule_GetDict _PyNumber_Int _PyObject_GetAttrString _PySequence_Check _PySequence_GetItem _PyString_FromString _PyString_Type _PyType_IsSubtype _PyType_Type _Py_BuildValue _Py_InitModule4 __Py_NoneStruct _PyCObject_FromVoidPtr _PyDict_DelItemString _PyDict_GetItemString _PyDict_New _PyExc_AttributeError _PyExc_TypeError _PyExc_ValueError _PyObject_Free _PyObject_Str _PyObject_Type _PyString_AsString _PyString_ConcatAndDel _Py_FindMethod __PyObject_New _MAIN_ error: Command "g95 -shared build/temp.macosx-10.3-i386-2.4/build/ src.macosx-10.3-i386-2.4/Lib/fftpack/_fftpackmodule.o build/ temp.macosx-10.3-i386-2.4/Lib/fftpack/src/zfft.o build/ temp.macosx-10.3-i386-2.4/Lib/fftpack/src/drfft.o build/ temp.macosx-10.3-i386-2.4/Lib/fftpack/src/zrfft.o build/ temp.macosx-10.3-i386-2.4/Lib/fftpack/src/zfftnd.o build/ temp.macosx-10.3-i386-2.4/build/src.macosx-10.3-i386-2.4/ fortranobject.o -L/opt/local/lib -Lbuild/temp.macosx-10.3-i386-2.4 - ldfftpack -lfftw3 -o build/lib.macosx-10.3-i386-2.4/scipy/fftpack/ _fftpack.so" failed with exit status 1 Error: Status 1 encountered during processing. From haley at ucar.edu Wed Jul 18 19:02:44 2007 From: haley at ucar.edu (Mary Haley) Date: Wed, 18 Jul 2007 17:02:44 -0600 (MDT) Subject: [SciPy-user] pynetcdf crashing on Python 2.5 Message-ID: Hi Ryan, Somebody told me about this thread, and I thought I'd jump in and offer another solution. We have a software package called PyNIO that is based on Konrad Hinsen's Scientific.IO.netCDF package, only it also handles GRIB1, GRIB2, HDF SDS 4, and netCDF 4 classic files. I just finished building a set of PyNIO V1.2.0 binaries under Python 2.4.4 and Python 2.5, supporting both NumPy 1.0.3 and Numeric 24-2. If you are interested in trying PyNIO, drop me a line. [I haven't gone public with this release yet, because I'm having difficulty trying to build NumPy 1.0.3 on a Linux box that has a newer version of the SSL libraries than what I think NumPy 1.0.3 is expecting.] You can see some PyNIO documentation at: http://www.pyngl.ucar.edu/Nio.shtml Cheers, --Mary > > Bill Dandreta wrote: > > I don't know if this has any bearing on your problem but Python 2.5 is > > hard masked on Gentoo do to problems on 64 bit systems with packages > > depending on numeric. > > > > Thanks, but, yeah, I am aware of that. (I did my research before > unmasking it. It's driven me nuts that a stable python release has been > waiting 10+ months to get into my "cutting edge" distro.) There weren't > any bugs against the packages I use, though I have found that plugins > for gedit 2.16 don't like python, but this has been fixed in 2.18. One > of the reasons I originally chose pynetcdf was its support for numpy, > not Numeric, so that's not the issue here. > > Ryan > > -- > Ryan May > Graduate Research Assistant > School of Meteorology > University of Oklahoma > From robert.kern at gmail.com Wed Jul 18 19:04:58 2007 From: robert.kern at gmail.com (Robert Kern) Date: Wed, 18 Jul 2007 18:04:58 -0500 Subject: [SciPy-user] pynetcdf crashing on Python 2.5 In-Reply-To: References: Message-ID: <469E9C9A.3070707@gmail.com> Mary Haley wrote: > [I haven't gone public with this release yet, because I'm having > difficulty trying to build NumPy 1.0.3 on a Linux box that has a newer > version of the SSL libraries than what I think NumPy 1.0.3 is > expecting.] SSL? numpy has nothing to do with SSL. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From haley at ucar.edu Wed Jul 18 19:17:14 2007 From: haley at ucar.edu (Mary Haley) Date: Wed, 18 Jul 2007 17:17:14 -0600 (MDT) Subject: [SciPy-user] pynetcdf crashing on Python 2.5 In-Reply-To: <469E9C9A.3070707@gmail.com> References: <469E9C9A.3070707@gmail.com> Message-ID: Robert, sorry, you're right, this isn't a NumPy issue, but it manifested itself when I tried to build NumPy. I built Python 2.5 (I thought successfully), and then when I tried to build NumPy 1.0.3 I got the error: ImportError: No module named _md5 I googled this left and right, and it turns out that when I built Python 2.5, some module (hashlib?) didn't get built, possibly because it's expecting some particular version of SSL, and I happen to have a different version. Python 2.5 is working for me, but I can't build NumPy because it depends on "_md5" which I believe is dependent on "hashlib". I'm still trying to figure thins out. I would be great if I could have NumPy bypass this somehow, because I don't think there's a fix for this on the Python 2.5 end. --Mary On Wed, 18 Jul 2007, Robert Kern wrote: > Mary Haley wrote: > >> [I haven't gone public with this release yet, because I'm having >> difficulty trying to build NumPy 1.0.3 on a Linux box that has a newer >> version of the SSL libraries than what I think NumPy 1.0.3 is >> expecting.] > > SSL? numpy has nothing to do with SSL. > > -- > Robert Kern > > "I have come to believe that the whole world is an enigma, a harmless enigma > that is made terrible by our own mad attempt to interpret it as though it had > an underlying truth." > -- Umberto Eco > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > From wjdandreta at att.net Wed Jul 18 21:10:07 2007 From: wjdandreta at att.net (Bill Dandreta) Date: Wed, 18 Jul 2007 21:10:07 -0400 Subject: [SciPy-user] pynetcdf crashing on Python 2.5 In-Reply-To: References: <469E9C9A.3070707@gmail.com> Message-ID: <469EB9EF.1000903@att.net> A shot in the dark. Maybe python has an optional compile time switch to include ssl support? Bill Mary Haley wrote: > Robert, sorry, you're right, this isn't a NumPy issue, but it > manifested itself when I tried to build NumPy. I built Python 2.5 (I > thought successfully), and then when I tried to build NumPy 1.0.3 I > got the error: > > ImportError: No module named _md5 > > I googled this left and right, and it turns out that when I built > Python 2.5, some module (hashlib?) didn't get built, possibly because > it's expecting some particular version of SSL, and I happen to have a > different version. Python 2.5 is working for me, but I can't build > NumPy because it depends on "_md5" which I believe is dependent > on "hashlib". > > I'm still trying to figure thins out. I would be great if I could > have NumPy bypass this somehow, because I don't think there's > a fix for this on the Python 2.5 end. > > --Mary > > > > On Wed, 18 Jul 2007, Robert Kern wrote: > > >> Mary Haley wrote: >> >> >>> [I haven't gone public with this release yet, because I'm having >>> difficulty trying to build NumPy 1.0.3 on a Linux box that has a newer >>> version of the SSL libraries than what I think NumPy 1.0.3 is >>> expecting.] >>> >> SSL? numpy has nothing to do with SSL. >> >> -- >> Robert Kern >> >> "I have come to believe that the whole world is an enigma, a harmless enigma >> that is made terrible by our own mad attempt to interpret it as though it had >> an underlying truth." >> -- Umberto Eco >> _______________________________________________ >> SciPy-user mailing list >> SciPy-user at scipy.org >> http://projects.scipy.org/mailman/listinfo/scipy-user >> >> > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > > -- Bill wjdandreta at att.net Gentoo Linux X86_64 2.6.20-gentoo-r8 Reclaim Your Inbox with http://www.mozilla.org/products/thunderbird/ All things cometh to he who waiteth as long as he who waiteth worketh like hell while he waiteth. -------------- next part -------------- An HTML attachment was scrubbed... URL: From david at ar.media.kyoto-u.ac.jp Thu Jul 19 01:29:26 2007 From: david at ar.media.kyoto-u.ac.jp (David Cournapeau) Date: Thu, 19 Jul 2007 14:29:26 +0900 Subject: [SciPy-user] pynetcdf crashing on Python 2.5 In-Reply-To: References: <469E9C9A.3070707@gmail.com> Message-ID: <469EF6B6.4030600@ar.media.kyoto-u.ac.jp> Mary Haley wrote: > Robert, sorry, you're right, this isn't a NumPy issue, but it > manifested itself when I tried to build NumPy. I built Python 2.5 (I > thought successfully), and then when I tried to build NumPy 1.0.3 I > got the error: > > ImportError: No module named _md5 > I got a similar problem when building python on a solaris machine. On Linux, I would strongly recommend using the python available in your distribution, though. What is the reason you built your own ? cheers, David From robert.kern at gmail.com Thu Jul 19 01:58:58 2007 From: robert.kern at gmail.com (Robert Kern) Date: Thu, 19 Jul 2007 00:58:58 -0500 Subject: [SciPy-user] pynetcdf crashing on Python 2.5 In-Reply-To: References: <469E9C9A.3070707@gmail.com> Message-ID: <469EFDA2.4000109@gmail.com> Mary Haley wrote: > Robert, sorry, you're right, this isn't a NumPy issue, but it > manifested itself when I tried to build NumPy. I built Python 2.5 (I > thought successfully), and then when I tried to build NumPy 1.0.3 I > got the error: > > ImportError: No module named _md5 > > I googled this left and right, and it turns out that when I built > Python 2.5, some module (hashlib?) didn't get built, possibly because > it's expecting some particular version of SSL, and I happen to have a > different version. Python 2.5 is working for me, but I can't build > NumPy because it depends on "_md5" which I believe is dependent > on "hashlib". > > I'm still trying to figure thins out. I would be great if I could > have NumPy bypass this somehow, because I don't think there's > a fix for this on the Python 2.5 end. Ah, okay. We do use the md5 module in part of the build process. See numpy/core/code_generators/genapi.py . If you just need to get something built, you can modify that file to use a different hash. You could write your own that does something extremely simple like keep the strings in a dict mapping to numbers that you increment. However, your Python installation is broken. hashlib is a standard module that should exist in all Python installations. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From lbolla at gmail.com Thu Jul 19 03:34:14 2007 From: lbolla at gmail.com (lorenzo bolla) Date: Thu, 19 Jul 2007 09:34:14 +0200 Subject: [SciPy-user] scipy.sparse and dot product Message-ID: <80c99e790707190034j4fd0ff5fkff73b9101668139a@mail.gmail.com> does this seem weird to you, too? ----------------------------------------------------------------- In [34]: A = scipy.sparse.spdiags([[1,2,3]],0,3,3) In [35]: x = scipy.array([1,2,3]) In [36]: scipy.dot(A,x) Out[36]: array([ (0, 0) 1.0 (1, 1) 2.0 (2, 2) 3.0, (0, 0) 2.0 (1, 1) 4.0 (2, 2) 6.0, (0, 0) 3.0 (1, 1) 6.0 (2, 2) 9.0], dtype=object) # <--- a matrix with repeated entries??? In [37]: scipy.dot(A.todense(),x) Out[37]: matrix([[ 1., 4., 9.]]) # <--- ok In [38]: A*x Out[38]: array([ 1., 4., 9.]) # <--- ok In [39]: A.todense()*x Out[39]: matrix([[ 1., 4., 9.]]) <--- ok ----------------------------------------------------------------- L. -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefan at sun.ac.za Thu Jul 19 06:33:46 2007 From: stefan at sun.ac.za (Stefan van der Walt) Date: Thu, 19 Jul 2007 12:33:46 +0200 Subject: [SciPy-user] scipy.sparse and dot product In-Reply-To: <80c99e790707190034j4fd0ff5fkff73b9101668139a@mail.gmail.com> References: <80c99e790707190034j4fd0ff5fkff73b9101668139a@mail.gmail.com> Message-ID: <20070719103346.GQ7290@mentat.za.net> On Thu, Jul 19, 2007 at 09:34:14AM +0200, lorenzo bolla wrote: > does this seem weird to you, too? > > ----------------------------------------------------------------- > > In [34]: A = scipy.sparse.spdiags([[1,2,3]],0,3,3) > > In [35]: x = scipy.array([1,2,3]) > > In [36]: scipy.dot(A,x) > Out[36]: > array([ (0, 0) 1.0 > (1, 1) 2.0 > (2, 2) 3.0, > (0, 0) 2.0 > (1, 1) 4.0 > (2, 2) 6.0, > (0, 0) 3.0 > (1, 1) 6.0 > (2, 2) 9.0], dtype=object) # <--- a matrix with repeated > entries??? The numpy 'dot'-function does not know about sparse matrices. You might want to try A.dot(x) or A*x I don't think the elementwise-product has been implemented yet. Regards St?fan From haley at ucar.edu Thu Jul 19 08:52:27 2007 From: haley at ucar.edu (Mary Haley) Date: Thu, 19 Jul 2007 06:52:27 -0600 Subject: [SciPy-user] pynetcdf crashing on Python 2.5 In-Reply-To: <469EF6B6.4030600@ar.media.kyoto-u.ac.jp> References: <469E9C9A.3070707@gmail.com> <469EF6B6.4030600@ar.media.kyoto-u.ac.jp> Message-ID: On Jul 18, 2007, at 11:29 PM, David Cournapeau wrote: > Mary Haley wrote: >> Robert, sorry, you're right, this isn't a NumPy issue, but it >> manifested itself when I tried to build NumPy. I built Python 2.5 (I >> thought successfully), and then when I tried to build NumPy 1.0.3 I >> got the error: >> >> ImportError: No module named _md5 >> > I got a similar problem when building python on a solaris machine. On > Linux, I would strongly recommend using the python available in your > distribution, though. What is the reason you built your own ? > I'm building software for other users, and I like to test it against the latest versions of Python and NumPy, if possible. Also, we provide these precompiled binaries to users, and like to have it available for a variety of software versions. The other thing is that our systems tend to be a few versions behind in python and it's usually just easier to "roll our own". I ended up finding another Linux system that had an older version of SSL installed, and I was able to get Python 2.5 fully built on it. Thanks for everybody's suggestions. --Mary > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user From fie.pye at atlas.cz Thu Jul 19 18:33:13 2007 From: fie.pye at atlas.cz (fie.pye at atlas.cz) Date: Thu, 19 Jul 2007 22:33:13 GMT Subject: [SciPy-user] BLAS, LAPACK, ATLAS libraries. Message-ID: >--------------------------------------------------------- >Od: Scott Ransom >P?ijato: 18.7.2007 4:15:24 >P?edm?t: Re: [SciPy-user] BLAS, LAPACK, ATLAS libraries. > >> The problem is the way you build the shared library is wrong: you cannot > >> just use g77 -shared -o soname *.o, because LAPACK object files are in > >> several directories. > >> > >> One correct way is to use the static library .a, uncompress it in a > >> directory, and build the shared library from that. There is a problem > >> when several object files have the same name (because you cannot have > >> several files with the same name in a directory), though, so extra care > >> must be taken. > > > >You might be able to do something like this. It has worked for me > >in the past (with GNU ld): > > > >ld -shared -o libfoo.so --whole-archive libfoo.a > > > >Scott > > > >-- > >Scott M. Ransom Address: NRAO > >Phone: (434) 296-0320 520 Edgemont Rd. > >email: sransom at nrao.edu Charlottesville, VA 22903 USA > >GPG Fingerprint: 06A9 9553 78BE 16DB 407B FFCA 9BFA B6FF FFD3 2989 > >_______________________________________________ > >SciPy-user mailing list > >SciPy-user at scipy.org > >http://projects.scipy.org/mailman/listinfo/scipy-user > > > > Hello. Thank you all for responses. Finally I installed BLAS, LAPACK, python2.5.1, numpy and scipy. Scot was right. I had to change the way I built the shared libraries. The command ld -shared -o libfoo.so --whole-archive libfoo.a helped but installation stopped on other error. After that I had to change numpy and scipy packages. The *.tar.gz numpy and scipy packages I downloaded via www.scipy.org did not work. I followed the recommendation from http://permalink.gmane.org/gmane.comp.python.scientific.user/12133 It works. Best regards. Fie Pye From fie.pye at atlas.cz Thu Jul 19 18:40:42 2007 From: fie.pye at atlas.cz (fie.pye at atlas.cz) Date: Thu, 19 Jul 2007 22:40:42 GMT Subject: [SciPy-user] BLAS, LAPACK, ATLAS libraries. Message-ID: <2e7ee8776fc740ca8cd618d8d0d1d2fc@2271d759aab94160bbd6a2bf37e42b2e> >--------------------------------------------------------- >Od: David Cournapeau >P?ijato: 18.7.2007 3:54:48 >P?edm?t: Re: [SciPy-user] BLAS, LAPACK, ATLAS libraries. > >fie.pye at atlas.cz wrote: > >> Hi David, hi Vincent, > >> > >> thank you for your response. > >> On my computer I have three gcc compilers: gcc4.1, gcc4.2 and gcc3.4.6. Since you mentioned possible problem with gfortran I decided to compile BLAS, LAPACK, python2.5 and numpy again with gcc3.4.6 and f77. > >To be precise, what is problematic is mixing fortran compilers (for > >example using gfortran for BLAS and g77 for LAPACK). gfortran by itself > >is not that problematic. > >> > >> Traceback (most recent call last): > >> File "", line 1, in > >> File "/usr/local/python/python2.5.1/lib/python2.5/site-packages/numpy/__init__.py", line 43, in > >> import linalg > >> File "/usr/local/python/python2.5.1/lib/python2.5/site-packages/numpy/linalg/__init__.py", line 4, in > >> from linalg import * > >> File "/usr/local/python/python2.5.1/lib/python2.5/site-packages/numpy/linalg/linalg.py", line 25, in > >> from numpy.linalg import lapack_lite > >> ImportError: /usr/local/lib64/lapack/liblapack.so: undefined symbol: slamch_ > >The problem is the way you build the shared library is wrong: you cannot > >just use g77 -shared -o soname *.o, because LAPACK object files are in > >several directories. > > > >One correct way is to use the static library .a, uncompress it in a > >directory, and build the shared library from that. There is a problem > >when several object files have the same name (because you cannot have > >several files with the same name in a directory), though, so extra care > >must be taken. > >> > >> I included all installation scripts and log files to enclosed file. > >> > >> I also began to install from source rpm but I am not familiar with that installation therefore I stopped after building. What does it mean refblas. > >I cannot use blas and lapack from officiel repository because they do > >not work very well, and I use a different name to avoid name clashes. > >You should build the following srpms in this order: > > > >- refblas > >- lapack3 > >- python-numpy > >- python-scipy > > > >Building them is not really different than any other source rpms. Since > >you are using a distribution I've never tested, there is a good chance > >it does not work out of the box, but I would rather help you solving > >those problems so that everybody can benefit from them rather than > >explaining how to build blas and lapack properly (which is really error > >prone and non trivial). > > > >David > >_______________________________________________ > >SciPy-user mailing list > >SciPy-user at scipy.org > >http://projects.scipy.org/mailman/listinfo/scipy-user > > > > Hello David. Thank you for responses. I managed to install numpy and scipy with BLAS and LAPACK libraries. Now I am going to install ATLAS and again python2.5.1, numpy and scipy. I will follow two ways. The first one is to build it from *.tar.gz sources. The second one is to build it from *.src.rpm as you recommended. I think that the closer one *.src.rpm from http://software.opensuse.org/download/home:/ashigabou to CentOS 5.0 is Fedoea 6 http://software.opensuse.org/download/home:/ashigabou/Fedora_Extras_6/src/ The reason why I started with the *.tar.gz is that I have the full control over the version of libraries and places where the libraries are located. I can easily remove them when installation fails. In case of *.src.rmp I will have to study the installation and removing procedure first. I am going to start with rpmbuild. If you have some suggestions let me know. If everything goes well I will install BLAS, LAPACK, ATLAS, python2.5.1, numpy and scipy also on HP workstation and server with AMD Opteron 2220 and 2218 with SUSE Linux Enterprise 10. Best regards. Fie Pye From david at ar.media.kyoto-u.ac.jp Thu Jul 19 22:27:04 2007 From: david at ar.media.kyoto-u.ac.jp (David Cournapeau) Date: Fri, 20 Jul 2007 11:27:04 +0900 Subject: [SciPy-user] BLAS, LAPACK, ATLAS libraries. In-Reply-To: <2e7ee8776fc740ca8cd618d8d0d1d2fc@2271d759aab94160bbd6a2bf37e42b2e> References: <2e7ee8776fc740ca8cd618d8d0d1d2fc@2271d759aab94160bbd6a2bf37e42b2e> Message-ID: <46A01D78.7010009@ar.media.kyoto-u.ac.jp> fie.pye at atlas.cz wrote: > Hello David > > Thank you for responses. I managed to install numpy and scipy with BLAS and LAPACK libraries. Now I am going to install ATLAS and again python2.5.1, numpy and scipy. I will follow two ways. The first one is to build it from *.tar.gz sources. The second one is to build it from *.src.rpm as you recommended. I think that the closer one *.src.rpm from http://software.opensuse.org/download/home:/ashigabou to CentOS 5.0 is Fedoea 6 > http://software.opensuse.org/download/home:/ashigabou/Fedora_Extras_6/src/ > > The reason why I started with the *.tar.gz is that I have the full control over the version of libraries and places where the libraries are located. I can easily remove them when installation fails. In case of *.src.rmp I will have to study the installation and removing procedure first. I am going to start with rpmbuild. If you have some suggestions let me know. > > If everything goes well I will install BLAS, LAPACK, ATLAS, python2.5.1, numpy and scipy also on HP workstation and server with AMD Opteron 2220 and 2218 with SUSE Linux Enterprise 10. > I can try to generate rpm for this distribution if you want (CentOS is not supported by the Suse build system, but Suse Linux enterprise is). If you manage to generate rpms for Centos, I would appreciate to get the modifications you had to do (if any, but I think they do not work out of the box for Centos). cheers, David From david at ar.media.kyoto-u.ac.jp Thu Jul 19 22:53:39 2007 From: david at ar.media.kyoto-u.ac.jp (David Cournapeau) Date: Fri, 20 Jul 2007 11:53:39 +0900 Subject: [SciPy-user] BLAS, LAPACK, ATLAS libraries. In-Reply-To: <46A01D78.7010009@ar.media.kyoto-u.ac.jp> References: <2e7ee8776fc740ca8cd618d8d0d1d2fc@2271d759aab94160bbd6a2bf37e42b2e> <46A01D78.7010009@ar.media.kyoto-u.ac.jp> Message-ID: <46A023B3.9000809@ar.media.kyoto-u.ac.jp> David Cournapeau wrote: > fie.pye at atlas.cz wrote: >> Hello David >> >> Thank you for responses. I managed to install numpy and scipy with BLAS and LAPACK libraries. Now I am going to install ATLAS and again python2.5.1, numpy and scipy. I will follow two ways. The first one is to build it from *.tar.gz sources. The second one is to build it from *.src.rpm as you recommended. I think that the closer one *.src.rpm from http://software.opensuse.org/download/home:/ashigabou to CentOS 5.0 is Fedoea 6 >> http://software.opensuse.org/download/home:/ashigabou/Fedora_Extras_6/src/ >> >> The reason why I started with the *.tar.gz is that I have the full control over the version of libraries and places where the libraries are located. I can easily remove them when installation fails. In case of *.src.rmp I will have to study the installation and removing procedure first. I am going to start with rpmbuild. If you have some suggestions let me know. >> >> If everything goes well I will install BLAS, LAPACK, ATLAS, python2.5.1, numpy and scipy also on HP workstation and server with AMD Opteron 2220 and 2218 with SUSE Linux Enterprise 10. >> > I can try to generate rpm for this distribution if you want (CentOS is > not supported by the Suse build system, but Suse Linux enterprise is). Ok, it looks like SUSE Linux Enterprise 10 is similar enough to opensuse such as I won't have to do modifications, so the packages should be built soon and made available in http://software.opensuse.org/download/home:/ashigabou (a couple of hours maximum depending on the availability of the compiler farm). David From nwagner at iam.uni-stuttgart.de Fri Jul 20 07:27:37 2007 From: nwagner at iam.uni-stuttgart.de (Nils Wagner) Date: Fri, 20 Jul 2007 13:27:37 +0200 Subject: [SciPy-user] How to build a sparse block arrowhead matrix in scipy Message-ID: <46A09C29.5070703@iam.uni-stuttgart.de> Hi all, what is the best way to build a sparse block arrowhead matrix A in scipy ? The diagonal blocks are given by the matrices B1,B2,...,B8 The entries in the last block row/column are given by the matrix C. The example is taken from [1]. A short python script would be appreciated. Nils [1] A. Sameh, J. Lermit and K. Noh, On the intermediate eigenvalues of symmetric sparse matrices, BIT Vol. 15 (1975) pp. 185-191 From cimrman3 at ntc.zcu.cz Fri Jul 20 08:27:31 2007 From: cimrman3 at ntc.zcu.cz (Robert Cimrman) Date: Fri, 20 Jul 2007 14:27:31 +0200 Subject: [SciPy-user] ANN: SFE-00.26.01 20.07.2007 release Message-ID: <46A0AA33.7080603@ntc.zcu.cz> Version 00.26.01 is released 20.07.2007, featuring new testing framework, new terms (linear spring, volume), improved handling of periodic boundary conditions and many other gradual updates and bug fixes, see http://ui505p06-mbs.ntc.zcu.cz/sfe cheers, r. From david at ar.media.kyoto-u.ac.jp Sat Jul 21 03:56:55 2007 From: david at ar.media.kyoto-u.ac.jp (David Cournapeau) Date: Sat, 21 Jul 2007 16:56:55 +0900 Subject: [SciPy-user] [scikits] svm and pyem now available in scikits.learn Message-ID: <46A1BC47.2010104@ar.media.kyoto-u.ac.jp> Hi, In short: for people who need to use svm (SVM) and pyem (Gaussian Mixture Models) from the scipy.sandbox, they are now available and working in scikits.learn package. - Getting the code : svn co http://svn.scipy.org/svn/scikits/trunk/learn - Importing the toolboxes : they both reside in the scikits.learn.machine namespace, that is "from scipy.sandbox import svm" becomes "from scikits.learn.machine import svm" and so on. Anything which does not work as before is a bug, and should be filled as such on the scikits trac system (http://projects.scipy.org/scipy/scikits/). For the curious, the learn namespace will soon contain some code to load/pre process/manipulate datasets and some basic learner based on the above algoritms, cheers, David From josh8912 at yahoo.com Sun Jul 22 20:16:13 2007 From: josh8912 at yahoo.com (JJ) Date: Sun, 22 Jul 2007 17:16:13 -0700 (PDT) Subject: [SciPy-user] missing libacml.so when using cgi script Message-ID: <186675.64366.qm@web54011.mail.re2.yahoo.com> Hello all: I am developing a website, initially on my local machine using the apache httpd server. My linux box has scipy/numpy installed, and they work fine from a terminal. However, I need to use the programs in a cgi script and am having problems getting them to import. In my bashrc file (for a terminal) I have an export LD_LIBRARY_PATH statement that leads to my libacml.so file. However, when I try to import scipy from a cgi script I get the following error: File '/usr/lib64/python2.4/site-packages/scipy/optimize/lbfgsb.py", line 30, in ? import _lbfgsb ImportError: libacml.so: cannot open shared object file: No such file or directory Numpy does import just fine. I tried using the following in the cgi script but it did not correct the problem: if os.environ.has_key('LD_LIBRARY_PATH')==False: os.environ['LD_LIBRARY_PATH'] = path to lib else: os.environ['LD_LIBRARY_PATH'] = os.environ['LD_LIBRARY_PATH'] + path to lib I also tried adding similar statments for LD_RUN_PATH and LAPACK to no avail. Also, file permissions for the folder with libacml.so are set to allow others to read. Does anyone know how I might get scipy working from a cgi script? John ____________________________________________________________________________________ Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more. http://mobile.yahoo.com/go?refer=1GNXIC From robert.kern at gmail.com Sun Jul 22 20:33:11 2007 From: robert.kern at gmail.com (Robert Kern) Date: Sun, 22 Jul 2007 19:33:11 -0500 Subject: [SciPy-user] missing libacml.so when using cgi script In-Reply-To: <186675.64366.qm@web54011.mail.re2.yahoo.com> References: <186675.64366.qm@web54011.mail.re2.yahoo.com> Message-ID: <46A3F747.9030301@gmail.com> JJ wrote: > Hello all: > I am developing a website, initially on my local > machine using the apache httpd server. My linux box > has scipy/numpy installed, and they work fine from a > terminal. However, I need to use the programs in a > cgi script and am having problems getting them to > import. In my bashrc file (for a terminal) I have an > export LD_LIBRARY_PATH statement that leads to my > libacml.so file. However, when I try to import scipy > from a cgi script I get the following error: > > File > '/usr/lib64/python2.4/site-packages/scipy/optimize/lbfgsb.py", > line 30, in ? import _lbfgsb ImportError: > libacml.so: cannot open shared object file: No such > file or directory > > Numpy does import just fine. I tried using the > following in the cgi script but it did not correct the > problem: > > if os.environ.has_key('LD_LIBRARY_PATH')==False: > os.environ['LD_LIBRARY_PATH'] = path to lib > else: > os.environ['LD_LIBRARY_PATH'] = > os.environ['LD_LIBRARY_PATH'] + path to lib This won't work. The LD_LIBRARY_PATH environment variable needs to be set before the process starts, not just before the library is loaded. Read the Apache documentation for how to set up the environment for your CGI scripts. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From lists at benair.net Mon Jul 23 02:51:41 2007 From: lists at benair.net (BK) Date: Mon, 23 Jul 2007 08:51:41 +0200 Subject: [SciPy-user] (no subject) Message-ID: <1185173501.4656.1.camel@iagpc71.iag.uni-stuttgart.de> Hi everybody, since I discovered scipy I am constantly using python for all my little data handling jobs. However, there is one problem bugging me: my data often comes in Tecplot ascii-files that contain several sets of (float-)data. The principle file layout ist something like TITLE = "some name" VARIABLES = "x", "y", "z", "abc" ZONE T="zone1", I= 65, J= 97 [float data] ZONE T="zone2", I= 65, J= 49 [float data] ... I open the file using infile=open("filename",'r') to read the header information and extract the array sizes (I,J) for the first ZONE. Then I use io.array_import.read_array(infile,lines=(0,(1,I*J))) to read the data for the first ZONE. Then I would like to read the header for the second zone "zone2", extract (I,J) the same way as before and read the data for the second zone and so on. However, I get the error 'ValueError: I/O operation on closed file' which seems to indicate that io.array_import.read_array closed the file object after extracting the first data set. Looking into 'array_import.py' confirmes, that the class 'ascii_stream' closes the file-object upon destruction of the class object. Just for testing I changed 'array_import.py' such that it keeps the file object open if it was not opened by array_import itself. But then I had to learn that after importing an array the cursor is not positioned where I expected at the end of the data set, but somewhere arbitrary in between. Is there any way to change this behaviour? If I re-open the file I have to search the starting position of the next zone before reading the next data. While this is doable it's nevertheless annoying. Can anyone tell me how to keep the file object open after using read_array and continuing read operations after the last data set? Thank you! bene From robert.kern at gmail.com Mon Jul 23 02:59:09 2007 From: robert.kern at gmail.com (Robert Kern) Date: Mon, 23 Jul 2007 01:59:09 -0500 Subject: [SciPy-user] (no subject) In-Reply-To: <1185173501.4656.1.camel@iagpc71.iag.uni-stuttgart.de> References: <1185173501.4656.1.camel@iagpc71.iag.uni-stuttgart.de> Message-ID: <46A451BD.6040300@gmail.com> BK wrote: > Is there any way to change this behaviour? I just checked in a change to allow this. If you pass it a file object instead of a filename, it will not close the file object. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From lists at benair.net Mon Jul 23 04:36:01 2007 From: lists at benair.net (BK) Date: Mon, 23 Jul 2007 10:36:01 +0200 Subject: [SciPy-user] (no subject) In-Reply-To: <46A451BD.6040300@gmail.com> References: <1185173501.4656.1.camel@iagpc71.iag.uni-stuttgart.de> <46A451BD.6040300@gmail.com> Message-ID: <1185179762.5436.10.camel@iagpc71.iag.uni-stuttgart.de> Thank you, that was a fast reply! The file object is indeed kept open with your fix. However, the read cursor is still at eof after calling array_import and not at the end of the data array just read. I have to manually seek this position. Considering I specify the number of lines to be read by array_import, is it possible to leave the read position at the end of these lines? Regards, bene Am Montag, den 23.07.2007, 01:59 -0500 schrieb Robert Kern: > BK wrote: > > > Is there any way to change this behaviour? > > I just checked in a change to allow this. If you pass it a file object instead > of a filename, it will not close the file object. > From chanley at stsci.edu Mon Jul 23 12:42:53 2007 From: chanley at stsci.edu (Christopher Hanley) Date: Mon, 23 Jul 2007 12:42:53 -0400 Subject: [SciPy-user] SciPy 2007 Conference BOF Message-ID: <46A4DA8D.6060109@stsci.edu> Greetings, I have a question for those planning on attending the SciPy 2007 conference in a few weeks. I have been approached regarding the possibility about having a BOF meeting to discuss PyFITS. I was wondering if there would be an interest in this, or more generally, about astronomy software development. We at the Space Telescope Science Institute could talk about our future plans. Please let me know if you are interested in having a BOF meeting. If there is enough interest I will arrange a session for Thursday evening. Cheers, Chris Hanley -- Christopher Hanley Systems Software Engineer Space Telescope Science Institute 3700 San Martin Drive Baltimore MD, 21218 (410) 338-4338 From shupe at ipac.caltech.edu Mon Jul 23 14:21:26 2007 From: shupe at ipac.caltech.edu (David Shupe) Date: Mon, 23 Jul 2007 18:21:26 +0000 (UTC) Subject: [SciPy-user] SciPy 2007 Conference BOF References: <46A4DA8D.6060109@stsci.edu> Message-ID: Christopher Hanley stsci.edu> writes: > I have a question for those planning on attending the SciPy 2007 > conference in a few weeks. I have been approached regarding the > possibility about having a BOF meeting to discuss PyFITS. I was > wondering if there would be an interest in this, or more generally, > about astronomy software development. We at the Space Telescope Science > Institute could talk about our future plans. Please let me know if you > are interested in having a BOF meeting. If there is enough interest I > will arrange a session for Thursday evening. I'm very interested in this BOF session, especially if the topic is broadened beyond PyFITS to include development of utilities for astronomy. The Herschel Observatory is basing its data processing software on Jython. It might be useful to discuss these plans at the BOF. Regards, David Shupe NASA Herschel Science Center From chanley at stsci.edu Mon Jul 23 21:24:11 2007 From: chanley at stsci.edu (Christopher Hanley) Date: Mon, 23 Jul 2007 21:24:11 -0400 Subject: [SciPy-user] Astronomy / PyFITS BOF at SciPy Message-ID: <46A554BB.6090908@stsci.edu> Hi, It looks like we have more than enough interest for an astronomy BOF Thursday evening after dinner. I look forward to seeing everyone. Cheers, Chris From ryanlists at gmail.com Mon Jul 23 23:27:47 2007 From: ryanlists at gmail.com (Ryan Krauss) Date: Mon, 23 Jul 2007 22:27:47 -0500 Subject: [SciPy-user] filtering without phase shift Message-ID: I have a vector of data from an impact test. The data has some "noise" in it that is really ringing in the mass used in the test. I have spent a fair amount of effort getting rid of the ringing or trying to design the test so that the ringing is at as high a frequency as possible. I now must resort to filtering the data. I can get fairly decent results with a 10 kHz filter (see attached). But I can get really nice results with a 1 kHz filter and then shifting the vector back in time - somewhat arbitrarily. This feels slightly unscientific. I googled for zero phase filters, but don't really understand what I was reading. Is there a way to get magtitude attenuation without phase lag that is easy to implement and accepted as good practice among signal processing experts? Thanks, Ryan -------------- next part -------------- A non-text attachment was scrubbed... Name: filtering.png Type: image/png Size: 64927 bytes Desc: not available URL: From j.merritt at pgrad.unimelb.edu.au Mon Jul 23 23:43:10 2007 From: j.merritt at pgrad.unimelb.edu.au (Jonathan Merritt) Date: Tue, 24 Jul 2007 13:43:10 +1000 Subject: [SciPy-user] filtering without phase shift In-Reply-To: References: Message-ID: <46A5754E.6020600@pgrad.unimelb.edu.au> Hi Ryan, Ryan Krauss wrote: > Is there a way to get magtitude > attenuation without phase lag that is easy to implement and accepted > as good practice among signal processing experts? This is a very common problem in Biomechanics, where we often want to take the second derivative of noisy signals. Matlab has a filtfilt() function for applying a zero phase delay filter, and I have seen a SciPy implementation here: http://www.scipy.org/Cookbook/FiltFilt I can't comment on whether this implementation is "good". I'd like to hear from any signal processing experts too. :-) Jonathan Merritt. From bryan at cole.uklinux.net Tue Jul 24 03:14:25 2007 From: bryan at cole.uklinux.net (Bryan Cole) Date: Tue, 24 Jul 2007 08:14:25 +0100 Subject: [SciPy-user] filtering without phase shift In-Reply-To: References: Message-ID: <1185261264.5678.9.camel@pc1.cole.uklinux.net> The easiest way to do non-phase-shifted filtering is to use FFTs i.e. FFT -> Low Pass -> iFFT The only reason to move to time-domain filters is if you must do filtering in real-time where the complete dataset is (yet) unknown and you must obey the laws of causality. Using a frequency domain filter, you can have whatever cutoff you like. HTH Bryan On Mon, 2007-07-23 at 22:27 -0500, Ryan Krauss wrote: > I have a vector of data from an impact test. The data has some > "noise" in it that is really ringing in the mass used in the test. I > have spent a fair amount of effort getting rid of the ringing or > trying to design the test so that the ringing is at as high a > frequency as possible. I now must resort to filtering the data. > > I can get fairly decent results with a 10 kHz filter (see attached). > But I can get really nice results with a 1 kHz filter and then > shifting the vector back in time - somewhat arbitrarily. This feels > slightly unscientific. I googled for zero phase filters, but don't > really understand what I was reading. Is there a way to get magtitude > attenuation without phase lag that is easy to implement and accepted > as good practice among signal processing experts? > > Thanks, > > Ryan > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user From s.mientki at ru.nl Tue Jul 24 04:24:44 2007 From: s.mientki at ru.nl (Stef Mientki) Date: Tue, 24 Jul 2007 10:24:44 +0200 Subject: [SciPy-user] filtering without phase shift In-Reply-To: <1185261264.5678.9.camel@pc1.cole.uklinux.net> References: <1185261264.5678.9.camel@pc1.cole.uklinux.net> Message-ID: <46A5B74C.2060304@ru.nl> Bryan Cole wrote: > The easiest way to do non-phase-shifted filtering is to use FFTs i.e. > > FFT -> Low Pass -> iFFT > > The only reason to move to time-domain filters is if you must do > filtering in real-time where the complete dataset is (yet) unknown and > you must obey the laws of causality. > > Using a frequency domain filter, you can have whatever cutoff you like. > I'm a bit rusty, but isn't there a real danger by filtering in the frequency domain, creating a rectangle cutoff in the frequency domain, leads to an infinite ringing signal in the time-domain. The normal way of getting zero phaseshift, is to apply the filter twice, once normally and once in reversed order. Stef Mientki From david at ar.media.kyoto-u.ac.jp Tue Jul 24 04:15:21 2007 From: david at ar.media.kyoto-u.ac.jp (David Cournapeau) Date: Tue, 24 Jul 2007 17:15:21 +0900 Subject: [SciPy-user] filtering without phase shift In-Reply-To: <46A5B74C.2060304@ru.nl> References: <1185261264.5678.9.camel@pc1.cole.uklinux.net> <46A5B74C.2060304@ru.nl> Message-ID: <46A5B519.5090505@ar.media.kyoto-u.ac.jp> Stef Mientki wrote: > Bryan Cole wrote: > >> The easiest way to do non-phase-shifted filtering is to use FFTs i.e. >> >> FFT -> Low Pass -> iFFT >> >> The only reason to move to time-domain filters is if you must do >> filtering in real-time where the complete dataset is (yet) unknown and >> you must obey the laws of causality. >> >> Using a frequency domain filter, you can have whatever cutoff you like. >> >> > I'm a bit rusty, but isn't there a real danger by filtering in the > frequency domain, > creating a rectangle cutoff in the frequency domain, > leads to an infinite ringing signal in the time-domain. > I agree. It depends of course of the type of signals you have to filter and what you want to get from them, but I would not advise FFT filtering as THE method for filtering. > The normal way of getting zero phaseshift, > is to apply the filter twice, once normally and once in reversed order. > That's what I learnt too, but I am a bit rusty on those too :) David From ded.espaze at laposte.net Tue Jul 24 04:51:06 2007 From: ded.espaze at laposte.net (Dede) Date: Tue, 24 Jul 2007 10:51:06 +0200 Subject: [SciPy-user] vectorizing methods? In-Reply-To: <20070715093244.GA28109@clipper.ens.fr> References: <20070715093244.GA28109@clipper.ens.fr> Message-ID: <20070724105106.1ebcddc0@localhost> Sorry to reply a little late, I have else that solution: def vectorize(bar_function): def modified_bar_function(self, x): return bar_function(self, x) + self.a modified_bar_function.__doc__ = "Be carrefull, I am not who you think" return modified_bar_function class VectorizeBar(type): def __init__(cls, name, bases, dct): setattr(cls, "bar", vectorize(dct["bar"])) class Bar: __metaclass__ = VectorizeBar def bar(self, x): return x a = 2. It brings some magic but it's rather funny in some cases. Cheers, Dede On Sun, 15 Jul 2007 11:32:44 +0200 Gael Varoquaux wrote: > On Sat, Jul 14, 2007 at 04:31:59PM -0700, Greg Novak wrote: > > Is there a preferred way to vectorize methods, rather than > > functions? The obvious thing doesn't work: > > > class foo: > > def bar(self, x): pass > > bar = vectorize(bar) > > This cannot work, as you are applying "vectorize" before the class is > built, so the function is still unbound. The binding process, which > happens during the building of the class, will not like what you have > done to the function to vectorize it, mainly the fact that it is no > longer a plain function. > > > > class foo: > > __vectorMethods = ('bar', ) > > > def __init__(self, n): > > for name in self.__vectorMethods: > > setattr(self, name, vectorize(getattr(self, name))) > > > def bar(self, x): pass > > There you are vectorizing after the construction of the instance, so > the method is already bound. > > > which works fine but it doesn't seem like it should be necessary to > > do it in the initialization of every instance. > > Well, if your methods don't really refer to the object (they don't use > self at all in the body of the function), you could do something like: > > class Foo(object): > @staticmethod > @vectorize > def bar(x): > return x > > > In the static method there is no reference to the object. The problem > is that when the class is binding the method (making a call in which > the first argument is already assigned to the instance) it is really > modifying it. If you could apply vectorize to only part of the > argument, and get a curry of the original function you could than > transform bar(self, *args) in baz(self, *args), where *args can be > vectors, and this might work. > > Is can see two ways out of this: > > 1) Do some heavy magic with a metaclass and modify the binding > process (I am talking about things I don't know, so it may not be > feasible). > > 2.a) Use a static method that you vectorize, and pass it the > instance as the first argument using a convention bound method: > > class Foo(object): > @staticmethod > @vectorize > def bar(self, x): > return self.a + x > > def baz(self, x): > return self.bar(self, x) > > a = 1 > > 2.b) IMHO it would be even cleaner to only pass interesting vectors > to the vectorize staticmethod, as it has been vectorized relatively to > "self", but self cannot be a vector: > > class Foo(object): > @staticmethod > @vectorize > def bar(a, x): > return a + x > > def baz(self, x): > return self.bar(self.a, x) > > a = 1 > > Basically this is similar to using a standard function instead > of a method, but lets face it, the notions of bound method and > vectorized function seem mutually incompatible as they both > want to modify a function. > > It might be possible to implement a decorator similar to staticmethod > that does the proces presented in 2.a) but hiddes it from the user, > but to do this, you would need to understand how staticmethod works, > and I suspect there is some cooperation of the class building > mechanisme (so we are back to 1), I think). > > I hope 2.a) or 2.b) suit you, elsewhere maybe some one has a better > idea ? > > Cheers, > > Ga?l > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user From frank.horowitz at csiro.au Tue Jul 24 06:59:01 2007 From: frank.horowitz at csiro.au (Frank Horowitz) Date: Tue, 24 Jul 2007 18:59:01 +0800 Subject: [SciPy-user] Matplotlib transformations? Message-ID: <924B9651-3C11-4658-A976-E0C2B48DD862@csiro.au> Hi All, I have a visualization problem that I need to solve, I think that the matplotlib transforms module might do the trick, but want the opinion of any matplotlib experts out there whether I'm going down a blind alley before investing too much time into hacking... I need to convert a "few time step" but multiple value visualization from an animation to a single figure for publication. (It's to do with flow along a network, so spatial layout is quite important.) The best guess I currently have as to an acceptable visual display is something like a "skewed" bar graph for each component of the time series. In other words, take a normal rectangular bar graph/time- series and affine transform the bounding box so that it is deformed to a parallelogram. Is a strategy of building the bar-graph, then applying an affine transform, then plotting a viable strategy in the context of MPL 0.87.7? If not, I'm quite open to suggestions! TIA for any sage advice you might have! Cheers, Frank Horowitz From fredmfp at gmail.com Tue Jul 24 11:09:50 2007 From: fredmfp at gmail.com (fred) Date: Tue, 24 Jul 2007 17:09:50 +0200 Subject: [SciPy-user] mgrid/ogrid... Message-ID: <46A6163E.7080501@gmail.com> Hi all, What's difference between ogrid() and mgrid ? help() or ogrid?/mgrid? in ipython gives the same answer. Cheers, -- http://scipy.org/FredericPetit From franckm at aims.ac.za Tue Jul 24 11:45:36 2007 From: franckm at aims.ac.za (Kalala Mutombo Franck) Date: Tue, 24 Jul 2007 17:45:36 +0200 (SAST) Subject: [SciPy-user] download and install python with all modules In-Reply-To: <46A6163E.7080501@gmail.com> References: <46A6163E.7080501@gmail.com> Message-ID: <59416.41.194.14.11.1185291936.squirrel@webmail.aims.ac.za> Hi I want to download python and install it on my computer, how can I download python and all the needed modules? for examples scipy,numeric,etc. -- Franck Kalala Mutombo African Institute for Mathematical Sciences www.aims.ac.za On Tue, July 24, 2007 5:09 pm, fred wrote: > Hi all, > > What's difference between ogrid() and mgrid ? > > help() or ogrid?/mgrid? in ipython > gives the same answer. > > Cheers, > > -- > http://scipy.org/FredericPetit > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > From ryanlists at gmail.com Tue Jul 24 12:56:18 2007 From: ryanlists at gmail.com (Ryan Krauss) Date: Tue, 24 Jul 2007 11:56:18 -0500 Subject: [SciPy-user] download and install python with all modules In-Reply-To: <59416.41.194.14.11.1185291936.squirrel@webmail.aims.ac.za> References: <46A6163E.7080501@gmail.com> <59416.41.194.14.11.1185291936.squirrel@webmail.aims.ac.za> Message-ID: Scipy does not depend on numeric. You are better off installing numpy. This is a platform specific question. Have a look at http://scipy.org/Installing_SciPy If you just want a quick windows install this should do it: http://prdownloads.sourceforge.net/numpy/numpy-1.0.3.win32-py2.5.exe?download http://prdownloads.sourceforge.net/scipy/scipy-0.5.2.win32-py2.5.exe?download But exactly what you mean by all modules is slightly vague. You probably also want IPython and Matplotlib at a minimum. On 7/24/07, Kalala Mutombo Franck wrote: > Hi > > I want to download python and install it on my computer, how can I > download python and all the needed modules? for examples > scipy,numeric,etc. > -- > Franck Kalala Mutombo > African Institute for Mathematical Sciences > www.aims.ac.za > > On Tue, July 24, 2007 5:09 pm, fred wrote: > > Hi all, > > > > What's difference between ogrid() and mgrid ? > > > > help() or ogrid?/mgrid? in ipython > > gives the same answer. > > > > Cheers, > > > > -- > > http://scipy.org/FredericPetit > > > > _______________________________________________ > > SciPy-user mailing list > > SciPy-user at scipy.org > > http://projects.scipy.org/mailman/listinfo/scipy-user > > > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > From berthe.loic at gmail.com Tue Jul 24 12:58:03 2007 From: berthe.loic at gmail.com (=?ISO-8859-1?Q?BERTHE_Lo=EFc?=) Date: Tue, 24 Jul 2007 18:58:03 +0200 Subject: [SciPy-user] Installing numpy and scipy on IBM AIX Message-ID: Hi, I'm having trouble to install numpy and scipy on IBM AIX. As the website didn't recommend to install the stable version of numpy-1.0.3 and as I don't have any svn access on this AIX station, I tried to install numpy-1.0.2 Here are the logs of my install : ------------------------------------------------------------------------------------------ > python setup.py build Running from numpy source directory. F2PY Version 2_3649 [ ...] compile options: '-c' xlc: _configtest.c xlc _configtest.o -L/rdm/berthe/tmp/AIX/lib/ATLAS -lptf77blas -lptcblas -latlas -o _configtest ATLAS version 3.6.0 built by on Tue Jul 17 13:46:16 DFT 2007: UNAME : AIX btmcsx1 1 5 005F623A4C00 INSTFLG : MMDEF : /rdm/berthe/tmp/AIX/src/ATLAS/CONFIG/ARCHS/POWER4/xlc/gemm ARCHDEF : /rdm/berthe/tmp/AIX/src/ATLAS/CONFIG/ARCHS/POWER4/xlc/misc F2CDEFS : -DNoChange -DStringSunStyle CACHEEDGE: 524288 F77 : /usr/bin/xlf_r, version UNKNOWN F77FLAGS : -qtune=pwr3 -qarch=pwr3 -O3 -qmaxmem=-1 -qfloat=hsflt CC : /usr/vac/bin/xlc_r, version UNKNOWN CC FLAGS : -qtune=pwr3 -qarch=pwr3 -O3 -qmaxmem=-1 -qfloat=hsflt MCC : /usr/vac/bin/xlc_r, version UNKNOWN MCCFLAGS : -qtune=pwr3 -qarch=pwr3 -O3 -qmaxmem=-1 -qfloat=hsflt -qalias=allp success! removing: _configtest.c _configtest.o _configtest FOUND: libraries = ['ptf77blas', 'ptcblas', 'atlas'] library_dirs = ['/rdm/berthe/tmp//AIX/lib/ATLAS'] language = c define_macros = [('ATLAS_INFO', '"\\"3.6.0\\""')] [ ... ] creating build/temp.aix-5.1-2.5 creating build/temp.aix-5.1-2.5/numpy creating build/temp.aix-5.1-2.5/numpy/core creating build/temp.aix-5.1-2.5/numpy/core/src compile options: '-Ibuild/src.aix-5.1-2.5/numpy/core/src -Inumpy/core/include -Ibuild/src.aix- 5.1-2.5/numpy/core -Inumpy/core/src -Inumpy/core/include -I/rdm/berthe/tmp/AIX/include/python2.5 -c' xlc: numpy/core/src/multiarraymodule.c "numpy/core/include/numpy/ndarrayobject.h", line 191.24: 1506-275 (S) Unexpected text ',' encountered. "numpy/core/include/numpy/ndarrayobject.h", line 198.26: 1506-275 (S) Unexpected text ',' encountered. "numpy/core/include/numpy/ndarrayobject.h", line 210.26: 1506-275 (S) Unexpected text ',' encountered. "numpy/core/src/arrayobject.c", line 4489.17: 1506-068 (E) Operation between types "int(*)(void*,void*,int,int)" and "void*" is not allowed. "numpy/core/src/arrayobject.c", line 4594.61: 1506-280 (E) Function argument assignment between types "void*" and "int(*)(unsigned long*,unsigned long*,int,int)" is not allowed. "numpy/core/src/arrayobject.c", line 4598.61: 1506-280 (E) Function argument assignment between types "void*" and "int(*)(char*,char*,int,int)" is not allowed. "numpy/core/src/arrayobject.c", line 5472.39: 1506-068 (E) Operation between types "int(*)(struct PyArrayObject*,struct _object*)" and "void*" is not allowed. "numpy/core/src/arrayobject.c", line 7528.42: 1506-068 (E) Operation between types "void(*)(void*,void*,int,void*,void*)" and "void*" is not allowed. "numpy/core/include/numpy/ndarrayobject.h", line 191.24: 1506-275 (S) Unexpected text ',' encountered. "numpy/core/include/numpy/ndarrayobject.h", line 198.26: 1506-275 (S) Unexpected text ',' encountered. "numpy/core/include/numpy/ndarrayobject.h", line 210.26: 1506-275 (S) Unexpected text ',' encountered. "numpy/core/src/arrayobject.c", line 4489.17: 1506-068 (E) Operation between types "int(*)(void*,void*,int,int)" and "void*" is not allowed. "numpy/core/src/arrayobject.c", line 4594.61: 1506-280 (E) Function argument assignment between types "void*" and "int(*)(unsigned long*,unsigned long*,int,int)" is not allowed. "numpy/core/src/arrayobject.c", line 4598.61: 1506-280 (E) Function argument assignment between types "void*" and "int(*)(char*,char*,int,int)" is not allowed. "numpy/core/src/arrayobject.c", line 5472.39: 1506-068 (E) Operation between types "int(*)(struct PyArrayObject*,struct _object*)" and "void*" is not allowed. "numpy/core/src/arrayobject.c", line 7528.42: 1506-068 (E) Operation between types "void(*)(void*,void*,int,void*,void*)" and "void*" is not allowed. error: Command "xlc -DNDEBUG -O -Ibuild/src.aix-5.1-2.5/numpy/core/src -Inumpy/core/include -Ibuild/src.aix- 5.1-2.5/numpy/core -Inumpy/core/src -Inumpy/core/include -I/rdm/berthe/tmp/AIX/include/python2.5 -c numpy/core/src/multiarraymodule.c -o build/temp.aix-5.1-2.5/numpy/core/src/multiarraymodule.o" failed with exit status 1 ------------------------------------------------------------------------ I'm using the ActivePython-2.5.1.1-aix5-powerpc version of python, available on http://www.activestate.com/Products/activepython/ . Have you got any clue to fix this ? Furthermore, I didn't find any SVN snapshot archive for numpy or scipy. Is there any ? As numpy-1.0.3 is not recommended for installing scipy and as I 'm probably not the only one who cannot use svn, I think this could be very handy. Regards, -- LB -------------- next part -------------- An HTML attachment was scrubbed... URL: From robert.kern at gmail.com Tue Jul 24 14:36:04 2007 From: robert.kern at gmail.com (Robert Kern) Date: Tue, 24 Jul 2007 13:36:04 -0500 Subject: [SciPy-user] mgrid/ogrid... In-Reply-To: <46A6163E.7080501@gmail.com> References: <46A6163E.7080501@gmail.com> Message-ID: <46A64694.9080307@gmail.com> fred wrote: > Hi all, > > What's difference between ogrid() and mgrid ? In [1]: from numpy import * In [2]: mgrid[0:5,0:5] Out[2]: 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]]]) In [3]: ogrid[0:5,0:5] Out[3]: [array([[0], [1], [2], [3], [4]]), array([[0, 1, 2, 3, 4]])] mgrid gives you the fully broadcasted arrays. ogrid gives you partial arrays which will broadcast against each other. Depending on how you are using them, ogrid's results may be more efficient to use because you can often do the bulk of your computations on the smaller arrays and only do a handful of operations that broadcast against each other to form the final, full result. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From spmcinerney at hotmail.com Tue Jul 24 15:02:40 2007 From: spmcinerney at hotmail.com (Stephen McInerney) Date: Tue, 24 Jul 2007 12:02:40 -0700 Subject: [SciPy-user] download and install python with all modules In-Reply-To: Message-ID: a) A very good zero-hassle batteries-included Python distribution for Windows with scientific and visualization libraries is Enthought Python: http://code.enthought.com/enthon/ Current release is Python 2.4.3 ; (Python 2.5.x is behind but supposedly due "this August"). Enthought Python 2.4.3 has NumPy 0.9.9.2706 + SciPy 0.5.0.2033 + IPython 0.7.2 + Matplotlib 0.87.3.2478 + wx +much more ... Typically Enthought bundles lag Python releases by ~1 yr. You might contact enthought-dev at mail.enthought.com yourselves to ask for 2.5.x :) b) Compiling 15+ individual packages on Windows and reconciling multiple version conflicts is a huge pain and a barrier to adoption, in particular if we need the retro version Visual Express C++ for 2003. It's just not going to fly. To add a question I have always wanted to know, are there any firm plans to move NumPy + SciPy into Python? It really needs an arbitrary-precision numercial type (no, 'Decimal' is not good enough, too slow and basic methods like pow and math.* don't work on it ) Thanks, Stephen _________________________________________________________________ http://newlivehotmail.com From robert.kern at gmail.com Tue Jul 24 15:15:51 2007 From: robert.kern at gmail.com (Robert Kern) Date: Tue, 24 Jul 2007 14:15:51 -0500 Subject: [SciPy-user] download and install python with all modules In-Reply-To: References: Message-ID: <46A64FE7.90709@gmail.com> Stephen McInerney wrote: > a) A very good zero-hassle batteries-included Python distribution for > Windows > with scientific and visualization libraries is Enthought Python: > http://code.enthought.com/enthon/ > Current release is Python 2.4.3 ; (Python 2.5.x is behind but supposedly due > "this August"). > Enthought Python 2.4.3 has NumPy 0.9.9.2706 + SciPy 0.5.0.2033 + IPython > 0.7.2 + Matplotlib 0.87.3.2478 + wx +much more ... > Typically Enthought bundles lag Python releases by ~1 yr. > You might contact enthought-dev at mail.enthought.com yourselves to ask for > 2.5.x :) We're not updating the monolithic distribution anymore. Instead we are building binaries for each package separately and using Python eggs as a distribution mechanism. http://code.enthought.com/enstaller/ > b) Compiling 15+ individual packages on Windows and reconciling multiple > version conflicts > is a huge pain and a barrier to adoption, in particular if we need the retro > version > Visual Express C++ for 2003. It's just not going to fly. > > To add a question I have always wanted to know, are there any firm plans to > move > NumPy + SciPy into Python? None. There is a PEP for putting the C array interface into Python for efficient communication of multidimensional array data between C extensions. In a few years, we might be able to contribute a slimmed down array type and ufuncs for use at the Python level, but that seems less likely. scipy will never be a part of Python. > It really needs an arbitrary-precision numercial > type (no, 'Decimal' is not good enough, too slow and basic methods like pow > and math.* don't work on it ) We don't have an arbitrary-precision numerical type either. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From fredmfp at gmail.com Tue Jul 24 15:19:49 2007 From: fredmfp at gmail.com (fred) Date: Tue, 24 Jul 2007 21:19:49 +0200 Subject: [SciPy-user] mgrid/ogrid... In-Reply-To: <46A64694.9080307@gmail.com> References: <46A6163E.7080501@gmail.com> <46A64694.9080307@gmail.com> Message-ID: <46A650D5.9030909@gmail.com> Robert Kern a ?crit : > fred wrote: > >> Hi all, >> >> What's difference between ogrid() and mgrid ? >> > > In [1]: from numpy import * > > In [2]: mgrid[0:5,0:5] > Out[2]: > 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]]]) > > In [3]: ogrid[0:5,0:5] > Out[3]: > [array([[0], > [1], > [2], > [3], > [4]]), > array([[0, 1, 2, 3, 4]])] > > > Well, I should have try before, and not only read help, sorry. > mgrid gives you the fully broadcasted arrays. ogrid gives you partial arrays > which will broadcast against each other. Depending on how you are using them, > ogrid's results may be more efficient to use because you can often do the bulk > of your computations on the smaller arrays and only do a handful of operations > that broadcast against each other to form the final, full result. > Thanks for explanation as clear as possible, as usual ;-) Cheers, -- http://scipy.org/FredericPetit From shao at msg.ucsf.edu Tue Jul 24 15:42:07 2007 From: shao at msg.ucsf.edu (Lin Shao) Date: Tue, 24 Jul 2007 12:42:07 -0700 Subject: [SciPy-user] mgrid/ogrid... In-Reply-To: <46A64694.9080307@gmail.com> References: <46A6163E.7080501@gmail.com> <46A64694.9080307@gmail.com> Message-ID: So, is there any difference between N.indices() calls and N.mgrid[]? From robert.kern at gmail.com Tue Jul 24 15:47:57 2007 From: robert.kern at gmail.com (Robert Kern) Date: Tue, 24 Jul 2007 14:47:57 -0500 Subject: [SciPy-user] mgrid/ogrid... In-Reply-To: References: <46A6163E.7080501@gmail.com> <46A64694.9080307@gmail.com> Message-ID: <46A6576D.1090604@gmail.com> Lin Shao wrote: > So, is there any difference between N.indices() calls and N.mgrid[]? Yes! In [8]: mgrid[0:5:11j] Out[8]: array([ 0. , 0.5, 1. , 1.5, 2. , 2.5, 3. , 3.5, 4. , 4.5, 5. ]) In [9]: mgrid[0:5:0.5] Out[9]: array([ 0. , 0.5, 1. , 1.5, 2. , 2.5, 3. , 3.5, 4. , 4.5]) In [11]: mgrid[0:5:0.3] Out[11]: array([ 0. , 0.3, 0.6, 0.9, 1.2, 1.5, 1.8, 2.1, 2.4, 2.7, 3. , 3.3, 3.6, 3.9, 4.2, 4.5, 4.8]) -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From hetland at tamu.edu Tue Jul 24 16:55:48 2007 From: hetland at tamu.edu (Rob Hetland) Date: Tue, 24 Jul 2007 16:55:48 -0400 Subject: [SciPy-user] pynetcdf crashing on Python 2.5 In-Reply-To: References: Message-ID: <775208E0-E439-4D63-BD4B-7A06D8185E9A@tamu.edu> On Jul 18, 2007, at 7:02 PM, Mary Haley wrote: > Somebody told me about this thread, and I thought I'd jump in and > offer another solution. ..And yet another: http://code.google.com/p/netcdf4-python/ Although based on netcdf4, this package *does* support both reading and writing 'classic' netcdf3 files. I use this package for all of my work, and have been very happy with it. Particularly useful is the multifile support, as I often have 10+ gigs of data files spread out over 5+ files. -Rob ---- Rob Hetland, Associate Professor Dept. of Oceanography, Texas A&M University http://pong.tamu.edu/~rob phone: 979-458-0096, fax: 979-845-6331 From josh8912 at yahoo.com Tue Jul 24 17:28:28 2007 From: josh8912 at yahoo.com (JJ) Date: Tue, 24 Jul 2007 21:28:28 +0000 (UTC) Subject: [SciPy-user] missing libacml.so when using cgi script References: <186675.64366.qm@web54011.mail.re2.yahoo.com> <46A3F747.9030301@gmail.com> Message-ID: Robert Kern gmail.com> writes: > This won't work. The LD_LIBRARY_PATH environment variable needs to be set before > the process starts, not just before the library is loaded. Read the Apache > documentation for how to set up the environment for your CGI scripts. > Thanks Robert: I have now tried using the SetEnv directive, as Apache instructs. I added the following to the end of the httpd.config file SetEnv LD_LIBRARY_PATH /home/john/usr/acml/gnu64/lib SetEnv LAPACK /home/john/usr/acml/gnu64/lib/libacml.so SetEnv LD_RUN_PATH /home/john/usr/acml/gnu64/lib When I run my cgi script, I can verify that indeed these environment vaiables have been set. But the cgi script still fails when I try to import scipy, giving the message that libacml.so cannot be found. This is odd, as I can import scipy just fine in a terminal window. Any ideas? I have written to the Apache list also. John From david at ar.media.kyoto-u.ac.jp Tue Jul 24 21:04:27 2007 From: david at ar.media.kyoto-u.ac.jp (David Cournapeau) Date: Wed, 25 Jul 2007 10:04:27 +0900 Subject: [SciPy-user] download and install python with all modules In-Reply-To: <59416.41.194.14.11.1185291936.squirrel@webmail.aims.ac.za> References: <46A6163E.7080501@gmail.com> <59416.41.194.14.11.1185291936.squirrel@webmail.aims.ac.za> Message-ID: <46A6A19B.1040805@ar.media.kyoto-u.ac.jp> Kalala Mutombo Franck wrote: > Hi > > I want to download python and install it on my computer, how can I > download python and all the needed modules? for examples > scipy,numeric,etc. > Which platform are you on ? On Linux, depending on your distribution, it could be a simple matter of installing packaged binaries (for windows, other already pointed some possible solution). cheers, David From oliver.tomic at matforsk.no Wed Jul 25 07:06:18 2007 From: oliver.tomic at matforsk.no (oliver.tomic at matforsk.no) Date: Wed, 25 Jul 2007 13:06:18 +0200 Subject: [SciPy-user] reading .mat-files (Matlab 7) In-Reply-To: Message-ID: Hi list, I have searched the archive, but I really didn't come up with any conclusion. Is there now support in scipy.io (scipy 0.52) for reading .mat-files from Matlab 7? I undestand that it supports older versions (v4 and v5). Are there any plans to support for Matlab 7 .mat-files? I found this mail from Nick Fotopoulos, but this might be outdated: http://article.gmane.org/gmane.comp.python.scientific.user/4835/match=matlab+7+io+loadmat Any comments appreciated. cheers Oliver From fredmfp at gmail.com Wed Jul 25 09:50:34 2007 From: fredmfp at gmail.com (fred) Date: Wed, 25 Jul 2007 15:50:34 +0200 Subject: [SciPy-user] array dtype... Message-ID: <46A7552A.1090402@gmail.com> Hi all, I want to set arrays for a given datatype. I know I can use dtype='i', dtype='f', dtype='d' etc, which stand for dtype=int32, dtype=float32, dtype=float64. But I would like to know all the available types in the two declaration type. I googled, browsed scipy.org, but did not find anything about this issue. For instance, I would like to know if there is an equivalent "in one character" to the uint8 data type. Any pointer, url are welcome. TIA. Cheers, -- http://scipy.org/FredericPetit From stefan at sun.ac.za Wed Jul 25 09:57:31 2007 From: stefan at sun.ac.za (Stefan van der Walt) Date: Wed, 25 Jul 2007 15:57:31 +0200 Subject: [SciPy-user] reading .mat-files (Matlab 7) In-Reply-To: References: Message-ID: <20070725135731.GJ8728@mentat.za.net> Hi Oliver On Wed, Jul 25, 2007 at 01:06:18PM +0200, oliver.tomic at matforsk.no wrote: > Is there now support in scipy.io (scipy 0.52) for reading .mat-files from > Matlab 7? I undestand that it supports older versions (v4 and v5). Are > there any plans to support for Matlab 7 .mat-files? >From the docstring: "v4 (Level 1.0), v6 and v7.1 matfiles are supported." Cheers St?fan From stefan at sun.ac.za Wed Jul 25 10:49:37 2007 From: stefan at sun.ac.za (Stefan van der Walt) Date: Wed, 25 Jul 2007 16:49:37 +0200 Subject: [SciPy-user] array dtype... In-Reply-To: <46A7552A.1090402@gmail.com> References: <46A7552A.1090402@gmail.com> Message-ID: <20070725144937.GA26793@mentat.za.net> On Wed, Jul 25, 2007 at 03:50:34PM +0200, fred wrote: > For instance, I would like to know if there is an equivalent "in one > character" to the uint8 data type. N.dtype(uint8).char Cheers St?fan From rhc28 at cornell.edu Wed Jul 25 11:05:28 2007 From: rhc28 at cornell.edu (Rob Clewley) Date: Wed, 25 Jul 2007 11:05:28 -0400 Subject: [SciPy-user] reading .mat-files (Matlab 7) In-Reply-To: <20070725135731.GJ8728@mentat.za.net> References: <20070725135731.GJ8728@mentat.za.net> Message-ID: Stefan, scipy.io.loadmat from scipy 0.5.2 doesn't work on anything but v4 files for me. I generated extremely simple mat files (one small matrix in 'test.mat') with my matlab 7.3 using the -v6, -v5, and -v4 options, and scipy complained with this in all but the -v4 case: In [1]: import scipy.io as io In [2]: io.loadmat('test') --------------------------------------------------------------------------- exceptions.AttributeError Traceback (most recent call last) c:\temp\ C:\Python24\lib\site-packages\scipy\io\mio.py in loadmat(file_name, mdict, appen dmat, basename, **kwargs) 94 ''' 95 MR = mat_reader_factory(file_name, appendmat, **kwargs) ---> 96 matfile_dict = MR.get_variables() 97 if mdict is not None: 98 mdict.update(matfile_dict) C:\Python24\lib\site-packages\scipy\io\miobase.py in get_variables(self, variable_names) 267 variable_names = [variable_names] 268 self.mat_stream.seek(0) --> 269 mdict = self.file_header() 270 mdict['__globals__'] = [] 271 while not self.end_of_stream(): C:\Python24\lib\site-packages\scipy\io\mio5.py in file_header(self) 508 hdict = {} 509 hdr = self.read_dtype(self.dtypes['file_header']) --> 510 hdict['__header__'] = hdr['description'].strip(' \t\n\000') 511 v_major = hdr['version'] >> 8 512 v_minor = hdr['version'] & 0xFF AttributeError: 'numpy.ndarray' object has no attribute 'strip' This is with numpy 1.0.2. I wonder if this is the problem that Oliver has? -Rob On 25/07/07, Stefan van der Walt wrote: > Hi Oliver > > On Wed, Jul 25, 2007 at 01:06:18PM +0200, oliver.tomic at matforsk.no wrote: > > Is there now support in scipy.io (scipy 0.52) for reading .mat-files from > > Matlab 7? I undestand that it supports older versions (v4 and v5). Are > > there any plans to support for Matlab 7 .mat-files? > > >From the docstring: > > "v4 (Level 1.0), v6 and v7.1 matfiles are supported." > > Cheers > St?fan > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > From fredmfp at gmail.com Wed Jul 25 11:06:15 2007 From: fredmfp at gmail.com (fred) Date: Wed, 25 Jul 2007 17:06:15 +0200 Subject: [SciPy-user] array dtype... In-Reply-To: <20070725144937.GA26793@mentat.za.net> References: <46A7552A.1090402@gmail.com> <20070725144937.GA26793@mentat.za.net> Message-ID: <46A766E7.5080601@gmail.com> Stefan van der Walt a ?crit : > N.dtype(uint8).char > Great, I like the answer ! :-)) Thanks a lot. -- http://scipy.org/FredericPetit From peridot.faceted at gmail.com Wed Jul 25 11:36:16 2007 From: peridot.faceted at gmail.com (Anne Archibald) Date: Wed, 25 Jul 2007 11:36:16 -0400 Subject: [SciPy-user] filtering without phase shift In-Reply-To: <46A5B74C.2060304@ru.nl> References: <1185261264.5678.9.camel@pc1.cole.uklinux.net> <46A5B74C.2060304@ru.nl> Message-ID: On 24/07/07, Stef Mientki wrote: > > > Bryan Cole wrote: > > The easiest way to do non-phase-shifted filtering is to use FFTs i.e. > > > > FFT -> Low Pass -> iFFT > > > > The only reason to move to time-domain filters is if you must do > > filtering in real-time where the complete dataset is (yet) unknown and > > you must obey the laws of causality. > > > > Using a frequency domain filter, you can have whatever cutoff you like. > > > I'm a bit rusty, but isn't there a real danger by filtering in the > frequency domain, > creating a rectangle cutoff in the frequency domain, > leads to an infinite ringing signal in the time-domain. There is a concern with ringing if you just use a brick-wall cutoff (though often with an FFT you have so much frequency resolution the ringing isn't actually a problem). The easiest way to do this is to use a softer edge - there are standard filter shapes (Butterworth and so on) which will minimize ringing, but any relatively smooth falloff will help. It sounds like this is not quite your issue, but if what you need is a filter that preserves peak height, Kalman filtering is what you need. Anne From emanuelez at gmail.com Wed Jul 25 11:46:40 2007 From: emanuelez at gmail.com (Emanuele Zattin) Date: Wed, 25 Jul 2007 17:46:40 +0200 Subject: [SciPy-user] fitting mixed gaussians Message-ID: Hello, i'm trying to perform mixed-gaussian fitting on some small greyscale images (5x5 pixels, maximum 9x9). right now i'm using a leastsq approach but it tends to get pretty slow and unreliable when it comes to fit 4-5 2D gaussians even in such a small domain. I've noticed PyEM and i have the feeling it might be useful for me, but here i'm dealing with pixel intensities, not distributions. Any hint is welcome! Emanuele From gael.varoquaux at normalesup.org Wed Jul 25 11:51:32 2007 From: gael.varoquaux at normalesup.org (Gael Varoquaux) Date: Wed, 25 Jul 2007 17:51:32 +0200 Subject: [SciPy-user] fitting mixed gaussians In-Reply-To: References: Message-ID: <20070725155132.GD28080@clipper.ens.fr> On Wed, Jul 25, 2007 at 05:46:40PM +0200, Emanuele Zattin wrote: > i'm trying to perform mixed-gaussian fitting on some small greyscale > images (5x5 pixels, maximum 9x9). right now i'm using a leastsq > approach but it tends to get pretty slow and unreliable when it comes > to fit 4-5 2D gaussians even in such a small domain. Is the gaussian spot well centered on the image ? If so then I reckon you are interested in finding its width ? Maybe I am wrong, byt if I am right an approach that works very well is to determine the second momentum of the intensity/position distribution. This is not an optimisation procedure and is very quick. Reliability depends on the kind of data you are processing. Some code doing this can be found on http://scipy.org/Cookbook/FittingData#head-11870c917b101bb0d4b34900a0da1b7deb613bf7 HTH, Ga?l From emanuelez at gmail.com Wed Jul 25 11:58:50 2007 From: emanuelez at gmail.com (Emanuele Zattin) Date: Wed, 25 Jul 2007 17:58:50 +0200 Subject: [SciPy-user] fitting mixed gaussians In-Reply-To: <20070725155132.GD28080@clipper.ens.fr> References: <20070725155132.GD28080@clipper.ens.fr> Message-ID: On 7/25/07, Gael Varoquaux wrote: > On Wed, Jul 25, 2007 at 05:46:40PM +0200, Emanuele Zattin wrote: > > i'm trying to perform mixed-gaussian fitting on some small greyscale > > images (5x5 pixels, maximum 9x9). right now i'm using a leastsq > > approach but it tends to get pretty slow and unreliable when it comes > > to fit 4-5 2D gaussians even in such a small domain. > > Is the gaussian spot well centered on the image ? > > If so then I reckon you are interested in finding its width ? Maybe I am > wrong, byt if I am right an approach that works very well is to determine > the second momentum of the intensity/position distribution. This is not > an optimisation procedure and is very quick. Reliability depends on the > kind of data you are processing. > > Some code doing this can be found on > http://scipy.org/Cookbook/FittingData#head-11870c917b101bb0d4b34900a0da1b7deb613bf7 > > HTH, > > Ga?l The gaussian I am interested is indeed at the center of the images, but very often more maxima are present at the boundaries so i try to fit more gaussians. I am aware of the cookbook page... it's really interesting and it helped me a lot in the first steps. On the other side a momentum approach is not as easy when more gaussians are present. From stefan at sun.ac.za Wed Jul 25 11:55:48 2007 From: stefan at sun.ac.za (Stefan van der Walt) Date: Wed, 25 Jul 2007 17:55:48 +0200 Subject: [SciPy-user] fitting mixed gaussians In-Reply-To: References: Message-ID: <20070725155548.GC26793@mentat.za.net> Hi Emanuele On Wed, Jul 25, 2007 at 05:46:40PM +0200, Emanuele Zattin wrote: > i'm trying to perform mixed-gaussian fitting on some small greyscale > images (5x5 pixels, maximum 9x9). right now i'm using a leastsq > approach but it tends to get pretty slow and unreliable when it comes > to fit 4-5 2D gaussians even in such a small domain. > I've noticed PyEM and i have the feeling it might be useful for me, > but here i'm dealing with pixel intensities, not distributions. Any > hint is welcome! Expectation maximisation should work well for your needs. Take a look at the lecture notes at http://www.dsp.sun.ac.za/pr813/lectures/lecture06/pr813_lecture06.pdf You can view your MxN image as an MN-dimensional vector and follow the same process as you would for other types of features. If the dimensionality becomes a problem, you'll have to look at feature extraction or dimension reduction (using methods like the Karhunen-Loeve transform or linear discriminant analysis). Regards St?fan From Joris.DeRidder at ster.kuleuven.be Wed Jul 25 12:00:26 2007 From: Joris.DeRidder at ster.kuleuven.be (Joris De Ridder) Date: Wed, 25 Jul 2007 18:00:26 +0200 Subject: [SciPy-user] array dtype... In-Reply-To: <46A7552A.1090402@gmail.com> References: <46A7552A.1090402@gmail.com> Message-ID: > I googled, browsed scipy.org, but did not find anything about this > issue. > > For instance, I would like to know if there is an equivalent "in one > character" to the uint8 data type. Surf to the Numpy Example List: http://www.scipy.org/Numpy_Example_List and look under the topic "dtype". Cheers, J. From gael.varoquaux at normalesup.org Wed Jul 25 12:08:34 2007 From: gael.varoquaux at normalesup.org (Gael Varoquaux) Date: Wed, 25 Jul 2007 18:08:34 +0200 Subject: [SciPy-user] fitting mixed gaussians In-Reply-To: References: <20070725155132.GD28080@clipper.ens.fr> Message-ID: <20070725160834.GE28080@clipper.ens.fr> On Wed, Jul 25, 2007 at 05:58:50PM +0200, Emanuele Zattin wrote: > The gaussian I am interested is indeed at the center of the images, > but very often more maxima are present at the boundaries so i try to > fit more gaussians. I am aware of the cookbook page... it's really > interesting and it helped me a lot in the first steps. On the other > side a momentum approach is not as easy when more gaussians are > present. Neither is the fitting. Good luck with this problem, and keep me posted, I am interested in a good solution. Ga?l From fredmfp at gmail.com Wed Jul 25 12:09:51 2007 From: fredmfp at gmail.com (fred) Date: Wed, 25 Jul 2007 18:09:51 +0200 Subject: [SciPy-user] array dtype... In-Reply-To: References: <46A7552A.1090402@gmail.com> Message-ID: <46A775CF.6080304@gmail.com> Joris De Ridder a ?crit : >> I googled, browsed scipy.org, but did not find anything about this >> issue. >> >> For instance, I would like to know if there is an equivalent "in one >> character" to the uint8 data type. >> > > Surf to the Numpy Example List: http://www.scipy.org/Numpy_Example_List > and look under the topic "dtype". > Great too ;-) Bookmarked. (just a pity that google did not find it, or I'm an idiot ;-) Thanks. -- http://scipy.org/FredericPetit From stefan at sun.ac.za Wed Jul 25 13:34:42 2007 From: stefan at sun.ac.za (Stefan van der Walt) Date: Wed, 25 Jul 2007 19:34:42 +0200 Subject: [SciPy-user] reading .mat-files (Matlab 7) In-Reply-To: References: <20070725135731.GJ8728@mentat.za.net> Message-ID: <20070725173442.GB5361@mentat.za.net> Hi Rob On Wed, Jul 25, 2007 at 11:05:28AM -0400, Rob Clewley wrote: > scipy.io.loadmat from scipy 0.5.2 doesn't work on anything but v4 > files for me. I generated extremely simple mat files (one small matrix > in 'test.mat') with my matlab 7.3 using the -v6, -v5, and -v4 options, > and scipy complained with this in all but the -v4 case: Matthew made a number of changes since v0.5.2, so you may need to upgrade. He included test data files from Matlab 4 through 7.1, all which are loaded as part of the automated unit test suite. If you send me your file, I'd be glad to check that it loads under the latest version. Regards St?fan From stefan at sun.ac.za Wed Jul 25 13:43:06 2007 From: stefan at sun.ac.za (Stefan van der Walt) Date: Wed, 25 Jul 2007 19:43:06 +0200 Subject: [SciPy-user] fitting mixed gaussians In-Reply-To: <20070725160834.GE28080@clipper.ens.fr> References: <20070725155132.GD28080@clipper.ens.fr> <20070725160834.GE28080@clipper.ens.fr> Message-ID: <20070725174306.GC5361@mentat.za.net> On Wed, Jul 25, 2007 at 06:08:34PM +0200, Gael Varoquaux wrote: > On Wed, Jul 25, 2007 at 05:58:50PM +0200, Emanuele Zattin wrote: > > The gaussian I am interested is indeed at the center of the images, > > but very often more maxima are present at the boundaries so i try to > > fit more gaussians. I am aware of the cookbook page... it's really > > interesting and it helped me a lot in the first steps. On the other > > side a momentum approach is not as easy when more gaussians are > > present. > > Neither is the fitting. Sorry, I misunderstood your application. You don't want to use the images as features, but want to identify features *in* the image. Since your model is fitting so badly, you may want to consider another model/method. Since the images are only 5x5, you can use routines available in scipy to do a bi-polynomial or higher order surface fit. The maximum turning point of the polynomial then indicates your feature centre. Regards St?fan From oliver.tomic at matforsk.no Wed Jul 25 15:25:36 2007 From: oliver.tomic at matforsk.no (oliver.tomic at matforsk.no) Date: Wed, 25 Jul 2007 21:25:36 +0200 Subject: [SciPy-user] reading .mat-files (Matlab 7) In-Reply-To: Message-ID: Rob and Stefan, the problem below described by Rob is exactly what I have experienced. I get the same error. I use scipy 0.5.2 and numpy 1.0.3. Is there a newer version of scipy than 0.5.2 or do I have to use the svn? Here is a file that failed to load with scipy.io: (See attached file: brod.mat) It was created with Matlab 7.3 with backward compatibility to (-v6). Cheers Oliver scipy-user-bounces at scipy.org wrote on 25.07.2007 17:05:28: > Stefan, > > scipy.io.loadmat from scipy 0.5.2 doesn't work on anything but v4 > files for me. I generated extremely simple mat files (one small matrix > in 'test.mat') with my matlab 7.3 using the -v6, -v5, and -v4 options, > and scipy complained with this in all but the -v4 case: > > In [1]: import scipy.io as io > > In [2]: io.loadmat('test') > --------------------------------------------------------------------------- > exceptions.AttributeError Traceback (most > recent call last) > > c:\temp\ > > C:\Python24\lib\site-packages\scipy\io\mio.py in loadmat(file_name, > mdict, appen > dmat, basename, **kwargs) > 94 ''' > 95 MR = mat_reader_factory(file_name, appendmat, **kwargs) > ---> 96 matfile_dict = MR.get_variables() > 97 if mdict is not None: > 98 mdict.update(matfile_dict) > > C:\Python24\lib\site-packages\scipy\io\miobase.py in > get_variables(self, variable_names) > 267 variable_names = [variable_names] > 268 self.mat_stream.seek(0) > --> 269 mdict = self.file_header() > 270 mdict['__globals__'] = [] > 271 while not self.end_of_stream(): > > C:\Python24\lib\site-packages\scipy\io\mio5.py in file_header(self) > 508 hdict = {} > 509 hdr = self.read_dtype(self.dtypes['file_header']) > --> 510 hdict['__header__'] = hdr['description'].strip(' \t\n\000') > 511 v_major = hdr['version'] >> 8 > 512 v_minor = hdr['version'] & 0xFF > > AttributeError: 'numpy.ndarray' object has no attribute 'strip' > > > This is with numpy 1.0.2. I wonder if this is the problem that Oliver has? > > -Rob > > On 25/07/07, Stefan van der Walt wrote: > > Hi Oliver > > > > On Wed, Jul 25, 2007 at 01:06:18PM +0200, oliver.tomic at matforsk.no wrote: > > > Is there now support in scipy.io (scipy 0.52) for reading .mat-files from > > > Matlab 7? I undestand that it supports older versions (v4 and v5). Are > > > there any plans to support for Matlab 7 .mat-files? > > > > >From the docstring: > > > > "v4 (Level 1.0), v6 and v7.1 matfiles are supported." > > > > Cheers > > St?fan > > _______________________________________________ > > SciPy-user mailing list > > SciPy-user at scipy.org > > http://projects.scipy.org/mailman/listinfo/scipy-user > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user -------------- next part -------------- A non-text attachment was scrubbed... Name: brod.mat Type: application/octet-stream Size: 8656 bytes Desc: not available URL: From nwagner at iam.uni-stuttgart.de Wed Jul 25 15:30:55 2007 From: nwagner at iam.uni-stuttgart.de (Nils Wagner) Date: Wed, 25 Jul 2007 21:30:55 +0200 Subject: [SciPy-user] reading .mat-files (Matlab 7) In-Reply-To: References: Message-ID: On Wed, 25 Jul 2007 21:25:36 +0200 oliver.tomic at matforsk.no wrote: > > Rob and Stefan, > > the problem below described by Rob is exactly what I >have experienced. I > get the same error. I use scipy 0.5.2 and numpy 1.0.3. > > Is there a newer version of scipy than 0.5.2 or do I >have to use the svn? > > Here is a file that failed to load with scipy.io: > (See attached file: brod.mat) > It was created with Matlab 7.3 with backward >compatibility to (-v6). > > Cheers > Oliver > > > > scipy-user-bounces at scipy.org wrote on 25.07.2007 >17:05:28: > >> Stefan, >> >> scipy.io.loadmat from scipy 0.5.2 doesn't work on >>anything but v4 >> files for me. I generated extremely simple mat files >>(one small matrix >> in 'test.mat') with my matlab 7.3 using the -v6, -v5, >>and -v4 options, >> and scipy complained with this in all but the -v4 case: >> >> In [1]: import scipy.io as io >> >> In [2]: io.loadmat('test') >> > --------------------------------------------------------------------------- >> exceptions.AttributeError >> Traceback (most >> recent call last) >> >> c:\temp\ >> >> C:\Python24\lib\site-packages\scipy\io\mio.py in >>loadmat(file_name, >> mdict, appen >> dmat, basename, **kwargs) >> 94 ''' >> 95 MR = mat_reader_factory(file_name, >>appendmat, **kwargs) >> ---> 96 matfile_dict = MR.get_variables() >> 97 if mdict is not None: >> 98 mdict.update(matfile_dict) >> >> C:\Python24\lib\site-packages\scipy\io\miobase.py in >> get_variables(self, variable_names) >> 267 variable_names = [variable_names] >> 268 self.mat_stream.seek(0) >> --> 269 mdict = self.file_header() >> 270 mdict['__globals__'] = [] >> 271 while not self.end_of_stream(): >> >> C:\Python24\lib\site-packages\scipy\io\mio5.py in >>file_header(self) >> 508 hdict = {} >> 509 hdr = >>self.read_dtype(self.dtypes['file_header']) >> --> 510 hdict['__header__'] = >>hdr['description'].strip(' > \t\n\000') >> 511 v_major = hdr['version'] >> 8 >> 512 v_minor = hdr['version'] & 0xFF >> >> AttributeError: 'numpy.ndarray' object has no attribute >>'strip' >> >> >> This is with numpy 1.0.2. I wonder if this is the >>problem that Oliver > has? >> >> -Rob >> >> On 25/07/07, Stefan van der Walt >>wrote: >> > Hi Oliver >> > >> > On Wed, Jul 25, 2007 at 01:06:18PM +0200, >>oliver.tomic at matforsk.no > wrote: >> > > Is there now support in scipy.io (scipy 0.52) for >>reading .mat-files > from >> > > Matlab 7? I undestand that it supports older >>versions (v4 and v5). > Are >> > > there any plans to support for Matlab 7 .mat-files? >> > >> > >From the docstring: >> > >> > "v4 (Level 1.0), v6 and v7.1 matfiles are supported." >> > >> > Cheers >> > St?fan >> > _______________________________________________ >> > SciPy-user mailing list >> > SciPy-user at scipy.org >> > http://projects.scipy.org/mailman/listinfo/scipy-user >> > >> _______________________________________________ >> SciPy-user mailing list >> SciPy-user at scipy.org >> http://projects.scipy.org/mailman/listinfo/scipy-user No problem with the svn version. It's time for a new release ... >>> from scipy import * >>> io.loadmat('brod.mat') {'Brod': array([[ 1. , 1. , 1. , ..., 1. , 5.6, 4.7], [ 1. , 1. , 2. , ..., 1. , 5.1, 4.1], [ 1. , 2. , 1. , ..., 4.4, 4.8, 3.7], ..., [ 12. , 6. , 2. , ..., 1.8, 2.8, 4.2], [ 12. , 7. , 1. , ..., 2. , 4.9, 4.4], [ 12. , 7. , 2. , ..., 1.3, 5.2, 3.9]]), '__version__': '1.0', '__header__': 'MATLAB 5.0 MAT-file, Platform: PCWIN, Created on: Wed Jul 25 21:21:07 2007', '__globals__': []} Nils From oliver.tomic at matforsk.no Wed Jul 25 15:49:52 2007 From: oliver.tomic at matforsk.no (oliver.tomic at matforsk.no) Date: Wed, 25 Jul 2007 21:49:52 +0200 Subject: [SciPy-user] reading .mat-files (Matlab 7) In-Reply-To: Message-ID: Nils, Stefan and Rob, thank you for your help. scipy-user-bounces at scipy.org wrote on 25.07.2007 21:30:55: > > No problem with the svn version. It's time for a new > release ... Yes, it would be great to see a new release soon. The 0.5.2-release may be a bit seasoned after 8 months. > > >>> from scipy import * > >>> io.loadmat('brod.mat') > {'Brod': array([[ 1. , 1. , 1. , ..., 1. , 5.6, > 4.7], > [ 1. , 1. , 2. , ..., 1. , 5.1, 4.1], > [ 1. , 2. , 1. , ..., 4.4, 4.8, 3.7], > ..., > [ 12. , 6. , 2. , ..., 1.8, 2.8, 4.2], > [ 12. , 7. , 1. , ..., 2. , 4.9, 4.4], > [ 12. , 7. , 2. , ..., 1.3, 5.2, 3.9]]), > '__version__': '1.0', '__header__': 'MATLAB 5.0 MAT-file, > Platform: PCWIN, Created on: Wed Jul 25 21:21:07 2007', > '__globals__': []} > > Nils > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user Cheers Oliver From s.mientki at ru.nl Wed Jul 25 17:05:15 2007 From: s.mientki at ru.nl (Stef Mientki) Date: Wed, 25 Jul 2007 23:05:15 +0200 Subject: [SciPy-user] reading .mat-files (Matlab 7) In-Reply-To: References: Message-ID: <46A7BB0B.3060709@ru.nl> > No problem with the svn version. It's time for a new > release ... > > this would be very welcome, ... ... I don't understand svn ... I didn't even knew there was a "loadmat" I translated my scripts by hand :-( I think it would be very nice for those who consider switching from MatLab, that the first line they read is "and there is a M-file conversion tool". When I was looking for something different from MatLab, I found 2 candidates: SciPy and SciLab. Scipy had the advantage of better embedding (SciLab was just beginning), which was important for me (but not for most people coming from MatLab). SciLab had the advantage of a good M-file converter (I couldn't find it in SciPy), which is important for most people coming from MatLab. btw: I'm still very interesting in the "good" MatLab converter, (where and how to install ) because it gives me more arguments to convice my colleagues. cheers, Stef Mientki From david at ar.media.kyoto-u.ac.jp Wed Jul 25 22:11:07 2007 From: david at ar.media.kyoto-u.ac.jp (David Cournapeau) Date: Thu, 26 Jul 2007 11:11:07 +0900 Subject: [SciPy-user] fitting mixed gaussians In-Reply-To: References: Message-ID: <46A802BB.8000707@ar.media.kyoto-u.ac.jp> Emanuele Zattin wrote: > Hello, > i'm trying to perform mixed-gaussian fitting on some small greyscale > images (5x5 pixels, maximum 9x9). right now i'm using a leastsq > approach but it tends to get pretty slow and unreliable when it comes > to fit 4-5 2D gaussians even in such a small domain. > I've noticed PyEM and i have the feeling it might be useful for me, > but here i'm dealing with pixel intensities, not distributions. Any > hint is welcome! > > If I understand your problem well, you have one image and wants to fit one, possibly several Gaussian on it. pyem won't help you for that, or more exactly, would be both overkill and gives really poor performances (even for only one gaussian, if it is not centered, with a few tens samples, it would be pretty bad, I think). David From david at ar.media.kyoto-u.ac.jp Wed Jul 25 22:19:27 2007 From: david at ar.media.kyoto-u.ac.jp (David Cournapeau) Date: Thu, 26 Jul 2007 11:19:27 +0900 Subject: [SciPy-user] reading .mat-files (Matlab 7) In-Reply-To: <46A7BB0B.3060709@ru.nl> References: <46A7BB0B.3060709@ru.nl> Message-ID: <46A804AF.3020504@ar.media.kyoto-u.ac.jp> Stef Mientki wrote: >> No problem with the svn version. It's time for a new >> release ... >> >> > this would be very welcome, ... > ... I don't understand svn > ... I didn't even knew there was a "loadmat" > I translated my scripts by hand :-( > > I think it would be very nice for those who consider switching from MatLab, > that the first line they read is "and there is a M-file conversion tool". I have the feeling that there is a confusion between mat files and m scripts. mat files are just a file format used by matlab to store data. m scripts are matlab code, which scipy has no way to understand. There is no such thing as a scipy function which loads a matlab script and converts it to scipy. This would be impossible, or at least extremely difficult, since matlab and python are different languages with different semantics. Scilab (and octave) were created as programming environments with an explicit support for matlab syntax and semantics. scipy is a framework for scientific computing in python. This may be seen as a weakness if you are coming from matlab, but for me, this is the whole point, since I consider matlab as a pretty bad environment for scientific computing. If you want to be able to use matlab scripts with minimum fuss, I strongly advise you not to use scipy. If you are willing to spend time to convert them, to benefit from the advantages of scipy (a real programming language with advanced features, a full C Api), then use scipy. David From prabhu at aero.iitb.ac.in Tue Jul 24 17:25:37 2007 From: prabhu at aero.iitb.ac.in (Prabhu Ramachandran) Date: Wed, 25 Jul 2007 02:55:37 +0530 Subject: [SciPy-user] BoF on 3D visualization Message-ID: <18086.28241.432931.478493@gargle.gargle.HOWL> Hello, Gael Varoquaux and myself are planning on holding a "Pythonic 3D visualization" BoF at SciPy07 on Thursday evening. We'd like to know if any of you would be interested in this. If you are, please do let us know. Please also let us know if you have anything in particular you'd like to discuss. Thanks. Cheers, -- Prabhu Ramachandran http://www.aero.iitb.ac.in/~prabhu From fperez.net at gmail.com Thu Jul 26 01:22:15 2007 From: fperez.net at gmail.com (Fernando Perez) Date: Wed, 25 Jul 2007 23:22:15 -0600 Subject: [SciPy-user] BoF on 3D visualization In-Reply-To: <18086.28241.432931.478493@gargle.gargle.HOWL> References: <18086.28241.432931.478493@gargle.gargle.HOWL> Message-ID: On 7/24/07, Prabhu Ramachandran wrote: > Hello, > > Gael Varoquaux and myself are planning on holding a "Pythonic 3D > visualization" BoF at SciPy07 on Thursday evening. We'd like to know > if any of you would be interested in this. If you are, please do let > us know. Please also let us know if you have anything in particular > you'd like to discuss. Count me in. Cheers, f From s.mientki at ru.nl Thu Jul 26 04:33:52 2007 From: s.mientki at ru.nl (Stef Mientki) Date: Thu, 26 Jul 2007 10:33:52 +0200 Subject: [SciPy-user] reading .mat-files (Matlab 7) In-Reply-To: <46A804AF.3020504@ar.media.kyoto-u.ac.jp> References: <46A7BB0B.3060709@ru.nl> <46A804AF.3020504@ar.media.kyoto-u.ac.jp> Message-ID: <46A85C70.9020506@ru.nl> >>> >>> >> this would be very welcome, ... >> ... I don't understand svn >> ... I didn't even knew there was a "loadmat" >> I translated my scripts by hand :-( >> >> I think it would be very nice for those who consider switching from MatLab, >> that the first line they read is "and there is a M-file conversion tool". >> > I have the feeling that there is a confusion between mat files and m > scripts. mat files are just a file format used by matlab to store data. > m scripts are matlab code, which scipy has no way to understand. > thanks David, you're completely right, that was the mis-understanding. So happily the manual translation wasn't a waste of time after all ;-) cheers, Stef Mientki From nwagner at iam.uni-stuttgart.de Thu Jul 26 06:58:03 2007 From: nwagner at iam.uni-stuttgart.de (Nils Wagner) Date: Thu, 26 Jul 2007 12:58:03 +0200 Subject: [SciPy-user] argmin and optimization Message-ID: <46A87E3B.6020206@iam.uni-stuttgart.de> Hi all, I would like to implement an algorithm described by Golub and Liao. Get the source from here: http://citeseer.ist.psu.edu/638954.html The central question is the following. How do I implement the operator P_\Omega(\cdot) in scipy ? The definition is as follows (\LaTex notation) P_\Omega(y) = \textrm{argmin}\limits_{x \in \Omega} \|x-y\|_2 \forall \, y \in \mathds{R}^n \Omega = \{ x \in \mathds{R}^n | \le 1 \}. I have attached a short script which implements the rest of the algorithm. Any pointer how to implement P_\Omega(y) in scipy would be appreciated. Thanks in advance Nils From nwagner at iam.uni-stuttgart.de Thu Jul 26 07:02:18 2007 From: nwagner at iam.uni-stuttgart.de (Nils Wagner) Date: Thu, 26 Jul 2007 13:02:18 +0200 Subject: [SciPy-user] argmin and optimization Message-ID: <46A87F3A.9040900@iam.uni-stuttgart.de> I missed out the attachment. Nils -------------- next part -------------- A non-text attachment was scrubbed... Name: test_golub.py Type: text/x-python Size: 1036 bytes Desc: not available URL: From openopt at ukr.net Thu Jul 26 07:21:21 2007 From: openopt at ukr.net (dmitrey) Date: Thu, 26 Jul 2007 14:21:21 +0300 Subject: [SciPy-user] argmin and optimization In-Reply-To: <46A87F3A.9040900@iam.uni-stuttgart.de> References: <46A87F3A.9040900@iam.uni-stuttgart.de> Message-ID: <46A883B1.3090302@ukr.net> So your Omega is just all x: (x,x)<1? (Can you attach non-Latex notation elseware?) Why can't you just set P_Omega(y) = { y, for ||y|| <=1 y/||y||, for ||y|| > 1 } ? Regards, D. From nwagner at iam.uni-stuttgart.de Thu Jul 26 07:29:44 2007 From: nwagner at iam.uni-stuttgart.de (Nils Wagner) Date: Thu, 26 Jul 2007 13:29:44 +0200 Subject: [SciPy-user] argmin and optimization In-Reply-To: <46A883B1.3090302@ukr.net> References: <46A87F3A.9040900@iam.uni-stuttgart.de> <46A883B1.3090302@ukr.net> Message-ID: <46A885A8.5010400@iam.uni-stuttgart.de> dmitrey wrote: > So your Omega is just all x: (x,x)<1? > (x,x) <= 1 ("closed ball constraint") > (Can you attach non-Latex notation elseware?) > I can't see what you mean here. > Why can't you just set P_Omega(y) = { > y, for ||y|| <=1 > y/||y||, for ||y|| > 1 > } > ? > I don't see your point. Nils From openopt at ukr.net Thu Jul 26 07:49:02 2007 From: openopt at ukr.net (dmitrey) Date: Thu, 26 Jul 2007 14:49:02 +0300 Subject: [SciPy-user] argmin and optimization In-Reply-To: <46A885A8.5010400@iam.uni-stuttgart.de> References: <46A87F3A.9040900@iam.uni-stuttgart.de> <46A883B1.3090302@ukr.net> <46A885A8.5010400@iam.uni-stuttgart.de> Message-ID: <46A88A2E.8070406@ukr.net> Nils Wagner wrote: > dmitrey wrote: > >> So your Omega is just all x: (x,x)<1? >> >> > (x,x) <= 1 ("closed ball constraint") > > >> (Can you attach non-Latex notation elseware?) >> >> > I can't see what you mean here. > I meant couldn't you describe what does Omega and P_Omega mean w/o Latex? And/or describe howto see Latex strings in Linux? >> Why can't you just set P_Omega(y) = { >> y, for ||y|| <=1 >> y/||y||, for ||y|| > 1 >> } >> ? >> >> > I don't see your point. > > Nils > I meant is this true that the func P_Omega will yield the result you intend? from numpy.linalg import norm def P_Omega(y): n_y = norm(y) if n_y <= 1: return y else: return y/ny HTH, D > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > > > > From nwagner at iam.uni-stuttgart.de Thu Jul 26 08:05:51 2007 From: nwagner at iam.uni-stuttgart.de (Nils Wagner) Date: Thu, 26 Jul 2007 14:05:51 +0200 Subject: [SciPy-user] argmin and optimization In-Reply-To: <46A88A2E.8070406@ukr.net> References: <46A87F3A.9040900@iam.uni-stuttgart.de> <46A883B1.3090302@ukr.net> <46A885A8.5010400@iam.uni-stuttgart.de> <46A88A2E.8070406@ukr.net> Message-ID: <46A88E1F.5070103@iam.uni-stuttgart.de> dmitrey wrote: > Nils Wagner wrote: > >> dmitrey wrote: >> >> >>> So your Omega is just all x: (x,x)<1? >>> >>> >>> >> (x,x) <= 1 ("closed ball constraint") >> >> >> >>> (Can you attach non-Latex notation elseware?) >>> >>> >>> >> I can't see what you mean here. >> >> > I meant couldn't you describe what does Omega and P_Omega mean w/o Latex? > And/or describe howto see Latex strings in Linux? > >>> Why can't you just set P_Omega(y) = { >>> y, for ||y|| <=1 >>> y/||y||, for ||y|| > 1 >>> } >>> ? >>> >>> >>> >> I don't see your point. >> >> Nils >> >> > I meant is this true that the func P_Omega will yield the result you intend? > from numpy.linalg import norm > def P_Omega(y): > n_y = norm(y) > if n_y <= 1: return y > else: return y/ny > HTH, D > >> >> _______________________________________________ >> SciPy-user mailing list >> SciPy-user at scipy.org >> http://projects.scipy.org/mailman/listinfo/scipy-user >> >> >> >> >> > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > Dmitrey, Thank you very much for your help. It works fine for me. I have attached the script for the sake of completeness. Cheers, Nils -------------- next part -------------- A non-text attachment was scrubbed... Name: test_golub.py Type: text/x-python Size: 1151 bytes Desc: not available URL: From openopt at ukr.net Thu Jul 26 08:12:00 2007 From: openopt at ukr.net (dmitrey) Date: Thu, 26 Jul 2007 15:12:00 +0300 Subject: [SciPy-user] argmin and optimization In-Reply-To: <46A88E1F.5070103@iam.uni-stuttgart.de> References: <46A87F3A.9040900@iam.uni-stuttgart.de> <46A883B1.3090302@ukr.net> <46A885A8.5010400@iam.uni-stuttgart.de> <46A88A2E.8070406@ukr.net> <46A88E1F.5070103@iam.uni-stuttgart.de> Message-ID: <46A88F90.2050803@ukr.net> if you use python 2.5 you can use more short: def P_Omega(y): from numpy.linalg import norm n_y = norm(y) return y if n_y <= 1 else y/n_y HTH, D. Nils Wagner wrote: > dmitrey wrote: > >> Nils Wagner wrote: >> >> >>> dmitrey wrote: >>> >>> >>> >>>> So your Omega is just all x: (x,x)<1? >>>> >>>> >>>> >>>> >>> (x,x) <= 1 ("closed ball constraint") >>> >>> >>> >>> >>>> (Can you attach non-Latex notation elseware?) >>>> >>>> >>>> >>>> >>> I can't see what you mean here. >>> >>> >>> >> I meant couldn't you describe what does Omega and P_Omega mean w/o Latex? >> And/or describe howto see Latex strings in Linux? >> >> >>>> Why can't you just set P_Omega(y) = { >>>> y, for ||y|| <=1 >>>> y/||y||, for ||y|| > 1 >>>> } >>>> ? >>>> >>>> >>>> >>>> >>> I don't see your point. >>> >>> Nils >>> >>> >>> >> I meant is this true that the func P_Omega will yield the result you intend? >> from numpy.linalg import norm >> def P_Omega(y): >> n_y = norm(y) >> if n_y <= 1: return y >> else: return y/ny >> HTH, D >> >> >>> >>> _______________________________________________ >>> SciPy-user mailing list >>> SciPy-user at scipy.org >>> http://projects.scipy.org/mailman/listinfo/scipy-user >>> >>> >>> >>> >>> >>> >> _______________________________________________ >> SciPy-user mailing list >> SciPy-user at scipy.org >> http://projects.scipy.org/mailman/listinfo/scipy-user >> >> > Dmitrey, > > Thank you very much for your help. It works fine for me. > I have attached the script for the sake of completeness. > > Cheers, > Nils > > > ------------------------------------------------------------------------ > > from scipy import * > from pylab import plot, show > # > # Gene H. Golub and Li-Zhi Liao > # Continous methods for extreme and interior eigenvalue problems > # Linear Algebra and its Applications Vol. 415 (2006) pp. 31-51 > # > def merit(x): > """ Merit function equation (3.1) """ > return dot(x,dot(A,x))-c*dot(x,x) > > def meritp(x): > """ Gradient of the merit function """ > return 2*dot(A,x)-2*c*x > > def P(y): > """ Projection onto \Omega defined as > P_\Omega(y) = \argmin\limits_{x \in \Omega} \|x-y\|_2 """ > n_y = linalg.norm(y) > if n_y <=1: return y > else: return y/n_y > > def dyn(x,t): > """ Dynamical system equation (3.2) """ > tmp = zeros(n,float) > tmp = -(x-P(x-meritp(x))) > return tmp > > n = 6 > L = diag(r_[array(([-2.,-0.2])),zeros(2),ones(n-4)]) # Example 1 p. 46 > B = rand(n,n) > Q,R = linalg.qr(B) > A = dot(Q.T,dot(L,Q)) > A = 0.5*(A+A.T) > c = linalg.norm(A,1)+1. # default value in our numerical computation > print c > > x_0 =-ones(n) # Starting point > T = linspace(0.,30.,100) > x = integrate.odeint(dyn,x_0,T) > plot(T,x[:,0],T,x[:,1],T,x[:,2],T,x[:,3],T,x[:,4],T,x[:,5]) > print dot(x[-1,:],dot(A,x[-1,:])),dot(x[-1,:],x[-1,:]) > show() > > ------------------------------------------------------------------------ > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > From aisaac at american.edu Thu Jul 26 08:18:53 2007 From: aisaac at american.edu (Alan G Isaac) Date: Thu, 26 Jul 2007 08:18:53 -0400 Subject: [SciPy-user] argmin and optimization In-Reply-To: <46A87E3B.6020206@iam.uni-stuttgart.de> References: <46A87E3B.6020206@iam.uni-stuttgart.de> Message-ID: On Thu, 26 Jul 2007, Nils Wagner apparently wrote: > I would like to implement an algorithm described by Golub and Liao. > Get the source from here: http://citeseer.ist.psu.edu/638954.html > The central question is the following. How do I implement the operator > P_\Omega(\cdot) in scipy ? > The definition is as follows (\LaTex notation) > P_\Omega(y) = \textrm{argmin}\limits_{x \in \Omega} \|x-y\|_2 \forall \, > y \in \mathds{R}^n > \Omega = \{ x \in \mathds{R}^n | \le 1 \}. It looks like you are saying: get as close to y as possible without leaving the unit sphere. Is that right? This is just y if y is in the unit sphere and it is y normalized to unit length if y is outside the unit sphere. Please post the code when you finish the algorithm. Cheers, Alan Isaac From massimo.sandal at unibo.it Thu Jul 26 08:40:20 2007 From: massimo.sandal at unibo.it (massimo sandal) Date: Thu, 26 Jul 2007 14:40:20 +0200 Subject: [SciPy-user] reading .mat-files (Matlab 7) In-Reply-To: <46A7BB0B.3060709@ru.nl> References: <46A7BB0B.3060709@ru.nl> Message-ID: <46A89634.20206@unibo.it> Stef Mientki ha scritto: > this would be very welcome, ... > ... I don't understand svn I've never used it for scipy, but SVN (SubVersion) for an end user that wants the latest-and-greatest is pretty easy to use. Just: - install svn on your computer - at a console, type "svn checkout http://url-of-svn-server-you-want" and you'll obtain a directory with the (usually installable) source code you need. Then (if everything's been done right) just install like you would install a tarball. m. -- Massimo Sandal University of Bologna Department of Biochemistry "G.Moruzzi" snail mail: Via Irnerio 48, 40126 Bologna, Italy email: massimo.sandal at unibo.it tel: +39-051-2094388 fax: +39-051-2094387 -------------- next part -------------- A non-text attachment was scrubbed... Name: massimo.sandal.vcf Type: text/x-vcard Size: 274 bytes Desc: not available URL: From nwagner at iam.uni-stuttgart.de Thu Jul 26 08:37:25 2007 From: nwagner at iam.uni-stuttgart.de (Nils Wagner) Date: Thu, 26 Jul 2007 14:37:25 +0200 Subject: [SciPy-user] argmin and optimization In-Reply-To: References: <46A87E3B.6020206@iam.uni-stuttgart.de> Message-ID: <46A89585.80506@iam.uni-stuttgart.de> Alan G Isaac wrote: > On Thu, 26 Jul 2007, Nils Wagner apparently wrote: > >> I would like to implement an algorithm described by Golub and Liao. >> Get the source from here: http://citeseer.ist.psu.edu/638954.html >> > > >> The central question is the following. How do I implement the operator >> P_\Omega(\cdot) in scipy ? >> > > >> The definition is as follows (\LaTex notation) >> > > >> P_\Omega(y) = \textrm{argmin}\limits_{x \in \Omega} \|x-y\|_2 \forall \, >> y \in \mathds{R}^n >> > > >> \Omega = \{ x \in \mathds{R}^n | \le 1 \}. >> > > > It looks like you are saying: > get as close to y as possible without leaving the unit > sphere. Is that right? This is just y if y is in the > unit sphere and it is y normalized to unit length if > y is outside the unit sphere. > > Please post the code when you finish the algorithm. > > Cheers, > Alan Isaac > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > Alan, Your explanation is right. I have submitted the script in my previous email. Cheers, Nils From s.mientki at mailbox.kun.nl Thu Jul 26 09:39:59 2007 From: s.mientki at mailbox.kun.nl (stef mientki) Date: Thu, 26 Jul 2007 15:39:59 +0200 Subject: [SciPy-user] reading .mat-files (Matlab 7) In-Reply-To: <46A89634.20206@unibo.it> References: <46A7BB0B.3060709@ru.nl> <46A89634.20206@unibo.it> Message-ID: <46A8A42F.5050002@gmail.com> massimo sandal wrote: > Stef Mientki ha scritto: > >> this would be very welcome, ... >> ... I don't understand svn > > I've never used it for scipy, but SVN (SubVersion) for an end user > that wants the latest-and-greatest is pretty easy to use. Just: > - install svn on your computer > - at a console, type "svn checkout http://url-of-svn-server-you-want" > and you'll obtain a directory with the (usually installable) source > code you need. > > Then (if everything's been done right) just install like you would > install a tarball. thanks Massimo, but I'm just a computer user, so do you really think I know what a tarball is ;-) cheers, Stef > > m. > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > From massimo.sandal at unibo.it Thu Jul 26 09:45:54 2007 From: massimo.sandal at unibo.it (massimo sandal) Date: Thu, 26 Jul 2007 15:45:54 +0200 Subject: [SciPy-user] reading .mat-files (Matlab 7) In-Reply-To: <46A8A42F.5050002@gmail.com> References: <46A7BB0B.3060709@ru.nl> <46A89634.20206@unibo.it> <46A8A42F.5050002@gmail.com> Message-ID: <46A8A592.3010701@unibo.it> stef mientki ha scritto: >> Then (if everything's been done right) just install like you would >> install a tarball. > thanks Massimo, > but I'm just a computer user, > so do you really think I know what a tarball is ;-) Sorry, I'm always assuming everyone here's using Linux/Unix. :) However you're also a developer, otherwise what would you do on a scientific programming library mailing list? Don't hide from your responsibilities! :P m. -- Massimo Sandal University of Bologna Department of Biochemistry "G.Moruzzi" snail mail: Via Irnerio 48, 40126 Bologna, Italy email: massimo.sandal at unibo.it tel: +39-051-2094388 fax: +39-051-2094387 -------------- next part -------------- A non-text attachment was scrubbed... Name: massimo.sandal.vcf Type: text/x-vcard Size: 274 bytes Desc: not available URL: From david at ar.media.kyoto-u.ac.jp Thu Jul 26 09:37:48 2007 From: david at ar.media.kyoto-u.ac.jp (David Cournapeau) Date: Thu, 26 Jul 2007 22:37:48 +0900 Subject: [SciPy-user] reading .mat-files (Matlab 7) In-Reply-To: <46A8A42F.5050002@gmail.com> References: <46A7BB0B.3060709@ru.nl> <46A89634.20206@unibo.it> <46A8A42F.5050002@gmail.com> Message-ID: <46A8A3AC.5060405@ar.media.kyoto-u.ac.jp> stef mientki wrote: > massimo sandal wrote: > >> Stef Mientki ha scritto: >> >> >>> this would be very welcome, ... >>> ... I don't understand svn >>> >> I've never used it for scipy, but SVN (SubVersion) for an end user >> that wants the latest-and-greatest is pretty easy to use. Just: >> - install svn on your computer >> - at a console, type "svn checkout http://url-of-svn-server-you-want" >> and you'll obtain a directory with the (usually installable) source >> code you need. >> >> Then (if everything's been done right) just install like you would >> install a tarball. >> > thanks Massimo, > but I'm just a computer user, > so do you really think I know what a tarball is ;-) > > On windows, you can use TortoiseSVN, which is a graphical interface to subversion. Once you fetch the sources with it, installing scipy is exactly like installing from the official sources. David From jeff.lyon at cox.net Thu Jul 26 10:31:39 2007 From: jeff.lyon at cox.net (Jeff Lyon) Date: Thu, 26 Jul 2007 07:31:39 -0700 Subject: [SciPy-user] filtering without phase shift In-Reply-To: References: <1185261264.5678.9.camel@pc1.cole.uklinux.net> <46A5B74C.2060304@ru.nl> Message-ID: <00C8CDD1-F223-471D-87F2-DB1216611A6A@cox.net> Another way to filter your data is with an finite impulse response (FIR) filter. One of the nice properties of FIR filters is that they can have linear phase, or constant group delay. This means that all the frequencies in the filtered signal are delayed uniformly, and you can simply subtract out the delay. On Jul 25, 2007, at 8:36 AM, Anne Archibald wrote: > On 24/07/07, Stef Mientki wrote: >> >> >> Bryan Cole wrote: >>> The easiest way to do non-phase-shifted filtering is to use FFTs >>> i.e. >>> >>> FFT -> Low Pass -> iFFT >>> >>> The only reason to move to time-domain filters is if you must do >>> filtering in real-time where the complete dataset is (yet) >>> unknown and >>> you must obey the laws of causality. >>> >>> Using a frequency domain filter, you can have whatever cutoff you >>> like. >>> >> I'm a bit rusty, but isn't there a real danger by filtering in the >> frequency domain, >> creating a rectangle cutoff in the frequency domain, >> leads to an infinite ringing signal in the time-domain. > > There is a concern with ringing if you just use a brick-wall cutoff > (though often with an FFT you have so much frequency resolution the > ringing isn't actually a problem). The easiest way to do this is to > use a softer edge - there are standard filter shapes (Butterworth and > so on) which will minimize ringing, but any relatively smooth falloff > will help. > > It sounds like this is not quite your issue, but if what you need is a > filter that preserves peak height, Kalman filtering is what you need. > > Anne > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user From rmay at ou.edu Thu Jul 26 11:05:44 2007 From: rmay at ou.edu (Ryan May) Date: Thu, 26 Jul 2007 10:05:44 -0500 Subject: [SciPy-user] BoF on 3D visualization In-Reply-To: <18086.28241.432931.478493@gargle.gargle.HOWL> References: <18086.28241.432931.478493@gargle.gargle.HOWL> Message-ID: <46A8B848.2040000@ou.edu> Prabhu Ramachandran wrote: > Hello, > > Gael Varoquaux and myself are planning on holding a "Pythonic 3D > visualization" BoF at SciPy07 on Thursday evening. We'd like to know > if any of you would be interested in this. If you are, please do let > us know. Please also let us know if you have anything in particular > you'd like to discuss. > Count me in. Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma From s.mientki at mailbox.kun.nl Thu Jul 26 11:48:13 2007 From: s.mientki at mailbox.kun.nl (stef mientki) Date: Thu, 26 Jul 2007 17:48:13 +0200 Subject: [SciPy-user] reading .mat-files (Matlab 7) In-Reply-To: <46A8A592.3010701@unibo.it> References: <46A7BB0B.3060709@ru.nl> <46A89634.20206@unibo.it> <46A8A42F.5050002@gmail.com> <46A8A592.3010701@unibo.it> Message-ID: <46A8C23D.6000101@gmail.com> > > Sorry, I'm always assuming everyone here's using Linux/Unix. :) > > However you're also a developer, otherwise what would you do on a > scientific programming library mailing list? Don't hide from your > responsibilities! :P Well I already feel like a Don Quichotte, trying to introduce Python (Scipy) into an organization, as a replacement for MatLab and LabView. for the record compagny (university, 20,000 people, excluding students) : OS 100% Windows scientific computing 80% MatLab, 15% LabView, 5% other country OS 95% Windows, 4%Linux personal: I don't know anyone who is running Linux ;-) I think that's one of the differences between the "rich world" and the "poor world" cheers, Stef From Alexander.Dietz at astro.cf.ac.uk Thu Jul 26 12:15:25 2007 From: Alexander.Dietz at astro.cf.ac.uk (Alexander Dietz) Date: Thu, 26 Jul 2007 17:15:25 +0100 Subject: [SciPy-user] Question to functions Message-ID: <9cf809a00707260915i29520350gf8384f78f0ce6786@mail.gmail.com> Hi, I wanted to use a function to calculate the normal density (aka Gauss or Normal) by doing something like: y=scipy.???( x, m, s) with x representing my variable, m the mean of this Normal distribution and s the sigma value. I was looking now for 15 minutes in the numpy/scipy documentation, but all I found was a vast list of functions with scipy.special, but I did not found any function to just compute the normal probability. My question: in what package can I found this function with what name? If there are dozen of functions implemented in scipy I never heard of, then there must be the normal distribution as well. Cheers Alex -------------- next part -------------- An HTML attachment was scrubbed... URL: From robert.kern at gmail.com Thu Jul 26 14:47:11 2007 From: robert.kern at gmail.com (Robert Kern) Date: Thu, 26 Jul 2007 13:47:11 -0500 Subject: [SciPy-user] Question to functions In-Reply-To: <9cf809a00707260915i29520350gf8384f78f0ce6786@mail.gmail.com> References: <9cf809a00707260915i29520350gf8384f78f0ce6786@mail.gmail.com> Message-ID: <46A8EC2F.6020405@gmail.com> Alexander Dietz wrote: > Hi, > > I wanted to use a function to calculate the normal density (aka Gauss or > Normal) by doing something like: > > y=scipy.???( x, m, s) > > with x representing my variable, m the mean of this Normal distribution > and s the sigma value. I was looking now for 15 minutes in the > numpy/scipy documentation, but all I found was a vast list of functions > with scipy.special, but I did not found any function to just compute the > normal probability. > My question: in what package can I found this function with what name? > If there are dozen of functions implemented in scipy I never heard of, > then there must be the normal distribution as well. scipy.stats.norm.pdf(x, m, s) -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From Karl.Young at ucsf.edu Thu Jul 26 13:50:21 2007 From: Karl.Young at ucsf.edu (Karl Young) Date: Thu, 26 Jul 2007 10:50:21 -0700 Subject: [SciPy-user] BoF on 3D visualization In-Reply-To: <18086.28241.432931.478493@gargle.gargle.HOWL> References: <18086.28241.432931.478493@gargle.gargle.HOWL> Message-ID: <46A8DEDD.2060006@ucsf.edu> Prabhu Ramachandran wrote: >Hello, > >Gael Varoquaux and myself are planning on holding a "Pythonic 3D >visualization" BoF at SciPy07 on Thursday evening. We'd like to know >if any of you would be interested in this. If you are, please do let >us know. Please also let us know if you have anything in particular >you'd like to discuss. > >Thanks. > >Cheers, > > I'll definitely show; issues that come up in 3D visualization of neuroimages are tops on my list but I'm sure any discussion will be of interest (I'm a real novice re. 3D visualization so I'm not sure if I contribute a whole lot of interest) -- KY Karl Young Center for Imaging of Neurodegenerative Diseases, UCSF VA Medical Center (114M) Phone: (415) 221-4810 x3114 lab 4150 Clement Street FAX: (415) 668-2864 San Francisco, CA 94121 Email: karl young at ucsf edu From fredmfp at gmail.com Thu Jul 26 16:05:42 2007 From: fredmfp at gmail.com (fred) Date: Thu, 26 Jul 2007 22:05:42 +0200 Subject: [SciPy-user] using imread... Message-ID: <46A8FE96.40404@gmail.com> Hi all, I have to read some data got from a scan, ie data are printed on paper, then scanned. Before to begin, I want to test some stuff, of course, ie make some test on an image I know, and compare the results with the original. 1) I have a data (scipy array) that I know. 2) I create a png file from this array using matplotlib, mayavi, etc. 3) I read this png file with imread(). 4) This creates a scipy array I read and dump to a png file with matplotlib/mayavi, following the cookbook. Obviously, the png created in 2) and the png created in 4) are not the same. Scalar values of the png created in 4) ranges from 0 to 1, that's ok, but even rescaled, I don't get the same values as the original. So, what am I doing wrong ? Any pointer, url, are welcome. TIA. Cheers, -- http://scipy.org/FredericPetit From vaftrudner at gmail.com Thu Jul 26 16:41:29 2007 From: vaftrudner at gmail.com (Martin Blom) Date: Thu, 26 Jul 2007 15:41:29 -0500 Subject: [SciPy-user] Memory problems with stats.mannwhitneyu Message-ID: I need to do lots and lots of mannwhitneyu-tests and my programs keep running out of memory so something is wrong somewhere. When I run, for example, from scipy.stats import mannwhitneyu x = [2,4,8,3] y = [1,3,5,6] while True: u,p = mannwhitneyu(x,y) and run top to look at the memory used by python it just keeps increasing until I run out. Does anyone who understands the inner workings of the stats module know what's happening? Or is it that my little loop doesn't release memory in some way? I've been using mannwhitneyu for some time now, and I haven't noticed the problem until now, which might mean that I've had enough memory to get by until now or that there is a recent error, which seems unlikely when I look at the changelog. yours confusedly, Martin -------------- next part -------------- An HTML attachment was scrubbed... URL: From ctrachte at gmail.com Thu Jul 26 16:54:19 2007 From: ctrachte at gmail.com (Carl Trachte) Date: Thu, 26 Jul 2007 13:54:19 -0700 Subject: [SciPy-user] BoF on 3D visualization In-Reply-To: <46A8DEDD.2060006@ucsf.edu> References: <18086.28241.432931.478493@gargle.gargle.HOWL> <46A8DEDD.2060006@ucsf.edu> Message-ID: <426ada670707261354w216b195ctfa80ae3a334d11ad@mail.gmail.com> I am mostly ignorant with regard to the BoF subject, but I need to get smarter. I will attend. On 7/26/07, Karl Young wrote: > > Prabhu Ramachandran wrote: > > >Hello, > > > >Gael Varoquaux and myself are planning on holding a "Pythonic 3D > >visualization" BoF at SciPy07 on Thursday evening. We'd like to know > >if any of you would be interested in this. If you are, please do let > >us know. Please also let us know if you have anything in particular > >you'd like to discuss. > > > >Thanks. > > > >Cheers, > > > > > > I'll definitely show; issues that come up in 3D visualization of > neuroimages are tops on my list but I'm sure any discussion will be of > interest (I'm a real novice re. 3D visualization so I'm not sure if I > contribute a whole lot of interest) > > -- KY > > Karl Young > Center for Imaging of Neurodegenerative Diseases, UCSF > VA Medical Center (114M) Phone: (415) 221-4810 x3114 lab > 4150 Clement Street FAX: (415) 668-2864 > San Francisco, CA 94121 Email: karl young at ucsf edu > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pgmdevlist at gmail.com Thu Jul 26 16:54:16 2007 From: pgmdevlist at gmail.com (Pierre GM) Date: Thu, 26 Jul 2007 16:54:16 -0400 Subject: [SciPy-user] Memory problems with stats.mannwhitneyu In-Reply-To: References: Message-ID: <200707261654.17467.pgmdevlist@gmail.com> A silly question, but how do you exit this loop ? > while True: > u,p = mannwhitneyu(x,y) Unless you omitted some important part of your script, this loop will keep on running. From vaftrudner at gmail.com Thu Jul 26 17:15:25 2007 From: vaftrudner at gmail.com (Martin Blom) Date: Thu, 26 Jul 2007 16:15:25 -0500 Subject: [SciPy-user] Memory problems with stats.mannwhitneyu In-Reply-To: <200707261654.17467.pgmdevlist@gmail.com> References: <200707261654.17467.pgmdevlist@gmail.com> Message-ID: Well, yes, it does run forever as it stands. I don't see how that would make it eat all my memory though. The problem is not that it uses memory per se, it is that the amount of memory used continues to increase until I run out, and I don't see why that is. The below script is just the last stage of my attempt at debugging. My real program is much longer and trickier and does 18 million slightly different u-tests, but the memory issue is the same for both, and I didn't want to complicate the mail with a lot of unnecessary stuff. thank you Martin 2007/7/26, Pierre GM : > > > A silly question, but how do you exit this loop ? > > > while True: > > u,p = mannwhitneyu(x,y) > > Unless you omitted some important part of your script, this loop will keep > on > running. > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > -------------- next part -------------- An HTML attachment was scrubbed... URL: From robert.kern at gmail.com Thu Jul 26 17:53:14 2007 From: robert.kern at gmail.com (Robert Kern) Date: Thu, 26 Jul 2007 16:53:14 -0500 Subject: [SciPy-user] Memory problems with stats.mannwhitneyu In-Reply-To: References: Message-ID: <46A917CA.2040402@gmail.com> Martin Blom wrote: > I need to do lots and lots of mannwhitneyu-tests and my programs keep > running out of memory so something is wrong somewhere. When I run, for > example, > > from scipy.stats import mannwhitneyu > > x = [2,4,8,3] > y = [1,3,5,6] > > while True: > u,p = mannwhitneyu(x,y) > > and run top to look at the memory used by python it just keeps > increasing until I run out. Does anyone who understands the inner > workings of the stats module know what's happening? Or is it that my > little loop doesn't release memory in some way? I've been using > mannwhitneyu for some time now, and I haven't noticed the problem until > now, which might mean that I've had enough memory to get by until now or > that there is a recent error, which seems unlikely when I look at the > changelog. That is odd. I don't see this on numpy 1.0.3, recentish scipy SVN (maybe up to a week ago), Python 2.5.1, Intel Mac OS X. Both your code and the code for mannwhitneyu() look fine to me. Can you give us similarly-detailed information about the platform you are running on? If you used binary builds, also please let us know where you got them from, too. We have had problems in the past with numpy not freeing memory for array scalars, but I think that was before the 1.0 release. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From cscheid at sci.utah.edu Thu Jul 26 18:13:16 2007 From: cscheid at sci.utah.edu (Carlos Scheidegger) Date: Thu, 26 Jul 2007 16:13:16 -0600 Subject: [SciPy-user] Memory problems with stats.mannwhitneyu In-Reply-To: <46A917CA.2040402@gmail.com> References: <46A917CA.2040402@gmail.com> Message-ID: <46A91C7C.8010604@sci.utah.edu> > Can you give us similarly-detailed information about the platform you are > running on? If you used binary builds, also please let us know where you got > them from, too. We have had problems in the past with numpy not freeing memory > for array scalars, but I think that was before the 1.0 release. For whatever it's worth, I see the same issue here, running a plain Ubuntu Feisty install on AMD64. $ python Python 2.5.1 (r251:54863, May 2 2007, 16:27:44) [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import scipy >>> scipy.__version__ '0.5.2' >>> import numpy >>> numpy.__version__ '1.0.1' $ cat /proc/cpuinfo processor : 0 vendor_id : AuthenticAMD cpu family : 15 model : 33 model name : Dual Core AMD Opteron(tm) Processor 275 stepping : 2 cpu MHz : 2210.186 cache size : 1024 KB physical id : 0 siblings : 2 core id : 0 cpu cores : 2 fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt lm 3dnowext 3dnow pni lahf_lm cmp_legacy bogomips : 4423.08 TLB size : 1024 4K pages clflush size : 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management: ts fid vid ttp -carlos From gael.varoquaux at normalesup.org Fri Jul 27 02:02:21 2007 From: gael.varoquaux at normalesup.org (Gael Varoquaux) Date: Fri, 27 Jul 2007 08:02:21 +0200 Subject: [SciPy-user] using imread... In-Reply-To: <46A8FE96.40404@gmail.com> References: <46A8FE96.40404@gmail.com> Message-ID: <20070727060221.GA15345@clipper.ens.fr> On Thu, Jul 26, 2007 at 10:05:42PM +0200, fred wrote: > So, what am I doing wrong ? Can you post a minimal example of code ? Cheers, Ga?l From mwojc at p.lodz.pl Fri Jul 27 06:40:09 2007 From: mwojc at p.lodz.pl (Marek Wojciechowski) Date: Fri, 27 Jul 2007 12:40:09 +0200 (CEST) Subject: [SciPy-user] Numpy/Scipy on AIX In-Reply-To: References: Message-ID: <34436.147.162.29.65.1185532809.squirrel@poczta.p.lodz.pl> Hi! I trying to instal numpy and scipy on AIX 5.3. Unfortunately, running numpy's setup.py finished with error: building 'numpy.core._dotblas' extension compiling C sources C compiler: cc_r -DNDEBUG -O creating build/temp.aix-5.3-2.5/numpy/core/blasdot compile options: '-DNO_ATLAS_INFO=1 -Inumpy/core/blasdot -Inumpy/core/include -Ibuild/src.aix-5.3-2.5/numpy/core -Inumpy/core/src -Inumpy/core/include -I/home/Marek/apython/include/python2.5 -c' cc_r: numpy/core/blasdot/_dotblas.c xlf95 -bshared -F/tmp/tmpwQurYM_xlf.cfg build/temp.aix-5.3-2.5/numpy/core/blasdot/_dotblas.o -L/usr/lib -lblas -o build/lib.aix-5.3-2.5/numpy/core/_dotblas.so ld: 0711-317 ERROR: Undefined symbol: .main ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. ld: 0711-317 ERROR: Undefined symbol: .main ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. error: Command "xlf95 -bshared -F/tmp/tmpwQurYM_xlf.cfg build/temp.aix-5.3-2.5/numpy/core/blasdot/_dotblas.o -L/usr/lib -lblas -o build/lib.aix-5.3-2.5/numpy/core/_dotblas.so" failed with exit status 8 Is there any easy solution for this? Thanks in advance. Marek From david at ar.media.kyoto-u.ac.jp Fri Jul 27 07:06:59 2007 From: david at ar.media.kyoto-u.ac.jp (David Cournapeau) Date: Fri, 27 Jul 2007 20:06:59 +0900 Subject: [SciPy-user] Numpy/Scipy on AIX In-Reply-To: <34436.147.162.29.65.1185532809.squirrel@poczta.p.lodz.pl> References: <34436.147.162.29.65.1185532809.squirrel@poczta.p.lodz.pl> Message-ID: <46A9D1D3.7030703@ar.media.kyoto-u.ac.jp> Marek Wojciechowski wrote: > Hi! > I trying to instal numpy and scipy on AIX 5.3. Unfortunately, running > numpy's setup.py finished with error: > > building 'numpy.core._dotblas' extension > compiling C sources > C compiler: cc_r -DNDEBUG -O > > creating build/temp.aix-5.3-2.5/numpy/core/blasdot > compile options: '-DNO_ATLAS_INFO=1 -Inumpy/core/blasdot > -Inumpy/core/include -Ibuild/src.aix-5.3-2.5/numpy/core -Inumpy/core/src > -Inumpy/core/include -I/home/Marek/apython/include/python2.5 -c' > cc_r: numpy/core/blasdot/_dotblas.c > xlf95 -bshared -F/tmp/tmpwQurYM_xlf.cfg > build/temp.aix-5.3-2.5/numpy/core/blasdot/_dotblas.o -L/usr/lib -lblas -o > build/lib.aix-5.3-2.5/numpy/core/_dotblas.so > ld: 0711-317 ERROR: Undefined symbol: .main > ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more > information. > ld: 0711-317 ERROR: Undefined symbol: .main > ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more > information. > error: Command "xlf95 -bshared -F/tmp/tmpwQurYM_xlf.cfg > build/temp.aix-5.3-2.5/numpy/core/blasdot/_dotblas.o -L/usr/lib -lblas -o > build/lib.aix-5.3-2.5/numpy/core/_dotblas.so" failed with exit status 8 > > Is there any easy solution for this? Do you know which option is needed normally for compiling shared libraries on AIX ? The problem seems to be a missing symbol, .main, which I supposed is the main function, which is not supposed to be there for extensions. David From jelleferinga at gmail.com Fri Jul 27 07:49:31 2007 From: jelleferinga at gmail.com (jelle) Date: Fri, 27 Jul 2007 11:49:31 +0000 (UTC) Subject: [SciPy-user] using imread... References: <46A8FE96.40404@gmail.com> <20070727060221.GA15345@clipper.ens.fr> Message-ID: pil 1.1.6 supports numpy arrays, perhaps its even more efficent to use this? From elcorto at gmx.net Fri Jul 27 08:39:43 2007 From: elcorto at gmx.net (Steve Schmerler) Date: Fri, 27 Jul 2007 14:39:43 +0200 Subject: [SciPy-user] Memory problems with stats.mannwhitneyu In-Reply-To: <46A91C7C.8010604@sci.utah.edu> References: <46A917CA.2040402@gmail.com> <46A91C7C.8010604@sci.utah.edu> Message-ID: <46A9E78F.6060107@gmx.net> Carlos Scheidegger wrote: >> Can you give us similarly-detailed information about the platform you are >> running on? If you used binary builds, also please let us know where you got >> them from, too. We have had problems in the past with numpy not freeing memory >> for array scalars, but I think that was before the 1.0 release. > > For whatever it's worth, I see the same issue here, running a plain Ubuntu > Feisty install on AMD64. > > $ python > Python 2.5.1 (r251:54863, May 2 2007, 16:27:44) > [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. >>>> import scipy >>>> scipy.__version__ > '0.5.2' >>>> import numpy >>>> numpy.__version__ > '1.0.1' > > $ cat /proc/cpuinfo > processor : 0 > vendor_id : AuthenticAMD > cpu family : 15 > model : 33 > model name : Dual Core AMD Opteron(tm) Processor 275 > stepping : 2 > cpu MHz : 2210.186 > cache size : 1024 KB > physical id : 0 > siblings : 2 > core id : 0 > cpu cores : 2 > fpu : yes > fpu_exception : yes > cpuid level : 1 > wp : yes > flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca > cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt lm > 3dnowext 3dnow pni lahf_lm cmp_legacy > bogomips : 4423.08 > TLB size : 1024 4K pages > clflush size : 64 > cache_alignment : 64 > address sizes : 40 bits physical, 48 bits virtual > power management: ts fid vid ttp > same here: Debian etch, python 2.4.4, numpy 1.0.1-8, scipy 0.5.2-0.1 from Debian's repos processor : 0 vendor_id : AuthenticAMD cpu family : 15 model : 31 model name : AMD Athlon(tm) 64 Processor 3000+ stepping : 0 cpu MHz : 1808.928 cache size : 512 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt lm 3dnowext 3dnow up lahf_lm ts fid vid ttp bogomips : 3621.70 -- cheers, steve Random number generation is the art of producing pure gibberish as quickly as possible. From stefan at sun.ac.za Fri Jul 27 09:20:59 2007 From: stefan at sun.ac.za (Stefan van der Walt) Date: Fri, 27 Jul 2007 15:20:59 +0200 Subject: [SciPy-user] reading .mat-files (Matlab 7) In-Reply-To: <46A8C23D.6000101@gmail.com> References: <46A7BB0B.3060709@ru.nl> <46A89634.20206@unibo.it> <46A8A42F.5050002@gmail.com> <46A8A592.3010701@unibo.it> <46A8C23D.6000101@gmail.com> Message-ID: <20070727132059.GB7447@mentat.za.net> On Thu, Jul 26, 2007 at 05:48:13PM +0200, stef mientki wrote: > I think that's one of the differences between the "rich world" and the > "poor world" You may be surprised at the amount of exploitation that takes place in the "poor world" by big software companies. Fortunately, the South African government is pro free software, and invests big money in developing alternatives to commercial packages. At our university, the vast majority of all engineering is still done using MATLAB. It's usage is so deeply ingrained, that it is very difficult to convince people to consider free alternatives. We are fortunate to have talented teachers and ambassadors in our midst. Two years ago, for example, Fernando Perez came to South Africa, championing the cause and, through his workshop, broadening the vision of many engineers, mathematicians and engineers. Sometimes, a bit of effort is needed to set the ball rolling and to overcome the initial resistance offered by comfort zones. Once that has been breached, the facts speak for themselves. Regards St?fan From vaftrudner at gmail.com Fri Jul 27 12:33:12 2007 From: vaftrudner at gmail.com (Martin Blom) Date: Fri, 27 Jul 2007 11:33:12 -0500 Subject: [SciPy-user] Memory problems with stats.mannwhitneyu In-Reply-To: <46A9E78F.6060107@gmx.net> References: <46A917CA.2040402@gmail.com> <46A91C7C.8010604@sci.utah.edu> <46A9E78F.6060107@gmx.net> Message-ID: I'm on an Ubuntu Feisty machine, and the python installation is the standard one for feisty. Machine and python details: ~$ python Python 2.5.1 (r251:54863, May 2 2007, 16:56:35) [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import scipy >>> scipy.__version__ '0.5.2' >>> import numpy >>> numpy.__version__ '1.0.1' ~$ cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 15 model : 4 model name : Intel(R) Pentium(R) D CPU 3.20GHz stepping : 4 cpu MHz : 3192.271 cache size : 1024 KB physical id : 0 siblings : 2 core id : 0 cpu cores : 2 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 5 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc pni monitor ds_cpl est cid cx16 xtpr bogomips : 6389.70 clflush size : 64 processor : 1 vendor_id : GenuineIntel cpu family : 15 model : 4 model name : Intel(R) Pentium(R) D CPU 3.20GHz stepping : 4 cpu MHz : 3192.271 cache size : 1024 KB physical id : 0 siblings : 2 core id : 1 cpu cores : 2 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 5 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc pni monitor ds_cpl est cid cx16 xtpr bogomips : 6384.39 clflush size : 64 2007/7/27, Steve Schmerler : > > Carlos Scheidegger wrote: > >> Can you give us similarly-detailed information about the platform you > are > >> running on? If you used binary builds, also please let us know where > you got > >> them from, too. We have had problems in the past with numpy not freeing > memory > >> for array scalars, but I think that was before the 1.0 release. > > > > For whatever it's worth, I see the same issue here, running a plain > Ubuntu > > Feisty install on AMD64. > > > > $ python > > Python 2.5.1 (r251:54863, May 2 2007, 16:27:44) > > [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > >>>> import scipy > >>>> scipy.__version__ > > '0.5.2' > >>>> import numpy > >>>> numpy.__version__ > > '1.0.1' > > > > $ cat /proc/cpuinfo > > processor : 0 > > vendor_id : AuthenticAMD > > cpu family : 15 > > model : 33 > > model name : Dual Core AMD Opteron(tm) Processor 275 > > stepping : 2 > > cpu MHz : 2210.186 > > cache size : 1024 KB > > physical id : 0 > > siblings : 2 > > core id : 0 > > cpu cores : 2 > > fpu : yes > > fpu_exception : yes > > cpuid level : 1 > > wp : yes > > flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge > mca > > cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt > lm > > 3dnowext 3dnow pni lahf_lm cmp_legacy > > bogomips : 4423.08 > > TLB size : 1024 4K pages > > clflush size : 64 > > cache_alignment : 64 > > address sizes : 40 bits physical, 48 bits virtual > > power management: ts fid vid ttp > > > > same here: > > Debian etch, python 2.4.4, numpy 1.0.1-8, scipy 0.5.2-0.1 from Debian's > repos > > processor : 0 > vendor_id : AuthenticAMD > cpu family : 15 > model : 31 > model name : AMD Athlon(tm) 64 Processor 3000+ > stepping : 0 > cpu MHz : 1808.928 > cache size : 512 KB > fdiv_bug : no > hlt_bug : no > f00f_bug : no > coma_bug : no > fpu : yes > fpu_exception : yes > cpuid level : 1 > wp : yes > flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge > mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt > lm 3dnowext 3dnow up lahf_lm ts fid vid ttp > bogomips : 3621.70 > > -- > cheers, > steve > > Random number generation is the art of producing pure gibberish as > quickly as possible. > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zpincus at stanford.edu Fri Jul 27 12:46:59 2007 From: zpincus at stanford.edu (Zachary Pincus) Date: Fri, 27 Jul 2007 12:46:59 -0400 Subject: [SciPy-user] BoF on 3D visualization In-Reply-To: <426ada670707261354w216b195ctfa80ae3a334d11ad@mail.gmail.com> References: <18086.28241.432931.478493@gargle.gargle.HOWL> <46A8DEDD.2060006@ucsf.edu> <426ada670707261354w216b195ctfa80ae3a334d11ad@mail.gmail.com> Message-ID: Is there any chance that anyone took notes at this BoF and would be so gracious as to post anything for those of us who weren't at the meeting but nevertheless interested in this topic? Thanks, Zach Pincus Program in Biomedical Informatics and Department of Biochemistry Stanford University School of Medicine On Jul 26, 2007, at 4:54 PM, Carl Trachte wrote: > I am mostly ignorant with regard to the BoF subject, but I need to > get smarter. > I will attend. > > On 7/26/07, Karl Young < Karl.Young at ucsf.edu> wrote:Prabhu > Ramachandran wrote: > > >Hello, > > > >Gael Varoquaux and myself are planning on holding a "Pythonic 3D > >visualization" BoF at SciPy07 on Thursday evening. We'd like to know > >if any of you would be interested in this. If you are, please do let > >us know. Please also let us know if you have anything in particular > >you'd like to discuss. > > > >Thanks. > > > >Cheers, > > > > > > I'll definitely show; issues that come up in 3D visualization of > neuroimages are tops on my list but I'm sure any discussion will be of > interest (I'm a real novice re. 3D visualization so I'm not sure if I > contribute a whole lot of interest) > > -- KY > > Karl Young > Center for Imaging of Neurodegenerative Diseases, UCSF > VA Medical Center (114M) Phone: (415) 221-4810 x3114 > lab > 4150 Clement Street FAX: (415) 668-2864 > San Francisco, CA 94121 Email: karl young at ucsf edu > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user From gael.varoquaux at normalesup.org Fri Jul 27 12:49:35 2007 From: gael.varoquaux at normalesup.org (Gael Varoquaux) Date: Fri, 27 Jul 2007 18:49:35 +0200 Subject: [SciPy-user] BoF on 3D visualization In-Reply-To: References: <18086.28241.432931.478493@gargle.gargle.HOWL> <46A8DEDD.2060006@ucsf.edu> <426ada670707261354w216b195ctfa80ae3a334d11ad@mail.gmail.com> Message-ID: <20070727164934.GB15290@clipper.ens.fr> On Fri, Jul 27, 2007 at 12:46:59PM -0400, Zachary Pincus wrote: > Is there any chance that anyone took notes at this BoF and would be > so gracious as to post anything for those of us who weren't at the > meeting but nevertheless interested in this topic? It hasn't happened yet (it's on Tues august 14th ) Will try. No promises though. Ga?l From rmay at ou.edu Fri Jul 27 12:57:21 2007 From: rmay at ou.edu (Ryan May) Date: Fri, 27 Jul 2007 11:57:21 -0500 Subject: [SciPy-user] BoF on 3D visualization In-Reply-To: <20070727164934.GB15290@clipper.ens.fr> References: <18086.28241.432931.478493@gargle.gargle.HOWL> <46A8DEDD.2060006@ucsf.edu> <426ada670707261354w216b195ctfa80ae3a334d11ad@mail.gmail.com> <20070727164934.GB15290@clipper.ens.fr> Message-ID: <46AA23F1.4010806@ou.edu> Gael Varoquaux wrote: > On Fri, Jul 27, 2007 at 12:46:59PM -0400, Zachary Pincus wrote: >> Is there any chance that anyone took notes at this BoF and would be >> so gracious as to post anything for those of us who weren't at the >> meeting but nevertheless interested in this topic? > > It hasn't happened yet (it's on Tues august 14th ) > > Will try. No promises though. > > Ga?l Don't you mean Thursday August 16th? Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma From zpincus at stanford.edu Fri Jul 27 13:01:03 2007 From: zpincus at stanford.edu (Zachary Pincus) Date: Fri, 27 Jul 2007 13:01:03 -0400 Subject: [SciPy-user] BoF on 3D visualization In-Reply-To: <20070727164934.GB15290@clipper.ens.fr> References: <18086.28241.432931.478493@gargle.gargle.HOWL> <46A8DEDD.2060006@ucsf.edu> <426ada670707261354w216b195ctfa80ae3a334d11ad@mail.gmail.com> <20070727164934.GB15290@clipper.ens.fr> Message-ID: <01A2E9AB-E898-44B6-A576-9A3B0CFAD4A8@stanford.edu> > On Fri, Jul 27, 2007 at 12:46:59PM -0400, Zachary Pincus wrote: >> Is there any chance that anyone took notes at this BoF and would be >> so gracious as to post anything for those of us who weren't at the >> meeting but nevertheless interested in this topic? > > It hasn't happened yet (it's on Tues august 14th ) Aah, I misread and thought it was yesterday! > Will try. No promises though. Thanks in advance! I'm currently wading through all of the different 3DV options for python and and any insight on which tools are suited for which applications would be of course very valuable. Zach From prabhu at aero.iitb.ac.in Fri Jul 27 13:01:20 2007 From: prabhu at aero.iitb.ac.in (Prabhu Ramachandran) Date: Fri, 27 Jul 2007 22:31:20 +0530 Subject: [SciPy-user] BoF on 3D visualization In-Reply-To: <20070727164934.GB15290@clipper.ens.fr> References: <18086.28241.432931.478493@gargle.gargle.HOWL> <46A8DEDD.2060006@ucsf.edu> <426ada670707261354w216b195ctfa80ae3a334d11ad@mail.gmail.com> <20070727164934.GB15290@clipper.ens.fr> Message-ID: <18090.9440.908892.566658@gargle.gargle.HOWL> >>>>> "Gael" == Gael Varoquaux writes: Gael> On Fri, Jul 27, 2007 at 12:46:59PM -0400, Zachary Pincus Gael> wrote: >> Is there any chance that anyone took notes at this BoF and >> would be so gracious as to post anything for those of us who >> weren't at the meeting but nevertheless interested in this >> topic? Gael> It hasn't happened yet (it's on Tues august 14th ) I this is supposed to be on Thursday, Aug. 16th and the exact time will be announced at the conference so that we can coordinate it correctly. Gael> Will try. No promises though. :-) BoFs are supposed to be informal, so notes would be handy. Lets hope this can be arranged. regards, prabhu From gael.varoquaux at normalesup.org Fri Jul 27 13:17:11 2007 From: gael.varoquaux at normalesup.org (Gael Varoquaux) Date: Fri, 27 Jul 2007 19:17:11 +0200 Subject: [SciPy-user] BoF on 3D visualization In-Reply-To: <46AA23F1.4010806@ou.edu> References: <18086.28241.432931.478493@gargle.gargle.HOWL> <46A8DEDD.2060006@ucsf.edu> <426ada670707261354w216b195ctfa80ae3a334d11ad@mail.gmail.com> <20070727164934.GB15290@clipper.ens.fr> <46AA23F1.4010806@ou.edu> Message-ID: <20070727171711.GF15290@clipper.ens.fr> On Fri, Jul 27, 2007 at 11:57:21AM -0500, Ryan May wrote: > Don't you mean Thursday August 16th? $ ping brain.gael no answer from brain.gael But the fingers are here to correct the error. Yes, you are right. I guess to a frenchman Thursday and Tuesday sound to close. Ga?l From robert.kern at gmail.com Fri Jul 27 14:43:35 2007 From: robert.kern at gmail.com (Robert Kern) Date: Fri, 27 Jul 2007 13:43:35 -0500 Subject: [SciPy-user] Memory problems with stats.mannwhitneyu In-Reply-To: References: <46A917CA.2040402@gmail.com> <46A91C7C.8010604@sci.utah.edu> <46A9E78F.6060107@gmx.net> Message-ID: <46AA3CD7.4060504@gmail.com> Martin Blom wrote: > I'm on an Ubuntu Feisty machine, and the python installation is the > standard one for feisty. Machine and python details: > > > ~$ python > Python 2.5.1 (r251:54863, May 2 2007, 16:56:35) > [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4 )] on linux2 > Type "help", "copyright", "credits" or "license" for more information. >>>> import scipy >>>> scipy.__version__ > '0.5.2' >>>> import numpy >>>> numpy.__version__ > '1.0.1' Well, you all seem to have numpy 1.0.1 in common. I do not see this on my AMD 64 Ubuntu box with numpy SVN. I suspect a bug in numpy 1.0.1 and suggest upgrading. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From mwojc at p.lodz.pl Fri Jul 27 17:17:12 2007 From: mwojc at p.lodz.pl (Marek) Date: Fri, 27 Jul 2007 21:17:12 +0000 (UTC) Subject: [SciPy-user] Numpy/Scipy on AIX References: <34436.147.162.29.65.1185532809.squirrel@poczta.p.lodz.pl> <46A9D1D3.7030703@ar.media.kyoto-u.ac.jp> Message-ID: David Cournapeau ar.media.kyoto-u.ac.jp> writes: > > Marek Wojciechowski wrote: > > Hi! > > I trying to instal numpy and scipy on AIX 5.3. Unfortunately, running > > numpy's setup.py finished with error: > > > > building 'numpy.core._dotblas' extension > > compiling C sources > > C compiler: cc_r -DNDEBUG -O > > > > creating build/temp.aix-5.3-2.5/numpy/core/blasdot > > compile options: '-DNO_ATLAS_INFO=1 -Inumpy/core/blasdot > > -Inumpy/core/include -Ibuild/src.aix-5.3-2.5/numpy/core -Inumpy/core/src > > -Inumpy/core/include -I/home/Marek/apython/include/python2.5 -c' > > cc_r: numpy/core/blasdot/_dotblas.c > > xlf95 -bshared -F/tmp/tmpwQurYM_xlf.cfg > > build/temp.aix-5.3-2.5/numpy/core/blasdot/_dotblas.o -L/usr/lib -lblas -o > > build/lib.aix-5.3-2.5/numpy/core/_dotblas.so > > ld: 0711-317 ERROR: Undefined symbol: .main > > ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more > > information. > > ld: 0711-317 ERROR: Undefined symbol: .main > > ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more > > information. > > error: Command "xlf95 -bshared -F/tmp/tmpwQurYM_xlf.cfg > > build/temp.aix-5.3-2.5/numpy/core/blasdot/_dotblas.o -L/usr/lib -lblas -o > > build/lib.aix-5.3-2.5/numpy/core/_dotblas.so" failed with exit status 8 > > > > Is there any easy solution for this? > Do you know which option is needed normally for compiling shared > libraries on AIX ? The problem seems to be a missing symbol, .main, > which I supposed is the main function, which is not supposed to be there > for extensions. > > David > Thanks for your response, but I skipped the problem downloading svn version of numpy (previously i tried to install numpy-1.0.2), and this compiles nicely. But now i run into troubles with scipy. Namely, I get tons of unresolved symbols from lapack, for example: ld: 0711-317 ERROR: Undefined symbol: .sgemm_ Any workaround for this? I know there is linker option -brename:.sgemm_,.sgemm, which can solve it but this si not a nice solution. Thanks in advance Marek From david at ar.media.kyoto-u.ac.jp Sat Jul 28 03:37:15 2007 From: david at ar.media.kyoto-u.ac.jp (David Cournapeau) Date: Sat, 28 Jul 2007 16:37:15 +0900 Subject: [SciPy-user] Numpy/Scipy on AIX In-Reply-To: References: <34436.147.162.29.65.1185532809.squirrel@poczta.p.lodz.pl> <46A9D1D3.7030703@ar.media.kyoto-u.ac.jp> Message-ID: <46AAF22B.4040207@ar.media.kyoto-u.ac.jp> Marek wrote: > > > Thanks for your response, but I skipped the problem downloading svn version of > numpy (previously i tried to install numpy-1.0.2), and this compiles nicely. > But now i run into troubles with scipy. Namely, I get tons of unresolved > symbols from lapack, for example: > > ld: 0711-317 ERROR: Undefined symbol: .sgemm_ > > Any workaround for this? I know there is linker option -brename:.sgemm_,.sgemm, > which can solve it but this si not a nice solution. > > We'll need more informations to help you. The most useful thing would be to know the output of python setup.py config for numpy and scipy. Also, did you used the release of scipy (0.5.2) or the svn version as well ? David From mwojc at p.lodz.pl Sat Jul 28 07:47:02 2007 From: mwojc at p.lodz.pl (Marek Wojciechowski) Date: Sat, 28 Jul 2007 13:47:02 +0200 (CEST) Subject: [SciPy-user] Numpy/Scipy on AIX Message-ID: <33682.147.162.29.65.1185623222.squirrel@poczta.p.lodz.pl> David Cournapeau ar.media.kyoto-u.ac.jp> writes: > > Marek wrote: > > > > > > Thanks for your response, but I skipped the problem downloading svn version of > > numpy (previously i tried to install numpy-1.0.2), and this compiles nicely. > > But now i run into troubles with scipy. Namely, I get tons of unresolved > > symbols from lapack, for example: > > > > ld: 0711-317 ERROR: Undefined symbol: .sgemm_ > > > > Any workaround for this? I know there is linker option -brename:.sgemm_,.sgemm, > > which can solve it but this si not a nice solution. > > > > > We'll need more informations to help you. The most useful thing would be > to know the output of python setup.py config for numpy and scipy. > > Also, did you used the release of scipy (0.5.2) or the svn version as well ? > > David > I'm using svn version of scipy. As far as i observed scipy 0.5.2 is not compatibile with numpy-svn. Below i'm pasting what setup.py produces. I seems things are compiled and there is only linking problem with lapack. Thanks for help. ======================================================================== mkl_info: libraries mkl,vml,guide not found in /home/Marek/apython/lib libraries mkl,vml,guide not found in /usr/lib NOT AVAILABLE fftw3_info: libraries fftw3 not found in /home/Marek/apython/lib libraries fftw3 not found in /usr/lib fftw3 not found NOT AVAILABLE fftw2_info: libraries rfftw,fftw not found in /home/Marek/apython/lib libraries rfftw,fftw not found in /usr/lib fftw2 not found NOT AVAILABLE dfftw_info: libraries drfftw,dfftw not found in /home/Marek/apython/lib libraries drfftw,dfftw not found in /usr/lib dfftw not found NOT AVAILABLE djbfft_info: NOT AVAILABLE blas_opt_info: blas_mkl_info: libraries mkl,vml,guide not found in /home/Marek/apython/lib libraries mkl,vml,guide not found in /usr/lib NOT AVAILABLE atlas_blas_threads_info: Setting PTATLAS=ATLAS libraries ptf77blas,ptcblas,atlas not found in /home/Marek/apython/lib libraries ptf77blas,ptcblas,atlas not found in /usr/lib NOT AVAILABLE atlas_blas_info: libraries f77blas,cblas,atlas not found in /home/Marek/apython/lib libraries f77blas,cblas,atlas not found in /usr/lib NOT AVAILABLE blas_info: libraries blas not found in /home/Marek/apython/lib FOUND: libraries = ['blas'] library_dirs = ['/usr/lib'] language = f77 FOUND: libraries = ['blas'] library_dirs = ['/usr/lib'] define_macros = [('NO_ATLAS_INFO', 1)] language = f77 lapack_opt_info: lapack_mkl_info: NOT AVAILABLE atlas_threads_info: Setting PTATLAS=ATLAS libraries ptf77blas,ptcblas,atlas not found in /home/Marek/apython/lib libraries lapack_atlas not found in /home/Marek/apython/lib libraries ptf77blas,ptcblas,atlas not found in /usr/lib libraries lapack_atlas not found in /usr/lib numpy.distutils.system_info.atlas_threads_info NOT AVAILABLE atlas_info: libraries f77blas,cblas,atlas not found in /home/Marek/apython/lib libraries lapack_atlas not found in /home/Marek/apython/lib libraries f77blas,cblas,atlas not found in /usr/lib libraries lapack_atlas not found in /usr/lib numpy.distutils.system_info.atlas_info NOT AVAILABLE lapack_info: FOUND: libraries = ['lapack'] library_dirs = ['/home/Marek/apython/lib'] language = f77 FOUND: libraries = ['lapack', 'blas'] library_dirs = ['/home/Marek/apython/lib', '/usr/lib'] define_macros = [('NO_ATLAS_INFO', 1)] language = f77 non-existing path in 'Lib/linsolve': 'tests' umfpack_info: libraries umfpack not found in /home/Marek/apython/lib libraries umfpack not found in /usr/lib NOT AVAILABLE non-existing path in 'Lib/maxentropy': 'doc' running build running config_cc unifing config_cc, config, build_clib, build_ext, build commands --compiler options running config_fc unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options running build_src building py_modules sources building library "dfftpack" sources building library "linpack_lite" sources building library "mach" sources building library "quadpack" sources building library "odepack" sources building library "fitpack" sources building library "superlu_src" sources building library "odrpack" sources building library "minpack" sources building library "rootfind" sources building library "c_misc" sources building library "cephes" sources building library "mach" sources building library "toms" sources building library "amos" sources building library "cdf" sources building library "specfun" sources building library "statlib" sources building extension "scipy.cluster._vq" sources building extension "scipy.fftpack._fftpack" sources f2py options: [] adding 'build/src.aix-5.3-2.5/fortranobject.c' to sources. adding 'build/src.aix-5.3-2.5' to include_dirs. building extension "scipy.fftpack.convolve" sources f2py options: [] adding 'build/src.aix-5.3-2.5/fortranobject.c' to sources. adding 'build/src.aix-5.3-2.5' to include_dirs. building extension "scipy.integrate._quadpack" sources building extension "scipy.integrate._odepack" sources building extension "scipy.integrate.vode" sources f2py options: [] adding 'build/src.aix-5.3-2.5/fortranobject.c' to sources. adding 'build/src.aix-5.3-2.5' to include_dirs. building extension "scipy.interpolate._fitpack" sources building extension "scipy.interpolate.dfitpack" sources f2py options: [] adding 'build/src.aix-5.3-2.5/fortranobject.c' to sources. adding 'build/src.aix-5.3-2.5' to include_dirs. adding 'build/src.aix-5.3-2.5/Lib/interpolate/dfitpack-f2pywrappers.f' to sources. building extension "scipy.io.numpyio" sources building extension "scipy.lib.blas.fblas" sources f2py options: ['skip:', ':'] adding 'build/src.aix-5.3-2.5/fortranobject.c' to sources. adding 'build/src.aix-5.3-2.5' to include_dirs. adding 'build/src.aix-5.3-2.5/build/src.aix-5.3-2.5/Lib/lib/blas/fblas-f2pywrappers.f' to sources. building extension "scipy.lib.blas.cblas" sources adding 'build/src.aix-5.3-2.5/scipy/lib/blas/cblas.pyf' to sources. f2py options: ['skip:', ':'] adding 'build/src.aix-5.3-2.5/fortranobject.c' to sources. adding 'build/src.aix-5.3-2.5' to include_dirs. building extension "scipy.lib.lapack.flapack" sources f2py options: ['skip:', ':'] adding 'build/src.aix-5.3-2.5/fortranobject.c' to sources. adding 'build/src.aix-5.3-2.5' to include_dirs. building extension "scipy.lib.lapack.clapack" sources adding 'build/src.aix-5.3-2.5/scipy/lib/lapack/clapack.pyf' to sources. f2py options: ['skip:', ':'] adding 'build/src.aix-5.3-2.5/fortranobject.c' to sources. adding 'build/src.aix-5.3-2.5' to include_dirs. building extension "scipy.lib.lapack.calc_lwork" sources f2py options: [] adding 'build/src.aix-5.3-2.5/fortranobject.c' to sources. adding 'build/src.aix-5.3-2.5' to include_dirs. building extension "scipy.lib.lapack.atlas_version" sources building extension "scipy.linalg.fblas" sources adding 'build/src.aix-5.3-2.5/scipy/linalg/fblas.pyf' to sources. f2py options: [] adding 'build/src.aix-5.3-2.5/fortranobject.c' to sources. adding 'build/src.aix-5.3-2.5' to include_dirs. adding 'build/src.aix-5.3-2.5/build/src.aix-5.3-2.5/scipy/linalg/fblas-f2pywrappers.f' to sources. building extension "scipy.linalg.cblas" sources adding 'build/src.aix-5.3-2.5/scipy/linalg/cblas.pyf' to sources. f2py options: [] adding 'build/src.aix-5.3-2.5/fortranobject.c' to sources. adding 'build/src.aix-5.3-2.5' to include_dirs. building extension "scipy.linalg.flapack" sources adding 'build/src.aix-5.3-2.5/scipy/linalg/flapack.pyf' to sources. f2py options: [] adding 'build/src.aix-5.3-2.5/fortranobject.c' to sources. adding 'build/src.aix-5.3-2.5' to include_dirs. adding 'build/src.aix-5.3-2.5/build/src.aix-5.3-2.5/scipy/linalg/flapack-f2pywrappers.f' to sources. building extension "scipy.linalg.clapack" sources adding 'build/src.aix-5.3-2.5/scipy/linalg/clapack.pyf' to sources. f2py options: [] adding 'build/src.aix-5.3-2.5/fortranobject.c' to sources. adding 'build/src.aix-5.3-2.5' to include_dirs. building extension "scipy.linalg._flinalg" sources f2py options: [] adding 'build/src.aix-5.3-2.5/fortranobject.c' to sources. adding 'build/src.aix-5.3-2.5' to include_dirs. building extension "scipy.linalg.calc_lwork" sources f2py options: [] adding 'build/src.aix-5.3-2.5/fortranobject.c' to sources. adding 'build/src.aix-5.3-2.5' to include_dirs. building extension "scipy.linalg.atlas_version" sources building extension "scipy.linalg._iterative" sources f2py options: [] adding 'build/src.aix-5.3-2.5/fortranobject.c' to sources. adding 'build/src.aix-5.3-2.5' to include_dirs. building extension "scipy.linsolve._zsuperlu" sources building extension "scipy.linsolve._dsuperlu" sources building extension "scipy.linsolve._csuperlu" sources building extension "scipy.linsolve._ssuperlu" sources building extension "scipy.linsolve.umfpack.__umfpack" sources building extension "scipy.odr.__odrpack" sources building extension "scipy.optimize._minpack" sources building extension "scipy.optimize._zeros" sources building extension "scipy.optimize._lbfgsb" sources f2py options: [] adding 'build/src.aix-5.3-2.5/fortranobject.c' to sources. adding 'build/src.aix-5.3-2.5' to include_dirs. building extension "scipy.optimize.moduleTNC" sources building extension "scipy.optimize._cobyla" sources f2py options: [] adding 'build/src.aix-5.3-2.5/fortranobject.c' to sources. adding 'build/src.aix-5.3-2.5' to include_dirs. building extension "scipy.optimize.minpack2" sources f2py options: [] adding 'build/src.aix-5.3-2.5/fortranobject.c' to sources. adding 'build/src.aix-5.3-2.5' to include_dirs. building extension "scipy.signal.sigtools" sources building extension "scipy.signal.spline" sources building extension "scipy.special._cephes" sources building extension "scipy.special.specfun" sources f2py options: ['--no-wrap-functions'] adding 'build/src.aix-5.3-2.5/fortranobject.c' to sources. adding 'build/src.aix-5.3-2.5' to include_dirs. building extension "scipy.stats.statlib" sources f2py options: ['--no-wrap-functions'] adding 'build/src.aix-5.3-2.5/fortranobject.c' to sources. adding 'build/src.aix-5.3-2.5' to include_dirs. building extension "scipy.stats.futil" sources f2py options: [] adding 'build/src.aix-5.3-2.5/fortranobject.c' to sources. adding 'build/src.aix-5.3-2.5' to include_dirs. building extension "scipy.stats.mvn" sources f2py options: [] adding 'build/src.aix-5.3-2.5/fortranobject.c' to sources. adding 'build/src.aix-5.3-2.5' to include_dirs. adding 'build/src.aix-5.3-2.5/Lib/stats/mvn-f2pywrappers.f' to sources. building extension "scipy.stsci.convolve._correlate" sources building extension "scipy.stsci.convolve._lineshape" sources building extension "scipy.stsci.image._combine" sources building data_files sources running build_py copying Lib/__svn_version__.py -> build/lib.aix-5.3-2.5/scipy copying build/src.aix-5.3-2.5/scipy/__config__.py -> build/lib.aix-5.3-2.5/scipy running build_clib customize UnixCCompiler customize UnixCCompiler using build_clib customize IBMFCompiler Found executable /usr/bin/xlf90 Found executable /usr/bin/xlf Found executable /usr/bin/xlf95 Found executable /usr/bin/lslpp #Nome Pacchetto:Sottopacchetto:Livello:Stato:ID PTF:St. Correz.:Tipo:Descrizione:Indir. destinaz.:Uninstaller:Catalogo messaggi:Insieme di messaggi:Numero messaggio:Parent:Automatico:EFIX bloccata xlfcmp:xlfcmp:9.1.0.0: : :C: :XL Fortran Compiler: : : : : : :0:0: Creating /tmp/tmpDeHt5Z/8iHliD_xlf.cfg #Nome Pacchetto:Sottopacchetto:Livello:Stato:ID PTF:St. Correz.:Tipo:Descrizione:Indir. destinaz.:Uninstaller:Catalogo messaggi:Insieme di messaggi:Numero messaggio:Parent:Automatico:EFIX bloccata xlfcmp:xlfcmp:9.1.0.0: : :C: :XL Fortran Compiler: : : : : : :0:0: customize IBMFCompiler #Nome Pacchetto:Sottopacchetto:Livello:Stato:ID PTF:St. Correz.:Tipo:Descrizione:Indir. destinaz.:Uninstaller:Catalogo messaggi:Insieme di messaggi:Numero messaggio:Parent:Automatico:EFIX bloccata xlfcmp:xlfcmp:9.1.0.0: : :C: :XL Fortran Compiler: : : : : : :0:0: Creating /tmp/tmpDeHt5Z/qt0Obz_xlf.cfg customize IBMFCompiler using build_clib #Nome Pacchetto:Sottopacchetto:Livello:Stato:ID PTF:St. Correz.:Tipo:Descrizione:Indir. destinaz.:Uninstaller:Catalogo messaggi:Insieme di messaggi:Numero messaggio:Parent:Automatico:EFIX bloccata xlfcmp:xlfcmp:9.1.0.0: : :C: :XL Fortran Compiler: : : : : : :0:0: running build_ext customize UnixCCompiler customize UnixCCompiler using build_ext library 'mach' defined more than once, overwriting build_info {'sources': ['Lib/integrate/mach/r1mach.f', 'Lib/integrate/mach/d1mach.f', 'Lib/integrate/mach/xerror.f', 'Lib/integrate/mach/i1mach.f'], 'config_fc': {'noopt': ('Lib/integrate/setup.pyc', 1)}, 'source_languages': ['f77']}... with {'sources': ['Lib/special/mach/r1mach.f', 'Lib/special/mach/d1mach.f', 'Lib/special/mach/xerror.f', 'Lib/special/mach/i1mach.f'], 'config_fc': {'noopt': ('Lib/special/setup.pyc', 1)}, 'source_languages': ['f77']}... extending extension 'scipy.linsolve._zsuperlu' defined_macros with [('USE_VENDOR_BLAS', 1)] extending extension 'scipy.linsolve._dsuperlu' defined_macros with [('USE_VENDOR_BLAS', 1)] extending extension 'scipy.linsolve._csuperlu' defined_macros with [('USE_VENDOR_BLAS', 1)] extending extension 'scipy.linsolve._ssuperlu' defined_macros with [('USE_VENDOR_BLAS', 1)] customize IBMFCompiler #Nome Pacchetto:Sottopacchetto:Livello:Stato:ID PTF:St. Correz.:Tipo:Descrizione:Indir. destinaz.:Uninstaller:Catalogo messaggi:Insieme di messaggi:Numero messaggio:Parent:Automatico:EFIX bloccata xlfcmp:xlfcmp:9.1.0.0: : :C: :XL Fortran Compiler: : : : : : :0:0: Creating /tmp/tmpDeHt5Z/KqMbHj_xlf.cfg #Nome Pacchetto:Sottopacchetto:Livello:Stato:ID PTF:St. Correz.:Tipo:Descrizione:Indir. destinaz.:Uninstaller:Catalogo messaggi:Insieme di messaggi:Numero messaggio:Parent:Automatico:EFIX bloccata xlfcmp:xlfcmp:9.1.0.0: : :C: :XL Fortran Compiler: : : : : : :0:0: customize IBMFCompiler #Nome Pacchetto:Sottopacchetto:Livello:Stato:ID PTF:St. Correz.:Tipo:Descrizione:Indir. destinaz.:Uninstaller:Catalogo messaggi:Insieme di messaggi:Numero messaggio:Parent:Automatico:EFIX bloccata xlfcmp:xlfcmp:9.1.0.0: : :C: :XL Fortran Compiler: : : : : : :0:0: Creating /tmp/tmpDeHt5Z/XAGDI2_xlf.cfg #Nome Pacchetto:Sottopacchetto:Livello:Stato:ID PTF:St. Correz.:Tipo:Descrizione:Indir. destinaz.:Uninstaller:Catalogo messaggi:Insieme di messaggi:Numero messaggio:Parent:Automatico:EFIX bloccata xlfcmp:xlfcmp:9.1.0.0: : :C: :XL Fortran Compiler: : : : : : :0:0: customize IBMFCompiler using build_ext #Nome Pacchetto:Sottopacchetto:Livello:Stato:ID PTF:St. Correz.:Tipo:Descrizione:Indir. destinaz.:Uninstaller:Catalogo messaggi:Insieme di messaggi:Numero messaggio:Parent:Automatico:EFIX bloccata xlfcmp:xlfcmp:9.1.0.0: : :C: :XL Fortran Compiler: : : : : : :0:0: building 'scipy.integrate._odepack' extension compiling C sources C compiler: cc_r -DNDEBUG -O compile options: '-DNO_ATLAS_INFO=1 -I/home/Marek/apython/lib/python2.5/site-packages/numpy/core/include -I/home/Marek/apython/include/python2.5 -c' /home/Marek/apython/lib/python2.5/config/ld_so_aix /usr/bin/xlf95 -bI:/home/Marek/apython/lib/python2.5/config/python.exp build/temp.aix-5.3-2.5/Lib/integrate/_odepackmodule.o -L/usr/lib -Lbuild/temp.aix-5.3-2.5 -lodepack -llinpack_lite -lmach -lblas -o build/lib.aix-5.3-2.5/scipy/integrate/_odepack.so ld: 0711-317 ERRORE: Simbolo non definito : .idamax_ ld: 0711-317 ERRORE: Simbolo non definito : .dscal_ ld: 0711-317 ERRORE: Simbolo non definito : .daxpy_ ld: 0711-317 ERRORE: Simbolo non definito : .ddot_ ld: 0711-345 Usare l'opzione -bloadmap o -bnoquiet per ulteriori informazioni. building 'scipy.integrate.vode' extension compiling C sources C compiler: cc_r -DNDEBUG -O compile options: '-DNO_ATLAS_INFO=1 -Ibuild/src.aix-5.3-2.5 -I/home/Marek/apython/lib/python2.5/site-packages/numpy/core/include -I/home/Marek/apython/include/python2.5 -c' /home/Marek/apython/lib/python2.5/config/ld_so_aix /usr/bin/xlf95 -bI:/home/Marek/apython/lib/python2.5/config/python.exp build/temp.aix-5.3-2.5/build/src.aix-5.3-2.5/Lib/integrate/vodemodule.o build/temp.aix-5.3-2.5/build/src.aix-5.3-2.5/fortranobject.o -L/usr/lib -Lbuild/temp.aix-5.3-2.5 -lodepack -llinpack_lite -lmach -lblas -o build/lib.aix-5.3-2.5/scipy/integrate/vode.so ld: 0711-317 ERRORE: Simbolo non definito : .dscal_ ld: 0711-317 ERRORE: Simbolo non definito : .dcopy_ ld: 0711-317 ERRORE: Simbolo non definito : .idamax_ ld: 0711-317 ERRORE: Simbolo non definito : .daxpy_ ld: 0711-317 ERRORE: Simbolo non definito : .ddot_ ld: 0711-345 Usare l'opzione -bloadmap o -bnoquiet per ulteriori informazioni. building 'scipy.lib.blas.fblas' extension compiling C sources C compiler: cc_r -DNDEBUG -O compile options: '-DNO_ATLAS_INFO=1 -Ibuild/src.aix-5.3-2.5 -I/home/Marek/apython/lib/python2.5/site-packages/numpy/core/include -I/home/Marek/apython/include/python2.5 -c' compiling Fortran sources Fortran f77 compiler: /usr/bin/xlf -qextname -O5 Fortran f90 compiler: /usr/bin/xlf90 -qextname -O5 Fortran fix compiler: /usr/bin/xlf90 -qfixed -qextname -O5 compile options: '-DNO_ATLAS_INFO=1 -Ibuild/src.aix-5.3-2.5 -I/home/Marek/apython/lib/python2.5/site-packages/numpy/core/include -I/home/Marek/apython/include/python2.5 -c' /home/Marek/apython/lib/python2.5/config/ld_so_aix /usr/bin/xlf95 -bI:/home/Marek/apython/lib/python2.5/config/python.exp build/temp.aix-5.3-2.5/build/src.aix-5.3-2.5/build/src.aix-5.3-2.5/Lib/lib/blas/fblasmodule.o build/temp.aix-5.3-2.5/build/src.aix-5.3-2.5/fortranobject.o build/temp.aix-5.3-2.5/build/src.aix-5.3-2.5/Lib/lib/blas/fblaswrap.o build/temp.aix-5.3-2.5/build/src.aix-5.3-2.5/build/src.aix-5.3-2.5/Lib/lib/blas/fblas-f2pywrappers.o -L/usr/lib -Lbuild/temp.aix-5.3-2.5 -lblas -o build/lib.aix-5.3-2.5/scipy/lib/blas/fblas.so /usr/bin/xlf95: 1501-262 One or more input object files contain IPA information: specify -qipa for additional optimization. ld: 0711-317 ERRORE: Simbolo non definito : srotg_ ld: 0711-317 ERRORE: Simbolo non definito : drotg_ ld: 0711-317 ERRORE: Simbolo non definito : crotg_ ld: 0711-317 ERRORE: Simbolo non definito : zrotg_ ld: 0711-317 ERRORE: Simbolo non definito : srotmg_ ld: 0711-317 ERRORE: Simbolo non definito : drotmg_ ld: 0711-317 ERRORE: Simbolo non definito : srot_ ld: 0711-317 ERRORE: Simbolo non definito : drot_ ld: 0711-317 ERRORE: Simbolo non definito : csrot_ ld: 0711-317 ERRORE: Simbolo non definito : zdrot_ ld: 0711-317 ERRORE: Simbolo non definito : srotm_ ld: 0711-317 ERRORE: Simbolo non definito : drotm_ ld: 0711-317 ERRORE: Simbolo non definito : sswap_ ld: 0711-317 ERRORE: Simbolo non definito : dswap_ ld: 0711-317 ERRORE: Simbolo non definito : cswap_ ld: 0711-317 ERRORE: Simbolo non definito : zswap_ ld: 0711-317 ERRORE: Simbolo non definito : sscal_ ld: 0711-317 ERRORE: Simbolo non definito : dscal_ ld: 0711-317 ERRORE: Simbolo non definito : cscal_ ld: 0711-317 ERRORE: Simbolo non definito : zscal_ ld: 0711-317 ERRORE: Simbolo non definito : csscal_ ld: 0711-317 ERRORE: Simbolo non definito : zdscal_ ld: 0711-317 ERRORE: Simbolo non definito : scopy_ ld: 0711-317 ERRORE: Simbolo non definito : dcopy_ ld: 0711-317 ERRORE: Simbolo non definito : ccopy_ ld: 0711-317 ERRORE: Simbolo non definito : zcopy_ ld: 0711-317 ERRORE: Simbolo non definito : saxpy_ ld: 0711-317 ERRORE: Simbolo non definito : daxpy_ ld: 0711-317 ERRORE: Simbolo non definito : caxpy_ ld: 0711-317 ERRORE: Simbolo non definito : zaxpy_ ld: 0711-317 ERRORE: Simbolo non definito : .sdot_ ld: 0711-317 ERRORE: Simbolo non definito : .ddot_ ld: 0711-317 ERRORE: Simbolo non definito : .cdotu_ ld: 0711-317 ERRORE: Simbolo non definito : .zdotu_ ld: 0711-317 ERRORE: Simbolo non definito : .cdotc_ ld: 0711-317 ERRORE: Simbolo non definito : .zdotc_ ld: 0711-317 ERRORE: Simbolo non definito : .snrm2_ ld: 0711-317 ERRORE: Simbolo non definito : .dnrm2_ ld: 0711-317 ERRORE: Simbolo non definito : .scnrm2_ ld: 0711-317 ERRORE: Simbolo non definito : .dznrm2_ ld: 0711-317 ERRORE: Simbolo non definito : .sasum_ ld: 0711-317 ERRORE: Simbolo non definito : .dasum_ ld: 0711-317 ERRORE: Simbolo non definito : .scasum_ ld: 0711-317 ERRORE: Simbolo non definito : .dzasum_ ld: 0711-317 ERRORE: Simbolo non definito : isamax_ ld: 0711-317 ERRORE: Simbolo non definito : idamax_ ld: 0711-317 ERRORE: Simbolo non definito : icamax_ ld: 0711-317 ERRORE: Simbolo non definito : izamax_ ld: 0711-317 ERRORE: Simbolo non definito : sgemv_ ld: 0711-317 ERRORE: Simbolo non definito : dgemv_ ld: 0711-317 ERRORE: Simbolo non definito : cgemv_ ld: 0711-317 ERRORE: Simbolo non definito : zgemv_ ld: 0711-317 ERRORE: Simbolo non definito : ssymv_ ld: 0711-317 ERRORE: Simbolo non definito : dsymv_ ld: 0711-317 ERRORE: Simbolo non definito : chemv_ ld: 0711-317 ERRORE: Simbolo non definito : zhemv_ ld: 0711-317 ERRORE: Simbolo non definito : strmv_ ld: 0711-317 ERRORE: Simbolo non definito : dtrmv_ ld: 0711-317 ERRORE: Simbolo non definito : ctrmv_ ld: 0711-317 ERRORE: Simbolo non definito : ztrmv_ ld: 0711-317 ERRORE: Simbolo non definito : sger_ ld: 0711-317 ERRORE: Simbolo non definito : dger_ ld: 0711-317 ERRORE: Simbolo non definito : cgeru_ ld: 0711-317 ERRORE: Simbolo non definito : zgeru_ ld: 0711-317 ERRORE: Simbolo non definito : cgerc_ ld: 0711-317 ERRORE: Simbolo non definito : zgerc_ ld: 0711-317 ERRORE: Simbolo non definito : sgemm_ ld: 0711-317 ERRORE: Simbolo non definito : dgemm_ ld: 0711-317 ERRORE: Simbolo non definito : cgemm_ ld: 0711-317 ERRORE: Simbolo non definito : zgemm_ ld: 0711-317 ERRORE: Simbolo non definito : sdot_ ld: 0711-317 ERRORE: Simbolo non definito : ddot_ ld: 0711-317 ERRORE: Simbolo non definito : snrm2_ ld: 0711-317 ERRORE: Simbolo non definito : dnrm2_ ld: 0711-317 ERRORE: Simbolo non definito : scnrm2_ ld: 0711-317 ERRORE: Simbolo non definito : dznrm2_ ld: 0711-317 ERRORE: Simbolo non definito : sasum_ ld: 0711-317 ERRORE: Simbolo non definito : dasum_ ld: 0711-317 ERRORE: Simbolo non definito : scasum_ ld: 0711-317 ERRORE: Simbolo non definito : dzasum_ ld: 0711-345 Usare l'opzione -bloadmap o -bnoquiet per ulteriori informazioni. building 'scipy.lib.lapack.flapack' extension compiling C sources C compiler: cc_r -DNDEBUG -O compile options: '-DNO_ATLAS_INFO=1 -Ibuild/src.aix-5.3-2.5 -I/home/Marek/apython/lib/python2.5/site-packages/numpy/core/include -I/home/Marek/apython/include/python2.5 -c' /home/Marek/apython/lib/python2.5/config/ld_so_aix /usr/bin/xlf95 -bI:/home/Marek/apython/lib/python2.5/config/python.exp build/temp.aix-5.3-2.5/build/src.aix-5.3-2.5/build/src.aix-5.3-2.5/Lib/lib/lapack/flapackmodule.o build/temp.aix-5.3-2.5/build/src.aix-5.3-2.5/fortranobject.o -L/home/Marek/apython/lib -L/usr/lib -Lbuild/temp.aix-5.3-2.5 -llapack -lblas -o build/lib.aix-5.3-2.5/scipy/lib/lapack/flapack.so ld: 0711-317 ERRORE: Simbolo non definito : sgesv_ ld: 0711-317 ERRORE: Simbolo non definito : dgesv_ ld: 0711-317 ERRORE: Simbolo non definito : cgesv_ ld: 0711-317 ERRORE: Simbolo non definito : zgesv_ ld: 0711-317 ERRORE: Simbolo non definito : sgbsv_ ld: 0711-317 ERRORE: Simbolo non definito : dgbsv_ ld: 0711-317 ERRORE: Simbolo non definito : cgbsv_ ld: 0711-317 ERRORE: Simbolo non definito : zgbsv_ ld: 0711-317 ERRORE: Simbolo non definito : sposv_ ld: 0711-317 ERRORE: Simbolo non definito : dposv_ ld: 0711-317 ERRORE: Simbolo non definito : cposv_ ld: 0711-317 ERRORE: Simbolo non definito : zposv_ ld: 0711-317 ERRORE: Simbolo non definito : sgelss_ ld: 0711-317 ERRORE: Simbolo non definito : dgelss_ ld: 0711-317 ERRORE: Simbolo non definito : cgelss_ ld: 0711-317 ERRORE: Simbolo non definito : zgelss_ ld: 0711-317 ERRORE: Simbolo non definito : ssyev_ ld: 0711-317 ERRORE: Simbolo non definito : dsyev_ ld: 0711-317 ERRORE: Simbolo non definito : cheev_ ld: 0711-317 ERRORE: Simbolo non definito : zheev_ ld: 0711-317 ERRORE: Simbolo non definito : ssyevd_ ld: 0711-317 ERRORE: Simbolo non definito : dsyevd_ ld: 0711-317 ERRORE: Simbolo non definito : cheevd_ ld: 0711-317 ERRORE: Simbolo non definito : zheevd_ ld: 0711-317 ERRORE: Simbolo non definito : ssyevr_ ld: 0711-317 ERRORE: Simbolo non definito : dsyevr_ ld: 0711-317 ERRORE: Simbolo non definito : cheevr_ ld: 0711-317 ERRORE: Simbolo non definito : zheevr_ ld: 0711-317 ERRORE: Simbolo non definito : sgees_ ld: 0711-317 ERRORE: Simbolo non definito : dgees_ ld: 0711-317 ERRORE: Simbolo non definito : cgees_ ld: 0711-317 ERRORE: Simbolo non definito : zgees_ ld: 0711-317 ERRORE: Simbolo non definito : sgeev_ ld: 0711-317 ERRORE: Simbolo non definito : dgeev_ ld: 0711-317 ERRORE: Simbolo non definito : cgeev_ ld: 0711-317 ERRORE: Simbolo non definito : zgeev_ ld: 0711-317 ERRORE: Simbolo non definito : sgesdd_ ld: 0711-317 ERRORE: Simbolo non definito : dgesdd_ ld: 0711-317 ERRORE: Simbolo non definito : cgesdd_ ld: 0711-317 ERRORE: Simbolo non definito : zgesdd_ ld: 0711-317 ERRORE: Simbolo non definito : ssygv_ ld: 0711-317 ERRORE: Simbolo non definito : dsygv_ ld: 0711-317 ERRORE: Simbolo non definito : chegv_ ld: 0711-317 ERRORE: Simbolo non definito : zhegv_ ld: 0711-317 ERRORE: Simbolo non definito : ssygvd_ ld: 0711-317 ERRORE: Simbolo non definito : dsygvd_ ld: 0711-317 ERRORE: Simbolo non definito : chegvd_ ld: 0711-317 ERRORE: Simbolo non definito : zhegvd_ ld: 0711-317 ERRORE: Simbolo non definito : sggev_ ld: 0711-317 ERRORE: Simbolo non definito : dggev_ ld: 0711-317 ERRORE: Simbolo non definito : cggev_ ld: 0711-317 ERRORE: Simbolo non definito : zggev_ ld: 0711-317 ERRORE: Simbolo non definito : sgetrf_ ld: 0711-317 ERRORE: Simbolo non definito : dgetrf_ ld: 0711-317 ERRORE: Simbolo non definito : cgetrf_ ld: 0711-317 ERRORE: Simbolo non definito : zgetrf_ ld: 0711-317 ERRORE: Simbolo non definito : spotrf_ ld: 0711-317 ERRORE: Simbolo non definito : dpotrf_ ld: 0711-317 ERRORE: Simbolo non definito : cpotrf_ ld: 0711-317 ERRORE: Simbolo non definito : zpotrf_ ld: 0711-317 ERRORE: Simbolo non definito : sgetrs_ ld: 0711-317 ERRORE: Simbolo non definito : dgetrs_ ld: 0711-317 ERRORE: Simbolo non definito : cgetrs_ ld: 0711-317 ERRORE: Simbolo non definito : zgetrs_ ld: 0711-317 ERRORE: Simbolo non definito : spotrs_ ld: 0711-317 ERRORE: Simbolo non definito : dpotrs_ ld: 0711-317 ERRORE: Simbolo non definito : cpotrs_ ld: 0711-317 ERRORE: Simbolo non definito : zpotrs_ ld: 0711-317 ERRORE: Simbolo non definito : sgetri_ ld: 0711-317 ERRORE: Simbolo non definito : dgetri_ ld: 0711-317 ERRORE: Simbolo non definito : cgetri_ ld: 0711-317 ERRORE: Simbolo non definito : zgetri_ ld: 0711-317 ERRORE: Simbolo non definito : spotri_ ld: 0711-317 ERRORE: Simbolo non definito : dpotri_ ld: 0711-317 ERRORE: Simbolo non definito : cpotri_ ld: 0711-317 ERRORE: Simbolo non definito : zpotri_ ld: 0711-317 ERRORE: Simbolo non definito : strtri_ ld: 0711-317 ERRORE: Simbolo non definito : dtrtri_ ld: 0711-317 ERRORE: Simbolo non definito : ctrtri_ ld: 0711-317 ERRORE: Simbolo non definito : ztrtri_ ld: 0711-317 ERRORE: Simbolo non definito : sgeqrf_ ld: 0711-317 ERRORE: Simbolo non definito : dgeqrf_ ld: 0711-317 ERRORE: Simbolo non definito : cgeqrf_ ld: 0711-317 ERRORE: Simbolo non definito : zgeqrf_ ld: 0711-317 ERRORE: Simbolo non definito : sorgqr_ ld: 0711-317 ERRORE: Simbolo non definito : dorgqr_ ld: 0711-317 ERRORE: Simbolo non definito : cungqr_ ld: 0711-317 ERRORE: Simbolo non definito : zungqr_ ld: 0711-317 ERRORE: Simbolo non definito : sgehrd_ ld: 0711-317 ERRORE: Simbolo non definito : dgehrd_ ld: 0711-317 ERRORE: Simbolo non definito : cgehrd_ ld: 0711-317 ERRORE: Simbolo non definito : zgehrd_ ld: 0711-317 ERRORE: Simbolo non definito : sgebal_ ld: 0711-317 ERRORE: Simbolo non definito : dgebal_ ld: 0711-317 ERRORE: Simbolo non definito : cgebal_ ld: 0711-317 ERRORE: Simbolo non definito : zgebal_ ld: 0711-317 ERRORE: Simbolo non definito : slauum_ ld: 0711-317 ERRORE: Simbolo non definito : dlauum_ ld: 0711-317 ERRORE: Simbolo non definito : clauum_ ld: 0711-317 ERRORE: Simbolo non definito : zlauum_ ld: 0711-317 ERRORE: Simbolo non definito : slaswp_ ld: 0711-317 ERRORE: Simbolo non definito : dlaswp_ ld: 0711-317 ERRORE: Simbolo non definito : claswp_ ld: 0711-317 ERRORE: Simbolo non definito : zlaswp_ ld: 0711-345 Usare l'opzione -bloadmap o -bnoquiet per ulteriori informazioni. building 'scipy.lib.lapack.calc_lwork' extension compiling C sources C compiler: cc_r -DNDEBUG -O compile options: '-DNO_ATLAS_INFO=1 -Ibuild/src.aix-5.3-2.5 -I/home/Marek/apython/lib/python2.5/site-packages/numpy/core/include -I/home/Marek/apython/include/python2.5 -c' compiling Fortran sources Fortran f77 compiler: /usr/bin/xlf -qextname -O5 Fortran f90 compiler: /usr/bin/xlf90 -qextname -O5 Fortran fix compiler: /usr/bin/xlf90 -qfixed -qextname -O5 compile options: '-DNO_ATLAS_INFO=1 -Ibuild/src.aix-5.3-2.5 -I/home/Marek/apython/lib/python2.5/site-packages/numpy/core/include -I/home/Marek/apython/include/python2.5 -c' /home/Marek/apython/lib/python2.5/config/ld_so_aix /usr/bin/xlf95 -bI:/home/Marek/apython/lib/python2.5/config/python.exp build/temp.aix-5.3-2.5/build/src.aix-5.3-2.5/scipy/lib/lapack/calc_lworkmodule.o build/temp.aix-5.3-2.5/build/src.aix-5.3-2.5/fortranobject.o build/temp.aix-5.3-2.5/Lib/lib/lapack/calc_lwork.o -L/home/Marek/apython/lib -L/usr/lib -Lbuild/temp.aix-5.3-2.5 -llapack -lblas -o build/lib.aix-5.3-2.5/scipy/lib/lapack/calc_lwork.so /usr/bin/xlf95: 1501-262 One or more input object files contain IPA information: specify -qipa for additional optimization. ld: 0711-317 ERRORE: Simbolo non definito : .ilaenv_ ld: 0711-345 Usare l'opzione -bloadmap o -bnoquiet per ulteriori informazioni. building 'scipy.linalg.fblas' extension compiling C sources C compiler: cc_r -DNDEBUG -O compile options: '-DNO_ATLAS_INFO=1 -Ibuild/src.aix-5.3-2.5 -I/home/Marek/apython/lib/python2.5/site-packages/numpy/core/include -I/home/Marek/apython/include/python2.5 -c' compiling Fortran sources Fortran f77 compiler: /usr/bin/xlf -qextname -O5 Fortran f90 compiler: /usr/bin/xlf90 -qextname -O5 Fortran fix compiler: /usr/bin/xlf90 -qfixed -qextname -O5 compile options: '-DNO_ATLAS_INFO=1 -Ibuild/src.aix-5.3-2.5 -I/home/Marek/apython/lib/python2.5/site-packages/numpy/core/include -I/home/Marek/apython/include/python2.5 -c' /home/Marek/apython/lib/python2.5/config/ld_so_aix /usr/bin/xlf95 -bI:/home/Marek/apython/lib/python2.5/config/python.exp build/temp.aix-5.3-2.5/build/src.aix-5.3-2.5/build/src.aix-5.3-2.5/scipy/linalg/fblasmodule.o build/temp.aix-5.3-2.5/build/src.aix-5.3-2.5/fortranobject.o build/temp.aix-5.3-2.5/Lib/linalg/src/fblaswrap.o build/temp.aix-5.3-2.5/build/src.aix-5.3-2.5/build/src.aix-5.3-2.5/scipy/linalg/fblas-f2pywrappers.o -L/home/Marek/apython/lib -L/usr/lib -Lbuild/temp.aix-5.3-2.5 -llapack -lblas -o build/lib.aix-5.3-2.5/scipy/linalg/fblas.so /usr/bin/xlf95: 1501-262 One or more input object files contain IPA information: specify -qipa for additional optimization. ld: 0711-317 ERRORE: Simbolo non definito : srotg_ ld: 0711-317 ERRORE: Simbolo non definito : drotg_ ld: 0711-317 ERRORE: Simbolo non definito : crotg_ ld: 0711-317 ERRORE: Simbolo non definito : zrotg_ ld: 0711-317 ERRORE: Simbolo non definito : srotmg_ ld: 0711-317 ERRORE: Simbolo non definito : drotmg_ ld: 0711-317 ERRORE: Simbolo non definito : srot_ ld: 0711-317 ERRORE: Simbolo non definito : drot_ ld: 0711-317 ERRORE: Simbolo non definito : csrot_ ld: 0711-317 ERRORE: Simbolo non definito : zdrot_ ld: 0711-317 ERRORE: Simbolo non definito : srotm_ ld: 0711-317 ERRORE: Simbolo non definito : drotm_ ld: 0711-317 ERRORE: Simbolo non definito : sswap_ ld: 0711-317 ERRORE: Simbolo non definito : dswap_ ld: 0711-317 ERRORE: Simbolo non definito : cswap_ ld: 0711-317 ERRORE: Simbolo non definito : zswap_ ld: 0711-317 ERRORE: Simbolo non definito : sscal_ ld: 0711-317 ERRORE: Simbolo non definito : dscal_ ld: 0711-317 ERRORE: Simbolo non definito : cscal_ ld: 0711-317 ERRORE: Simbolo non definito : zscal_ ld: 0711-317 ERRORE: Simbolo non definito : csscal_ ld: 0711-317 ERRORE: Simbolo non definito : zdscal_ ld: 0711-317 ERRORE: Simbolo non definito : scopy_ ld: 0711-317 ERRORE: Simbolo non definito : dcopy_ ld: 0711-317 ERRORE: Simbolo non definito : ccopy_ ld: 0711-317 ERRORE: Simbolo non definito : zcopy_ ld: 0711-317 ERRORE: Simbolo non definito : saxpy_ ld: 0711-317 ERRORE: Simbolo non definito : daxpy_ ld: 0711-317 ERRORE: Simbolo non definito : caxpy_ ld: 0711-317 ERRORE: Simbolo non definito : zaxpy_ ld: 0711-317 ERRORE: Simbolo non definito : .cdotu_ ld: 0711-317 ERRORE: Simbolo non definito : .zdotu_ ld: 0711-317 ERRORE: Simbolo non definito : .cdotc_ ld: 0711-317 ERRORE: Simbolo non definito : .zdotc_ ld: 0711-317 ERRORE: Simbolo non definito : sgemv_ ld: 0711-317 ERRORE: Simbolo non definito : dgemv_ ld: 0711-317 ERRORE: Simbolo non definito : cgemv_ ld: 0711-317 ERRORE: Simbolo non definito : zgemv_ ld: 0711-317 ERRORE: Simbolo non definito : chemv_ ld: 0711-317 ERRORE: Simbolo non definito : zhemv_ ld: 0711-317 ERRORE: Simbolo non definito : ssymv_ ld: 0711-317 ERRORE: Simbolo non definito : dsymv_ ld: 0711-317 ERRORE: Simbolo non definito : strmv_ ld: 0711-317 ERRORE: Simbolo non definito : dtrmv_ ld: 0711-317 ERRORE: Simbolo non definito : ctrmv_ ld: 0711-317 ERRORE: Simbolo non definito : ztrmv_ ld: 0711-317 ERRORE: Simbolo non definito : sger_ ld: 0711-317 ERRORE: Simbolo non definito : dger_ ld: 0711-317 ERRORE: Simbolo non definito : cgeru_ ld: 0711-317 ERRORE: Simbolo non definito : zgeru_ ld: 0711-317 ERRORE: Simbolo non definito : cgerc_ ld: 0711-317 ERRORE: Simbolo non definito : zgerc_ ld: 0711-317 ERRORE: Simbolo non definito : sgemm_ ld: 0711-317 ERRORE: Simbolo non definito : dgemm_ ld: 0711-317 ERRORE: Simbolo non definito : cgemm_ ld: 0711-317 ERRORE: Simbolo non definito : zgemm_ ld: 0711-317 ERRORE: Simbolo non definito : .sdot_ ld: 0711-317 ERRORE: Simbolo non definito : .ddot_ ld: 0711-317 ERRORE: Simbolo non definito : .snrm2_ ld: 0711-317 ERRORE: Simbolo non definito : .dnrm2_ ld: 0711-317 ERRORE: Simbolo non definito : .scnrm2_ ld: 0711-317 ERRORE: Simbolo non definito : .dznrm2_ ld: 0711-317 ERRORE: Simbolo non definito : .sasum_ ld: 0711-317 ERRORE: Simbolo non definito : .dasum_ ld: 0711-317 ERRORE: Simbolo non definito : .scasum_ ld: 0711-317 ERRORE: Simbolo non definito : .dzasum_ ld: 0711-317 ERRORE: Simbolo non definito : isamax_ ld: 0711-317 ERRORE: Simbolo non definito : idamax_ ld: 0711-317 ERRORE: Simbolo non definito : icamax_ ld: 0711-317 ERRORE: Simbolo non definito : izamax_ ld: 0711-317 ERRORE: Simbolo non definito : sdot_ ld: 0711-317 ERRORE: Simbolo non definito : ddot_ ld: 0711-317 ERRORE: Simbolo non definito : snrm2_ ld: 0711-317 ERRORE: Simbolo non definito : dnrm2_ ld: 0711-317 ERRORE: Simbolo non definito : scnrm2_ ld: 0711-317 ERRORE: Simbolo non definito : dznrm2_ ld: 0711-317 ERRORE: Simbolo non definito : sasum_ ld: 0711-317 ERRORE: Simbolo non definito : dasum_ ld: 0711-317 ERRORE: Simbolo non definito : scasum_ ld: 0711-317 ERRORE: Simbolo non definito : dzasum_ ld: 0711-345 Usare l'opzione -bloadmap o -bnoquiet per ulteriori informazioni. building 'scipy.linalg.flapack' extension compiling C sources C compiler: cc_r -DNDEBUG -O compile options: '-DNO_ATLAS_INFO=1 -Ibuild/src.aix-5.3-2.5 -I/home/Marek/apython/lib/python2.5/site-packages/numpy/core/include -I/home/Marek/apython/include/python2.5 -c' compiling Fortran sources Fortran f77 compiler: /usr/bin/xlf -qextname -O5 Fortran f90 compiler: /usr/bin/xlf90 -qextname -O5 Fortran fix compiler: /usr/bin/xlf90 -qfixed -qextname -O5 compile options: '-DNO_ATLAS_INFO=1 -Ibuild/src.aix-5.3-2.5 -I/home/Marek/apython/lib/python2.5/site-packages/numpy/core/include -I/home/Marek/apython/include/python2.5 -c' /home/Marek/apython/lib/python2.5/config/ld_so_aix /usr/bin/xlf95 -bI:/home/Marek/apython/lib/python2.5/config/python.exp build/temp.aix-5.3-2.5/build/src.aix-5.3-2.5/build/src.aix-5.3-2.5/scipy/linalg/flapackmodule.o build/temp.aix-5.3-2.5/build/src.aix-5.3-2.5/fortranobject.o build/temp.aix-5.3-2.5/build/src.aix-5.3-2.5/build/src.aix-5.3-2.5/scipy/linalg/flapack-f2pywrappers.o -L/home/Marek/apython/lib -L/usr/lib -Lbuild/temp.aix-5.3-2.5 -llapack -lblas -o build/lib.aix-5.3-2.5/scipy/linalg/flapack.so /usr/bin/xlf95: 1501-262 One or more input object files contain IPA information: specify -qipa for additional optimization. ld: 0711-317 ERRORE: Simbolo non definito : spbtrf_ ld: 0711-317 ERRORE: Simbolo non definito : dpbtrf_ ld: 0711-317 ERRORE: Simbolo non definito : cpbtrf_ ld: 0711-317 ERRORE: Simbolo non definito : zpbtrf_ ld: 0711-317 ERRORE: Simbolo non definito : spbsv_ ld: 0711-317 ERRORE: Simbolo non definito : dpbsv_ ld: 0711-317 ERRORE: Simbolo non definito : cpbsv_ ld: 0711-317 ERRORE: Simbolo non definito : zpbsv_ ld: 0711-317 ERRORE: Simbolo non definito : sgebal_ ld: 0711-317 ERRORE: Simbolo non definito : dgebal_ ld: 0711-317 ERRORE: Simbolo non definito : cgebal_ ld: 0711-317 ERRORE: Simbolo non definito : zgebal_ ld: 0711-317 ERRORE: Simbolo non definito : sgehrd_ ld: 0711-317 ERRORE: Simbolo non definito : dgehrd_ ld: 0711-317 ERRORE: Simbolo non definito : cgehrd_ ld: 0711-317 ERRORE: Simbolo non definito : zgehrd_ ld: 0711-317 ERRORE: Simbolo non definito : sgbsv_ ld: 0711-317 ERRORE: Simbolo non definito : dgbsv_ ld: 0711-317 ERRORE: Simbolo non definito : cgbsv_ ld: 0711-317 ERRORE: Simbolo non definito : zgbsv_ ld: 0711-317 ERRORE: Simbolo non definito : sgesv_ ld: 0711-317 ERRORE: Simbolo non definito : dgesv_ ld: 0711-317 ERRORE: Simbolo non definito : cgesv_ ld: 0711-317 ERRORE: Simbolo non definito : zgesv_ ld: 0711-317 ERRORE: Simbolo non definito : sgetrf_ ld: 0711-317 ERRORE: Simbolo non definito : dgetrf_ ld: 0711-317 ERRORE: Simbolo non definito : cgetrf_ ld: 0711-317 ERRORE: Simbolo non definito : zgetrf_ ld: 0711-317 ERRORE: Simbolo non definito : sgetrs_ ld: 0711-317 ERRORE: Simbolo non definito : dgetrs_ ld: 0711-317 ERRORE: Simbolo non definito : cgetrs_ ld: 0711-317 ERRORE: Simbolo non definito : zgetrs_ ld: 0711-317 ERRORE: Simbolo non definito : sgetri_ ld: 0711-317 ERRORE: Simbolo non definito : dgetri_ ld: 0711-317 ERRORE: Simbolo non definito : cgetri_ ld: 0711-317 ERRORE: Simbolo non definito : zgetri_ ld: 0711-317 ERRORE: Simbolo non definito : sgesdd_ ld: 0711-317 ERRORE: Simbolo non definito : dgesdd_ ld: 0711-317 ERRORE: Simbolo non definito : cgesdd_ ld: 0711-317 ERRORE: Simbolo non definito : zgesdd_ ld: 0711-317 ERRORE: Simbolo non definito : sgelss_ ld: 0711-317 ERRORE: Simbolo non definito : dgelss_ ld: 0711-317 ERRORE: Simbolo non definito : cgelss_ ld: 0711-317 ERRORE: Simbolo non definito : zgelss_ ld: 0711-317 ERRORE: Simbolo non definito : sgeqrf_ ld: 0711-317 ERRORE: Simbolo non definito : dgeqrf_ ld: 0711-317 ERRORE: Simbolo non definito : cgeqrf_ ld: 0711-317 ERRORE: Simbolo non definito : zgeqrf_ ld: 0711-317 ERRORE: Simbolo non definito : sgerqf_ ld: 0711-317 ERRORE: Simbolo non definito : dgerqf_ ld: 0711-317 ERRORE: Simbolo non definito : cgerqf_ ld: 0711-317 ERRORE: Simbolo non definito : zgerqf_ ld: 0711-317 ERRORE: Simbolo non definito : sorgqr_ ld: 0711-317 ERRORE: Simbolo non definito : dorgqr_ ld: 0711-317 ERRORE: Simbolo non definito : cungqr_ ld: 0711-317 ERRORE: Simbolo non definito : zungqr_ ld: 0711-317 ERRORE: Simbolo non definito : sgeev_ ld: 0711-317 ERRORE: Simbolo non definito : dgeev_ ld: 0711-317 ERRORE: Simbolo non definito : cgeev_ ld: 0711-317 ERRORE: Simbolo non definito : zgeev_ ld: 0711-317 ERRORE: Simbolo non definito : sgegv_ ld: 0711-317 ERRORE: Simbolo non definito : dgegv_ ld: 0711-317 ERRORE: Simbolo non definito : cgegv_ ld: 0711-317 ERRORE: Simbolo non definito : zgegv_ ld: 0711-317 ERRORE: Simbolo non definito : ssyev_ ld: 0711-317 ERRORE: Simbolo non definito : dsyev_ ld: 0711-317 ERRORE: Simbolo non definito : cheev_ ld: 0711-317 ERRORE: Simbolo non definito : zheev_ ld: 0711-317 ERRORE: Simbolo non definito : sposv_ ld: 0711-317 ERRORE: Simbolo non definito : dposv_ ld: 0711-317 ERRORE: Simbolo non definito : cposv_ ld: 0711-317 ERRORE: Simbolo non definito : zposv_ ld: 0711-317 ERRORE: Simbolo non definito : spotrf_ ld: 0711-317 ERRORE: Simbolo non definito : dpotrf_ ld: 0711-317 ERRORE: Simbolo non definito : cpotrf_ ld: 0711-317 ERRORE: Simbolo non definito : zpotrf_ ld: 0711-317 ERRORE: Simbolo non definito : spotrs_ ld: 0711-317 ERRORE: Simbolo non definito : dpotrs_ ld: 0711-317 ERRORE: Simbolo non definito : cpotrs_ ld: 0711-317 ERRORE: Simbolo non definito : zpotrs_ ld: 0711-317 ERRORE: Simbolo non definito : spotri_ ld: 0711-317 ERRORE: Simbolo non definito : dpotri_ ld: 0711-317 ERRORE: Simbolo non definito : cpotri_ ld: 0711-317 ERRORE: Simbolo non definito : zpotri_ ld: 0711-317 ERRORE: Simbolo non definito : slauum_ ld: 0711-317 ERRORE: Simbolo non definito : dlauum_ ld: 0711-317 ERRORE: Simbolo non definito : clauum_ ld: 0711-317 ERRORE: Simbolo non definito : zlauum_ ld: 0711-317 ERRORE: Simbolo non definito : strtri_ ld: 0711-317 ERRORE: Simbolo non definito : dtrtri_ ld: 0711-317 ERRORE: Simbolo non definito : ctrtri_ ld: 0711-317 ERRORE: Simbolo non definito : ztrtri_ ld: 0711-317 ERRORE: Simbolo non definito : slaswp_ ld: 0711-317 ERRORE: Simbolo non definito : dlaswp_ ld: 0711-317 ERRORE: Simbolo non definito : claswp_ ld: 0711-317 ERRORE: Simbolo non definito : zlaswp_ ld: 0711-317 ERRORE: Simbolo non definito : cgees_ ld: 0711-317 ERRORE: Simbolo non definito : zgees_ ld: 0711-317 ERRORE: Simbolo non definito : dgees_ ld: 0711-317 ERRORE: Simbolo non definito : sgees_ ld: 0711-317 ERRORE: Simbolo non definito : sggev_ ld: 0711-317 ERRORE: Simbolo non definito : dggev_ ld: 0711-317 ERRORE: Simbolo non definito : cggev_ ld: 0711-317 ERRORE: Simbolo non definito : zggev_ ld: 0711-317 ERRORE: Simbolo non definito : ssbev_ ld: 0711-317 ERRORE: Simbolo non definito : dsbev_ ld: 0711-317 ERRORE: Simbolo non definito : ssbevd_ ld: 0711-317 ERRORE: Simbolo non definito : dsbevd_ ld: 0711-317 ERRORE: Simbolo non definito : ssbevx_ ld: 0711-317 ERRORE: Simbolo non definito : dsbevx_ ld: 0711-317 ERRORE: Simbolo non definito : chbevd_ ld: 0711-317 ERRORE: Simbolo non definito : zhbevd_ ld: 0711-317 ERRORE: Simbolo non definito : chbevx_ ld: 0711-317 ERRORE: Simbolo non definito : zhbevx_ ld: 0711-317 ERRORE: Simbolo non definito : sgbtrf_ ld: 0711-317 ERRORE: Simbolo non definito : dgbtrf_ ld: 0711-317 ERRORE: Simbolo non definito : cgbtrf_ ld: 0711-317 ERRORE: Simbolo non definito : zgbtrf_ ld: 0711-317 ERRORE: Simbolo non definito : sgbtrs_ ld: 0711-317 ERRORE: Simbolo non definito : dgbtrs_ ld: 0711-317 ERRORE: Simbolo non definito : cgbtrs_ ld: 0711-317 ERRORE: Simbolo non definito : zgbtrs_ ld: 0711-317 ERRORE: Simbolo non definito : .slamch_ ld: 0711-317 ERRORE: Simbolo non definito : .dlamch_ ld: 0711-317 ERRORE: Simbolo non definito : slamch_ ld: 0711-317 ERRORE: Simbolo non definito : dlamch_ ld: 0711-345 Usare l'opzione -bloadmap o -bnoquiet per ulteriori informazioni. building 'scipy.linalg._flinalg' extension compiling C sources C compiler: cc_r -DNDEBUG -O compile options: '-DNO_ATLAS_INFO=1 -Ibuild/src.aix-5.3-2.5 -I/home/Marek/apython/lib/python2.5/site-packages/numpy/core/include -I/home/Marek/apython/include/python2.5 -c' compiling Fortran sources Fortran f77 compiler: /usr/bin/xlf -qextname -O5 Fortran f90 compiler: /usr/bin/xlf90 -qextname -O5 Fortran fix compiler: /usr/bin/xlf90 -qfixed -qextname -O5 compile options: '-DNO_ATLAS_INFO=1 -Ibuild/src.aix-5.3-2.5 -I/home/Marek/apython/lib/python2.5/site-packages/numpy/core/include -I/home/Marek/apython/include/python2.5 -c' /home/Marek/apython/lib/python2.5/config/ld_so_aix /usr/bin/xlf95 -bI:/home/Marek/apython/lib/python2.5/config/python.exp build/temp.aix-5.3-2.5/build/src.aix-5.3-2.5/scipy/linalg/_flinalgmodule.o build/temp.aix-5.3-2.5/build/src.aix-5.3-2.5/fortranobject.o build/temp.aix-5.3-2.5/Lib/linalg/src/det.o build/temp.aix-5.3-2.5/Lib/linalg/src/lu.o -L/home/Marek/apython/lib -L/usr/lib -Lbuild/temp.aix-5.3-2.5 -llapack -lblas -o build/lib.aix-5.3-2.5/scipy/linalg/_flinalg.so /usr/bin/xlf95: 1501-262 One or more input object files contain IPA information: specify -qipa for additional optimization. ld: 0711-317 ERRORE: Simbolo non definito : .dgetrf_ ld: 0711-317 ERRORE: Simbolo non definito : .sgetrf_ ld: 0711-317 ERRORE: Simbolo non definito : .zgetrf_ ld: 0711-317 ERRORE: Simbolo non definito : .cgetrf_ ld: 0711-317 ERRORE: Simbolo non definito : .dlaswp_ ld: 0711-317 ERRORE: Simbolo non definito : .zlaswp_ ld: 0711-317 ERRORE: Simbolo non definito : .slaswp_ ld: 0711-317 ERRORE: Simbolo non definito : .claswp_ ld: 0711-345 Usare l'opzione -bloadmap o -bnoquiet per ulteriori informazioni. building 'scipy.linalg.calc_lwork' extension compiling C sources C compiler: cc_r -DNDEBUG -O compile options: '-DNO_ATLAS_INFO=1 -Ibuild/src.aix-5.3-2.5 -I/home/Marek/apython/lib/python2.5/site-packages/numpy/core/include -I/home/Marek/apython/include/python2.5 -c' compiling Fortran sources Fortran f77 compiler: /usr/bin/xlf -qextname -O5 Fortran f90 compiler: /usr/bin/xlf90 -qextname -O5 Fortran fix compiler: /usr/bin/xlf90 -qfixed -qextname -O5 compile options: '-DNO_ATLAS_INFO=1 -Ibuild/src.aix-5.3-2.5 -I/home/Marek/apython/lib/python2.5/site-packages/numpy/core/include -I/home/Marek/apython/include/python2.5 -c' /home/Marek/apython/lib/python2.5/config/ld_so_aix /usr/bin/xlf95 -bI:/home/Marek/apython/lib/python2.5/config/python.exp build/temp.aix-5.3-2.5/build/src.aix-5.3-2.5/scipy/linalg/calc_lworkmodule.o build/temp.aix-5.3-2.5/build/src.aix-5.3-2.5/fortranobject.o build/temp.aix-5.3-2.5/Lib/linalg/src/calc_lwork.o -L/home/Marek/apython/lib -L/usr/lib -Lbuild/temp.aix-5.3-2.5 -llapack -lblas -o build/lib.aix-5.3-2.5/scipy/linalg/calc_lwork.so /usr/bin/xlf95: 1501-262 One or more input object files contain IPA information: specify -qipa for additional optimization. ld: 0711-317 ERRORE: Simbolo non definito : .ilaenv_ ld: 0711-345 Usare l'opzione -bloadmap o -bnoquiet per ulteriori informazioni. building 'scipy.linalg._iterative' extension compiling C sources C compiler: cc_r -DNDEBUG -O compile options: '-DNO_ATLAS_INFO=1 -Ibuild/src.aix-5.3-2.5 -I/home/Marek/apython/lib/python2.5/site-packages/numpy/core/include -I/home/Marek/apython/include/python2.5 -c' compiling Fortran sources Fortran f77 compiler: /usr/bin/xlf -qextname -O5 Fortran f90 compiler: /usr/bin/xlf90 -qextname -O5 Fortran fix compiler: /usr/bin/xlf90 -qfixed -qextname -O5 compile options: '-DNO_ATLAS_INFO=1 -Ibuild/src.aix-5.3-2.5 -I/home/Marek/apython/lib/python2.5/site-packages/numpy/core/include -I/home/Marek/apython/include/python2.5 -c' /home/Marek/apython/lib/python2.5/config/ld_so_aix /usr/bin/xlf95 -bI:/home/Marek/apython/lib/python2.5/config/python.exp build/temp.aix-5.3-2.5/build/src.aix-5.3-2.5/build/src.aix-5.3-2.5/Lib/linalg/iterative/_iterativemodule.o build/temp.aix-5.3-2.5/build/src.aix-5.3-2.5/fortranobject.o build/temp.aix-5.3-2.5/build/src.aix-5.3-2.5/Lib/linalg/iterative/STOPTEST2.o build/temp.aix-5.3-2.5/build/src.aix-5.3-2.5/Lib/linalg/iterative/getbreak.o build/temp.aix-5.3-2.5/build/src.aix-5.3-2.5/Lib/linalg/iterative/BiCGREVCOM.o build/temp.aix-5.3-2.5/build/src.aix-5.3-2.5/Lib/linalg/iterative/BiCGSTABREVCOM.o build/temp.aix-5.3-2.5/build/src.aix-5.3-2.5/Lib/linalg/iterative/CGREVCOM.o build/temp.aix-5.3-2.5/build/src.aix-5.3-2.5/Lib/linalg/iterative/CGSREVCOM.o build/temp.aix-5.3-2.5/build/src.aix-5.3-2.5/Lib/linalg/iterative/GMRESREVCOM.o build/temp.aix-5.3-2.5/build/src.aix-5.3-2.5/Lib/linalg/iterative/QMRREVCOM.o -L/home/Marek/apython/lib -L/usr/lib -Lbuild/temp.aix-5.3-2.5 -llapack -lblas -o build/lib.aix-5.3-2.5/scipy/linalg/_iterative.so /usr/bin/xlf95: 1501-262 One or more input object files contain IPA information: specify -qipa for additional optimization. ld: 0711-317 ERRORE: Simbolo non definito : .saxpy_ ld: 0711-317 ERRORE: Simbolo non definito : .sdot_ ld: 0711-317 ERRORE: Simbolo non definito : .scopy_ ld: 0711-317 ERRORE: Simbolo non definito : .snrm2_ ld: 0711-317 ERRORE: Simbolo non definito : .slamch_ ld: 0711-317 ERRORE: Simbolo non definito : .daxpy_ ld: 0711-317 ERRORE: Simbolo non definito : .ddot_ ld: 0711-317 ERRORE: Simbolo non definito : .dcopy_ ld: 0711-317 ERRORE: Simbolo non definito : .dnrm2_ ld: 0711-317 ERRORE: Simbolo non definito : .dlamch_ ld: 0711-317 ERRORE: Simbolo non definito : .caxpy_ ld: 0711-317 ERRORE: Simbolo non definito : .cdotc_ ld: 0711-317 ERRORE: Simbolo non definito : .ccopy_ ld: 0711-317 ERRORE: Simbolo non definito : .scnrm2_ ld: 0711-317 ERRORE: Simbolo non definito : .zaxpy_ ld: 0711-317 ERRORE: Simbolo non definito : .zdotc_ ld: 0711-317 ERRORE: Simbolo non definito : .zcopy_ ld: 0711-317 ERRORE: Simbolo non definito : .dznrm2_ ld: 0711-317 ERRORE: Simbolo non definito : .sscal_ ld: 0711-317 ERRORE: Simbolo non definito : .dscal_ ld: 0711-317 ERRORE: Simbolo non definito : .cscal_ ld: 0711-317 ERRORE: Simbolo non definito : .zscal_ ld: 0711-317 ERRORE: Simbolo non definito : .strsv_ ld: 0711-317 ERRORE: Simbolo non definito : .dtrsv_ ld: 0711-317 ERRORE: Simbolo non definito : .ctrsv_ ld: 0711-317 ERRORE: Simbolo non definito : .ztrsv_ ld: 0711-345 Usare l'opzione -bloadmap o -bnoquiet per ulteriori informazioni. building 'scipy.linsolve._zsuperlu' extension compiling C sources C compiler: cc_r -DNDEBUG -O compile options: '-DNO_ATLAS_INFO=1 -DUSE_VENDOR_BLAS=1 -I/home/Marek/apython/lib/python2.5/site-packages/numpy/core/include -I/home/Marek/apython/include/python2.5 -c' /home/Marek/apython/lib/python2.5/config/ld_so_aix /usr/bin/xlf95 -bI:/home/Marek/apython/lib/python2.5/config/python.exp build/temp.aix-5.3-2.5/Lib/linsolve/_zsuperlumodule.o build/temp.aix-5.3-2.5/Lib/linsolve/_superlu_utils.o build/temp.aix-5.3-2.5/Lib/linsolve/_superluobject.o -L/home/Marek/apython/lib -L/usr/lib -Lbuild/temp.aix-5.3-2.5 -lsuperlu_src -llapack -lblas -o build/lib.aix-5.3-2.5/scipy/linsolve/_zsuperlu.so ld: 0711-317 ERRORE: Simbolo non definito : .ztrsv_ ld: 0711-317 ERRORE: Simbolo non definito : .zgemv_ ld: 0711-317 ERRORE: Simbolo non definito : .ztrsm_ ld: 0711-317 ERRORE: Simbolo non definito : .zgemm_ ld: 0711-317 ERRORE: Simbolo non definito : .ctrsv_ ld: 0711-317 ERRORE: Simbolo non definito : .cgemv_ ld: 0711-317 ERRORE: Simbolo non definito : .ctrsm_ ld: 0711-317 ERRORE: Simbolo non definito : .cgemm_ ld: 0711-317 ERRORE: Simbolo non definito : .dtrsv_ ld: 0711-317 ERRORE: Simbolo non definito : .dgemv_ ld: 0711-317 ERRORE: Simbolo non definito : .dtrsm_ ld: 0711-317 ERRORE: Simbolo non definito : .dgemm_ ld: 0711-317 ERRORE: Simbolo non definito : .strsv_ ld: 0711-317 ERRORE: Simbolo non definito : .sgemv_ ld: 0711-317 ERRORE: Simbolo non definito : .strsm_ ld: 0711-317 ERRORE: Simbolo non definito : .sgemm_ ld: 0711-345 Usare l'opzione -bloadmap o -bnoquiet per ulteriori informazioni. building 'scipy.linsolve._dsuperlu' extension compiling C sources C compiler: cc_r -DNDEBUG -O compile options: '-DNO_ATLAS_INFO=1 -DUSE_VENDOR_BLAS=1 -I/home/Marek/apython/lib/python2.5/site-packages/numpy/core/include -I/home/Marek/apython/include/python2.5 -c' /home/Marek/apython/lib/python2.5/config/ld_so_aix /usr/bin/xlf95 -bI:/home/Marek/apython/lib/python2.5/config/python.exp build/temp.aix-5.3-2.5/Lib/linsolve/_dsuperlumodule.o build/temp.aix-5.3-2.5/Lib/linsolve/_superlu_utils.o build/temp.aix-5.3-2.5/Lib/linsolve/_superluobject.o -L/home/Marek/apython/lib -L/usr/lib -Lbuild/temp.aix-5.3-2.5 -lsuperlu_src -llapack -lblas -o build/lib.aix-5.3-2.5/scipy/linsolve/_dsuperlu.so ld: 0711-317 ERRORE: Simbolo non definito : .ztrsv_ ld: 0711-317 ERRORE: Simbolo non definito : .zgemv_ ld: 0711-317 ERRORE: Simbolo non definito : .ztrsm_ ld: 0711-317 ERRORE: Simbolo non definito : .zgemm_ ld: 0711-317 ERRORE: Simbolo non definito : .ctrsv_ ld: 0711-317 ERRORE: Simbolo non definito : .cgemv_ ld: 0711-317 ERRORE: Simbolo non definito : .ctrsm_ ld: 0711-317 ERRORE: Simbolo non definito : .cgemm_ ld: 0711-317 ERRORE: Simbolo non definito : .dtrsv_ ld: 0711-317 ERRORE: Simbolo non definito : .dgemv_ ld: 0711-317 ERRORE: Simbolo non definito : .dtrsm_ ld: 0711-317 ERRORE: Simbolo non definito : .dgemm_ ld: 0711-317 ERRORE: Simbolo non definito : .strsv_ ld: 0711-317 ERRORE: Simbolo non definito : .sgemv_ ld: 0711-317 ERRORE: Simbolo non definito : .strsm_ ld: 0711-317 ERRORE: Simbolo non definito : .sgemm_ ld: 0711-345 Usare l'opzione -bloadmap o -bnoquiet per ulteriori informazioni. building 'scipy.linsolve._csuperlu' extension compiling C sources C compiler: cc_r -DNDEBUG -O compile options: '-DNO_ATLAS_INFO=1 -DUSE_VENDOR_BLAS=1 -I/home/Marek/apython/lib/python2.5/site-packages/numpy/core/include -I/home/Marek/apython/include/python2.5 -c' /home/Marek/apython/lib/python2.5/config/ld_so_aix /usr/bin/xlf95 -bI:/home/Marek/apython/lib/python2.5/config/python.exp build/temp.aix-5.3-2.5/Lib/linsolve/_csuperlumodule.o build/temp.aix-5.3-2.5/Lib/linsolve/_superlu_utils.o build/temp.aix-5.3-2.5/Lib/linsolve/_superluobject.o -L/home/Marek/apython/lib -L/usr/lib -Lbuild/temp.aix-5.3-2.5 -lsuperlu_src -llapack -lblas -o build/lib.aix-5.3-2.5/scipy/linsolve/_csuperlu.so ld: 0711-317 ERRORE: Simbolo non definito : .ztrsv_ ld: 0711-317 ERRORE: Simbolo non definito : .zgemv_ ld: 0711-317 ERRORE: Simbolo non definito : .ztrsm_ ld: 0711-317 ERRORE: Simbolo non definito : .zgemm_ ld: 0711-317 ERRORE: Simbolo non definito : .ctrsv_ ld: 0711-317 ERRORE: Simbolo non definito : .cgemv_ ld: 0711-317 ERRORE: Simbolo non definito : .ctrsm_ ld: 0711-317 ERRORE: Simbolo non definito : .cgemm_ ld: 0711-317 ERRORE: Simbolo non definito : .dtrsv_ ld: 0711-317 ERRORE: Simbolo non definito : .dgemv_ ld: 0711-317 ERRORE: Simbolo non definito : .dtrsm_ ld: 0711-317 ERRORE: Simbolo non definito : .dgemm_ ld: 0711-317 ERRORE: Simbolo non definito : .strsv_ ld: 0711-317 ERRORE: Simbolo non definito : .sgemv_ ld: 0711-317 ERRORE: Simbolo non definito : .strsm_ ld: 0711-317 ERRORE: Simbolo non definito : .sgemm_ ld: 0711-345 Usare l'opzione -bloadmap o -bnoquiet per ulteriori informazioni. building 'scipy.linsolve._ssuperlu' extension compiling C sources C compiler: cc_r -DNDEBUG -O compile options: '-DNO_ATLAS_INFO=1 -DUSE_VENDOR_BLAS=1 -I/home/Marek/apython/lib/python2.5/site-packages/numpy/core/include -I/home/Marek/apython/include/python2.5 -c' /home/Marek/apython/lib/python2.5/config/ld_so_aix /usr/bin/xlf95 -bI:/home/Marek/apython/lib/python2.5/config/python.exp build/temp.aix-5.3-2.5/Lib/linsolve/_ssuperlumodule.o build/temp.aix-5.3-2.5/Lib/linsolve/_superlu_utils.o build/temp.aix-5.3-2.5/Lib/linsolve/_superluobject.o -L/home/Marek/apython/lib -L/usr/lib -Lbuild/temp.aix-5.3-2.5 -lsuperlu_src -llapack -lblas -o build/lib.aix-5.3-2.5/scipy/linsolve/_ssuperlu.so ld: 0711-317 ERRORE: Simbolo non definito : .ztrsv_ ld: 0711-317 ERRORE: Simbolo non definito : .zgemv_ ld: 0711-317 ERRORE: Simbolo non definito : .ztrsm_ ld: 0711-317 ERRORE: Simbolo non definito : .zgemm_ ld: 0711-317 ERRORE: Simbolo non definito : .ctrsv_ ld: 0711-317 ERRORE: Simbolo non definito : .cgemv_ ld: 0711-317 ERRORE: Simbolo non definito : .ctrsm_ ld: 0711-317 ERRORE: Simbolo non definito : .cgemm_ ld: 0711-317 ERRORE: Simbolo non definito : .dtrsv_ ld: 0711-317 ERRORE: Simbolo non definito : .dgemv_ ld: 0711-317 ERRORE: Simbolo non definito : .dtrsm_ ld: 0711-317 ERRORE: Simbolo non definito : .dgemm_ ld: 0711-317 ERRORE: Simbolo non definito : .strsv_ ld: 0711-317 ERRORE: Simbolo non definito : .sgemv_ ld: 0711-317 ERRORE: Simbolo non definito : .strsm_ ld: 0711-317 ERRORE: Simbolo non definito : .sgemm_ ld: 0711-345 Usare l'opzione -bloadmap o -bnoquiet per ulteriori informazioni. building 'scipy.odr.__odrpack' extension compiling C sources C compiler: cc_r -DNDEBUG -O compile options: '-DNO_ATLAS_INFO=1 -ILib/odr -I/home/Marek/apython/lib/python2.5/site-packages/numpy/core/include -I/home/Marek/apython/include/python2.5 -c' /home/Marek/apython/lib/python2.5/config/ld_so_aix /usr/bin/xlf95 -bI:/home/Marek/apython/lib/python2.5/config/python.exp build/temp.aix-5.3-2.5/Lib/odr/__odrpack.o -L/usr/lib -Lbuild/temp.aix-5.3-2.5 -lodrpack -lblas -o build/lib.aix-5.3-2.5/scipy/odr/__odrpack.so ld: 0711-317 ERRORE: Simbolo non definito : .dcopy_ ld: 0711-317 ERRORE: Simbolo non definito : .ddot_ ld: 0711-317 ERRORE: Simbolo non definito : .dnrm2_ ld: 0711-317 ERRORE: Simbolo non definito : .daxpy_ ld: 0711-317 ERRORE: Simbolo non definito : .dswap_ ld: 0711-317 ERRORE: Simbolo non definito : .dscal_ ld: 0711-317 ERRORE: Simbolo non definito : .drotg_ ld: 0711-317 ERRORE: Simbolo non definito : .drot_ ld: 0711-317 ERRORE: Simbolo non definito : .dasum_ ld: 0711-317 ERRORE: Simbolo non definito : .idamax_ ld: 0711-345 Usare l'opzione -bloadmap o -bnoquiet per ulteriori informazioni. building 'scipy.optimize._lbfgsb' extension compiling C sources C compiler: cc_r -DNDEBUG -O compile options: '-DNO_ATLAS_INFO=1 -Ibuild/src.aix-5.3-2.5 -I/home/Marek/apython/lib/python2.5/site-packages/numpy/core/include -I/home/Marek/apython/include/python2.5 -c' compiling Fortran sources Fortran f77 compiler: /usr/bin/xlf -qextname -O5 Fortran f90 compiler: /usr/bin/xlf90 -qextname -O5 Fortran fix compiler: /usr/bin/xlf90 -qfixed -qextname -O5 compile options: '-DNO_ATLAS_INFO=1 -Ibuild/src.aix-5.3-2.5 -I/home/Marek/apython/lib/python2.5/site-packages/numpy/core/include -I/home/Marek/apython/include/python2.5 -c' /home/Marek/apython/lib/python2.5/config/ld_so_aix /usr/bin/xlf95 -bI:/home/Marek/apython/lib/python2.5/config/python.exp build/temp.aix-5.3-2.5/build/src.aix-5.3-2.5/Lib/optimize/lbfgsb/_lbfgsbmodule.o build/temp.aix-5.3-2.5/build/src.aix-5.3-2.5/fortranobject.o build/temp.aix-5.3-2.5/Lib/optimize/lbfgsb/routines.o -L/home/Marek/apython/lib -L/usr/lib -Lbuild/temp.aix-5.3-2.5 -llapack -lblas -o build/lib.aix-5.3-2.5/scipy/optimize/_lbfgsb.so /usr/bin/xlf95: 1501-262 One or more input object files contain IPA information: specify -qipa for additional optimization. ld: 0711-317 ERRORE: Simbolo non definito : .dcopy_ ld: 0711-317 ERRORE: Simbolo non definito : .dscal_ ld: 0711-317 ERRORE: Simbolo non definito : .dtrtrs_ ld: 0711-317 ERRORE: Simbolo non definito : .ddot_ ld: 0711-317 ERRORE: Simbolo non definito : .daxpy_ ld: 0711-317 ERRORE: Simbolo non definito : .dpotrf_ ld: 0711-345 Usare l'opzione -bloadmap o -bnoquiet per ulteriori informazioni. From david at ar.media.kyoto-u.ac.jp Sat Jul 28 07:51:22 2007 From: david at ar.media.kyoto-u.ac.jp (David Cournapeau) Date: Sat, 28 Jul 2007 20:51:22 +0900 Subject: [SciPy-user] Numpy/Scipy on AIX In-Reply-To: <33682.147.162.29.65.1185623222.squirrel@poczta.p.lodz.pl> References: <33682.147.162.29.65.1185623222.squirrel@poczta.p.lodz.pl> Message-ID: <46AB2DBA.4020601@ar.media.kyoto-u.ac.jp> Marek Wojciechowski wrote: > David Cournapeau ar.media.kyoto-u.ac.jp> writes: > > >> Marek wrote: >> >>> Thanks for your response, but I skipped the problem downloading svn >>> > version > of > >>> numpy (previously i tried to install numpy-1.0.2), and this compiles >>> > nicely. > >>> But now i run into troubles with scipy. Namely, I get tons of >>> > unresolved > >>> symbols from lapack, for example: >>> >>> ld: 0711-317 ERROR: Undefined symbol: .sgemm_ >>> >>> Any workaround for this? I know there is linker >>> > option -brename:.sgemm_,.sgemm, > >>> which can solve it but this si not a nice solution. >>> >>> >>> >> We'll need more informations to help you. The most useful thing would be >> > > >> to know the output of python setup.py config for numpy and scipy. >> >> Also, did you used the release of scipy (0.5.2) or the svn version as >> > well ? > >> David >> >> > > I'm using svn version of scipy. As far as i observed scipy 0.5.2 is not > compatibile with numpy-svn. Below i'm pasting what setup.py produces. I > seems things are compiled and there is only linking problem with lapack. > Thanks for help. > Where are your blas and lapack coming from ? Did you compile them by yourself ? How ? (compiler, version, etc...) David From mwojc at p.lodz.pl Sat Jul 28 10:41:03 2007 From: mwojc at p.lodz.pl (Marek Wojciechowski) Date: Sat, 28 Jul 2007 16:41:03 +0200 (CEST) Subject: [SciPy-user] Numpy/Scipy on AIX In-Reply-To: References: Message-ID: <34352.147.162.29.65.1185633663.squirrel@poczta.p.lodz.pl> > > I'm using svn version of scipy. As far as i observed scipy 0.5.2 is not > > compatibile with numpy-svn. Below i'm pasting what setup.py produces. I > > seems things are compiled and there is only linking problem with lapack. > > Thanks for help. > > > Where are your blas and lapack coming from ? Did you compile them by > yourself ? How ? (compiler, version, etc...) > I'm using IBM(R) XL Fortran Enterprise Edition V9.1 and IBM(R) XL C Enterprise Edition V7.0. Maybe there is some incompatibility between compilers for Fortran and C? That's what is installed on the machine i'm working on. I have to compile lapack by myself (actually scipy installer can do that), this is lapack-lite-3.1.1 downloaded from the web, and blas is the one shipped with XL Fortran. Are there some obvious incompatibilities? Thanks Marek From fredmfp at gmail.com Sat Jul 28 19:03:07 2007 From: fredmfp at gmail.com (fred) Date: Sun, 29 Jul 2007 01:03:07 +0200 Subject: [SciPy-user] using imread... In-Reply-To: References: <46A8FE96.40404@gmail.com> <20070727060221.GA15345@clipper.ens.fr> Message-ID: <46ABCB2B.5070602@gmail.com> jelle a ?crit : > pil 1.1.6 supports numpy arrays, perhaps its even more efficent to use this? > > Well, I think I need to learn a little bit more about using gimp before... Thanks anyway. Cheers, -- http://scipy.org/FredericPetit From david at ar.media.kyoto-u.ac.jp Sun Jul 29 05:49:32 2007 From: david at ar.media.kyoto-u.ac.jp (David Cournapeau) Date: Sun, 29 Jul 2007 18:49:32 +0900 Subject: [SciPy-user] Numpy/Scipy on AIX In-Reply-To: <34352.147.162.29.65.1185633663.squirrel@poczta.p.lodz.pl> References: <34352.147.162.29.65.1185633663.squirrel@poczta.p.lodz.pl> Message-ID: <46AC62AC.3000500@ar.media.kyoto-u.ac.jp> Marek Wojciechowski wrote: >>> I'm using svn version of scipy. As far as i observed scipy 0.5.2 is not >>> compatibile with numpy-svn. Below i'm pasting what setup.py produces. I >>> seems things are compiled and there is only linking problem with lapack. >>> Thanks for help. >>> >> Where are your blas and lapack coming from ? Did you compile them by >> yourself ? How ? (compiler, version, etc...) >> > > I'm using IBM(R) XL Fortran Enterprise Edition V9.1 and IBM(R) XL C > Enterprise Edition V7.0. Maybe there is some incompatibility between > compilers for Fortran and C? That's what is installed on the machine i'm > working on. I have to compile lapack by myself (actually scipy installer > can do that), scipy cannot compile lapack by itself. I don't know the exact process in this case, but scipy has a "lite" lapack as a fall back; I am not 100 % sure, though. There is a pretty good chance that the LAPACK you compiled has something wrong: LAPACK is difficult to compile correctly when you want to use it in a non Fortran environment; at least it is on Linux. Did you test LAPACK ? LAPACK 3.1.1 causes problems with scipy at the moment, too, so I recommend you to compile the version 3.0 (beware though, you should NOT use the BLAS from LAPACK 3.0, because it is buggy). If I were you, I would do this first: compile LAPACK 3.0 with the AIX BLAS, and compile the testers and run them (doing a make lapack_testing should be enough). If this works, then the problem is either in the calling convention (python calls fortran code "through C", so you need to be sure that C and Fortran convention are the same; I would guess that AIX being proprietary and used for HPC, IBM tries to have compatible convention by default), or in scipy. If this is the case, we can focus on this point. Cheers, David From pearu at cens.ioc.ee Sun Jul 29 11:33:55 2007 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Sun, 29 Jul 2007 17:33:55 +0200 Subject: [SciPy-user] Numpy/Scipy on AIX In-Reply-To: <46AC62AC.3000500@ar.media.kyoto-u.ac.jp> References: <34352.147.162.29.65.1185633663.squirrel@poczta.p.lodz.pl> <46AC62AC.3000500@ar.media.kyoto-u.ac.jp> Message-ID: <46ACB363.9050601@cens.ioc.ee> David Cournapeau wrote: > scipy cannot compile lapack by itself. yes, it can. Just define env. variables BLAS_SRC, LAPACK_SRC pointing to blas, lapack source directories, respectively. If there are some blas or lapack libraries lying around in the system then one must also set BLAS=None, LAPACK=None, ATLAS=None so that numpy.distutils will not pick up the unwanted libraries. > I don't know the exact process in > this case, but scipy has a "lite" lapack as a fall back; I am not 100 % > sure, though. Did you mean numpy? numpy has lite lapack, not scipy. > There is a pretty good chance that the LAPACK you compiled has something > wrong: LAPACK is difficult to compile correctly when you want to use it > in a non Fortran environment; at least it is on Linux. Did you test LAPACK ? > > LAPACK 3.1.1 causes problems with scipy at the moment, too, so I > recommend you to compile the version 3.0 (beware though, you should NOT > use the BLAS from LAPACK 3.0, because it is buggy). If I were you, I > would do this first: compile LAPACK 3.0 with the AIX BLAS, and compile > the testers and run them (doing a make lapack_testing should be enough). I have fixed the problems with LAPACK 3.1.1 recently. Just use numpy from SVN and scipy should compile fine with LAPACK 3.1.1. Pearu From david at ar.media.kyoto-u.ac.jp Mon Jul 30 01:27:34 2007 From: david at ar.media.kyoto-u.ac.jp (David Cournapeau) Date: Mon, 30 Jul 2007 14:27:34 +0900 Subject: [SciPy-user] Numpy/Scipy on AIX In-Reply-To: <46ACB363.9050601@cens.ioc.ee> References: <34352.147.162.29.65.1185633663.squirrel@poczta.p.lodz.pl> <46AC62AC.3000500@ar.media.kyoto-u.ac.jp> <46ACB363.9050601@cens.ioc.ee> Message-ID: <46AD76C6.3040206@ar.media.kyoto-u.ac.jp> Pearu Peterson wrote: > > David Cournapeau wrote: > >> scipy cannot compile lapack by itself. > > yes, it can. Just define env. variables BLAS_SRC, LAPACK_SRC > pointing to blas, lapack source directories, respectively. > If there are some blas or lapack libraries lying > around in the system then one must also set BLAS=None, LAPACK=None, > ATLAS=None so that numpy.distutils will not pick up the unwanted libraries. Wow, I didn't see this feature while I packaged scipy. Sorry for the misinformation. > >> There is a pretty good chance that the LAPACK you compiled has something >> wrong: LAPACK is difficult to compile correctly when you want to use it >> in a non Fortran environment; at least it is on Linux. Did you test LAPACK ? >> >> LAPACK 3.1.1 causes problems with scipy at the moment, too, so I >> recommend you to compile the version 3.0 (beware though, you should NOT >> use the BLAS from LAPACK 3.0, because it is buggy). If I were you, I >> would do this first: compile LAPACK 3.0 with the AIX BLAS, and compile >> the testers and run them (doing a make lapack_testing should be enough). > > I have fixed the problems with LAPACK 3.1.1 recently. Just use numpy > from SVN and scipy should compile fine with LAPACK 3.1.1. Do all the tests pass now ? As far as I remembered (but this was a few months ago), building with LAPACK 3.1.1 is possible, but some tests fail. I don't have the time right now to recompile my own lapack to reproduce the problem, but I can do it within the new few days if you need more precise informations. David From elcorto at gmx.net Mon Jul 30 02:22:31 2007 From: elcorto at gmx.net (Steve Schmerler) Date: Mon, 30 Jul 2007 08:22:31 +0200 Subject: [SciPy-user] Memory problems with stats.mannwhitneyu In-Reply-To: <46AA3CD7.4060504@gmail.com> References: <46A917CA.2040402@gmail.com> <46A91C7C.8010604@sci.utah.edu> <46A9E78F.6060107@gmx.net> <46AA3CD7.4060504@gmail.com> Message-ID: <46AD83A7.90001@gmx.net> Robert Kern wrote: > Martin Blom wrote: >> I'm on an Ubuntu Feisty machine, and the python installation is the >> standard one for feisty. Machine and python details: >> >> >> ~$ python >> Python 2.5.1 (r251:54863, May 2 2007, 16:56:35) >> [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4 )] on linux2 >> Type "help", "copyright", "credits" or "license" for more information. >>>>> import scipy >>>>> scipy.__version__ >> '0.5.2' >>>>> import numpy >>>>> numpy.__version__ >> '1.0.1' > > Well, you all seem to have numpy 1.0.1 in common. I do not see this on my AMD 64 > Ubuntu box with numpy SVN. I suspect a bug in numpy 1.0.1 and suggest upgrading. Yes, the problem isn't there with numpy 1.0.4.dev3869, scipy 0.5.3.dev3105. -- cheers, steve I love deadlines. I like the whooshing sound they make as they fly by. -- Douglas Adams From robert.vergnes at yahoo.fr Mon Jul 30 10:37:46 2007 From: robert.vergnes at yahoo.fr (Robert VERGNES) Date: Mon, 30 Jul 2007 16:37:46 +0200 (CEST) Subject: [SciPy-user] odeint memoryError Message-ID: <106788.73226.qm@web27402.mail.ukl.yahoo.com> Hello, when I have a time vector too thin or long (...), then odeint crash and returns a "MemoryError". Apart from splitting my calculation in parts is there some ways around ? ie like a wrapper dealing with this exception? Best Regards Robert --------------------------------- Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail -------------- next part -------------- An HTML attachment was scrubbed... URL: From fredmfp at gmail.com Mon Jul 30 11:26:18 2007 From: fredmfp at gmail.com (fred) Date: Mon, 30 Jul 2007 17:26:18 +0200 Subject: [SciPy-user] using imread... [fixed] In-Reply-To: References: <46A8FE96.40404@gmail.com> <20070727060221.GA15345@clipper.ens.fr> Message-ID: <46AE031A.4050803@gmail.com> jelle a ?crit : > pil 1.1.6 supports numpy arrays, perhaps its even more efficent to use this? > Well, the problem was only between the keyboard and the chair... Cheers, -- http://scipy.org/FredericPetit From rhc28 at cornell.edu Mon Jul 30 14:32:43 2007 From: rhc28 at cornell.edu (Rob Clewley) Date: Mon, 30 Jul 2007 14:32:43 -0400 Subject: [SciPy-user] odeint memoryError In-Reply-To: <106788.73226.qm@web27402.mail.ukl.yahoo.com> References: <106788.73226.qm@web27402.mail.ukl.yahoo.com> Message-ID: Robert, You need to post more information about your system of ODEs as there are many reasons (some even mathematical) why you might be running out of memory. You may need to adjust some algorithmic parameters such as step size or accuracy tolerances. -Rob On 30/07/07, Robert VERGNES wrote: > Hello, > > when I have a time vector too thin or long (...), then odeint crash and > returns a "MemoryError". > > Apart from splitting my calculation in parts is there some ways around ? ie > like a wrapper dealing with this exception? > > > Best Regards > > Robert > > > ________________________________ > Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! > Mail > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > > From Alexander.Dietz at astro.cf.ac.uk Mon Jul 30 16:01:35 2007 From: Alexander.Dietz at astro.cf.ac.uk (Alexander Dietz) Date: Mon, 30 Jul 2007 21:01:35 +0100 Subject: [SciPy-user] Problems installing scipy Message-ID: <9cf809a00707301301x53086d46q8f4242d3876545bb@mail.gmail.com> Hi, I am trying to install scipy on my laptop, running FC5. I have installed numpy, so I downloaded the scipy-package and run the setup script which creates a warning only: > python setup.py install usr/lib/python2.4/distutils/dist.py:236: UserWarning: Unknown distribution option: 'configuration' warnings.warn(msg) running install running build running config_fc When testing the installation within (i)python I get: In [1]: import scipy --------------------------------------------------------------------------- exceptions.ImportError Traceback (most recent call last) /opt/users/src/scipy-0.5.2/ ImportError: No module named scipy I tried also to scipy to install in the directory /usr/lib/python2.4/site-packages where numpy is installed (at least that's what numpy.__path__ is saying) with python setup.py install --prefix=/usr/lib/python2.4/site-packages but this also did not install scipy so I can use it. Can someone help me? What's going wrong? In which directory is scipy installed if no path is defined? Thanks Alex -------------- next part -------------- An HTML attachment was scrubbed... URL: From david at ar.media.kyoto-u.ac.jp Mon Jul 30 22:58:05 2007 From: david at ar.media.kyoto-u.ac.jp (David Cournapeau) Date: Tue, 31 Jul 2007 11:58:05 +0900 Subject: [SciPy-user] Problems installing scipy In-Reply-To: <9cf809a00707301301x53086d46q8f4242d3876545bb@mail.gmail.com> References: <9cf809a00707301301x53086d46q8f4242d3876545bb@mail.gmail.com> Message-ID: <46AEA53D.5090306@ar.media.kyoto-u.ac.jp> Alexander Dietz wrote: > Hi, > > I am trying to install scipy on my laptop, running FC5. I have > installed numpy, so I downloaded the scipy-package and run the setup > script which creates a warning only: > Note that to avoid all this hassle, there are some rpm for FC5 for numpy and scipy: http://download.opensuse.org/repositories/home:/ashigabou/Fedora_Extras_5/ > > python setup.py install > usr/lib/python2.4/distutils/dist.py:236: UserWarning: Unknown > distribution option: 'configuration' > warnings.warn(msg) > running install > running build > running config_fc > > When testing the installation within (i)python I get: > > In [1]: import scipy > --------------------------------------------------------------------------- > > exceptions.ImportError Traceback (most > recent call last) > > /opt/users/src/scipy-0.5.2/ > > ImportError: No module named scipy > > > I tried also to scipy to install in the directory > /usr/lib/python2.4/site-packages where numpy is installed (at least > that's what numpy.__path__ is saying) with > python setup.py install --prefix=/usr/lib/python2.4/site-packages > You did not give enough details, but the line above suggests that you are making a mistake concerning where the packages are installed. If you do python setup.py install -> install in the default site-packages of your python installation, in this case /usr/lib/python2.4/site-packages if you do python setup.py install --prefix=SOMEPATH, this will install the packages in SOMEPATH/python2.4/site-packages (assuming your python is 2.4, of course). So the path you give to the --prefix option and the one where python is looking at are different. For example, not having administrative rights on my machine, I install everything in my $HOME/local directory: python setup.py install --prefix=$HOME/local And the add $HOME/local/python2.4/site-packages to my PYTHONPATH. cheers, David From v-nijs at kellogg.northwestern.edu Tue Jul 31 00:24:53 2007 From: v-nijs at kellogg.northwestern.edu (Vincent Nijs) Date: Mon, 30 Jul 2007 23:24:53 -0500 Subject: [SciPy-user] google group In-Reply-To: <46AEA53D.5090306@ar.media.kyoto-u.ac.jp> Message-ID: Is there a reason why the numpy list is available as a Google group and the scipy list is not? It would be great to have both available as Google groups. Vincent From robert.kern at gmail.com Tue Jul 31 00:31:27 2007 From: robert.kern at gmail.com (Robert Kern) Date: Mon, 30 Jul 2007 23:31:27 -0500 Subject: [SciPy-user] google group In-Reply-To: References: Message-ID: <46AEBB1F.8030507@gmail.com> Vincent Nijs wrote: > Is there a reason why the numpy list is available as a Google group and the > scipy list is not? It would be great to have both available as Google > groups. Someone decided to request a Google Groups gateway for numpy-discussion, but they didn't care about the scipy lists. If you would like to make such a gateway, please do! Just be sure to pay attention to it. The first I had heard about the Google Groups gateway for numpy-discussion was just after we moved the list from sourceforge.net, and the Google Groups info hadn't been updated! -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From topengineer at gmail.com Tue Jul 31 02:15:40 2007 From: topengineer at gmail.com (HuiChang Moon) Date: Tue, 31 Jul 2007 15:15:40 +0900 Subject: [SciPy-user] I want to improve the speed of eig(). Message-ID: <296323b50707302315l580fe2adgabd1be3b338846af@mail.gmail.com> Hi, users, I have a problem with calculating the eigenvalue problem using the eig(). The array I want to calculate is about 5000*5000 but, the array is very sparse. At each row it has only 3 non-zero items, and the matrix is diagonal. I have to solve eigenvalue problem, but it takes very long time. How can I do? I try to use sparse matix in Scipy, but eig() function doent' work with sparse_matrix. Please help me~! Thank you. -- Nano SOI Process Lab. Hanyang University. Contacts; smartmoon at hanyang.ac.kr HeeChang.Moon at Gmail.com +82-2-2220-0247 +82-10-6455-7444 ________________________________________ Dream but be awake. ________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From robert.vergnes at yahoo.fr Tue Jul 31 02:31:59 2007 From: robert.vergnes at yahoo.fr (Robert VERGNES) Date: Tue, 31 Jul 2007 08:31:59 +0200 (CEST) Subject: [SciPy-user] RE : Re: odeint memoryError In-Reply-To: Message-ID: <793925.17944.qm@web27407.mail.ukl.yahoo.com> Dear Rob, It is related with step size and accuracy. Is there some way I could know if ODEINT will crash or not ? - hence I would adapt the length of my t_vector... an example of crashing odeint is below: from scipy import * from numpy import * from scipy.integrate import * # Equation Parameters t_step= 1E-12 t_start=1.0172 t_end = 1.01726095276 t_interim = t_range = arange(t_start, t_end,t_step) print 'Length of t_range: ' + str(len(t_range)) print 'Length should be around: '+ str(((t_end-t_start)/t_step)) w0 =sqrt (10) fo = 0.075 y0_interim = [-2.20182185029, 0.0120342071085] #[Theta_dot, Theta] def func_f3(y,t): """ Jacobian function """ return [ - fo*y[0]- w0**2*sin(y[1]), y[0]] if __name__ == '__main__': # ODE calculation y, infodict = odeint(func_f3,y0_interim,t_interim, full_output =1) print y print infodict Rob Clewley a ?crit : Robert, You need to post more information about your system of ODEs as there are many reasons (some even mathematical) why you might be running out of memory. You may need to adjust some algorithmic parameters such as step size or accuracy tolerances. -Rob On 30/07/07, Robert VERGNES wrote: > Hello, > > when I have a time vector too thin or long (...), then odeint crash and > returns a "MemoryError". > > Apart from splitting my calculation in parts is there some ways around ? ie > like a wrapper dealing with this exception? > > > Best Regards > > Robert > > > ________________________________ > Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! > Mail > > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > > _______________________________________________ SciPy-user mailing list SciPy-user at scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user --------------------------------- Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail -------------- next part -------------- An HTML attachment was scrubbed... URL: From nwagner at iam.uni-stuttgart.de Tue Jul 31 03:26:12 2007 From: nwagner at iam.uni-stuttgart.de (Nils Wagner) Date: Tue, 31 Jul 2007 09:26:12 +0200 Subject: [SciPy-user] I want to improve the speed of eig(). In-Reply-To: <296323b50707302315l580fe2adgabd1be3b338846af@mail.gmail.com> References: <296323b50707302315l580fe2adgabd1be3b338846af@mail.gmail.com> Message-ID: <46AEE414.9000501@iam.uni-stuttgart.de> HuiChang Moon wrote: > Hi, users, > I have a problem with calculating the eigenvalue problem using the eig(). > The array I want to calculate is about 5000*5000 but, the array is > very sparse. > At each row it has only 3 non-zero items, and the matrix is diagonal. A diagonal matrix has only one entry per row. I guess you mean a tridiagonal matrix ? eig is restricted to dense arrays. You may try arpack or lobpcg. It depends on the properties of your matrix (symmetrie, definiteness, ...) >>> from scipy.sandbox import lobpcg >>> help (lobpcg) >>> from scipy.sandbox import arpack >>> help (arpack) Can you send your matrix (in matrixmarket format) off-list ? HTH Nils > I have to solve eigenvalue problem, but it takes very long time. > How can I do? > I try to use sparse matix in Scipy, but eig() function doent' work > with sparse_matrix. > Please help me~! > Thank you. > > -- > Nano SOI Process Lab. > Hanyang University. > > Contacts; > smartmoon at hanyang.ac.kr > HeeChang.Moon at Gmail.com > +82-2-2220-0247 > +82-10-6455-7444 > > ________________________________________ > Dream but be awake. > ________________________________________ > ------------------------------------------------------------------------ > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > From elcorto at gmx.net Tue Jul 31 05:09:55 2007 From: elcorto at gmx.net (Steve Schmerler) Date: Tue, 31 Jul 2007 11:09:55 +0200 Subject: [SciPy-user] odeint memoryError In-Reply-To: <793925.17944.qm@web27407.mail.ukl.yahoo.com> References: <793925.17944.qm@web27407.mail.ukl.yahoo.com> Message-ID: <46AEFC63.9090806@gmx.net> Robert VERGNES wrote: > Dear Rob, > > It is related with step size and accuracy. Is there some way I could > know if ODEINT will crash or not ? - hence I would adapt the length of > my t_vector... > > > an example of crashing odeint is below: > > from scipy import * > from numpy import * > from scipy.integrate import * > > # Equation Parameters > t_step= 1E-12 > t_start=1.0172 > t_end = 1.01726095276 > t_interim = t_range = arange(t_start, t_end,t_step) > print 'Length of t_range: ' + str(len(t_range)) > print 'Length should be around: '+ str(((t_end-t_start)/t_step)) > w0 =sqrt (10) > fo = 0.075 > y0_interim = [-2.20182185029, 0.0120342071085] #[Theta_dot, Theta] > > def func_f3(y,t): > """ Jacobian function """ > return [ - fo*y[0]- w0**2*sin(y[1]), y[0]] > > if __name__ == '__main__': > # ODE calculation > y, infodict = odeint(func_f3,y0_interim,t_interim, full_output =1) > print y > print infodict > With t_step= 1E-12, you t_range array has a size of about 6e7 floats, which is about 460 MB of memory for t_range alone. With 2 additional arrays for y[0] and y[1], you will run out of memory or at least force extensive swap usage. On my machine with 512 MB RAM I also get a MemoryError. Are you sure you need such a high resolution? Usually I'm happy with, say 50000 points. Like this: # Equation Parameters ##t_step= 1E-12 npts=50000 t_start=1.0172 t_end = 1.01726095276 ##t_interim = t_range = arange(t_start, t_end,t_step) t_interim = t_range = linspace(t_start, t_end, npts) print 't_step: %e' %(t_range[-1]-t_range[-2]) print 'Length of t_range: ' + str(len(t_range)) print 'Length should be around: '+ str(((t_end-t_start)/t_step)) ..... HTH -- cheers, steve I love deadlines. I like the whooshing sound they make as they fly by. -- Douglas Adams From nwagner at iam.uni-stuttgart.de Tue Jul 31 05:23:47 2007 From: nwagner at iam.uni-stuttgart.de (Nils Wagner) Date: Tue, 31 Jul 2007 11:23:47 +0200 Subject: [SciPy-user] [Fwd: Re: I want to improve the speed of eig().] Message-ID: <46AEFFA3.1070600@iam.uni-stuttgart.de> Ok. I am using the svn version of scipy on linux and I am not familiar with Windows. Since arpack and lobpcg are still in the sandbox (bleeding edge http://en.wikipedia.org/wiki/Bleeding_edge) I can't give you further advice. Anyway it might be a good idea to move arpack and lobpcg into the main tree. Comments would be appreciated. However you can send me your matrix off-list. Which eigenvalues do you need ? I mean you can't compute all of them in case of large sparse matrices. How about the corresponding eigenvectors ? Is your matrix real and symmetric ? Cheers, Nils -------------- next part -------------- An embedded message was scrubbed... From: "HuiChang Moon" Subject: Re: [SciPy-user] I want to improve the speed of eig(). Date: Tue, 31 Jul 2007 18:02:04 +0900 Size: 9735 URL: From rademacherchristoph at googlemail.com Tue Jul 31 09:25:59 2007 From: rademacherchristoph at googlemail.com (Christoph Rademacher) Date: Tue, 31 Jul 2007 15:25:59 +0200 Subject: [SciPy-user] restricting optimize.leastsq to positive results Message-ID: Hi all, I am using optimize.leastsq to fit my experimental data. Is there a way to restrict the results to be a positive float? e.g. my target function is a simple linear combination of three variables to fit f(x) : return a*A(x) + b*B(x) From my experiment I know that a,b,A,B can only be positive floats. How do I put this extra information in optimize.leastsq? Thanks for your help, Christoph From v-nijs at kellogg.northwestern.edu Tue Jul 31 10:51:29 2007 From: v-nijs at kellogg.northwestern.edu (Vincent Nijs) Date: Tue, 31 Jul 2007 09:51:29 -0500 Subject: [SciPy-user] google group In-Reply-To: <46AEBB1F.8030507@gmail.com> Message-ID: Robert, I can't find any information about setting up a 'gateway' to the scipy list in Google groups. Making a new group looks easy but that is not the idea. Do you know who setup the numpy group? Vincent On 7/30/07 11:31 PM, "Robert Kern" wrote: > Vincent Nijs wrote: >> Is there a reason why the numpy list is available as a Google group and the >> scipy list is not? It would be great to have both available as Google >> groups. > > Someone decided to request a Google Groups gateway for numpy-discussion, but > they didn't care about the scipy lists. If you would like to make such a > gateway, please do! Just be sure to pay attention to it. The first I had heard > about the Google Groups gateway for numpy-discussion was just after we moved > the > list from sourceforge.net, and the Google Groups info hadn't been updated! From scyang at nist.gov Tue Jul 31 11:30:07 2007 From: scyang at nist.gov (Stephen Yang) Date: Tue, 31 Jul 2007 11:30:07 -0400 Subject: [SciPy-user] optimize.leastsq ier flag Message-ID: <46AF557F.7000707@nist.gov> Hello everyone, I'm getting an ier flag of '4' when I run this code to fit some data to a gaussian: p0 = [1, 1, 1] gauss = lambda p, x: p[0]*numpy.exp(-((x-p[1])**2/(2*p[2]**2))) res = lambda p, x, y: gauss(p, x) - y optimized, success = optimize.minpack.leastsq(res, p0, args = (omega, counts)) print 'success flag:', success In the minpack documentation, there is supposedly a 'mesg' return value, which states: mesg -- a string message giving information about the cause of failure. So.. first, does anyone know what a flag of '4' means? Secondly, how would you go about getting this flag? I tried optimized, mesg, success = optimize.minpack.leastsq(res, p0, args = (omega, counts)) with no luck.. ValueError: need more than 2 values to unpack Any help would be greatly appreciated. From robert.kern at gmail.com Tue Jul 31 12:02:40 2007 From: robert.kern at gmail.com (Robert Kern) Date: Tue, 31 Jul 2007 11:02:40 -0500 Subject: [SciPy-user] google group In-Reply-To: References: Message-ID: <46AF5D20.9030809@gmail.com> Vincent Nijs wrote: > Robert, > > I can't find any information about setting up a 'gateway' to the scipy list > in Google groups. Making a new group looks easy but that is not the idea. http://groups.google.com/support/bin/answer.py?answer=46387&topic=9249 > Do you know who setup the numpy group? Mike McLay, if I remember correctly. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From Alexander.Dietz at astro.cf.ac.uk Tue Jul 31 14:29:57 2007 From: Alexander.Dietz at astro.cf.ac.uk (Alexander Dietz) Date: Tue, 31 Jul 2007 19:29:57 +0100 Subject: [SciPy-user] Problems installing scipy In-Reply-To: <46AEA53D.5090306@ar.media.kyoto-u.ac.jp> References: <9cf809a00707301301x53086d46q8f4242d3876545bb@mail.gmail.com> <46AEA53D.5090306@ar.media.kyoto-u.ac.jp> Message-ID: <9cf809a00707311129n64475320w1380d58832c80cc4@mail.gmail.com> Hi, thanks for the tipps bot none of them are working! On 7/31/07, David Cournapeau wrote: > > Alexander Dietz wrote: > > Hi, > > > > I am trying to install scipy on my laptop, running FC5. I have > > installed numpy, so I downloaded the scipy-package and run the setup > > script which creates a warning only: > > > Note that to avoid all this hassle, there are some rpm for FC5 for numpy > and scipy: > > http://download.opensuse.org/repositories/home:/ashigabou/Fedora_Extras_5/ I tried to install the rpm package, but, as I expected before, several other packages are required to install scipy: error: Failed dependencies: libblas.so.3 is needed by python-scipy-0.5.2-14.1.i386 liblapack.so.3 is needed by python-scipy-0.5.2-14.1.i386 python-numpy is needed by python-scipy-0.5.2-14.1.i386 And as I pointed out, I have numpy installed already... Also, when running the setup script absolutely nothing gets installed. This might be related to the warning printed out: /usr/lib/python2.4/distutils/dist.py:236: UserWarning: Unknown distribution option: 'configuration' warnings.warn(msg) Do I need a new version of 'distutils'? Any other idea in order to install scipy? Thanks Alex -------------- next part -------------- An HTML attachment was scrubbed... URL: From v-nijs at kellogg.northwestern.edu Tue Jul 31 15:02:40 2007 From: v-nijs at kellogg.northwestern.edu (Vincent Nijs) Date: Tue, 31 Jul 2007 14:02:40 -0500 Subject: [SciPy-user] google group In-Reply-To: <46AF5D20.9030809@gmail.com> Message-ID: New messages to the scipy-user mailing list will now also be archived in a google group at: http://groups.google.com/group/scipy-user Some relevant information from Google: 1. "A remote archive works a bit differently than a regular Google Group; you'll still be able to search the archive and post messages to your mailing list via the online form in the group, but you won't be able to post to the Google Group via email because all of the messages will be coming from your mailing list. Also, your subscription choices for the group will be limited to No Email, Digest, and Abridged." 2. "Only new messages to the list will be stored in the Google Group" Best, Vincent From Alexander.Dietz at astro.cf.ac.uk Tue Jul 31 16:35:11 2007 From: Alexander.Dietz at astro.cf.ac.uk (Alexander Dietz) Date: Tue, 31 Jul 2007 21:35:11 +0100 Subject: [SciPy-user] General question on scipy In-Reply-To: <9cf809a00706290548u42ce009w32e6b279085553c2@mail.gmail.com> References: <9cf809a00706290354l7ff898bexcb4f8adab3041a5d@mail.gmail.com> <4684EEC3.4040000@ar.media.kyoto-u.ac.jp> <9cf809a00706290502m4207e366xb5d7401f6568bbdb@mail.gmail.com> <9cf809a00706290524p5fbc2e40m754ef6dc2c1994cf@mail.gmail.com> <9cf809a00706290548u42ce009w32e6b279085553c2@mail.gmail.com> Message-ID: <9cf809a00707311335w726da9ebh836e7a0f3905a67d@mail.gmail.com> Hi, I tried to install scipy the same way on my laptop, but this time it did not work. I got an error this time: error: Command "/usr/bin/g77 -g -Wall -fno-second-underscore -fPIC -O2 -funroll-loops -march=i686 -mmmx -msse2 -msse -fomit-frame-pointer -malign-double -c -c Lib/fftpack/dfftpack/zfftb1.f -o build/temp.linux- i686-2.4/Lib/fftpack/dfftpack/zfftb1.o" failed with exit status 1 Any ideas? Cheers Alex On 6/29/07, Alexander Dietz wrote: > > Hi, > > I got it to work, finally, thanks to the back-online installing page. What > I did was: > > yum install lapack-devel blas-devel > cd scipy-0.5.2 > python setup.py install >& install.log > > This finally worked. Thanks a lot for helping me installing scipy!!! > > Alex > > > On 6/29/07, Matthieu Brucher wrote: > > > > try python-scipy (or even more better, yum search scipy to find the real > > name of the package) > > > > Matthieu > > > > 2007/6/29, Alexander Dietz < Alexander.Dietz at astro.cf.ac.uk>: > > > > > > Hi, > > > > > > here is my try: > > > > > > # yum install scipy > > > Loading "installonlyn" plugin > > > Setting up Install Process > > > .... > > > ..... > > > No Match for argument: scipy > > > Nothing to do > > > > > > > > > So there is no scipy found or so. > > > > > > > > > Cheers > > > Alex > > > > > > > > > > > > On 6/29/07, Matthieu Brucher < matthieu.brucher at gmail.com> wrote: > > > > > > > > > > > > > > > 2007/6/29, Alexander Dietz < Alexander.Dietz at astro.cf.ac.uk>: > > > > > > > > > > Hi, > > > > > > > > > > here is what I am using exactly: FC5 and Linux > > > > > 2.6.20-1.2316.fc5smp. Hope this helps. > > > > > Can I install scipy (and all the dependend libraries) using 'yum' > > > > > or something similar? 'yum' itself does not work... > > > > > > > > > > Cheers > > > > > Alex > > > > > > > > > > > > yum install numpy > > > > yum install scipy > > > > > > > > But FC5's scipy is old IIRC, can you update to FC 6 at least ? > > > > > > > > Matthieu > > > > > > > > _______________________________________________ > > > > SciPy-user mailing list > > > > SciPy-user at scipy.org > > > > http://projects.scipy.org/mailman/listinfo/scipy-user > > > > > > > > > > > > > > _______________________________________________ > > > SciPy-user mailing list > > > SciPy-user at scipy.org > > > http://projects.scipy.org/mailman/listinfo/scipy-user > > > > > > > > > > _______________________________________________ > > SciPy-user mailing list > > SciPy-user at scipy.org > > http://projects.scipy.org/mailman/listinfo/scipy-user > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From william.ratcliff at gmail.com Tue Jul 31 17:25:46 2007 From: william.ratcliff at gmail.com (william ratcliff) Date: Tue, 31 Jul 2007 17:25:46 -0400 Subject: [SciPy-user] Question about scipy.test() Message-ID: <827183970707311425x15810362jacd3907a3a85bca4@mail.gmail.com> Hi! I'm trying to compile scipy on a windows box running windows xp professional. The processor is an Intel Core 2 Extreme QX67--(it's a quad). I compiled atlas3.7.11 from source and it was fine. Next, I built numpy from source and it passed all of its tests. Next, I built scipy from source. However, when I ran scipy.tests(level=1, verbosity=2), it crashed python (2.5.1--latest release from python.org). I checked and both are using the libraries I generated from atlas and lapack. The tests reached: ... generation of a binary structure 4 ... ok generic filter 1 ... ERROR generic 1d filter 1 Then, it crashed python. Any ideas? I am using mingw to compile from the command window. Thanks, William Ratcliff -------------- next part -------------- An HTML attachment was scrubbed... URL: From haase at msg.ucsf.edu Tue Jul 31 17:58:19 2007 From: haase at msg.ucsf.edu (Sebastian Haase) Date: Tue, 31 Jul 2007 23:58:19 +0200 Subject: [SciPy-user] histogram equalization using scipy.interpolate.splrep Message-ID: Hi, I'm trying to implement an efficiant numpy / scipy based implementation of an image analysis procedure called "histogram equalization". http://en.wikipedia.org/wiki/Histogram_equalization (I don't want to use the Python Imaging Library !) For that I calculate the intesity histogram of my 2D or 3D images (Let's call this 1D array `h`). Then I calculate `hh= h.astype(N.float).cumsum()` Now I need to create a new 2D / 3D image replacing each pixel value with the corresponding "look-up value" in `hh`. The means essentially doing something like `a2 = hh[a]` -- if `a` was the original image. Of course this syntax does not work, because a) the array index lookup probably is not possible using 2D/3D indices like this - right !? and b) my histogram is just sampling / approximating all the actually occuring values in `a`. In other words: the histogram is based on creating bins, and nearby pixel values in `a` are then counted into same bin. Consequently there is no simple "array index lookup" to get the needed value out of the `h` array. Instead one needs to interpolate. This is were I thought the scipy.interpolate package might come in handy ;-) In fact, if `a` was a 1D "image" I think this would work: >>> rep = scipy.interpolate.splrep(x,y) # x,y being the horizontal,count axis in my histogram >>> aa = scipy.interpolate.splev(a,rep) But for a.ndim being 2 I get: Traceback (most recent call last): File "", line 1, in ? File "C:\PrWinN\scipy\interpolate\fitpack.py", line 443, in splev y,ier=_fitpack._spl_(x,der,t,c,k) ValueError: object too deep for desired array Using N.vectorize(lambda x: scipy.interpolate.splev(x,rep)) works but is slow. I there a fast vectorized version of some interpolation already in scipy.interpolate ? Am I missing something ? Thanks, Sebastian Haase From Alexander.Dietz at astro.cf.ac.uk Tue Jul 31 17:58:51 2007 From: Alexander.Dietz at astro.cf.ac.uk (Alexander Dietz) Date: Tue, 31 Jul 2007 22:58:51 +0100 Subject: [SciPy-user] Another error while installing scipy Message-ID: <9cf809a00707311458u26b2e5cehd3fd0a22e4a74010@mail.gmail.com> Hi, while trying to install scipy on my laptop (FC5, numpy 1.0.3) I encountered finally an error never occured before. I would appreciate to resolve this problem in order to get scipy installed. Cheers Alex Traceback (most recent call last): File "setup.py", line 55, in ? setup_package() File "setup.py", line 47, in setup_package configuration=configuration ) File "/usr/lib/python2.4/site-packages/numpy/distutils/core.py", line 142, in setup config = configuration() File "setup.py", line 19, in configuration config.add_subpackage('Lib') File "/usr/lib/python2.4/site-packages/numpy/distutils/misc_util.py", line 772, in add_subpackage caller_level = 2) File "/usr/lib/python2.4/site-packages/numpy/distutils/misc_util.py", line 755, in get_subpackage caller_level = caller_level + 1) File "/usr/lib/python2.4/site-packages/numpy/distutils/misc_util.py", line 702, in _get_configuration_from_setup_py config = setup_module.configuration(*args) File "/opt/users/src/scipy-0.5.2/Lib/setup.py", line 15, in configuration config.add_subpackage('odr') File "/usr/lib/python2.4/site-packages/numpy/distutils/misc_util.py", line 772, in add_subpackage caller_level = 2) File "/usr/lib/python2.4/site-packages/numpy/distutils/misc_util.py", line 755, in get_subpackage caller_level = caller_level + 1) File "/usr/lib/python2.4/site-packages/numpy/distutils/misc_util.py", line 687, in _get_configuration_from_setup_py ('.py', 'U', 1)) File "Lib/odr/setup.py", line 9, in ? from numpy.distutils.misc_util import get_path, Configuration, dot_join ImportError: cannot import name get_path As far as I know I have all these lapack, blas and atlas packages installed. Any ideas? Cheers Alex -------------- next part -------------- An HTML attachment was scrubbed... URL: From amcmorl at gmail.com Tue Jul 31 18:00:50 2007 From: amcmorl at gmail.com (Angus McMorland) Date: Wed, 1 Aug 2007 10:00:50 +1200 Subject: [SciPy-user] optimize.leastsq ier flag In-Reply-To: <46AF557F.7000707@nist.gov> References: <46AF557F.7000707@nist.gov> Message-ID: Hi Stephen, On 01/08/07, Stephen Yang wrote: > Hello everyone, > > I'm getting an ier flag of '4' when I run this code to fit some data to > a gaussian: > > p0 = [1, 1, 1] > > gauss = lambda p, x: p[0]*numpy.exp(-((x-p[1])**2/(2*p[2]**2))) > res = lambda p, x, y: gauss(p, x) - y > optimized, success = optimize.minpack.leastsq(res, p0, args = (omega, > counts)) > print 'success flag:', success > > In the minpack documentation, there is supposedly a 'mesg' return value, > which states: > > mesg -- a string message giving information about the cause of failure. > > So.. first, does anyone know what a flag of '4' means? >From the MINPACK ldif documentation (http://www.netlib.org/minpack/lmdif.f): c info = 4 the cosine of the angle between fvec and any c column of the jacobian is at most gtol in c absolute value. I'm afraid I can't offer any advice as to what that means exactly... will leave that to an expert. > Secondly, how would you go about getting this flag? >From the docstring: Inputs: full_output -- non-zero to return all optional outputs. Outputs: (x, {cov_x, infodict, mesg}, ier) So, you need to call as: optimized, blah,moreblah, mesg, success = optimize.minpack.leastsq(res, p0, args = (omega, counts), full_output = 1) >I tried > > optimized, mesg, success = optimize.minpack.leastsq(res, p0, args = > (omega, counts)) > > with no luck.. > ValueError: need more than 2 values to unpack > > Any help would be greatly appreciated. > I hope that helps, Angus. -- AJC McMorland, PhD Student Physiology, University of Auckland From robert.kern at gmail.com Tue Jul 31 18:04:17 2007 From: robert.kern at gmail.com (Robert Kern) Date: Tue, 31 Jul 2007 17:04:17 -0500 Subject: [SciPy-user] Another error while installing scipy In-Reply-To: <9cf809a00707311458u26b2e5cehd3fd0a22e4a74010@mail.gmail.com> References: <9cf809a00707311458u26b2e5cehd3fd0a22e4a74010@mail.gmail.com> Message-ID: <46AFB1E1.5080402@gmail.com> Alexander Dietz wrote: > Hi, > > while trying to install scipy on my laptop (FC5, numpy 1.0.3) I > encountered finally an error never occured before. I would appreciate to > resolve this problem in order to get scipy installed. > File "Lib/odr/setup.py", line 9, in ? > from numpy.distutils.misc_util import get_path, Configuration, dot_join > ImportError: cannot import name get_path > > > As far as I know I have all these lapack, blas and atlas packages > installed. Any ideas? I goofed before the 1.0.3 release. I thought that get_path() was only used internally; it *is* currently deprecated in favor of using the Configuration object. Lib/odr/setup.py is fixed in scipy SVN, though. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From stefan at sun.ac.za Tue Jul 31 18:15:35 2007 From: stefan at sun.ac.za (Stefan van der Walt) Date: Wed, 1 Aug 2007 00:15:35 +0200 Subject: [SciPy-user] Question about scipy.test() In-Reply-To: <827183970707311425x15810362jacd3907a3a85bca4@mail.gmail.com> References: <827183970707311425x15810362jacd3907a3a85bca4@mail.gmail.com> Message-ID: <20070731221535.GY7447@mentat.za.net> Hi William Are you compiling the latest version of the scipy source from SVN? If so, which version of the mingw gcc compiler are you using? You'll find a bug-report related to this problem on the SciPy trac; any additional information you can provide will be valuable. Regards St?fan On Tue, Jul 31, 2007 at 05:25:46PM -0400, william ratcliff wrote: > Hi! I'm trying to compile scipy on a windows box running windows xp > professional. The processor is an Intel Core 2 Extreme QX67--(it's a quad). I > compiled atlas3.7.11 from source and it was fine. Next, I built numpy from > source and it passed all of its tests. Next, I built scipy from source. > However, when I ran scipy.tests(level=1, verbosity=2), > it crashed python (2.5.1--latest release from python.org). I checked and both > are using the libraries I generated from atlas and lapack. > > The tests reached: > > ... > generation of a binary structure 4 ... ok > generic filter 1 ... ERROR > generic 1d filter 1 > > Then, it crashed python. > > Any ideas? I am using mingw to compile from the command window. > > Thanks, > William Ratcliff From zunzun at zunzun.com Tue Jul 31 18:23:01 2007 From: zunzun at zunzun.com (zunzun at zunzun.com) Date: Tue, 31 Jul 2007 18:23:01 -0400 Subject: [SciPy-user] General question on scipy In-Reply-To: <9cf809a00707311335w726da9ebh836e7a0f3905a67d@mail.gmail.com> References: <9cf809a00706290354l7ff898bexcb4f8adab3041a5d@mail.gmail.com> <4684EEC3.4040000@ar.media.kyoto-u.ac.jp> <9cf809a00706290502m4207e366xb5d7401f6568bbdb@mail.gmail.com> <9cf809a00706290524p5fbc2e40m754ef6dc2c1994cf@mail.gmail.com> <9cf809a00706290548u42ce009w32e6b279085553c2@mail.gmail.com> <9cf809a00707311335w726da9ebh836e7a0f3905a67d@mail.gmail.com> Message-ID: <20070731222301.GA23052@zunzun.com> On Tue, Jul 31, 2007 at 09:35:11PM +0100, Alexander Dietz wrote: > I got an error this time: > > error: Command "/usr/bin/g77 -g -Wall -fno-second-underscore -fPIC -O2 > -funroll-loops -march=i686 -mmmx -msse2 -msse -fomit-frame-pointer > -malign-double -c -c Lib/fftpack/dfftpack/zfftb1.f -o build/temp.linux- > i686-2.4/Lib/fftpack/dfftpack/zfftb1.o" failed with exit status 1 What happens if you type '/usr/bin/g77' on a command line? James From william.ratcliff at gmail.com Tue Jul 31 18:47:18 2007 From: william.ratcliff at gmail.com (william ratcliff) Date: Tue, 31 Jul 2007 18:47:18 -0400 Subject: [SciPy-user] Question about scipy.test() In-Reply-To: <20070731221535.GY7447@mentat.za.net> References: <827183970707311425x15810362jacd3907a3a85bca4@mail.gmail.com> <20070731221535.GY7447@mentat.za.net> Message-ID: <827183970707311547w3a57c809i81a2fac4768cea92@mail.gmail.com> I am using the latest version of the scipy source from SVN. I am using the mingw from the enthought sumo distribution of python (2.4.3), just copied over to the python25 directory. I'm not sure of the version-- It is version 4.0.3 of gcc according to the folder in C:\Python25\MingW\bin\lib\gcc-lib\i686-pc-mingw32 The only addition I made to the library was a recent download of g95. Has this bug come up before? Thanks, William On 7/31/07, Stefan van der Walt wrote: > > Hi William > > Are you compiling the latest version of the scipy source from SVN? If > so, which version of the mingw gcc compiler are you using? > > You'll find a bug-report related to this problem on the SciPy trac; > any additional information you can provide will be valuable. > > Regards > St?fan > > On Tue, Jul 31, 2007 at 05:25:46PM -0400, william ratcliff wrote: > > Hi! I'm trying to compile scipy on a windows box running windows xp > > professional. The processor is an Intel Core 2 Extreme QX67--(it's a > quad). I > > compiled atlas3.7.11 from source and it was fine. Next, I built numpy > from > > source and it passed all of its tests. Next, I built scipy from > source. > > However, when I ran scipy.tests(level=1, verbosity=2), > > it crashed python (2.5.1--latest release from python.org). I checked > and both > > are using the libraries I generated from atlas and lapack. > > > > The tests reached: > > > > ... > > generation of a binary structure 4 ... ok > > generic filter 1 ... ERROR > > generic 1d filter 1 > > > > Then, it crashed python. > > > > Any ideas? I am using mingw to compile from the command window. > > > > Thanks, > > William Ratcliff > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.org > http://projects.scipy.org/mailman/listinfo/scipy-user > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aisaac at american.edu Tue Jul 31 22:01:12 2007 From: aisaac at american.edu (Alan G Isaac) Date: Tue, 31 Jul 2007 22:01:12 -0400 Subject: [SciPy-user] Finding Neighboors In-Reply-To: References: Message-ID: On Tue, 17 Apr 2007, Matthieu Brucher apparently wrote: > I wanted to know if there was a module in scipy that is able to find the > k-neighboors of a point ? > If so, is there an optimized one - tree-based search - ? > If not, I'm doing the optimized version. Hi Matthieu, Where did you go with this? Thanks! Alan From david at ar.media.kyoto-u.ac.jp Tue Jul 31 21:57:01 2007 From: david at ar.media.kyoto-u.ac.jp (David Cournapeau) Date: Wed, 01 Aug 2007 10:57:01 +0900 Subject: [SciPy-user] Problems installing scipy In-Reply-To: <9cf809a00707311129n64475320w1380d58832c80cc4@mail.gmail.com> References: <9cf809a00707301301x53086d46q8f4242d3876545bb@mail.gmail.com> <46AEA53D.5090306@ar.media.kyoto-u.ac.jp> <9cf809a00707311129n64475320w1380d58832c80cc4@mail.gmail.com> Message-ID: <46AFE86D.6090306@ar.media.kyoto-u.ac.jp> Alexander Dietz wrote: > Hi, > > thanks for the tipps bot none of them are working! > > On 7/31/07, *David Cournapeau* < david at ar.media.kyoto-u.ac.jp > > wrote: > > Alexander Dietz wrote: > > Hi, > > > > I am trying to install scipy on my laptop, running FC5. I have > > installed numpy, so I downloaded the scipy-package and run the setup > > script which creates a warning only: > > > Note that to avoid all this hassle, there are some rpm for FC5 for > numpy > and scipy: > > http://download.opensuse.org/repositories/home:/ashigabou/Fedora_Extras_5/ > > > > I tried to install the rpm package, but, as I expected before, several > other packages are required to install scipy: > > error: Failed dependencies: > libblas.so.3 is needed by python-scipy-0.5.2-14.1.i386 > liblapack.so.3 is needed by python-scipy-0.5.2-14.1.i386 > python-numpy is needed by python-scipy-0.5.2-14.1.i386 Those are provided by the repository (that's the whole point :) ). You should add the repository for the method you are using (yum, or whatever else you are using). See the following for more details http://en.opensuse.org/Build_Service/User You can do it manually too, by downloading all the rpms from here: http://download.opensuse.org/repositories/home:/ashigabou/Fedora_Extras_5/repodata/ For scipy, you need at least lapack3-3.0-devel, lapack3-3.0, refblas3 and refblas3-devel. > > And as I pointed out, I have numpy installed already... > > Also, when running the setup script absolutely nothing gets installed. > This might be related to the warning printed out: > > /usr/lib/python2.4/distutils/dist.py:236: UserWarning: Unknown > distribution option: 'configuration' > warnings.warn(msg) > > Do I need a new version of 'distutils'? Any other idea in order to > install scipy? No. Which numpy are you using ? The last release (1.0.3) is unfortunately unusable to build last release 0.5.2 at the moment (but the rpms above backport some changes from SVN to make it work, one more reason to use them :)). I think it would be much easier to help you getting the rpm installed, if you want to get released versions working. David From david at ar.media.kyoto-u.ac.jp Tue Jul 31 22:00:08 2007 From: david at ar.media.kyoto-u.ac.jp (David Cournapeau) Date: Wed, 01 Aug 2007 11:00:08 +0900 Subject: [SciPy-user] Another error while installing scipy In-Reply-To: <46AFB1E1.5080402@gmail.com> References: <9cf809a00707311458u26b2e5cehd3fd0a22e4a74010@mail.gmail.com> <46AFB1E1.5080402@gmail.com> Message-ID: <46AFE928.7040207@ar.media.kyoto-u.ac.jp> Robert Kern wrote: > Alexander Dietz wrote: > >> Hi, >> >> while trying to install scipy on my laptop (FC5, numpy 1.0.3) I >> encountered finally an error never occured before. I would appreciate to >> resolve this problem in order to get scipy installed. >> > > >> File "Lib/odr/setup.py", line 9, in ? >> from numpy.distutils.misc_util import get_path, Configuration, dot_join >> ImportError: cannot import name get_path >> >> >> As far as I know I have all these lapack, blas and atlas packages >> installed. Any ideas? >> > > I goofed before the 1.0.3 release. I thought that get_path() was only used > internally; it *is* currently deprecated in favor of using the Configuration > object. Lib/odr/setup.py is fixed in scipy SVN, though. > > Alexander, to install numpy and scipy, you should really try the rpms of the ashigabou repository, they take care of all those problems. It is just a matter to add the repository to your package manager, and then everything is taken care for you. The above problem is taken care of, for example :) (I backported some changes from svn to make it work). David From rsamurti at airtelbroadband.in Tue Jul 31 23:28:03 2007 From: rsamurti at airtelbroadband.in (R S Ananda Murthy) Date: Wed, 01 Aug 2007 08:58:03 +0530 Subject: [SciPy-user] Error in SciPy install on Zenwalk-4.6.1 system. Message-ID: <46AFFDC3.8060905@airtelbroadband.in> Hello, I am trying to make package of SciPy on Zenwalk-4.6.1. I have already installed numpy, lapack, fftw. When I do python setup.py install --prefix=/usr --root=$dest setup runs for some time, and then I get the following message: File "/usr/lib/python2.5/site-packages/numpy/distutils/misc_util.py", line 687, in _get_configuration_from_setup_py ('.py', 'U', 1)) File "Lib/odr/setup.py", line 9, in from numpy.distutils.misc_util import get_path, Configuration, dot_join ImportError: cannot import name get_path Why am I getting this ImportError? How to correct this? Thanks for your help, Anand From robert.kern at gmail.com Tue Jul 31 23:33:12 2007 From: robert.kern at gmail.com (Robert Kern) Date: Tue, 31 Jul 2007 22:33:12 -0500 Subject: [SciPy-user] Error in SciPy install on Zenwalk-4.6.1 system. In-Reply-To: <46AFFDC3.8060905@airtelbroadband.in> References: <46AFFDC3.8060905@airtelbroadband.in> Message-ID: <46AFFEF8.9080108@gmail.com> R S Ananda Murthy wrote: > Hello, > > I am trying to make package of SciPy on Zenwalk-4.6.1. I have already > installed numpy, lapack, fftw. When I do > > python setup.py install --prefix=/usr --root=$dest > > setup runs for some time, and then I get the following message: > > File "/usr/lib/python2.5/site-packages/numpy/distutils/misc_util.py", > line 687, in _get_configuration_from_setup_py > ('.py', 'U', 1)) > File "Lib/odr/setup.py", line 9, in > from numpy.distutils.misc_util import get_path, Configuration, dot_join > ImportError: cannot import name get_path > > > Why am I getting this ImportError? Because I screwed up just before the numpy 1.0.3 release and removed that deprecated function without realizing that scipy 0.5.2 still used it. > How to correct this? This is fixed in the SVN scipy. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco