Skip to content

Commit

Permalink
Update CustomFactorExample.py with comments to explain typing
Browse files Browse the repository at this point in the history
  • Loading branch information
cntaylor authored Sep 1, 2023
1 parent 8611aec commit 039f5cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/gtsam/examples/CustomFactorExample.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import gtsam
import numpy as np

I = np.eye(1)
I = np.eye(1) # Creates a 1-element, 2D array


def simulate_car() -> List[float]:
Expand Down Expand Up @@ -44,7 +44,7 @@ def error_gps(measurement: np.ndarray, this: gtsam.CustomFactor,
if jacobians is not None:
jacobians[0] = I

return error
return error # with input types this is a 1D np.ndarray


def error_odom(measurement: np.ndarray, this: gtsam.CustomFactor,
Expand Down

0 comments on commit 039f5cf

Please sign in to comment.