[io] mechanics_run.py: fix numerics output value in hdf5 log
@@ -15,8 +15,8 @@ import numpy as np
import h5py
import bisect
import time
+import numbers
import shutil
-import pickle
import tempfile
from contextlib import contextmanager
@@ -775,11 +775,12 @@ class MechanicsHdf5Runner(siconos.io.mechanics_hdf5.MechanicsHdf5):
siconos.io.mechanics_hdf5.data(self.log_data()
[fun.__name__],
'timing', 1), endt)
+ if (isinstance(output, numbers.Number))
siconos.io.mechanics_hdf5.add_line(
siconos.io.mechanics_hdf5.data(self.log_data()
[fun.__name__],
'value', 1),
- pickle.dumps(output))
+ float(output))
return output
return logged
else:
