def _rotate_shape_check()

in theseus/geometry/so2.py [0:0]


    def _rotate_shape_check(self, point: Union[Point2, torch.Tensor]):
        err_msg = "SO2 can only rotate 2-D vectors."
        if isinstance(point, torch.Tensor):
            if not point.ndim == 2 or point.shape[1] != 2:
                raise ValueError(err_msg)
        elif point.dof() != 2:
            raise ValueError(err_msg)
        if (
            point.shape[0] != self.shape[0]
            and point.shape[0] != 1
            and self.shape[0] != 1
        ):
            raise ValueError(
                "Input point batch size is not broadcastable with group batch size."
            )