From 3d21b065178cc7543e834c42d0bcf9a3936e1ee9 Mon Sep 17 00:00:00 2001 From: Sebastian Castro <169091242+scastro-bdai@users.noreply.github.com> Date: Mon, 30 Dec 2024 11:49:31 -0500 Subject: [PATCH] Fix string equality warnings in `SplineFit` class (#147) --- spatialmath/spline.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spatialmath/spline.py b/spatialmath/spline.py index 0a472ecc..8d30bd80 100644 --- a/spatialmath/spline.py +++ b/spatialmath/spline.py @@ -192,14 +192,14 @@ def stochastic_downsample_interpolation( ) sample_time = self.time_data[candidate_removal_index] - if check_type is "local": + if check_type == "local": angular_error = SO3(self.pose_data[candidate_removal_index]).angdist( SO3(self.spline.spline_so3(sample_time).as_matrix()) ) euclidean_error = np.linalg.norm( self.pose_data[candidate_removal_index].t - self.spline.spline_xyz(sample_time) ) - elif check_type is "global": + elif check_type == "global": angular_error = self.max_angular_error() euclidean_error = self.max_euclidean_error() else: