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

Robert Kern robert.kern at gmail.com
Tue Jan 30 19:04:25 CST 2007


Tim Churches wrote:
> Travis Oliphant wrote:
>> I've added a patch to the Porting to NumPy page so that RPy uses NumPy 
>> instead of Numeric.  It would be very helpful for unification if these 
>> package authors would accept these patches.  NumPy is far enough along 
>> in development that I don't think there is any reason for new releases 
>> of packages to continue to support Numeric.
>>
>> For numarray-support in packages the transition may take a little 
>> longer.   I know that some think that supporting multiple array packages 
>> may be a good idea.  I think that is a recipe for long-term headaches. 
>> We are moving to get the array interface into Python.  Until that 
>> happens (hopefully by Python 2.6), third-party code should write to 
>> NumPy.  You can use the attribute-based array interface if you are 
>> willing to alter that at some point in the future when the array 
>> interface is moved into Python.
> 
> 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.

I don't see why. RPy will use numpy internally to communicate with R. Your code
will use Numeric internally to do whatever you do. As of Numeric 24.2, each can
consume the other's arrays seamlessly. You might want to intersperse some
Numeric.asarray() and numpy.asarray() calls at the boundaries, but that should
be it.

> I would argue that it is premature for RPy to drop support for Numeric.
> Maybe by the time Python 2.6 is out and NumPy is part of Python.

numpy itself will never be part of Python. We're aiming for a standardized array
interface and an API for manipulating that interface to become part of Python.

-- 
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


More information about the Numpy-discussion mailing list