def gen_problem(params):
    """Convert parameters to be input to SALib.

    This function converts the params dictionary into a dictionary formatted to 
    be input at the SALib as mean to generate the samples.

    Parameters
    ----------
    params : dict
        Example: {"variable": {"bounds": [0, 1], "type": "int"}}
        
    Returns
    -------
    dict
        Formatted to be input into SALib sampling
    """

    n_vars = len(params)

    problem = {"num_vars": n_vars, "names": [], "bounds": []}

    for key in params.keys():
        problem["names"] += [key]
        if "type" in params[key].keys():
            bd = params[key]["bounds"]
            if params[key]["type"] == "int":
                bd[-1] += 1
            problem["bounds"] += [bd]
        else:
            problem["bounds"] += [params[key]["bounds"]]

    return problem