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