It is hard to say whether it is your IDE or that is the way it outputs the result. If it is the latter, you should forward this as an issue with tech support, since the help states that a double is returned,.... not a truncated double
As for in general...
I know you can in scripts using numpy, but in plain python, you have to be overt in your decisions... see
7. Input and Output — Python 3.11.5 documentation
for other options.
If you use numpy therre is a setprintoptions method. which enables you to handle boolean, float, list and array formatting.
ft = {"bool": lambda x: repr(x.astype(np.int32)),
"float_kind": '{: 6.2f}'.format}
np.set_printoptions(
edgeitems=10, linewidth=120, precision=3, suppress=True, threshold=200,
formatter=ft
)
Check your python IDE... there may be a setting option there
... sort of retired...