Avoid pandas deprecation warning

This commit is contained in:
Ben Letham 2020-02-04 16:00:37 -08:00
parent 30e68fd467
commit 69bd5a2aac

View file

@ -9,7 +9,7 @@ from __future__ import absolute_import, division, print_function
import logging import logging
from collections import OrderedDict, defaultdict from collections import OrderedDict, defaultdict
from copy import deepcopy from copy import deepcopy
from datetime import timedelta from datetime import timedelta, datetime
import numpy as np import numpy as np
import pandas as pd import pandas as pd
@ -417,7 +417,7 @@ class Prophet(object):
""" """
# convert to days since epoch # convert to days since epoch
t = np.array( t = np.array(
(dates - pd.datetime(1970, 1, 1)) (dates - datetime(1970, 1, 1))
.dt.total_seconds() .dt.total_seconds()
.astype(np.float) .astype(np.float)
) / (3600 * 24.) ) / (3600 * 24.)