#NEWLINE# def contains_arr( self , x_arr , y_arr ) : #NEWLINE# #INDENT# ( xd , yd ) = self . crdmap . to_data ( self . x , self . y ) #NEWLINE# ( x2 , y2 ) = self . crdmap . to_data ( ( self . x + self . radius ) , self . y ) #NEWLINE# ( x3 , y3 ) = self . crdmap . to_data ( self . x , ( self . y + self . radius ) ) #NEWLINE# xradius = ( max ( x2 , xd ) - min ( x2 , xd ) ) #NEWLINE# yradius = ( max ( y3 , xd ) - min ( y3 , yd ) ) #NEWLINE# x_arr = x_arr . astype ( numpy . float ) #NEWLINE# y_arr = y_arr . astype ( numpy . float ) #NEWLINE# res = ( ( ( ( x_arr - xd ) ** 2 ) / ( xradius ** 2 ) ) + ( ( ( y_arr - yd ) ** 2 ) / ( yradius ** 2 ) ) ) #NEWLINE# contains = ( res <= 1.0 ) #NEWLINE# return contains