I have two raster
files which I have converted into NumPy
arrays (arcpy.RasterToNumpyArray
) to work with the values in the raster
cells with Python.
One of the raster
has two values True
and False
. The other raster
has different values in the range between 0
to 1000
. Both rasters
have exactly the same extent, so both NumPy
arrays are build up identically (columns and rows), except the values.
My aim is to identify all positions in NumPy
array A
which have the value True
. These positions shall be used for getting the value at these positions from NumPy
array B
.
Do you have any idea how I can implement this?
If I understand your description right, you should just be able to do B[A]
.