import math


def calculate_crop_for_angle(image, angle):
    """
    Calculates the pixels in vertical and horizontal direction which become invalid, i.e.,
    not completely filled with image.

    :param image: input image
    :param angle: rotation angle
    :type image: numpy.ndarray
    :type angle: float
    :return: (vertical_crop, horizontal_crop)
    :rtype: tuple(int, int)

    >>> calculate_crop_for_angle(np.zeros((32, 32,)), 45.0)
    (15, 15)
    """
    wd = (image.shape[0] * 0.5) * math.tan(angle / (180.0 / math.pi))
    hd = (image.shape[1] * 0.5) * math.tan(angle / (180.0 / math.pi))
    hd, wd = int(abs(hd)), int(abs(wd))
    return hd, wd