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

Mateusz Łoskot mateusz at loskot.net
Sat May 13 07:21:55 EDT 2006


Christopher Barker wrote:
> Mateusz Łoskot wrote:
> 
>> 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.
> 
> 
> Speaking as a long time numpy (Numeric, etc.) user, and a new user of
> GDAL, I had no idea GDAL worked with num* at all! at least not directly.

Yes, it is :-)

> In fact, I thought I was going to have to write that code myself. Where
> do I find docs for this? I'm sure I've just missed something, but I'm
> finding the docs a bit sparse.

Do you mean docs for Python bindings of GDAL?
AFAIK the only docs for Python oriented users is the "GDAL API Tutorial"
(http://www.gdal.org/gdal_tutorial.html).
Although, I'm not sure if there is or not manual reference
for gdal.py module, so I'll take up this subject soon.

In the meantime, I'd suggest to use epydoc tool to generate
some manual - it won't be a complete reference but
it can be usable.

> On the other hand, I am also finding GDAL to be an excellent library,
> and have so far gotten it to do what I need it to do. So kudos!

Thanks!

>> Can we consider NumPy as the only package in future?
>> Simply, we are wondering which Python library we should develop for
>> NumPy, Numeric or numarray to be most generally useful.
> 
> 
> Speaking as a very interested observer, but not a developer of any of
> the num* packages:
> 
> numpy is the way of the future. As an observer, I think that's pretty
> clear. On the other hand, it is still beta software, so dropping Numeric
> just yet may not be appropriate. If you don't already support numarray,
> there is no reason to do so now.
> 
> It will do the python numerical community a world of good for all of us
> to get back to a single array package.
> 
> Note also that we hope some day to get a simple n-d array object into
> the python standard library. When that happens, that object is all but
> guaranteed to be compatible with numpy.

There are two separate bindings to Python in GDAL:
- native, called traditional
- SWIG based, called New Generation Python

So, we've decided to port the latter to NumPy.

Thank you
-- 
Mateusz Łoskot
http://mateusz.loskot.net




More information about the NumPy-Discussion mailing list