[Gdal-dev] NumPy supported in 1.4.0?

Philip Riggs priggs at simla.colostate.edu
Thu Feb 8 18:57:17 EST 2007


Thank you for your answer, Frank.
I tried configuring --without-python --with-ngpython and received the  
following errors. How do I fix this?

Philip

cc1plus: warning: command line option "-Wstrict-prototypes" is valid  
for C/ObjC but not for C++
_gdal_array.cpp: In static member function 'static GDALDataset*  
NUMPYDataset::Open(GDALOpenInfo*)':
_gdal_array.cpp:319: error: 'NPY_CDOUBLE' was not declared in this scope
_gdal_array.cpp:323: error: 'NPY_CFLOAT' was not declared in this scope
_gdal_array.cpp:327: error: 'NPY_DOUBLE' was not declared in this scope
_gdal_array.cpp:331: error: 'NPY_FLOAT' was not declared in this scope
_gdal_array.cpp:335: error: 'NPY_INT' was not declared in this scope
_gdal_array.cpp:336: error: 'NPY_LONG' was not declared in this scope
_gdal_array.cpp:340: error: 'NPY_UINT' was not declared in this scope
_gdal_array.cpp:341: error: 'NPY_ULONG' was not declared in this scope
_gdal_array.cpp:345: error: 'NPY_SHORT' was not declared in this scope
_gdal_array.cpp:349: error: 'NPY_USHORT' was not declared in this scope
_gdal_array.cpp:353: error: 'NPY_BYTE' was not declared in this scope
_gdal_array.cpp:354: error: 'NPY_UBYTE' was not declared in this scope
error: command 'gcc' failed with exit status 1
make[2]: *** [install] Error 1
make[1]: *** [install] Error 2
make: *** [install-actions] Error 2


On Feb 8, 2007, at 2:45 AM, Frank Warmerdam wrote:

> Philip Riggs wrote:
>> I understood from the news release that numpy (not Numeric) was  
>> being supported in 1.4.0. It looks as if only Numeric is being  
>> supported based on gdalnumeric.py in the Python site-packages:
>> import gdal
>> import _gdal
>> from gdalconst import *
>> from Numeric import *
>>  Can somebody clear this up? Is numpy being supported now, or did  
>> I misunderstand the new release?
>
> Philip,
>
> I imagine Howard can give a fuller answer if needed, but I believe you
> are still using the "old" python bindings which are I think still the
> default in 1.4.0.
>
> Try configuring --without-python --with-ngpython.  This should build
> the version in gdal/swig/python which does use numpy instead of
> Numeric.
>
> Best regards,
> -- 
> --------------------------------------- 
> +--------------------------------------
> I set the clouds in motion - turn up   | Frank Warmerdam,  
> warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush    | President OSGeo, http:// 
> osgeo.org




More information about the Gdal-dev mailing list