| Version 6 (modified by sasha, 7 years ago) |
|---|
This page is created for developers to share their experiences in transitioning their projects from Numeric/NumArray to NumPy?.
SciPy?
SciPy is a large collection of toolboxes to give more number-crunching capability to Python with NumPy. Converting it to use NumPy intead of Numeric was accomplished in a relatively short time. Part of this was due to the fact that SciPy relies heavily on f2py and so once f2py was working for NumPy, then SciPy could work. But, this was not the whole story. There are still many hand-written C-modules and a large number of Python modules that were using Numeric-specific ideas that had to be converted.
The convertcode script was used for all of the Python modules and that proved its worth. There was some hand-editing that still had to be done because the typecode-character conversions also tried to convert legitimate uses of the 'c' string (used in determining which Fortran data-type to select) to 'S1'. This experience led to disabling of that conversion in convert code.
There were several C modules that used the function pointers in the old Numeric PyArray?_Descr structure. These all had to be changed by hand. The numpyio module and the signaltoolsmodule where the most difficult to change as they had made the most use of the old C-structures in Numeric.
RPy
RPy is a very simple, yet robust, Python interface to the R Programming Language.
Before transition to NumPy, RPy was designed to interoperate with Numeric.
Transition was fairly straighforward. The only trick worth mentioning is that the transition required to define PY_ARRAY_TYPES_PREFIX to avoid conflict between R and NumPy headers.
Attachments
-
rpy-0.4.6-both-patch.txt
(7.1 KB) - added by sasha
7 years ago.
Patch for rpy-0.4.6 to support numpy.
