(self, img)
Args:
            img (numpy.ndarray (C x H x W)): Image to be cropped.

        Returns:
            img (numpy.ndarray (C x H x W)): Cropped image.
Args:
            img (numpy.ndarray (C x H x W)): Image to be cropped.
Args : img ( numpy . ndarray ( C x H x W )) : Image to be cropped .
def __call__(self, img):
        """
        Args:
            img (numpy.ndarray (C x H x W)): Image to be cropped.

        Returns:
            img (numpy.ndarray (C x H x W)): Cropped image.
        """
        i, j, h, w = self.get_params(img, self.size)

        """
        i: Upper pixel coordinate.
        j: Left pixel coordinate.
        h: Height of the cropped image.
        w: Width of the cropped image.
        """
        if not(_is_numpy_image(img)):
            raise TypeError('img should be ndarray. Got {}'.format(type(img)))
        if img.ndim == 3:
            return img[i:i+h, j:j+w, :]
        elif img.ndim == 2:
            return img[i:i + h, j:j + w]
        else:
            raise RuntimeError('img should be ndarray with 2 or 3 dimensions. Got {}'.format(img.ndim))
def __call__ ( self , img ) : i , j , h , w = self . get_params ( img , self . size ) """
        i: Upper pixel coordinate.
        j: Left pixel coordinate.
        h: Height of the cropped image.
        w: Width of the cropped image.
        """ if not ( _is_numpy_image ( img ) ) : raise TypeError ( 'img should be ndarray. Got {}' . format ( type ( img ) ) ) if img . ndim == 3 : return img [ i : i + h , j : j + w , : ] elif img . ndim == 2 : return img [ i : i + h , j : j + w ] else : raise RuntimeError ( 'img should be ndarray with 2 or 3 dimensions. Got {}' . format ( img . ndim ) )