<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: list values in a table or array??? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/list-values-in-a-table-or-array/m-p/427099#M33512</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Irini,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for Arrays in python numpy is really handy. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There are also arcpy functions to convert numpy Arrays to rasters and the other way around.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//000v00000130000000" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//000v00000130000000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for example&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
import numpy as np

a = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]

a = np.array(a)
a = np.reshape(a, (4,5))
&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;will get you:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;[[ 1&amp;nbsp; 2&amp;nbsp; 3&amp;nbsp; 4&amp;nbsp; 5]
 [ 6&amp;nbsp; 7&amp;nbsp; 8&amp;nbsp; 9 10]
 [11 12 13 14 15]
 [16 17 18 19 20]]&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 19:13:23 GMT</pubDate>
    <dc:creator>RaphaelR</dc:creator>
    <dc:date>2021-12-11T19:13:23Z</dc:date>
    <item>
      <title>list values in a table or array???</title>
      <link>https://community.esri.com/t5/python-questions/list-values-in-a-table-or-array/m-p/427097#M33510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello everyone! &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to ask you if there is a way in python to do the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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???&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(Is this helpful?) I need to save this table/array as an ascii file, which will be continuously converted in a raster file!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you very much in advance!!!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Nov 2012 10:29:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/list-values-in-a-table-or-array/m-p/427097#M33510</guid>
      <dc:creator>irinivozinaki</dc:creator>
      <dc:date>2012-11-06T10:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: list values in a table or array???</title>
      <link>https://community.esri.com/t5/python-questions/list-values-in-a-table-or-array/m-p/427098#M33511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In my considered opinion there is no reason to use either of this to for this purpose. Simple list slicing with defined number of columns will do the trick.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Simple example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;i = range(20)
cols = 4
f = open('D:\\tmp.csv', 'w')
for r in range(len(i)/cols):
&amp;nbsp;&amp;nbsp;&amp;nbsp; f.write(';'.join([str(v) for v in i[r*cols:(r+1)*cols]]) + '\n')
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Arek&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:13:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/list-values-in-a-table-or-array/m-p/427098#M33511</guid>
      <dc:creator>ArkadiuszMatoszka</dc:creator>
      <dc:date>2021-12-11T19:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: list values in a table or array???</title>
      <link>https://community.esri.com/t5/python-questions/list-values-in-a-table-or-array/m-p/427099#M33512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Irini,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for Arrays in python numpy is really handy. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There are also arcpy functions to convert numpy Arrays to rasters and the other way around.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//000v00000130000000" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//000v00000130000000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for example&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
import numpy as np

a = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]

a = np.array(a)
a = np.reshape(a, (4,5))
&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;will get you:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;[[ 1&amp;nbsp; 2&amp;nbsp; 3&amp;nbsp; 4&amp;nbsp; 5]
 [ 6&amp;nbsp; 7&amp;nbsp; 8&amp;nbsp; 9 10]
 [11 12 13 14 15]
 [16 17 18 19 20]]&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:13:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/list-values-in-a-table-or-array/m-p/427099#M33512</guid>
      <dc:creator>RaphaelR</dc:creator>
      <dc:date>2021-12-11T19:13:23Z</dc:date>
    </item>
    <item>
      <title>Re: list values in a table or array???</title>
      <link>https://community.esri.com/t5/python-questions/list-values-in-a-table-or-array/m-p/427100#M33513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;There are also arcpy functions to convert numpy Arrays to rasters and the other way around.&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//000v00000130000000"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//000v00000130000000&lt;/A&gt;&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Didn't know about that. Always something new to learn &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;A&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Nov 2012 11:58:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/list-values-in-a-table-or-array/m-p/427100#M33513</guid>
      <dc:creator>ArkadiuszMatoszka</dc:creator>
      <dc:date>2012-11-06T11:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: list values in a table or array???</title>
      <link>https://community.esri.com/t5/python-questions/list-values-in-a-table-or-array/m-p/427101#M33514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;it is depending on how you will use this table or array, what they are used for.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Nov 2012 19:43:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/list-values-in-a-table-or-array/m-p/427101#M33514</guid>
      <dc:creator>zhengniu</dc:creator>
      <dc:date>2012-11-06T19:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: list values in a table or array???</title>
      <link>https://community.esri.com/t5/python-questions/list-values-in-a-table-or-array/m-p/427102#M33515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you all very much!!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;More accurately,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have created part of a code which &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;a) takes two specific raster files (of a 5x4 grid) following a path&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;b) creates two separate arrays of 5x4 dimension &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I have used the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; array_d=arcpy.RasterToNumPyArray(raster_d)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; array_v=arcpy.RasterToNumPyArray(raster_v)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (height_d, width_d)=array_d.shape&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (height_v, width_v)=array_velocity.shape&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;c) Subsequently, the code reads every cell value of both arrays, obtaining two values h, v&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for row1 in range (0,height_d):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row2=row1&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for col1 in range (0,width_d):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; col2=col1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; h=array_d.item(row1,col1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; v=array_v.item(row2,col2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;d) according to several scenarios of these values, h and v, the code calculates a parameter, named "D", in every cell. That is, the D parameter depends on the h and v. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to save the calculated parameter, "D", for every cell in a new array of the same dimensions (5x4 dimension), in an ascii file.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This ascii file will be converted subsequently to a raster file (I suppose this is the easy thing)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Nov 2012 05:00:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/list-values-in-a-table-or-array/m-p/427102#M33515</guid>
      <dc:creator>irinivozinaki</dc:creator>
      <dc:date>2012-11-08T05:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: list values in a table or array???</title>
      <link>https://community.esri.com/t5/python-questions/list-values-in-a-table-or-array/m-p/427103#M33516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;not sure if i understand correctly but if you´re working on cell by cell basis, wouldn´t this be much easier with just using raster calculator?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;anyways, code below creates a new array for the D parameter and writes it to an ascii file (no header, will need one if you want to use AsciiToRaster).&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
array_d=arcpy.RasterToNumPyArray(raster_d)
array_v=arcpy.RasterToNumPyArray(raster_v)
(height_d, width_d)=array_d.shape
(height_v, width_v)=array_v.shape

# create empty array to store the "D" parameter
newarr = np.zeros((5,4))


for row1 in range (0,height_d):

&amp;nbsp;&amp;nbsp;&amp;nbsp; row2=row1

&amp;nbsp;&amp;nbsp;&amp;nbsp; for col1 in range (0,width_d):
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; col2=col1

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; h=array_d.item(row1,col1)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; v=array_v.item(row2,col2)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # calculate the "D" parameter
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; expr = h+v
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; newarr[row1,col1] =&amp;nbsp; expr

# write the new array to an ascii file
np.savetxt("e:/out.txt", newarr, fmt="%.2f", delimiter= " ")
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:13:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/list-values-in-a-table-or-array/m-p/427103#M33516</guid>
      <dc:creator>RaphaelR</dc:creator>
      <dc:date>2021-12-11T19:13:26Z</dc:date>
    </item>
    <item>
      <title>Re: list values in a table or array???</title>
      <link>https://community.esri.com/t5/python-questions/list-values-in-a-table-or-array/m-p/427104#M33517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;@ rafaelr&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Your help was very important! My problem is solved for small grids! Let's try for bigger ones!!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am not good on python programming but I am trying...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to ask you for the raster calculator. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;As I can see it is an ArcGIS tool, but as long as the calculations among my cells are not the same every time, for all the cells. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For example I am checking whether the cell value of the first array is greater than one and the cell value of the second array is lower than 3 and if this happens the D value is calculated through a specific equation. But there are several scenarios for the read cell values...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So...It won't help me, will it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you again!!!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Nov 2012 08:47:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/list-values-in-a-table-or-array/m-p/427104#M33517</guid>
      <dc:creator>irinivozinaki</dc:creator>
      <dc:date>2012-11-08T08:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: list values in a table or array???</title>
      <link>https://community.esri.com/t5/python-questions/list-values-in-a-table-or-array/m-p/427105#M33518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;you can build elaborate expressions with raster calculator as well:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//009z000000z7000000.htm"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//009z000000z7000000.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;however, going with python only is sometimes more straight forward (long/complex expressions in raster calculator can become a bit hard to read). i guess it´s a preference thing.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Nov 2012 09:05:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/list-values-in-a-table-or-array/m-p/427105#M33518</guid>
      <dc:creator>RaphaelR</dc:creator>
      <dc:date>2012-11-08T09:05:44Z</dc:date>
    </item>
    <item>
      <title>Re: list values in a table or array???</title>
      <link>https://community.esri.com/t5/python-questions/list-values-in-a-table-or-array/m-p/427106#M33519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yesterday I supposed that converting the ascii to raster file would be the easy thing. May be I was wrong &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Something goes wrong with the needed header of the ascii file. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have created an ascii file (damageFile) which is the same with the one where the calculated values are saved. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am writing the following...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;damageFile=open('C:\\Python26\\ArcGIS10.0\\Python programming\\test2.ascii', "w+")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;damageFile.write('NCOLS 5' + "\n")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;damageFile.write('NROWS 4' + "\n")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;damageFile.write('XLLCORNER 513589.931' + "\n")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;damageFile.write('YLLCORNER 3923728.436' + "\n")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;damageFile.write('CELLSIZE 10' + "\n")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;damageFile.write('NODATA_VALUE -100' + "\n")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;then the calculations follow under several scenarios...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and then the statement:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;numpy.savetxt("C:\\Python26\\ArcGIS10.0\\Python programming\\test2.ascii", Damage, fmt="%14.11f", delimiter="w+")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and the damageFile is closed...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you find any mistake that I can see???&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you very much!!!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Nov 2012 08:47:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/list-values-in-a-table-or-array/m-p/427106#M33519</guid>
      <dc:creator>irinivozinaki</dc:creator>
      <dc:date>2012-11-09T08:47:34Z</dc:date>
    </item>
    <item>
      <title>Re: list values in a table or array???</title>
      <link>https://community.esri.com/t5/python-questions/list-values-in-a-table-or-array/m-p/427107#M33520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This is the output ascii file&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Whereas the headers seem to be ok...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The first row of the calculated values is missing and the second is not properly written...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;NCOLS 5&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;NROWS 4&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;XLLCORNER 513589&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;YLLCORNER 3923728&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CELLSIZE 10&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;NODATA_VALUE -100&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;172 10.14299988747 10.28650045395 10.42899966240 10.57000041008&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;19.53180027008 19.10220050812 19.15980005264 19.21560001373 19.27019977570&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;20.64479970932 23.32259988785 23.50019931793 23.67780017853 23.85419940948&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Nov 2012 08:51:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/list-values-in-a-table-or-array/m-p/427107#M33520</guid>
      <dc:creator>irinivozinaki</dc:creator>
      <dc:date>2012-11-09T08:51:42Z</dc:date>
    </item>
    <item>
      <title>Re: list values in a table or array???</title>
      <link>https://community.esri.com/t5/python-questions/list-values-in-a-table-or-array/m-p/427108#M33521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I finally manage it through the help of the following link...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://stackoverflow.com/questions/12223167/adding-header-to-numpy-array"&gt;http://stackoverflow.com/questions/12223167/adding-header-to-numpy-array&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you all very much, have a nice day!!!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Nov 2012 06:42:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/list-values-in-a-table-or-array/m-p/427108#M33521</guid>
      <dc:creator>irinivozinaki</dc:creator>
      <dc:date>2012-11-12T06:42:36Z</dc:date>
    </item>
  </channel>
</rss>

