Skip to content

Commit

Permalink
fix: data shape returns a tuple
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathias Guijarro committed Oct 31, 2024
1 parent 062ce72 commit f881adb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ophyd/utils/epics_pvs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f881adb

Please sign in to comment.