[Numpy-discussion] Patch for RPy to use NumPy uploaded to www.scipy.org

Christopher Barker Chris.Barker at noaa.gov
Wed Jan 31 12:08:48 EST 2007

Tim Churches wrote:
> Yes, except that we have quite a lot of code in fielded applications
> which is written with Numeric, and which also uses RPy. We currently
> have no funds to do the Numeric to NumPy port in our code. If RPy
> dropped support for Numeric, we would be forced to use increasing old
> versions of RPy, which means we would be locked into increasing old
> versions of R.

Aside from Robert's point about passing Numeric arrays to numpy --

It really isn't that much work to port Numeric code to numpy, 
particularly if that code is all Python. Truly, numpy is not some brand 
new beast, it's the next generation Numeric -- think of it as Numeric2. 
Most of it is the same, and the differences are there because it was 
decided to sacrifice some backwards compatibility to get a truly BETTER api.

Any code that is under active development (and ideally has some tests!) 
can be ported to numpy with very little extra work. If your code is not 
under active development, then you might as well stick with all the 
existing libs that already work. i.e. if you are upgrading RPy, you 
might as well upgrade to numpy as well.

I haven't done it myself[1], but even if you have C code that works with 
Numeric arrays, porting that isn't too hard either -- do you think 
Travis would be able to do it for an assortment of other packages if it 
were? And he (and others on this list) will help!

On the other hand, supporting multiple Num* packages really is a pain in 
the *&^@*, and the users are left with a limited subset of what they 
could have.


[1] I haven't done it myself because I've found that most of the C code 
I wrote for Numeric is no longer necessary with a few additional 
features in numpy: record arrays, in=place byteswap, fromfile.

Christopher Barker, Ph.D.

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov

More information about the NumPy-Discussion mailing list