From 12d8ae2f5f54ce892dd8ef67cd24d1d6f68d7b4d Mon Sep 17 00:00:00 2001 From: Frank dellaert Date: Fri, 21 Aug 2020 11:01:08 -0400 Subject: [PATCH] Address review comments --- python/gtsam/__init__.py | 5 ++--- python/gtsam/utils/plot.py | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/python/gtsam/__init__.py b/python/gtsam/__init__.py index a828e836f..b2d1fb7e7 100644 --- a/python/gtsam/__init__.py +++ b/python/gtsam/__init__.py @@ -5,11 +5,10 @@ def _init(): """This function is to add shims for the long-gone Point2 and Point3 types""" import numpy as np - import math global Point2 # export function - def Point2(x=math.nan, y=math.nan): + 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" @@ -18,7 +17,7 @@ def _init(): global Point3 # export function - def Point3(x=math.nan, y=math.nan, z=math.nan): + 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" diff --git a/python/gtsam/utils/plot.py b/python/gtsam/utils/plot.py index faa947db1..b2c2ab879 100644 --- a/python/gtsam/utils/plot.py +++ b/python/gtsam/utils/plot.py @@ -309,11 +309,11 @@ def plot_pose3(fignum, pose, axis_length=0.1, P=None, def plot_trajectory(fignum, values, scale=1, marginals=None, title="Plot Trajectory", axis_labels=('X axis', 'Y axis', 'Z axis')): """ - Plot a complete 3D trajectory using poses in `values`. + Plot a complete 2D/3D trajectory using poses in `values`. Args: fignum (int): Integer representing the figure number to use for plotting. - values (gtsam.Values): Values dict containing the poses. + values (gtsam.Values): Values containing some Pose2 and/or Pose3 values. scale (float): Value to scale the poses by. marginals (gtsam.Marginals): Marginalized probability values of the estimation. Used to plot uncertainty bounds.