def get_var_domains(sample):
    """Get the possible values of the variables from a sample.

    Arguments:
        sample: A two-dimensional numpy array containing a sample of
            the configuration variables.

    Returns:
        A list with one entry for each variable containing a
        sequence with all the possible values of the variable.
    """
    # sorted() called to return a stable order (it could be unstable
    # because of Python's hash randomization).
    var_domains = [list(sorted(set(sample[:, i])))
                   for i in range(sample.shape[1])]
    return var_domains