Skip to content

Commit

Permalink
make chain load reproducible
Browse files Browse the repository at this point in the history
  • Loading branch information
cmbant committed Jan 9, 2025
1 parent 475189f commit 032f06b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion getdist/chains.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def chainFiles(root, chain_indices=None, ext='.txt', separator="_",
basename = os.path.basename(root)
reg_exp = re.compile(re.escape(basename) + '(' + re.escape(separator) + '(?P<num>[0-9]+))?' + re.escape(ext))
files = []
for f in os.listdir(folder):
for f in sorted(os.listdir(folder)):
if match := reg_exp.fullmatch(f):
index = int(match.group("num") or 0)
if (chain_indices is None or index in chain_indices) \
Expand Down

0 comments on commit 032f06b

Please sign in to comment.