Skip to content

Commit

Permalink
Removed cftime pin
Browse files Browse the repository at this point in the history
  • Loading branch information
jlstevens committed Jul 16, 2021
1 parent b7f8e41 commit b7d7a1b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions holoviews/core/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -2178,13 +2178,13 @@ def cftime_to_timestamp(date, time_unit='us'):
time_unit since 1970-01-01 00:00:00
"""
import cftime
utime = cftime.utime('microseconds since 1970-01-01 00:00:00')
if time_unit == 'us':
tscale = 1
else:
tscale = (np.timedelta64(1, 'us')/np.timedelta64(1, time_unit))
return utime.date2num(date)*tscale

return cftime.date2num(date,'microseconds since 1970-01-01 00:00:00',
calendar='standard')*tscale

def search_indices(values, source):
"""
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"streamz >=0.5.0",
"datashader >=0.11.1",
"ffmpeg",
"cftime <=1.4.1",
"cftime",
"netcdf4",
"dask",
"scipy",
Expand Down

0 comments on commit b7d7a1b

Please sign in to comment.