parameters: (src_size, size)
return_statement: return int(w), int(h)
docstring: Scale down crop size if it's bigger than image size
docstring_summary: Scale down crop size if it's bigger than image size
docstring_tokens: Scale down crop size if it s bigger than image size
function: def scale_down(src_size, size):
      """Scale down crop size if it's bigger than image size"""
      w, h = size
      sw, sh = src_size
      if sh < h:
          w, h = float(w*sh)/h, sh
      if sw < w:
          w, h = sw, float(h*sw)/w
      return int(w), int(h)
function_tokens: def scale_down ( src_size , size ) : w , h = size sw , sh = src_size if sh < h : w , h = float ( w * sh ) / h , sh if sw < w : w , h = sw , float ( h * sw ) / w return int ( w ) , int ( h )