From b4d0261e996dc49123ebee87e61caae30d0b1fac Mon Sep 17 00:00:00 2001 From: Tony Wong Date: Fri, 19 Aug 2022 07:11:27 +0800 Subject: [PATCH] Fix use of subtree parameter in plot_tree and get_mask --- astrodendro/plot.py | 2 +- astrodendro/structure.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/astrodendro/plot.py b/astrodendro/plot.py index f675d44..b7b020a 100644 --- a/astrodendro/plot.py +++ b/astrodendro/plot.py @@ -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) diff --git a/astrodendro/structure.py b/astrodendro/structure.py index 7bd855f..d21c870 100644 --- a/astrodendro/structure.py +++ b/astrodendro/structure.py @@ -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