def dfttk_occupancies_to_espei(occupancies):
    """Convert DFTTK occupancies, e.g. [[0.5 0.5], [1.0]] to ESPEI's configuration [[0.5, 0.5], 1.0]"""
    espei_occupancies = []
    for subl in occupancies:
        if len(subl) == 1:
            # this sublattice is an endmember
            espei_occupancies.append(1.0)
        else:
            # this sublattice has an interaction
            espei_occupancies.append([occ for occ in subl])
    return espei_occupancies