diff --git a/src/fairchem/core/datasets/base_dataset.py b/src/fairchem/core/datasets/base_dataset.py index 2ca26596c..fd0aca5a1 100644 --- a/src/fairchem/core/datasets/base_dataset.py +++ b/src/fairchem/core/datasets/base_dataset.py @@ -109,7 +109,9 @@ def _metadata(self) -> DatasetMetadata: for field in DatasetMetadata._fields } ) - + assert np.issubdtype( + metadata.natoms.dtype, np.integer + ), f"Metadata natoms must be an integer type! not {metadata.natoms.dtype}" assert metadata.natoms.shape[0] == len( self ), "Loaded metadata and dataset size mismatch."