Select to view content in your preferred language

list values in a table or array???

2109
11
11-06-2012 02:29 AM
irinivozinaki
Deactivated User
Hello everyone!

I would like to ask you if there is a way in python to do the following:

I have 20 values and I want to list them in a 5x4 array. Or is it better to list them in a 5x4 table? Which is the difference between the table and array in python???

(Is this helpful?) I need to save this table/array as an ascii file, which will be continuously converted in a raster file!




Thank you very much in advance!!!
Tags (2)
0 Kudos
11 Replies
irinivozinaki
Deactivated User
This is the output ascii file

Whereas the headers seem to be ok...
The first row of the calculated values is missing and the second is not properly written...

NCOLS 5
NROWS 4
XLLCORNER 513589
YLLCORNER 3923728
CELLSIZE 10
NODATA_VALUE -100
172 10.14299988747 10.28650045395 10.42899966240 10.57000041008
19.53180027008 19.10220050812 19.15980005264 19.21560001373 19.27019977570
20.64479970932 23.32259988785 23.50019931793 23.67780017853 23.85419940948
0 Kudos
irinivozinaki
Deactivated User
I finally manage it through the help of the following link...

http://stackoverflow.com/questions/12223167/adding-header-to-numpy-array

Thank you all very much, have a nice day!!!
0 Kudos