Skip to content

Commit

Permalink
Fix use of subtree parameter in plot_tree and get_mask
Browse files Browse the repository at this point in the history
  • Loading branch information
tonywong94 committed Aug 18, 2022
1 parent 75ec031 commit b4d0261
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion astrodendro/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def plot_tree(self, ax, structure=None, subtree=True, autoscale=True, **kwargs):
"""

# Get the lines for the dendrogram
lines = self.get_lines(structures=structure, **kwargs)
lines = self.get_lines(structures=structure, subtree=subtree, **kwargs)

# Add the lines to the axes
ax.add_collection(lines)
Expand Down
2 changes: 1 addition & 1 deletion astrodendro/structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ def get_mask(self, shape=None, subtree=True):
"""
if shape is None:
shape = self._dendrogram.data.shape
indices = self.indices(subtree=True) if subtree else self.indices
indices = self.indices(subtree=True) if subtree else self.indices()
mask = np.zeros(shape, dtype=bool)
mask[indices] = True
return mask

0 comments on commit b4d0261

Please sign in to comment.