Branched from: Re: Script Zonal statistics percentiles, using Float rasters
I'm trying to do the exact same thing for 25, 50, and 75 percentiles. I have an integer DEM and a set of continuous polygons. Here is the error I'm getting:
Traceback (most recent call last):
File "C:\Python27\ArcGIS10.3\Lib\percentiles.py", line 100, in <module>
pixval = GetPixelValueForPercentile(dct_per, perc_dec)
File "C:\Python27\ArcGIS10.3\Lib\percentiles.py", line 10, in GetPixelValueForPercentile
UnboundLocalError: local variable 'pix_val' referenced before assignment
I am not a python programmer, any insight is most appreciated. I've attached the script with the changes I made, which were only the list of percentiles (line 25) and the paths to my datasets. Ideally, if it's possible, I would like to run this on a float raster instead of an integer raster.