(attributes, encode_values)
return {v.name: v.values if v.is_discrete else vartype(v)
                for v in attributes}
Encode variables to a list mapping name to variable type
        or a list of values.
Encode variables to a list mapping name to variable type
        or a list of values.
Encode variables to a list mapping name to variable type or a list of values .
def encode_variables(attributes, encode_values):
        """Encode variables to a list mapping name to variable type
        or a list of values."""

        if not encode_values:
            return {v.name: vartype(v) for v in attributes}

        return {v.name: v.values if v.is_discrete else vartype(v)
                for v in attributes}
def encode_variables ( attributes , encode_values ) : if not encode_values : return { v . name : vartype ( v ) for v in attributes } return { v . name : v . values if v . is_discrete else vartype ( v ) for v in attributes }