diff --git a/python/damask/_configmaterial.py b/python/damask/_configmaterial.py index 0f8d4efa1..febeca64c 100644 --- a/python/damask/_configmaterial.py +++ b/python/damask/_configmaterial.py @@ -69,8 +69,8 @@ class ConfigMaterial(Config): _,idx = np.unique(np.hstack(list({**constituents_,**kwargs_}.values())),return_index=True,axis=0) idx = np.sort(idx) - constituents_ = {k:v[idx].squeeze() for k,v in constituents_.items()} - kwargs_ = {k:v[idx].squeeze() for k,v in kwargs_.items()} + constituents_ = {k:np.atleast_1d(v[idx].squeeze()) for k,v in constituents_.items()} + kwargs_ = {k:np.atleast_1d(v[idx].squeeze()) for k,v in kwargs_.items()} return ConfigMaterial().material_add(constituents_,**kwargs_)