I accidentally came into this weird behavior when use format string together with Numpy 32 float and Numpy.round() . To reproduce:
score=0.7827188774
npf32_score_rounded=np.round(np.float32(0.7827188774),4)
score_rounded=np.round(score,4)
print(f" {npf32_score_rounded}")
print(f" {score_rounded}")
print(npf32_score_rounded)
print(score_rounded)
#0.7827000021934509 expect to get 0.7827
#0.7827
#0.7827 # without string format, it works as expected
#0.7827
Is this behavior normal or it should be fixed?
Numpy version == 1.20.2
Python version == 3.8.0