From ed752fa4226369e2ede221efbbf329d6eb680080 Mon Sep 17 00:00:00 2001 From: Aggrathon Date: Thu, 30 Mar 2023 01:18:32 +0300 Subject: [PATCH 1/2] fix bool isinstance int --- slisemap/plot.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/slisemap/plot.py b/slisemap/plot.py index a2ffa45..8c17cad 100644 --- a/slisemap/plot.py +++ b/slisemap/plot.py @@ -222,7 +222,7 @@ def plot_barmodels( mask = [coefficients.index(var) for var in bars] coefficients = bars B = B[:, mask] - if isinstance(bars, int): + if isinstance(bars, int) and not isinstance(bars, bool): influence = np.abs(centers) influence = influence.max(0) + influence.mean(0) mask = np.argsort(-influence)[:bars] @@ -239,7 +239,6 @@ def plot_barmodels( ax.legend().remove() lim = np.max(np.abs(ax.get_xlim())) ax.set(xlabel=None, ylabel=None, xlim=(-lim, lim)) - # ax.set_ylabel("Coefficients") ax.set_title("Cluster mean models") return ax From a4a3ef8e59f760076235012d43b0cb4d7984bcb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Bj=C3=B6rklund?= Date: Fri, 31 Mar 2023 15:32:25 +0300 Subject: [PATCH 2/2] version bump --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6657a0d..7a8be4a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "slisemap" -version = "1.5.0" +version = "1.5.1" authors = [ { name = "Anton Björklund", email = "anton.bjorklund@helsinki.fi" }, { name = "Jarmo Mäkelä", email = "jarmo.makela@helsinki.fi" },