I have binary (0-1) rasters.
I'm trying to do an operation equivalent to:
z = arcpy.sa.Con((Raster(a) | Raster(b) | Raster(c) | ... | Raster(y))
where the raster files a-y are dynamically generated from a list. I tried using python's built-in 'any' function like so:
z = arcpy.sa.Con(any(Raster(r) for r in rasters_a_to_y))
but to no avail, I get an error Truth value of a raster is ambiguous
. Is there any equivalent to 'any
' function in the ArcPy toolbox or another way to do this that I haven't considered?