Skip to content

Commit

Permalink
Change dtype of Matrix to float
Browse files Browse the repository at this point in the history
  • Loading branch information
orosoman-dstl committed Aug 31, 2023
1 parent b3f3330 commit 4ad8a4b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/tutorials/01_KalmanFilterTutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@
# responsibility, a :class:`~.Predictor` takes a :class:`~.TransitionModel` as input and
# an :class:`~.Updater` takes a :class:`~.MeasurementModel` as input. Note that for now we're using
# the same models used to generate the ground truth and the simulated measurements. This won't
# usually be possible and it's an interesting exercise to explore what happens when these
# usually be possible, and it's an interesting exercise to explore what happens when these
# parameters are mismatched.
from stonesoup.predictor.kalman import KalmanPredictor
predictor = KalmanPredictor(transition_model)
Expand Down
4 changes: 2 additions & 2 deletions stonesoup/models/transition/nonlinear.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ def function(self, state, noise=False, **kwargs) -> StateVector:
sv1 = state.state_vector
turn_rate = sv1[4, :]
# Avoid divide by zero in the function evaluation
if turn_rate[0] == 0:
turn_rate = Matrix([np.finfo(float).eps])
turn_rate = turn_rate.astype(float)
turn_rate[turn_rate == 0.] = np.finfo(float).eps
dAngle = turn_rate * time_interval_sec
cos_dAngle = np.cos(dAngle)
sin_dAngle = np.sin(dAngle)
Expand Down

0 comments on commit 4ad8a4b

Please sign in to comment.