Skip to content

Commit

Permalink
Merge pull request #11 from edahelsinki/development
Browse files Browse the repository at this point in the history
Fix `isinstance(bool, int)  == True` oversight
  • Loading branch information
Aggrathon authored Mar 31, 2023
2 parents 25e643b + a4a3ef8 commit c181e61
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "[email protected]" },
{ name = "Jarmo Mäkelä", email = "[email protected]" },
Expand Down
3 changes: 1 addition & 2 deletions slisemap/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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

Expand Down

0 comments on commit c181e61

Please sign in to comment.