We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c1af4d commit f34551aCopy full SHA for f34551a
src/track_linearization/core.py
@@ -71,8 +71,8 @@ def project_points_to_segment(
71
/ sum_squares
72
)
73
74
- nx_param[np.where(nx_param < 0)] = 0.0
75
- nx_param[np.where(nx_param > 1)] = 1.0
+ np.clip(nx_param, 0.0, 1.0, out=nx_param)
+
76
return node1[np.newaxis, ...] + (
77
nx_param[:, :, np.newaxis] * segment_diff[np.newaxis, ...]
78
0 commit comments