how to change datatype in numpy arra code example Example: change type of array python arr=arr.astype('uint8')