Skip to content

Commit

Permalink
Improve code in get_atomic_types (#469)
Browse files Browse the repository at this point in the history
  • Loading branch information
frostedoyster authored Feb 1, 2025
1 parent 68bd9f5 commit 71c8d49
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/metatrain/utils/data/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ def get_atomic_types(datasets: Union[Dataset, List[Dataset]]) -> List[int]:

types = set()
for dataset in datasets:
for index in range(len(dataset)):
system = dataset[index]["system"]
for sample in dataset:
system = sample["system"]
types.update(set(system.types.tolist()))

return sorted(types)
Expand Down

0 comments on commit 71c8d49

Please sign in to comment.