diff --git a/deepmd/utils/data.py b/deepmd/utils/data.py index 485079b08d..57bea00fac 100644 --- a/deepmd/utils/data.py +++ b/deepmd/utils/data.py @@ -580,7 +580,7 @@ def _load_data( return np.float32(0.0), data def _load_type(self, sys_path: DPPath): - atom_type = (sys_path / "type.raw").load_txt(dtype=np.int32, ndmin=1) + atom_type = (sys_path / "type.raw").load_txt(ndmin=1).astype(np.int32) return atom_type def _load_type_mix(self, set_name: DPPath):