A dummy question. I need to change all values in my rasters into ones. I've been able to do this fine in the Rater Calculator just by multiplying the layer by zero and adding one (my_layer*0+1), but when I'm doing the same in arcpy, for some reason it works for a part of my raster but for some it changes all the nodata cells to ones as well. The nodata values in different rasters are different because my rasters have been generated from different source data. Does it not recognize some nodata values? If so, this is odd as it displays them correctly when I just import them on the mxd. Any ideas on why this works sometimes, but sometimes not?
Here's the exact script:
bin_test = arcpy.Raster("F:/datasets/map1.img")*0+1