From f881adb9404fbc1dd80108c650ef86e61b537032 Mon Sep 17 00:00:00 2001 From: Mathias Guijarro Date: Thu, 31 Oct 2024 12:56:07 +0100 Subject: [PATCH] fix: data shape returns a tuple --- ophyd/utils/epics_pvs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ophyd/utils/epics_pvs.py b/ophyd/utils/epics_pvs.py index ce3733e0c..39d9ad298 100644 --- a/ophyd/utils/epics_pvs.py +++ b/ophyd/utils/epics_pvs.py @@ -401,12 +401,12 @@ def data_shape(val): ``list(np.ndarray.shape)`` """ if data_type(val) != "array": - return [] + return () try: - return list(val.shape) + return tuple(val.shape) except AttributeError: - return [len(val)] + return (len(val),) # Vendored from pyepics v3.3.0