From aa3bff704cd12f0e3e247d4c45b34e2f2c4478e7 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Fri, 22 Oct 2021 13:03:12 -0400 Subject: [PATCH] De-densify some funcs --- piker/data/_sharedmem.py | 1 + piker/data/_source.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/piker/data/_sharedmem.py b/piker/data/_sharedmem.py index 2169e262..ea452cb3 100644 --- a/piker/data/_sharedmem.py +++ b/piker/data/_sharedmem.py @@ -395,6 +395,7 @@ def open_shm_array( # "unlink" created shm on process teardown by # pushing teardown calls onto actor context stack + tractor._actor._lifetime_stack.callback(shmarr.close) tractor._actor._lifetime_stack.callback(shmarr.destroy) diff --git a/piker/data/_source.py b/piker/data/_source.py index 46302508..8ec92dfd 100644 --- a/piker/data/_source.py +++ b/piker/data/_source.py @@ -133,9 +133,11 @@ def mk_symbol( def from_df( + df: pd.DataFrame, source=None, default_tf=None + ) -> np.recarray: """Convert OHLC formatted ``pandas.DataFrame`` to ``numpy.recarray``.