pyerrors.input.utils

Utilities for the input

 1"""Utilities for the input"""
 2
 3
 4def check_idl(idl, che):
 5    """Checks if list of configurations is contained in an idl
 6
 7    Parameters
 8    ----------
 9    idl : range or list
10        idl of the current replicum
11    che : list
12        list of configurations to be checked against
13    """
14    missing = []
15    for c in che:
16        if c not in idl:
17            missing.append(c)
18    # print missing configurations such that it can directly be parsed to slurm terminal
19    if not (len(missing) == 0):
20        print(len(missing), "configs missing")
21        miss_str = str(missing[0])
22        for i in missing[1:]:
23            miss_str += "," + str(i)
24        print(miss_str)
def check_idl(idl, che)
 5def check_idl(idl, che):
 6    """Checks if list of configurations is contained in an idl
 7
 8    Parameters
 9    ----------
10    idl : range or list
11        idl of the current replicum
12    che : list
13        list of configurations to be checked against
14    """
15    missing = []
16    for c in che:
17        if c not in idl:
18            missing.append(c)
19    # print missing configurations such that it can directly be parsed to slurm terminal
20    if not (len(missing) == 0):
21        print(len(missing), "configs missing")
22        miss_str = str(missing[0])
23        for i in missing[1:]:
24            miss_str += "," + str(i)
25        print(miss_str)

Checks if list of configurations is contained in an idl

Parameters
  • idl (range or list): idl of the current replicum
  • che (list): list of configurations to be checked against