Commit a79f4124 authored by Sean Solari's avatar Sean Solari
Browse files

Bug fixes

parent 0328eb3d
......@@ -867,7 +867,7 @@ class Index:
group_name = group[0]
counts.loc[:, group_name] = counts[list(group)].sum(axis=1)
counts.drop(labels=list(groups[1:]), axis=1, inplace=True)
counts.drop(labels=list(group[1:]), axis=1, inplace=True)
# Remove any groups that weren't specified.
all_groups = counts.columns.tolist()
......@@ -914,7 +914,7 @@ class Index:
Colour generation.
"""
max_vector = tuple(counts.max())
min_vector = tuple(counts.min())
min_vector = tuple(int(v) for v in counts[counts > 0].min())
colours = [colour for colour, _ in groups]
colour_generator = ColourGenerator(
colours,
......@@ -1172,4 +1172,4 @@ class ColourGenerator:
def _log_scores(self, vector):
for i, score in enumerate(vector):
if score > 0:
yield self.colours[i], log(score / self.min_vector[i]) / self._log_norm_factor
yield self.colours[i], log(score / self.min_vector[i]) / self._log_norm_factor[i]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment