def list_all_equal(data):
    """
    Checks if all of the elements of a list are the same.

    Parameters
    ----------
    data : list of 1D
        The list of elements to compare

    Returns
    -------
    equivalence: bool
        True if the elements are all the same

    Notes
    -----
    Based on https://stackoverflow.com/questions/3844801
    """

    equivalence = data.count(data[0]) == len(data)

    return equivalence