clean up the __init__ file
parent
108c77b57a
commit
7793a2ddc1
|
|
@ -1,6 +1,12 @@
|
|||
from . import utils
|
||||
from .gtsam import *
|
||||
from .utils import findExampleDataFile
|
||||
"""Module definition file for GTSAM"""
|
||||
|
||||
# pylint: disable=import-outside-toplevel, global-variable-not-assigned, possibly-unused-variable, import-error, import-self
|
||||
|
||||
import sys
|
||||
|
||||
from gtsam import gtsam, utils
|
||||
from gtsam.gtsam import *
|
||||
from gtsam.utils import findExampleDataFile
|
||||
|
||||
|
||||
def _init():
|
||||
|
|
@ -13,7 +19,7 @@ def _init():
|
|||
def Point2(x=np.nan, y=np.nan):
|
||||
"""Shim for the deleted Point2 type."""
|
||||
if isinstance(x, np.ndarray):
|
||||
assert x.shape == (2,), "Point2 takes 2-vector"
|
||||
assert x.shape == (2, ), "Point2 takes 2-vector"
|
||||
return x # "copy constructor"
|
||||
return np.array([x, y], dtype=float)
|
||||
|
||||
|
|
@ -22,7 +28,7 @@ def _init():
|
|||
def Point3(x=np.nan, y=np.nan, z=np.nan):
|
||||
"""Shim for the deleted Point3 type."""
|
||||
if isinstance(x, np.ndarray):
|
||||
assert x.shape == (3,), "Point3 takes 3-vector"
|
||||
assert x.shape == (3, ), "Point3 takes 3-vector"
|
||||
return x # "copy constructor"
|
||||
return np.array([x, y, z], dtype=float)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue