Skip to content

Commit

Permalink
fix print_results output of compare to print out symmetric matrix (#536)
Browse files Browse the repository at this point in the history
  • Loading branch information
ctb authored and luizirber committed Aug 23, 2018
1 parent 988459c commit 12aa76f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sourmash/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,15 +399,16 @@ def compare(args):
D[i][j] = similarity
D[j][i] = similarity

if len(siglist) < 30:
labeltext.append(E.name())

if len(siglist) < 30:
for i, E in enumerate(siglist):
# for small matrices, pretty-print some output
name_num = '{}-{}'.format(i, E.name())
if len(name_num) > 20:
name_num = name_num[:17] + '...'
print_results('{:20s}\t{}'.format(name_num, D[i, :, ],))

labeltext.append(E.name())

print_results('min similarity in matrix: {:.3f}', numpy.min(D))

# shall we output a matrix?
Expand Down

0 comments on commit 12aa76f

Please sign in to comment.