parameters: (self, label, xmin, ymin, xmax, ymax)
return_statement: return out
docstring: Calculate intersect areas, normalized.
docstring_summary: Calculate intersect areas, normalized.
docstring_tokens: Calculate intersect areas normalized .
function: def _intersect(self, label, xmin, ymin, xmax, ymax):
          """Calculate intersect areas, normalized."""
          left = np.maximum(label[:, 0], xmin)
          right = np.minimum(label[:, 2], xmax)
          top = np.maximum(label[:, 1], ymin)
          bot = np.minimum(label[:, 3], ymax)
          invalid = np.where(np.logical_or(left >= right, top >= bot))[0]
          out = label.copy()
          out[:, 0] = left
          out[:, 1] = top
          out[:, 2] = right
          out[:, 3] = bot
          out[invalid, :] = 0
          return out
function_tokens: def _intersect ( self , label , xmin , ymin , xmax , ymax ) : left = np . maximum ( label [ : , 0 ] , xmin ) right = np . minimum ( label [ : , 2 ] , xmax ) top = np . maximum ( label [ : , 1 ] , ymin ) bot = np . minimum ( label [ : , 3 ] , ymax ) invalid = np . where ( np . logical_or ( left >= right , top >= bot ) ) [ 0 ] out = label . copy ( ) out [ : , 0 ] = left out [ : , 1 ] = top out [ : , 2 ] = right out [ : , 3 ] = bot out [ invalid , : ] = 0 return out