Changes between Version 12 and Version 13 of TransitionStories

Show
Ignore:
Timestamp:
11/08/06 04:19:04 (7 years ago)
Author:
gpk2
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TransitionStories

    v12 v13  
    2323R.py - an alternative approach to R<->Python interface is available in the from the [https://svn.sourceforge.net/svnroot/rpy/trunk/sandbox/ RPy sandbox].  In r.py R objects are first class Python objects that support {{{__array_struct__}}} interface.  This allows creation of ndarrays that share data with R. 
    2424 
     25= Numeric = 
     26 
     27Rather than converting all at once, I lived for a while with a mixed Numeric/Numpy/Numarray environment. 
     28The attached module (NumNumericNumpy) makes that much easier:  it gives you something close to backwards 
     29compatibility for old Numeric applications, with minimal modifications. 
     30 
     31If you replace references to {{{LinearAlgebra}}} with {{{Num.LA}}}, {{{RandomArray}}} with {{{Num.RA}}}, {{{FFT}}} with {{{Num.FFT}}}, 
     32and import the Num module instead of {{{Numeric}}}, {{{LinearAlgebra}}}, {{{RandomArray}}} and {{{FFT}}}, 
     33then many simple applications will run on both {{{Numpy}}} and {{{Numeric}}}. 
     34 
     35There are several traps, though.  The default arguments for {{{Num.sum}}}, {{{Num.prod}}}, differ, 
     36so you need to explicity specify {{{axis=0}}}, instead of relying on the default.   {{{numpy.nonzero}}} 
     37has a different return value, which needs to be dealt with by hand, or by enhancing {{{Num.py}}}. 
     38Note that this is merely a compatibility/porting aid, not a complete solution.