8000 dates: coerce to int · matplotlib/matplotlib@7a74530 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7a74530

Browse files
committed
dates: coerce to int
1 parent 59f7f52 commit 7a74530

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/dates.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,8 @@ def _from_ordinalf(x, tz=None, musec_prec=20):
297297
# Compensate for rounding errors
298298
if musec_prec > 1:
299299
musec = datetime.timedelta(
300-
microseconds=round(
301-
dt.microsecond / float(musec_prec)) * musec_prec)
300+
microseconds=int(round(
301+
dt.microsecond / float(musec_prec)) * musec_prec))
302302
dt = dt.replace(microsecond=0) + musec
303303

304304
return dt.astimezone(tz)

0 commit comments

Comments
 (0)
0