mirror of
https://github.com/wassname/catalyst.git
synced 2026-09-11 12:00:50 +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):
|
def fast_append_date_to_index(index, timestamp):
|
||||||
"""
|
"""
|
||||||
Append a timestamp to a DatetimeIndex. DatetimeIndex.append throws an
|
Append a timestamp to a DatetimeIndex. DatetimeIndex.append does not
|
||||||
error on pandas 0.12.0
|
appear to work.
|
||||||
"""
|
"""
|
||||||
return pd.DatetimeIndex(
|
return pd.DatetimeIndex(
|
||||||
np.hstack(
|
np.hstack(
|
||||||
[
|
[
|
||||||
index.values,
|
index.values,
|
||||||
[timestamp],
|
[timestamp.asm8],
|
||||||
]
|
]
|
||||||
)
|
),
|
||||||
|
tz='UTC',
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user