mirror of
https://github.com/wassname/scikit-image.git
synced 2026-09-12 12:50:49 +08:00
Absorbing the patch from Julian
This commit is contained in:
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
Description: Fix slicing error revealed by numpy 1.9.0.
|
||||
Numpy 1.9.0 no longer allows oversize data to be assigned to a
|
||||
boolean indexed 1-d array by discarding excess elements.
|
||||
Author: Charles Harris <charlesr.harris@gmail.com>
|
||||
Origin: 7a074d5dd165536cb05fd87ea94a29510edac1a7
|
||||
Date: Fri, 4 Jul 2014 20:04:32 -0600
|
||||
Bug: https://github.com/scikit-image/scikit-image/issues/1050
|
||||
|
||||
--- a/skimage/segmentation/_join.py
|
||||
+++ b/skimage/segmentation/_join.py
|
||||
@@ -124,7 +124,7 @@ def relabel_sequential(label_field, offs
|
||||
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)
|
||||
Reference in New Issue
Block a user