Skip to content

Commit

Permalink
fix timedelta usage
Browse files Browse the repository at this point in the history
  • Loading branch information
d-chambers committed Jan 4, 2024
1 parent cf45f51 commit 5d09f7d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/test_utils/test_stations_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@ def inv_df_duplicate_channels(self, df_from_inv):
# first add duplicates of fur with different start/end times
df_from_inv["end_date"] = np.datetime64("2020-01-01")
sub_fur = df_from_inv[df_from_inv["station"] == "FUR"]
sub_fur["end_date"] = sub_fur["start_date"] - np.timedelta64(1, "Y")
sub_fur["start_date"] = sub_fur["end_date"] - np.timedelta64(3, "Y")
year = np.timedelta64(365, "D")
sub_fur["end_date"] = sub_fur["start_date"] - year
sub_fur["start_date"] = sub_fur["end_date"] - 3 * year
new_df = pd.concat([df_from_inv, sub_fur], ignore_index=True).reset_index(
drop=True
)
Expand Down

0 comments on commit 5d09f7d

Please sign in to comment.