mirror of
https://github.com/wassname/catalyst.git
synced 2026-06-28 10:31:30 +08:00
BUG: Fix numpy dtype casting bug that only manifests in pandas 0.14.0.
This commit is contained in:
@@ -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',
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user