Solved! Go to Solution.
for i in xrange(xwidth): xmin += i d[xmin, ymax] = ar[0] for j in xrange(yheight): ymax -= j d[xmin, ymax] = ar[0]
>>> a=[1,2,3] >>> b=1 >>> a[b+=1] Traceback ( File "<interactive input>", line 1 a[b+=1] ^ SyntaxError: invalid syntax
import arcpy import pprint theRaster = r'C:\gis\solarTESTING\default.gdb\d1' ras = arcpy.Raster(theRaster) ar = arcpy.RasterToNumPyArray(theRaster) xmin = ras.extent.XMin ymax = ras.extent.YMax yheight, xwidth = ar.shape d={} for i in xrange(xwidth): d[xmin += i, ymax] = ar[0] for j in xrange(yheight): d[xmin, ymax -= j] = ar[0] pprint.pprint(d)
for i in xrange(xwidth): xmin += i d[xmin, ymax] = ar[0] for j in xrange(yheight): ymax -= j d[xmin, ymax] = ar[0]
>>> a=[1,2,3] >>> b=1 >>> a[b+=1] Traceback ( File "<interactive input>", line 1 a[b+=1] ^ SyntaxError: invalid syntax