Skip to content

Commit f1cb688

Browse files
committed
fill value all fields
1 parent 7d8bc80 commit f1cb688

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/mdio/schemas/v1/dataset_serializer.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,8 @@ def _get_fill_value(data_type: ScalarType | StructuredType | str) -> any:
154154
return fill_value_map.get(data_type)
155155
if isinstance(data_type, StructuredType):
156156
numpy_dtype = to_numpy_dtype(data_type)
157-
return np.void((), dtype=numpy_dtype)
157+
fill_value = (0,) * len(numpy_dtype.fields)
158+
return np.void(fill_value, dtype=numpy_dtype)
158159
if isinstance(data_type, str):
159160
return ""
160161
# If we do not have a fill value for this type, use None

0 commit comments

Comments
 (0)