def get_ut_matrix_values(label_list, matrix, non_zeros_only=False):
    """
    Return upper triangular values of the matrix

    parameters
    -----------
    :param label_list: list of str
        List of labels
    :param matrix: matrix
    :param non_zeros_only: boolean, optional
        Boolean to indicate the inclusion of non-zero values
    :return: list
        List of [value, [label1, label2]
    """
    results = []
    row_count, col_count = matrix.shape

    r = -1
    while r < row_count - 1:
        r += 1
        c = r
        while c < col_count - 1:
            c += 1
            v = matrix[r, c]
            word_pair = [label_list[r], label_list[c]]
            word_pair.sort()  # added to support comparison of word pairs

            if non_zeros_only:
                if v != 0:
                    results.append([v, word_pair])
            else:
                results.append([v, word_pair])

    return results