From 8204da3f3e19419ee9e482a634bbf4d5cd26f277 Mon Sep 17 00:00:00 2001
From: Mikkel N Schmidt <mnsc@dtu.dk>
Date: Tue, 22 Feb 2022 16:35:35 +0100
Subject: [PATCH] changed floor division

---
 supr/utils.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/supr/utils.py b/supr/utils.py
index 18c2431..630b357 100644
--- a/supr/utils.py
+++ b/supr/utils.py
@@ -48,7 +48,7 @@ def unravel_indices(indices: torch.LongTensor, shape: Tuple[int, ...]) -> torch.
     coord = []
     for dim in reversed(shape):
         coord.append(indices % dim)
-        indices = indices // dim
+        indices = torch.div(indices, dim, rounding_mode='floor')
     coord = torch.stack(coord[::-1], dim=-1)
     return coord
 
-- 
GitLab