From 07ff87b5aae51b05d1208ac52f7fa7bcb9388d50 Mon Sep 17 00:00:00 2001 From: dionperd Date: Tue, 21 Nov 2023 12:53:54 +0100 Subject: [PATCH 1/2] Corrected cosimulator exclusive proxy regions zero connectivity weights --- tvb_contrib/tvb/contrib/cosimulation/cosimulator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tvb_contrib/tvb/contrib/cosimulation/cosimulator.py b/tvb_contrib/tvb/contrib/cosimulation/cosimulator.py index d7b127f05c..6e66893474 100644 --- a/tvb_contrib/tvb/contrib/cosimulation/cosimulator.py +++ b/tvb_contrib/tvb/contrib/cosimulation/cosimulator.py @@ -151,7 +151,7 @@ def _configure_cosimulation(self): # Reconfigure the connectivity for regions modelled by the other cosimulator exclusively: if self.exclusive: - self.connectivity.weights[self.proxy_inds][:, self.proxy_inds] = 0.0 + self.connectivity.weights[np.ix_(self.proxy_inds, self.proxy_inds)] = 0.0 self.connectivity.configure() # Configure the cosimulator monitor From f6ac25d28712359fb0e3b55d57d4afb9273e1ae0 Mon Sep 17 00:00:00 2001 From: dionperd Date: Tue, 21 Nov 2023 13:27:45 +0100 Subject: [PATCH 2/2] np. -> numpy. in cosimulator.py --- tvb_contrib/tvb/contrib/cosimulation/cosimulator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tvb_contrib/tvb/contrib/cosimulation/cosimulator.py b/tvb_contrib/tvb/contrib/cosimulation/cosimulator.py index 6e66893474..db106a51d0 100644 --- a/tvb_contrib/tvb/contrib/cosimulation/cosimulator.py +++ b/tvb_contrib/tvb/contrib/cosimulation/cosimulator.py @@ -151,7 +151,7 @@ def _configure_cosimulation(self): # Reconfigure the connectivity for regions modelled by the other cosimulator exclusively: if self.exclusive: - self.connectivity.weights[np.ix_(self.proxy_inds, self.proxy_inds)] = 0.0 + self.connectivity.weights[numpy.ix_(self.proxy_inds, self.proxy_inds)] = 0.0 self.connectivity.configure() # Configure the cosimulator monitor