Closed
Description
dti = pd.date_range('2016-01-01', periods=3, tz='US/Central')
>>> pd.Index(dti, dtype=object)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/site-packages/pandas/core/indexes/base.py", line 294, in __new__
dtype=dtype, **kwargs)
File "/usr/local/lib/python2.7/site-packages/pandas/core/indexes/datetimes.py", line 453, in __new__
raise ValueError("cannot localize from non-UTC data")
ValueError: cannot localize from non-UTC data
>>> np.array(dti, dtype=object)
array([1451628000000000000L, 1451714400000000000L, 1451800800000000000L],
dtype=object)
I expected these to match pd.Index(list(dti), dtype=object)
and np.array(list(dti))
, respectively.