You could do something like this
n_digits = 3
rounded = (x * 10**n_digits).round() / (10**n_digits)
from this forum post but it will keep the zeros at the end.
You could do something like this
n_digits = 3
rounded = (x * 10**n_digits).round() / (10**n_digits)
from this forum post but it will keep the zeros at the end.