def imresize(im, sz):
 pil_im = Image.fromarray(uint8(im))
 return array(pil_im.resize(sz))

def imresize ( im , sz ) : pil_im = Image . fromarray ( uint8 ( im ) ) return array ( pil_im . resize ( sz ) )
resize an image by given output size and method .