diff --git a/hysop/operator/base/custom_symbolic_operator.py b/hysop/operator/base/custom_symbolic_operator.py index 440d7eedc99c48f4ffd6c5e91e2cc7a1a3511b49..f3f42c9f33eb22e25ced23e79327b8078105b9e1 100644 --- a/hysop/operator/base/custom_symbolic_operator.py +++ b/hysop/operator/base/custom_symbolic_operator.py @@ -653,7 +653,7 @@ class SymbolicExpressionParser(object): @classmethod def parse_subexpr(cls, variables, info, expr): if isinstance(expr, npw.ndarray): - assert expr.ndim == 0 + assert expr.ndim == 0, expr expr = expr.tolist() if isinstance(expr, (str, int,long,float,complex,npw.number)): diff --git a/hysop/simulation.py b/hysop/simulation.py index 273ffd406948c0dfc01c85b7880d7171eaeee731..f7d4d506b70dcbd2335b4cbf7eebbb87f2178859 100644 --- a/hysop/simulation.py +++ b/hysop/simulation.py @@ -138,8 +138,9 @@ class Simulation(object): dt_name = '{}_dt'.format(name) if (name is not None) else 'dt' if (dt is None): - dt = ScalarParameter(name=dt_name, dtype=HYSOP_REAL, - min_value=np.finfo(HYSOP_REAL).eps, + dtype = t.dtype if (t is not None) else HYSOP_REAL + dt = ScalarParameter(name=dt_name, dtype=dtype, + min_value=np.finfo(dtype).eps, initial_value=dt0, quiet=quiet) else: dt.value = dt0