Skip to content

Commit

Permalink
add test for scipy#3025
Browse files Browse the repository at this point in the history
  • Loading branch information
thouis authored and André Gaul committed Dec 4, 2013
1 parent be9bb54 commit cfa4a9a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scipy/ndimage/tests/test_regression.py
Expand Up @@ -35,5 +35,15 @@ def SE(img, thresh=.7, size=4):
# shouldn't crash
SE(a)

def test_gh_issue_3025():
"""Github issue #3025 - improper merging of labels"""
d = np.zeros((60,320))
d[:,:257] = 1
d[:,260:] = 1
d[36,257] = 1
d[35,258] = 1
d[35,259] = 1
assert ndimage.label(d, np.ones((3,3)))[1] == 1

if __name__ == "__main__":
run_module_suite()

0 comments on commit cfa4a9a

Please sign in to comment.