Source code for sym.ops.spherical_camera_cal.lie_group_ops
# -----------------------------------------------------------------------------# This file was autogenerated by symforce from template:# ops/CLASS/lie_group_ops.py.jinja# Do NOT modify by hand.# -----------------------------------------------------------------------------# ruff: noqa: PLR0915, F401, PLW0211, PLR0914from__future__importannotationsimportmathimporttypingasTimportnumpyimportsym
[docs]classLieGroupOps(object):""" Python LieGroupOps implementation for :py:class:`symforce.cam.spherical_camera_cal.SphericalCameraCal`. """
[docs]@staticmethoddeffrom_tangent(vec:numpy.ndarray,epsilon:float)->sym.SphericalCameraCal:# Total ops: 0# Input arraysifvec.shape==(11,):vec=vec.reshape((11,1))elifvec.shape!=(11,1):raiseIndexError("vec is expected to have shape (11, 1) or (11,); instead had shape {}".format(vec.shape))# Intermediate terms (0)# Output terms_res=[0.0]*11_res[0]=vec[0,0]_res[1]=vec[1,0]_res[2]=vec[2,0]_res[3]=vec[3,0]_res[4]=vec[4,0]_res[5]=vec[5,0]_res[6]=vec[6,0]_res[7]=vec[7,0]_res[8]=vec[8,0]_res[9]=vec[9,0]_res[10]=vec[10,0]returnsym.SphericalCameraCal.from_storage(_res)
[docs]@staticmethoddefretract(a:sym.SphericalCameraCal,vec:numpy.ndarray,epsilon:float)->sym.SphericalCameraCal:# Total ops: 11# Input arrays_a=a.dataifvec.shape==(11,):vec=vec.reshape((11,1))elifvec.shape!=(11,1):raiseIndexError("vec is expected to have shape (11, 1) or (11,); instead had shape {}".format(vec.shape))# Intermediate terms (0)# Output terms_res=[0.0]*11_res[0]=_a[0]+vec[0,0]_res[1]=_a[1]+vec[1,0]_res[2]=_a[2]+vec[2,0]_res[3]=_a[3]+vec[3,0]_res[4]=_a[4]+vec[4,0]_res[5]=_a[5]+vec[5,0]_res[6]=_a[6]+vec[6,0]_res[7]=_a[7]+vec[7,0]_res[8]=_a[8]+vec[8,0]_res[9]=_a[9]+vec[9,0]_res[10]=_a[10]+vec[10,0]returnsym.SphericalCameraCal.from_storage(_res)