few bug solving

This commit is contained in:
Noe Brucy
2023-07-12 11:13:03 +02:00
parent 29a9150534
commit a1e4f775b6
4 changed files with 40 additions and 18 deletions
+2 -2
View File
@@ -370,7 +370,7 @@ class HDF5Container(BaseProcessor):
for base_unit_str in unit:
expo = unit[base_unit_str]
base_unit = self._get_units(base_unit_str)
new_unit = new_unit * base_unit ** expo
new_unit = new_unit * base_unit**expo
return new_unit
if (data is not None) and isinstance(data, dict) and list(unit)[0] in data:
for key in unit:
@@ -435,7 +435,7 @@ class HDF5Container(BaseProcessor):
self._save_data(name_full + "/" + key, data[key], "", unit)
else:
try:
if len(data) == 0:
if data is None or len(data) == 0:
return
except TypeError:
data = np.array([data])