From b20e9e58eec84dad114dd28ffe483c5320c6acee Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Tue, 5 Apr 2022 11:04:45 -0400 Subject: [PATCH] Use HL tracer by default, seems to be faster? --- piker/ui/_compression.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/piker/ui/_compression.py b/piker/ui/_compression.py index 1e178036..cdc8bb2e 100644 --- a/piker/ui/_compression.py +++ b/piker/ui/_compression.py @@ -155,7 +155,7 @@ def downsample( def ohlc_flatten( ohlc: np.ndarray, - use_mxmn: bool = False, + use_mxmn: bool = True, ) -> tuple[np.ndarray, np.ndarray]: ''' @@ -167,7 +167,11 @@ def ohlc_flatten( index = ohlc['index'] if use_mxmn: + # traces a line optimally over highs to lows + # using numba. NOTE: pretty sure this is faster + # and looks about the same as the below output. flat, x = hl2mxmn(ohlc) + else: flat = rfn.structured_to_unstructured( ohlc[['open', 'high', 'low', 'close']]