From 59e587b110a9e07b52f5e96025bccad728193c17 Mon Sep 17 00:00:00 2001 From: Jean-Remi King Date: Tue, 3 May 2022 22:03:04 +0200 Subject: [PATCH 1/3] fix --- mne/viz/_brain/colormap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mne/viz/_brain/colormap.py b/mne/viz/_brain/colormap.py index 2f4ccb5c1c9..9264e739987 100644 --- a/mne/viz/_brain/colormap.py +++ b/mne/viz/_brain/colormap.py @@ -52,9 +52,9 @@ def get_fill_colors(cols, n_fill): if ind.size > 0: # choose the two colors between which there is the large step ind = ind[0] + 1 - fillcols = np.r_[np.tile(cols[ind, :], (n_fill / 2, 1)), + fillcols = np.r_[np.tile(cols[ind, :], (int(n_fill / 2), 1)), np.tile(cols[ind + 1, :], - (n_fill - n_fill / 2, 1))] + (n_fill - int(n_fill / 2), 1))] else: # choose a color from the middle of the colormap fillcols = np.tile(cols[int(cols.shape[0] / 2), :], (n_fill, 1)) From 6f90ad625e565fb3fcf1dea3ac8288ff077d4d0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-R=C3=A9mi=20KING?= Date: Wed, 4 May 2022 09:12:03 +0200 Subject: [PATCH 2/3] Update mne/viz/_brain/colormap.py Co-authored-by: Eric Larson --- mne/viz/_brain/colormap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mne/viz/_brain/colormap.py b/mne/viz/_brain/colormap.py index 9264e739987..e2ff719aa59 100644 --- a/mne/viz/_brain/colormap.py +++ b/mne/viz/_brain/colormap.py @@ -52,7 +52,7 @@ def get_fill_colors(cols, n_fill): if ind.size > 0: # choose the two colors between which there is the large step ind = ind[0] + 1 - fillcols = np.r_[np.tile(cols[ind, :], (int(n_fill / 2), 1)), + fillcols = np.r_[np.tile(cols[ind, :], (n_fill // 2, 1)), np.tile(cols[ind + 1, :], (n_fill - int(n_fill / 2), 1))] else: From 6689bda34ed3b4e7f291df65f3e57f3c49f8eab7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-R=C3=A9mi=20KING?= Date: Wed, 4 May 2022 09:12:08 +0200 Subject: [PATCH 3/3] Update mne/viz/_brain/colormap.py Co-authored-by: Eric Larson --- mne/viz/_brain/colormap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mne/viz/_brain/colormap.py b/mne/viz/_brain/colormap.py index e2ff719aa59..93c1ad2a050 100644 --- a/mne/viz/_brain/colormap.py +++ b/mne/viz/_brain/colormap.py @@ -54,7 +54,7 @@ def get_fill_colors(cols, n_fill): ind = ind[0] + 1 fillcols = np.r_[np.tile(cols[ind, :], (n_fill // 2, 1)), np.tile(cols[ind + 1, :], - (n_fill - int(n_fill / 2), 1))] + (n_fill - n_fill // 2, 1))] else: # choose a color from the middle of the colormap fillcols = np.tile(cols[int(cols.shape[0] / 2), :], (n_fill, 1))