how to convert datatype of numpy array from float32 to int16 code example Example: change type of array python arr=arr.astype('uint8')