def get_simplified_tpmatrices(tpmats):
    """Return copy of tpmats list, where diagonal matrices have been
    simplified and placed in scale arrays.

    Parameters
    ----------
    tpmats
        Instances of :class:`.TPMatrix`

    Returns
    -------
    List[TPMatrix]
        List of :class:`.TPMatrix`'es, that have been simplified

    """
    A = []
    for tpmat in tpmats:
        A.append(tpmat.get_simplified())

    # Add equal matrices
    B = [A[0]]
    for a in A[1:]:
        found = False
        for b in B:
            if a == b:
                b += a
                found = True
        if not found:
            B.append(a)
    return B