[baseprocessor] solve error when saving scalar data
This commit is contained in:
+5
-2
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user