[Numpy-discussion] NumPy, Numeric or numarray or all of them?

Travis Oliphant oliphant.travis at ieee.org
Thu May 11 08:41:01 EDT 2006


Mateusz ?oskot wrote:
> Hi,
>
> I'm a developer contributing to GDAL project (http://www.gdal.org).
> GDAL is a core GeoSpatial Librarry that has had Python bindings
> for a while. Recently, we did get some reports from users that GDAL
> bindings do not work with NumPy package.
>   

Most packages can be "ported" simply by replacing include 
"Numeric/arrayobject.h" with include "numpy/arrayobject.h" and making 
sure the include files are retrieved from the right place. NumPy was 
designed to make porting from Numeric a breeze.
>
> This situation brings some questions we'd like to ask NumPy Dev Team:
>
> Is it fair to say we are unlikely to see Numeric releases for new
> Pythons in the future?
>   
Yes, that's fair. Nobody is maintaining Numeric.
> Can we consider NumPy as the only package in future?
>   
Yes. That's where development is currently active.
> Simply, we are wondering which Python library we should develop for
> NumPy, Numeric or numarray to be most generally useful.
>   

NumPy is the merging of Numeric and numarray to bring people together. I 
think you should develop for NumPy. In practical terms, it is pretty 
easy to port from Numeric.

> What's the recommended way to go now?
>   

I've ported tens of packages to NumPy from Numeric and have had very 
little trouble. It is not difficult. Most of the time, simply replacing 
the *.h file with the one from numpy works fine. It might be a bit 
trickier to get your headers from the right place. The directory is 
returned by

import numpy.distutils
numpy.distutils.misc_util.get_numpy_include_dirs()

Give it a try it's not very difficult.

-Travis







More information about the NumPy-Discussion mailing list