[baseprocessor] solve error when saving scalar data

This commit is contained in:
Noe Brucy
2021-10-19 13:43:49 +02:00
parent 1cc0f09399
commit d956f08f46
+5 -2
View File
@@ -356,8 +356,11 @@ class HDF5Container(BaseProcessor):
else:
self._save_data(name_full + "/" + key, data[key], "", unit)
else:
if len(data) == 0:
return
try:
if len(data) == 0:
return
except TypeError:
data = np.array([data])
self.save.create_array(
os.path.dirname(name_full),