def array_sequence_equal(array_sequence, reference=None):
    """
    Determine if all array objects in a sequence are equal.

    Parameters
    ----------
    array_sequence: sequence of numpy.array
        Sequence of numpy.array or compatible type (e.g. astropy.units.Quantity) objects to compare.
        The objects must support element-wise comparision and implement an any() method.
    reference: numpy.array, optional
        If given all arrays in the sequence will be compared with reference, otherwise they will
        be compared with each other. Must be a numpy.array or compatible type (e.g. Quantity).

    Returns
    -------
    equal: bool
        True if all arrays in the sequence are equal (or equal to reference, if given), otherwise
        False.
    """
    if len(array_sequence) == 0:
        raise ValueError('array_sequence must contain at least one array object!')
    else:
        if reference is None:
            reference = array_sequence[0]
        for array in array_sequence:
            try:
                assert (array == reference).all()
            except (AttributeError, AssertionError):
                # Attribute error if array & reference different lengths, Assertion Error if same
                # length but one or more elements differ in value.
                return False
        return True