Skip to content

Commit

Permalink
fix normalization warnings with copy
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-springer committed Jan 22, 2025
1 parent c20eda0 commit 4c27641
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rdtools/normalization.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,9 +575,9 @@ def _interpolate_series(time_series, target_index, max_timedelta=None,
df = df.dropna()

# convert to integer index and calculate the size of gaps in input
timestamps = df.index.view('int64')
df.loc[:, 'timestamp'] = timestamps
df.loc[:, 'gapsize_ns'] = df['timestamp'].diff()
timestamps = df.index.view("int64").copy()
df["timestamp"] = timestamps
df["gapsize_ns"] = df["timestamp"].diff()
df.index = timestamps

valid_indput_index = df.index.copy()
Expand Down

0 comments on commit 4c27641

Please sign in to comment.