Please follow the code lines:
A = np.array([0 for i in range(10)])
A[:] = 0.1/2
A
Out[36]: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
A[:] = float(0.2/2)
A[:]
Out[38]: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
I can't understand, why numpy is giving such a strange behavior?
I am using numpy 1.13.3