Round Tensor to x decimal places

Works, but you have to replace ^ with **:

n_digits = 3
arr = torch.rand((3,3))
rounded = torch.round(arr * 10**n_digits) / (10**n_digits)
2 Likes