We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e756d3a commit 7b44826Copy full SHA for 7b44826
deepmd/utils/data_system.py
@@ -1,5 +1,6 @@
1
# SPDX-License-Identifier: LGPL-3.0-or-later
2
import collections
3
+import itertools
4
import logging
5
import os
6
import warnings
@@ -864,7 +865,11 @@ def process_systems(
864
865
systems = rglob_sys_str(systems, patterns)
866
elif isinstance(systems, list):
867
# Process each system individually and flatten results
- systems = sum([_process_single_system(system) for system in systems], [])
868
+ systems = list(
869
+ itertools.chain.from_iterable(
870
+ _process_single_system(system) for system in systems
871
+ )
872
873
return systems
874
875
0 commit comments