Skip to content

Commit

Permalink
change indices to be 1-based
Browse files Browse the repository at this point in the history
  • Loading branch information
ctb committed Oct 15, 2023
1 parent 8e7c7d4 commit b90f761
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/sourmash/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def plot(args):
sys.exit(-1)
elif args.indices:
# construct integer labels
labeltext = [str(i) for i in range(D.shape[0])]
labeltext = [str(i + 1) for i in range(D.shape[0])]
else:
assert not display_labels
labeltext = [""] * D.shape[0]
Expand Down
24 changes: 12 additions & 12 deletions tests/test_sourmash.py
Original file line number Diff line number Diff line change
Expand Up @@ -979,10 +979,10 @@ def test_plot_6_indices(runtmp):
print(runtmp.last_result.out)

expected = """\
0\t0
1\t1
2\t2
3\t3"""
0\t1
1\t2
2\t3
3\t4"""
assert expected in runtmp.last_result.out


Expand All @@ -1000,10 +1000,10 @@ def test_plot_6_no_labels(runtmp):
print(runtmp.last_result.out)

expected = """\
0\t0
1\t1
2\t2
3\t3"""
0\t1
1\t2
2\t3
3\t4"""
assert expected in runtmp.last_result.out


Expand All @@ -1021,10 +1021,10 @@ def test_plot_6_no_indices(runtmp):
print(runtmp.last_result.out)

expected = """\
0\t0
1\t1
2\t2
3\t3"""
0\t1
1\t2
2\t3
3\t4"""
assert expected in runtmp.last_result.out


Expand Down

0 comments on commit b90f761

Please sign in to comment.