Skip to content

Commit

Permalink
prevent squeeze from reducing one-column rows to scalar
Browse files Browse the repository at this point in the history
  • Loading branch information
xinehc committed Dec 16, 2024
1 parent bbbe15c commit e07636d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/melon/melon.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,8 @@ def run_em(self, max_iterations=1000, epsilon=1e-10):
## return assignments
assignments = []
for p_read in p_reads.tocsr():
p_read = p_read.toarray().squeeze()
assignments.append(np.where(p_read == p_read.max())[0].tolist())
p_read = p_read.toarray()
assignments.append(np.where(p_read == p_read.max())[1].tolist())

ties = defaultdict(set)
for qseqid, lineage in enumerate(assignments):
Expand Down

0 comments on commit e07636d

Please sign in to comment.