def deg2rad(tensor: torch.Tensor) -> torch.Tensor:
    'Function that converts angles from degrees to radians.\n\n    Args:\n        tensor (torch.Tensor): Tensor of arbitrary shape.\n\n    Returns:\n        torch.Tensor: tensor with same shape as input.\n\n    Examples::\n\n        >>> input = 360. * torch.rand(1, 3, 3)\n        >>> output = deg2rad(input)\n    '
    if (not isinstance(tensor, torch.Tensor)):
        raise TypeError('Input type is not a torch.Tensor. Got {}'.format(type(tensor)))
    return ((tensor * pi.to(tensor.device).type(tensor.dtype)) / 180.0)
Function that converts angles from degrees to radians.

Args:
    tensor (torch.Tensor): Tensor of arbitrary shape.

Returns:
    torch.Tensor: tensor with same shape as input.

Examples::

    >>> input = 360. * torch.rand(1, 3, 3)
    >>> output = deg2rad(input)
def deg2rad(tensor: torch.Tensor) -> torch.Tensor:
    'Function that converts angles from degrees to radians.\n\n    Args:\n        tensor (torch.Tensor): Tensor of arbitrary shape.\n\n    Returns:\n        torch.Tensor: tensor with same shape as input.\n\n    Examples::\n\n        >>> input = 360. * torch.rand(1, 3, 3)\n        >>> output = deg2rad(input)\n    '
    if (not isinstance(tensor, torch.Tensor)):
        raise TypeError('Input type is not a torch.Tensor. Got {}'.format(type(tensor)))
    return ((tensor * pi.to(tensor.device).type(tensor.dtype)) / 180.0)