From 0808fbf8a7f1da0d5b6531039b99e204ecd214ff Mon Sep 17 00:00:00 2001 From: Sebastian Castro <169091242+scastro-bdai@users.noreply.github.com> Date: Thu, 19 Dec 2024 09:48:56 -0500 Subject: [PATCH] Fix string equality warnings in `SplineFit` class We've started getting some loud warnings about using `is` instead of `==` when checking string values. This small PR should resolve that. --- 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: