Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dcherian committed Mar 26, 2024
1 parent 8ec61a9 commit 08d6ead
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions flox/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ def invert(x) -> tuple[np.ndarray, ...]:
preferred_method = "cohorts"

# Now normalize the dotproduct to get containment
containment = dotproduct / chunks_per_label
containment = csr_array(dotproduct / chunks_per_label)

# Use a threshold to force some merging. We do not use the filtered
# containment matrix for estimating "sparsity" because it is a bit
Expand All @@ -407,8 +407,6 @@ def invert(x) -> tuple[np.ndarray, ...]:
containment.data[mask] = 0
containment.eliminate_zeros()

containment = csr_array(containment)

# Iterate over labels, beginning with those with most chunks
logger.info("find_group_cohorts: merging cohorts")
order = np.argsort(containment.sum(axis=LABEL_AXIS))[::-1]
Expand Down

0 comments on commit 08d6ead

Please sign in to comment.