From 93330954c2e74d6447ef140c00b3f90a0fee6c39 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Thu, 15 Dec 2022 17:01:21 -0500 Subject: [PATCH] Ugh, use `bool` flag to determine index field.. --- piker/data/_pathops.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/piker/data/_pathops.py b/piker/data/_pathops.py index da51e9c1..3dee38b2 100644 --- a/piker/data/_pathops.py +++ b/piker/data/_pathops.py @@ -94,6 +94,7 @@ def path_arrays_from_ohlc( data: np.ndarray, start: int64, bar_gap: float64 = 0.43, + use_time_index: bool = True, # XXX: ``numba`` issue: https://github.com/numba/numba/issues/8622 # index_field: str, @@ -126,8 +127,11 @@ def path_arrays_from_ohlc( high = q['high'] low = q['low'] 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 # index = float64(q[index_field])