Skip to content

Commit

Permalink
off by one bug
Browse files Browse the repository at this point in the history
To take the edge, one need to go all the way to None, and not to zero. 
e.g.
[0,1,2,3,4,5,6][slice(3,0,1)] -- > [3, 2, 1]

[0,1,2,3,4,5,6][slice(3,None,1)] --> [3, 2, 1, 0]

See also:
JaneliaSciComp/bigstream#8
  • Loading branch information
orena1 authored Sep 22, 2022
1 parent 09c2ea6 commit e4bed17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dask_stitch/local_affine.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def merge_neighbors(
for no, o in zip(neighbor_offset, overlap):
bs, ws = slice(None, None), slice(o, -o)
if no == -1:
bs, ws = slice(0, o), slice(o, 0, -1)
bs, ws = slice(0, o), slice(o-1, None, -1)
elif no == 1:
bs, ws = slice(-o, None), slice(-1, -o-1, -1)
block_slc.append(bs)
Expand Down

0 comments on commit e4bed17

Please sign in to comment.