Ugh, use `bool` flag to determine index field..
parent
9dd4945580
commit
da3f74e28e
|
@ -94,6 +94,7 @@ def path_arrays_from_ohlc(
|
||||||
data: np.ndarray,
|
data: np.ndarray,
|
||||||
start: int64,
|
start: int64,
|
||||||
bar_gap: float64 = 0.43,
|
bar_gap: float64 = 0.43,
|
||||||
|
use_time_index: bool = True,
|
||||||
|
|
||||||
# XXX: ``numba`` issue: https://github.com/numba/numba/issues/8622
|
# XXX: ``numba`` issue: https://github.com/numba/numba/issues/8622
|
||||||
# index_field: str,
|
# index_field: str,
|
||||||
|
@ -126,8 +127,11 @@ def path_arrays_from_ohlc(
|
||||||
high = q['high']
|
high = q['high']
|
||||||
low = q['low']
|
low = q['low']
|
||||||
close = q['close']
|
close = q['close']
|
||||||
# index = float64(q['index'])
|
|
||||||
index = float64(q['time'])
|
if use_time_index:
|
||||||
|
index = float64(q['time'])
|
||||||
|
else:
|
||||||
|
index = float64(q['index'])
|
||||||
|
|
||||||
# XXX: ``numba`` issue: https://github.com/numba/numba/issues/8622
|
# XXX: ``numba`` issue: https://github.com/numba/numba/issues/8622
|
||||||
# index = float64(q[index_field])
|
# index = float64(q[index_field])
|
||||||
|
|
Loading…
Reference in New Issue