Closed
Description
a = np.array([0,255], dtype='uint8')
output:array([ 0, 255], dtype=uint8)
a * 2
output:array([ 0, 254], dtype=uint8) // become the top eight after the operation
b = np.array([1, 255], dtype='uint8')
b * 256
output:array([ 256, 65280], dtype=uint16) // Automatically become the type of uint16
The change of the variable type depends on the minimum of the array?