-1

I can't figure out what's wrong with the syntax in line 9 below. Help? Using Python in ArcMap.

>>> for strName in rasterList:
...     pRaster = arcpy.Raster(strName)
...     pPoint = arcpy.Point(2256560.829028871, 908394.8188188977)
...     if pRaster.name == "dem":
...         myArray = arcpy.RasterToNumPyArray(pRaster, pPoint, 3, 3)
...         (width, height)= myArray.shape
...         for row in range(0,height):
...             for col in range(0,width):
...                 print "["+ str(row) + ", " + str(col)+"]:"str(myArray.item(row,col))
...                 
Parsing error SyntaxError: invalid syntax (line 9)
K. L.
  • 1
  • 1
  • 3

1 Answers1

1

You are missing a + between print "["+ str(row) + ", " + str(col)+"]:" and str(myArray.item(row,col))

Francesco
  • 4,052
  • 2
  • 21
  • 29