diff --git a/qcelemental/models/v2/types.py b/qcelemental/models/v2/types.py index 942203a8..27ecb31a 100644 --- a/qcelemental/models/v2/types.py +++ b/qcelemental/models/v2/types.py @@ -11,6 +11,17 @@ def generate_caster(dtype): def cast_to_np(v): + # for driver=properties + if isinstance(v, dict): + vv = {} + for key, val in v.items(): + try: + val = np.asarray(val, dtype=dtype) + except ValueError: + raise ValueError(f"Could not cast {val} to NumPy Array!") + vv[key] = val + return vv + try: v = np.asarray(v, dtype=dtype) except ValueError: