Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fill value all fields
  • Loading branch information
tasansal committed Sep 5, 2025
commit 36ea3772e8ec601d0ec3a8a2498d47592b193ff8
3 changes: 2 additions & 1 deletion src/mdio/schemas/v1/dataset_serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ def _get_fill_value(data_type: ScalarType | StructuredType | str) -> any:
return fill_value_map.get(data_type)
if isinstance(data_type, StructuredType):
numpy_dtype = to_numpy_dtype(data_type)
return np.void((), dtype=numpy_dtype)
fill_value = (0,) * len(numpy_dtype.fields)
return np.void(fill_value, dtype=numpy_dtype)
if isinstance(data_type, str):
return ""
# If we do not have a fill value for this type, use None
Expand Down