def test_gh_issue_3025():
 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)

def test_gh_issue_3025 ( ) : 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 )
github issue #3025 - improper merging of labels .