From 1ebfb6fa3faac285601873984d122df45be96699 Mon Sep 17 00:00:00 2001 From: Azad Baykara Date: Wed, 14 Feb 2024 11:22:27 +0100 Subject: [PATCH] / operator is replaced with // as '/' returns int in python2.7 but float in python3.6, which makes the return values of the function different --- magnet_loss/magnet_tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/magnet_loss/magnet_tools.py b/magnet_loss/magnet_tools.py index 46d1c10..da37761 100644 --- a/magnet_loss/magnet_tools.py +++ b/magnet_loss/magnet_tools.py @@ -165,4 +165,4 @@ def get_cluster_ind(self, c, i): def get_class_ind(self, c): """Given a cluster index return the class index.""" - return c / self.k + return c // self.k