#NEWLINE# def test_ticket_742( ) : #NEWLINE# #INDENT# def SE( img , thresh = 0.7 , size = 4 ) : #NEWLINE# #INDENT# mask = ( img > thresh ) #NEWLINE# rank = len ( mask . shape ) #NEWLINE# ( la , co ) = ndimage . label ( mask , ndimage . generate_binary_structure ( rank , rank ) ) #NEWLINE# slices = ndimage . find_objects ( la ) #NEWLINE# #UNINDENT# if ( np . dtype ( np . intp ) != np . dtype ( 'i' ) ) : #NEWLINE# #INDENT# shape = ( 3 , 1240 , 1240 ) #NEWLINE# a = np . random . rand ( np . product ( shape ) ) . reshape ( shape ) #NEWLINE# SE ( SE )