#NEWLINE# def get_extent( view , transpose = False ) : #NEWLINE# #INDENT# ( sy , sx ) = [ s for s in view if isinstance ( s , slice ) ] #NEWLINE# if transpose : #NEWLINE# #INDENT# return ( sy . start , sy . stop , sx . start , sx . stop ) #NEWLINE# #UNINDENT# return ( sx . start , sx . stop , sy . start , sy . stop )