From: Konrad H. <kh...@ce...> - 2006-06-06 16:23:23
|
On May 31, 2006, at 4:53, Travis Oliphant wrote: > Please help the developers by responding to a few questions. > > 1) Have you transitioned or started to transition to NumPy (i.e. =20 > import numpy)? No. > 2) Will you transition within the next 6 months? (if you answered =20 > No to #1) I would like to, but I am not sure to find the time. I am not in a =20 hurry either, as Numeric continues to work fine. > 3) Please, explain your reason(s) for not making the switch. (if =20 > you answered No to #2) Lack of time. Some of the changes from Numeric are subtle and require =20= a careful analysis of the code, and then careful testing. For big =20 applications, that's a lot of work. There are also modules (I am =20 thinking of RNG) that have been replaced by something completely =20 different that needs to be evaluated first. Konrad. -- --------------------------------------------------------------------- Konrad Hinsen Laboratoire L=E9on Brillouin, CEA Saclay, 91191 Gif-sur-Yvette Cedex, France Tel.: +33-1 69 08 79 25 Fax: +33-1 69 08 82 61 E-Mail: kon...@ce... --------------------------------------------------------------------- |
From: Travis O. <oli...@ee...> - 2006-06-09 23:58:08
|
Thanks for your response to the questionaire. >>3) Please, explain your reason(s) for not making the switch. (if >>you answered No to #2) >> >> > >Lack of time. Some of the changes from Numeric are subtle and require >a careful analysis of the code, and then careful testing. For big >applications, that's a lot of work. There are also modules (I am >thinking of RNG) that have been replaced by something completely >different that needs to be evaluated first. > > You may be interested to note that I just added the RNG interface to numpy for back-wards compatibility. It can be accessed and used by re-placing import RNG with import numpy.random.oldrng as RNG Best regards, -Travis |
From: <kon...@la...> - 2006-06-13 13:00:13
|
On 10.06.2006, at 01:57, Travis Oliphant wrote: > You may be interested to note that I just added the RNG interface =20 > to numpy for back-wards compatibility. It can be accessed and used =20= > by re-placing > > import RNG > > with > > import numpy.random.oldrng as RNG Thanks, that will facilitate the transition. Is this just a =20 compatible interface, or actually the same algorithm as in the =20 original RNG module? Konrad. -- --------------------------------------------------------------------- Konrad Hinsen Centre de Biophysique Mol=E9culaire, CNRS Orl=E9ans Synchrotron Soleil - Division Exp=E9riences Saint Aubin - BP 48 91192 Gif sur Yvette Cedex, France Tel. +33-1 69 35 97 15 E-Mail: hi...@cn... --------------------------------------------------------------------- |
From: Robert K. <rob...@gm...> - 2006-06-13 16:48:53
|
kon...@la... wrote: > On 10.06.2006, at 01:57, Travis Oliphant wrote: > >>You may be interested to note that I just added the RNG interface >>to numpy for back-wards compatibility. It can be accessed and used >>by re-placing >> >>import RNG >> >>with >> >>import numpy.random.oldrng as RNG > > Thanks, that will facilitate the transition. Is this just a > compatible interface, or actually the same algorithm as in the > original RNG module? Just the interface. Do you actually want to use the old algorithm, or are you primarily concerned about matching old test results? The old algorithms are not very good, so I really don't want to put them back into numpy. It should be easy to roll out a separate RNG module that simply uses numpy instead of Numeric, 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: Travis O. <oli...@ie...> - 2006-06-13 16:52:13
|
kon...@la... wrote: > On 10.06.2006, at 01:57, Travis Oliphant wrote: > > >> You may be interested to note that I just added the RNG interface >> to numpy for back-wards compatibility. It can be accessed and used >> by re-placing >> >> import RNG >> >> with >> >> import numpy.random.oldrng as RNG >> > > Thanks, that will facilitate the transition. Is this just a > compatible interface, or actually the same algorithm as in the > original RNG module? > If I understand your question correctly, then it's just a compatibility interface. I'm not sure which part of the original algorithm you are referring to. The random numbers are generated by the Mersenne Twister algorithm in mtrand. Each generator in numpy.random.oldrng creates a new RandomState for generation using that algorithm. The density function calculations were taken from RNG, but the random-number generators themselves are methods of the RandomState. -Travis |
From: Fernando P. <fpe...@gm...> - 2006-06-25 18:27:42
|
On 5/30/06, Travis Oliphant <oli...@ie...> wrote: > > Please help the developers by responding to a few questions. Sorry for not replying before, I wanted a more complete picture before answering. > 1) Have you transitioned or started to transition to NumPy (i.e. import > numpy)? The day this email came in, I had just started to look into porting our major research code. I actually did the work 2 weeks ago, and it went remarkably well. It took a single (marathon) day, about 14 hours of solid work, to go through the old codebase and convert it. This project had a mix of legacy Fortran wrapped via f2py, hand-written C extensions using Numeric, a fair bit of weave.inline() and pure python. It uses matplotlib, PyX and Mayavi for various visualization tasks. There are some 40k loc in the Fortran sources (2/3 of that auto-generated in python from Mathematica computations), and about 13k loc in the C and python sources. This codebase is heavily unit-tested, which was critical for the port. For this kind of effort, unittests make an enormous difference, as they guide you directly to all the problematic spots. Without unittests, this kind of port would have been a nightmare, and I would have never known whether things were actually finished or not. Most of my changes had to do with explicit uses of 'typecode=' which became dtype, and uses of .flat, which used to return a normal array and is now an iterator. I haven't benchmarked things right away, because I expect the numpy-based code to take quite a hit. In this code, I've heavily abused arrays for very trivial 2 and 3-element arithmetic operations, but that means that I create literally millions of extremely small arrays. Even with Numeric, this overhead was already measurable, and I imagine it will get worse with numpy. But since this was silly anyway, and I need to use these little arrays as dictionary keys, instead of doing lots of tuple(array()) all the time, I'm using David Cooke's Vector as a template for a hand-written mini-array class that will do exactly what I need with as little overhead as possible. If for any reason you do want to see actual benchmarks, I can try to run some with the codebases immediately before and after the Numeric->numpy change and report back. > 2) Will you transition within the next 6 months? (if you answered No to #1) That's it: by now we've moved all of our code and it doesn't really work with Numeric anymore, so we're committed :) Again, many thanks for the major improvements that numpy brings! Cheers, f |
From: Fernando P. <fpe...@gm...> - 2006-06-25 18:55:37
|
On 5/30/06, Travis Oliphant <oli...@ie...> wrote: > 4) Please provide any suggestions for improving NumPy. Well, if I can beg for one thing, it would be fixing dot(): http://projects.scipy.org/scipy/numpy/ticket/156 This bug is currently stalling us pretty badly, since dot() is at the core of everything we do. While the codebase I alluded to in my previous message is fine, a project that sits on top of it is blocked from moving on due to this particular problem. If it's a problem on our side, I'll gladly correct it, but it does seem like a bug to me (esp. with Stefan's test of r2651 which passes). If there's any extra info that you need from me, by all means let me know an I'll be happy to provide it. If you have a feel for where the problem may be but don't have time to fix it right now, I can look into it myself, if you can point me in the right direction. Cheers, f |