Skip to content

Commit

Permalink
Merge pull request #1052 from charris/numpy-1.9.0-fix
Browse files Browse the repository at this point in the history
BUG: Fix slicing error revealed by numpy 1.9.0.
  • Loading branch information
jni committed Jul 5, 2014
2 parents 6887f2c + 7a074d5 commit 1c27a97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion skimage/segmentation/_join.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def relabel_sequential(label_field, offset=1):
if m == len(labels0): # nothing to do, already 1...n labels
return label_field, labels, labels
forward_map = np.zeros(m + 1, int)
forward_map[labels0] = np.arange(offset, offset + len(labels0) + 1)
forward_map[labels0] = np.arange(offset, offset + len(labels0))
if not (labels == 0).any():
labels = np.concatenate(([0], labels))
inverse_map = np.zeros(offset - 1 + len(labels), dtype=np.intp)
Expand Down

0 comments on commit 1c27a97

Please sign in to comment.