Fixed issue saving HDF5 files when observables were defined through functions
@@ -360,7 +360,7 @@ def save_events_to_madminer_file(
if isinstance(definition, six.string_types):
observable_definitions.append(definition.encode("ascii", "ignore"))
else:
- observable_definitions.append("")
+ observable_definitions.append("".encode("ascii", "ignore"))
# Store observable definitions
f.create_dataset("observables/names", (n_observables,), dtype="S256", data=observable_names_ascii)
