The datatype is incompatible with the numpy function you are calling, but can you cast the datatype to float and then try rounding?
I have some python code that labels distances on an image and do the decimal rounding with text = f"{data_list[i]:0,.3f}" where data_list is a list of floats.
import numpy as np
# convert to float
arr.astype(np.float32)
K=3
rounded=np.round(arr,K)