Skip to content

Commit

Permalink
Use pandas bug work around
Browse files Browse the repository at this point in the history
  • Loading branch information
mdeceglie committed Sep 6, 2024
1 parent 755f18b commit c042985
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rdtools/clearsky_temperature.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ def get_clearsky_tamb(times, latitude, longitude, window_size=40,
if times.freq is None:
freq_actual = pd.infer_freq(times)
if freq_actual is None:
times._engine.clear_mapping()
# workaround from https://github.com/pandas-dev/pandas/issues/55794
freq_actual = pd.infer_freq(times[:10])
warnings.warn("Input 'times' has no frequency attribute. "
"Inferring frequency from first 10 timestamps.")
Expand Down

0 comments on commit c042985

Please sign in to comment.