Skip to content

Commit

Permalink
fix interpolation range (#444)
Browse files Browse the repository at this point in the history
  • Loading branch information
durandom authored Sep 16, 2023
1 parent 970ff77 commit 6cb6dbf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/paddock/telemetry/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,9 @@ def resample(self, input_df, columns=["Brake", "SpeedMs"], method="nearest", fre
resampled_df = pd.DataFrame({"DistanceRoundTrack": new_distance_round_track})

for column in columns:
interp = interp1d(df["DistanceRoundTrack"], df[column], kind=method)
interp = interp1d(
df["DistanceRoundTrack"], df[column], kind=method, bounds_error=False, fill_value="extrapolate"
)
interpolated_values = interp(new_distance_round_track)

if np.issubdtype(df[column].dtype, np.integer):
Expand Down

0 comments on commit 6cb6dbf

Please sign in to comment.