Skip to content

Commit

Permalink
Fix resolution bug in datetime2year_float
Browse files Browse the repository at this point in the history
  • Loading branch information
DominikStiller committed Sep 5, 2024
1 parent 5e1b0ec commit ab569d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cfr/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ def datetime2year_float(date, resolution='month'):
day = [d.day for d in date]
if resolution == 'month': day = np.ones(np.size(day))

year_float = ymd2year_float(year, month, day)
year_float = ymd2year_float(year, month, day, resolution)

return year_float

Expand Down Expand Up @@ -701,4 +701,4 @@ def download(url: str, fname: str, chunk_size=1024, show_bar=True, verify=False)

ensts_url_dict = {
'BC09_NINO34': 'https://github.com/fzhu2e/cfr-data/raw/main/BC09_NINO34.csv',
}
}

0 comments on commit ab569d3

Please sign in to comment.