When you convert from 32bit float to 16bit float and back, some of the bits are lost, but note that this does not mean the decimal representation will be shorter. When you print out a floating point number, the computer only prints the closest decimal representation of the binary value.
It is easier to see what is going on in binary:
# copied from stackoverflow, prints float in binary
import struct
def binary(num):
return ''.join(bin(ord(c)).replace('0b', '').rjust(8, '0')
for c in struct.pack('!f', num))
x = np.array([0.0429911], dtype='f4')
x1 = x.astype('f2')
x2 = x1.astype('f4')
print binary(x), x
print binary(x1), x1
print binary(x2), x2
output:
00111101001100000001011101110000 [ 0.0429911]
00111101001100000010000000000000 [ 0.04299927]
00111101001100000010000000000000 [ 0.04299927]
as you can see, in binary the final result is truncated (set to 0) yet the decimal representation is longer.