add namespace hack to prevent gtsam.gtsam.gtsfm

release/4.3a0
senselessdev1 2022-10-13 09:12:55 -04:00
parent f9971f5049
commit 73fd3f9dc2
2 changed files with 5 additions and 1 deletions

4
python/gtsam/gtsfm.py Normal file
View File

@ -0,0 +1,4 @@
# This trick is to allow direct import of sub-modules
# without this, we can only do `from gtsam.gtsam.gtsfm import X`
# with this trick, we can do `from gtsam.gtsfm import X`
from .gtsam.gtsfm import *

View File

@ -9,7 +9,7 @@ import numpy as np
import gtsam
from gtsam import IndexPair, KeypointsVector, MatchIndicesMap, NamedSfmMeasurementVector
from gtsam.gtsam.gtsfm import (
from gtsam.gtsfm import (
DsfTrackGenerator,
Keypoints,
NamedSfmMeasurement,