Skip to content

Commit

Permalink
Attempt to debug cftime issues on windows (#3512)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Feb 21, 2019
1 parent 565358b commit 9706f54
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions holoviews/core/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -1919,10 +1919,10 @@ def cftime_to_timestamp(date, time_unit='us'):
date: cftime datetime object (or array)
Returns:
Milliseconds since 1970-01-01 00:00:00
time_unit since 1970-01-01 00:00:00
"""
import cftime
utime = cftime.utime('microseconds since 1970-01-01')
utime = cftime.utime('microseconds since 1970-01-01 00:00:00')
if time_unit == 'us':
tscale = 1
else:
Expand Down
4 changes: 2 additions & 2 deletions holoviews/tests/plotting/bokeh/testelementplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ def test_cftime_transform_gregorian_no_warn(self):
curve = Curve((gregorian_dates, [1, 2, 3]))
plot = bokeh_renderer.get_plot(curve)
xs = plot.handles['cds'].data['x']
self.assertEqual(xs.astype('int'),
self.assertEqual(xs.astype('int64'),
np.array([951696000000, 951868800000, 951955200000]))

def test_cftime_transform_noleap_warn(self):
Expand All @@ -334,7 +334,7 @@ def test_cftime_transform_noleap_warn(self):
curve = Curve((gregorian_dates, [1, 2, 3]))
plot = bokeh_renderer.get_plot(curve)
xs = plot.handles['cds'].data['x']
self.assertEqual(xs.astype('int'),
self.assertEqual(xs.astype('int64'),
np.array([951696000000, 951868800000, 951955200000]))
substr = (
"Converting cftime.datetime from a non-standard calendar "
Expand Down

0 comments on commit 9706f54

Please sign in to comment.