diff --git a/mala/targets/density.py b/mala/targets/density.py index 5782611fa..d5fdfe27c 100644 --- a/mala/targets/density.py +++ b/mala/targets/density.py @@ -417,6 +417,7 @@ def read_from_cube(self, path, units="1/Bohr^3", **kwargs): "We recommend to check and change the requested units" ) data, meta = read_cube(path) + data = np.expand_dims(data, -1) data *= self.convert_units(1, in_units=units) self.density = data self.grid_dimensions = list(np.shape(data)[0:3])