Ticket #1518 (closed defect: fixed)
Python-NG Bindings -Complex data ReadAsArray
| Reported by: | tisham@… | Owned by: | warmerdam |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.4.1 |
| Component: | PythonBindings | Version: | 1.4.0 |
| Severity: | normal | Keywords: | |
| Cc: | hobu |
Description (last modified by warmerdam) (diff)
Reading complex datasets form Python using the Python-NG bindings produces the following error:
Wow complex
Traceback (most recent call last):
File "testwin.py", line 17, in <module>
databuffer = band.ReadAsArray(0,0,10,10,10,10)
File "c:\Python25\Lib\site-packages\gdal.py", line 657, in ReadAsArray
buf_xsize, buf_ysize, buf_obj )
File "c:\Python25\Lib\site-packages\gdal_array.py", line 135, in BandReadAsArray
ar = numpy.reshape(ar, [1,win_ysize,win_xsize])
File "c:\python25\lib\site-packages\numpy-1.0.1-py2.5-win32.egg\numpy\core\fromnumeric.py", line 62, in reshape
return reshape(newshape, order=order)
ValueError: total size of new array must be unchanged
This might be dependent on the numpy-version being used. This bug has been reproduced in Windows with the MingW and VC++ Express compilers and in Linux-Debian with stock numpy install from apt-get.
Change History
Note: See
TracTickets for help on using
tickets.
