From f3289c197774287e69007d7f6756204098c14200 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Wed, 2 Feb 2022 08:06:41 -0500 Subject: [PATCH] Create source length zeroed arrays from yielded `None` fsp history --- piker/fsp/_engine.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/piker/fsp/_engine.py b/piker/fsp/_engine.py index 1b601c35..f9ba0c39 100644 --- a/piker/fsp/_engine.py +++ b/piker/fsp/_engine.py @@ -135,11 +135,17 @@ async def fsp_compute( output = history_output[key] if history is None: + + if output is None: + length = len(src.array) + else: + length = len(output) + # using the first output, determine # the length of the struct-array that # will be pushed to shm. history = np.zeros( - len(output), + length, dtype=dst.array.dtype )