Skip to content

Commit 7bf04f6

Browse files
authored
Merge pull request #74 from Pennycook/ignore-scipy-warning
Ignore SciPy UserWarning about axis limits
2 parents 9bfd0fb + 4cc08d6 commit 7bf04f6

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

codebasin/report.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import itertools as it
88
import json
99
import logging
10+
import warnings
1011

1112
from codebasin import util
1213

@@ -166,8 +167,10 @@ def clustering(output_name, setmap):
166167
clusters = hierarchy.linkage(squareform(matrix), method="average")
167168

168169
# Plot dendrogram of hierarchical clustering
170+
# Ignore SciPy warning about axis limits, because we override them
169171
fig, ax = plt.subplots()
170-
hierarchy.dendrogram(clusters, labels=platforms, orientation="right")
172+
with warnings.catch_warnings(action="ignore"):
173+
hierarchy.dendrogram(clusters, labels=platforms, orientation="right")
171174
ax.set_xlim(xmin=0, xmax=1)
172175
ax.axvline(x=divergence(setmap), linestyle="--", label="Average")
173176
ax.text(
-146 Bytes
Loading

0 commit comments

Comments
 (0)