Skip to content

Commit d4c981d

Browse files
committed
core.io.h5.utils.process_scalar_value: handles 1 val arrays
1 parent 4a536cd commit d4c981d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cdl/core/io/h5/utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ def process_scalar_value(dset, name, callback):
4646
"""Process dataset numeric/str value `name`"""
4747
try:
4848
scdata = dset[name][()]
49+
if isinstance(scdata, np.ndarray):
50+
scdata = scdata[0]
4951
if scdata is not None:
5052
return callback(scdata)
5153
except (KeyError, ValueError):

0 commit comments

Comments
 (0)