mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-14 19:43:41 +02:00
feat: hadrons input can now handle irregularly spaced ensembles. A
warning is triggered in these cases.
This commit is contained in:
parent
5dd365a997
commit
abbb234257
1 changed files with 3 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
||||||
import os
|
import os
|
||||||
|
import warnings
|
||||||
from collections import Counter
|
from collections import Counter
|
||||||
import h5py
|
import h5py
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
@ -45,7 +46,8 @@ def _get_files(path, filestem, idl):
|
||||||
if len(dc) == 1:
|
if len(dc) == 1:
|
||||||
idx = range(cnfg_numbers[0], cnfg_numbers[-1] + dc[0], dc[0])
|
idx = range(cnfg_numbers[0], cnfg_numbers[-1] + dc[0], dc[0])
|
||||||
else:
|
else:
|
||||||
raise Exception('Configurations are not evenly spaced.')
|
idx = idl
|
||||||
|
warnings.warn("Configurations are not evenly spaced.", RuntimeWarning)
|
||||||
|
|
||||||
return filtered_files, idx
|
return filtered_files, idx
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue