import yaml


def load_config(name):
    """
    Load YAML configuration file.

    Parameters
    ----------
    name : str
        Path of the configuration file.

    Returns
    -------
    cfg : dict
        Dictionary containing all the configuration information.

    """
    try:
        with open(name, "r") as stream:
            cfg = yaml.load(stream, Loader=yaml.FullLoader)
    except FileNotFoundError as e:
        print(e)
        raise
    return cfg