Encode array to uint8 and then back
Try array_name.encode("uint8").decode("uint8") if this worked, then you can use the decode() method
I have an array which has intensity values from -3000 to 1000,I have thresholded all values which are less then -100 to -100 and all values greater than 400 to 400,After which i convert it to datatype np.uint8,Which makes all the values in the array to have intensity values from 0 to 255,
What i am confused about is,is there an operation i can run which will give the array from 0-255 intensity range to the earlier one -100 to 400?
Any suggestions will be useful,Thanks in advance