According to tooltip (at least in Spyder) for function round
, if second argument is omitted or None
the returned result is an integer. However:
round(np.pi)
Out[214]: 3
round(np.sqrt(2))
Out[215]: 1.0
In the first case it's an integer but in the second it's not and also wrong if interpreted as a float with one digit; the natural way to interpret a number looking like that if one doesn't know the details behind the code presenting it.
I don't see the logic behind using an additional .0 when presenting a number supposedly rounded to an integer.