BUG: Fix numpy dtype casting bug that only manifests in pandas 0.14.0.

This commit is contained in:
Scott Sanderson
2014-10-02 18:09:51 -04:00
parent d52dc68b5a
commit 028ba719a2
+5 -4
View File
@@ -551,14 +551,15 @@ def fast_build_history_output(buffer_frame, last_period, algo_dt):
def fast_append_date_to_index(index, timestamp):
"""
Append a timestamp to a DatetimeIndex. DatetimeIndex.append throws an
error on pandas 0.12.0
Append a timestamp to a DatetimeIndex. DatetimeIndex.append does not
appear to work.
"""
return pd.DatetimeIndex(
np.hstack(
[
index.values,
[timestamp],
[timestamp.asm8],
]
)
),
tz='UTC',
)