[Numpy-discussion] Problems with Numeric

Ali Santacruz amsd2013@yahoo....
Sat Jun 16 23:06:04 CDT 2007



Hi dear
list, 



I am designing an application that uses GDAL (which seems to bind to Numeric) to
read an image and convert it to an array. The code runs without problem in the
console, then I compile it (apparently without problems), but when I try to
launch the application, it fails and the next error appears in the .log:


 


Traceback
(most recent call last):


  File "ViewGdal_0.0-1.py", line 10,
in ?


  File "gdal\__init__.pyc", line 11,
in ?


  File "gdal\gdalnumeric.pyc", line
85, in ?                     #from Numeric import *


  File "Numeric.pyc", line 93, in ?                                 #from
Precision import *


  File "Precision.pyc", line 26, in ?                                #_code_table
= _fill_table(typecodes)


  File "Precision.pyc", line 23, in
_fill_table                   #table[key] = _get_precisions(value)


  File "Precision.pyc", line 18, in
_get_precisions          


TypeError:
data type not understood


 


This refers
to the next in Precision.py in Numeric:


 


typecodes =
{'Character':'c', 'Integer':'1sil', 'UnsignedInteger':'bwu', 'Float':'fd',
'Complex':'FD'}


def
_get_precisions(typecodes):


    lst = []


    for t in typecodes:


        lst.append( (zeros( (1,), t
).itemsize()*8, t) )                    #this is line 18


    return lst 


 


As far as I
understand (I’ve been working with Python for just a couple of months), there
is a problem with the typecodes. What can I do to solve this problem?


 


I’ve not
found a version of GDAL that binds to Numpy. I am using GDAL from hobutools (v.
1.75), Numeric v. 24.2, Python 2.4.3 on WinXP.


 


Any help is
_really_ appreciated.


 


Regards,


 


Ali S.





__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis! 
Regístrate ya - http://correo.espanol.yahoo.com/ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20070616/b8c77922/attachment.html 


More information about the Numpy-discussion mailing list