From d739cf15b88ad22eb72e46142e9f816eaedb52e7 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Fri, 2 Dec 2022 11:20:17 -0500 Subject: [PATCH] Markup OHLC->path gen with `numba` issue # --- piker/data/_pathops.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/piker/data/_pathops.py b/piker/data/_pathops.py index 144bea33..23df989d 100644 --- a/piker/data/_pathops.py +++ b/piker/data/_pathops.py @@ -89,6 +89,8 @@ def path_arrays_from_ohlc( data: np.ndarray, start: int64, bar_gap: float64 = 0.43, + + # XXX: ``numba`` issue: https://github.com/numba/numba/issues/8622 # index_field: str, ) -> tuple[ @@ -115,17 +117,18 @@ def path_arrays_from_ohlc( # /home/goodboy/repos/piker/env/lib/python3.8/site-packages/numba/core/typing/builtins.py:991 for i, q in enumerate(data[start:], start): - # TODO: ask numba why this doesn't work.. - # open, high, low, close, index = q[ - # ['open', 'high', 'low', 'close', 'index']] - open = q['open'] high = q['high'] low = q['low'] close = q['close'] - # index = float64(q[index_field]) index = float64(q['index']) + # XXX: ``numba`` issue: https://github.com/numba/numba/issues/8622 + # index = float64(q[index_field]) + # AND this (probably) + # open, high, low, close, index = q[ + # ['open', 'high', 'low', 'close', 'index']] + istart = i * 6 istop = istart + 6