You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wraps output of condensed_tree's minimum in a list
This only happens when a single cluster is returned, and when using the `"leaf"` argument for the clustering.
The result of `condensed_tree['parent'].min()` is an integer, but the output of the `_get_leaves` function should be a list, otherwise a `TypeError` is raised.
For instance in `predictions.py`, with `list(selected_cluster)`:
```
selected_clusters = condensed_tree._select_clusters()
self.cluster_map = {c: n for n, c in enumerate(sorted(list(selected_clusters)))}
```
and `_select_clusters()` is a method of `CondensedTree` defined in `plots.py`, which calls `_get_leaves`
```
def _select_clusters(self):
[ ... ]
elif self.cluster_selection_method == 'leaf':
return _get_leaves(self._raw_tree)
```
0 commit comments