questions anon wrote:
> I am trying to do something really simple.
> I have a numpy array and if any values in the array are 255 I want to
> change them to 1.
> but I can't seem to get anything to work!
Note that numpy is a specialist topic, and for everything but the basics the
numpy mailing li
I am trying to do something really simple.
I have a numpy array and if any values in the array are 255 I want to
change them to 1.
but I can't seem to get anything to work!
If I use:
for i, value in enumerate(mask_arr):
if value==255:
mask_arr[i]=1
I get this error:
Traceback (most