def check_data_2d(x, y, z):
    """
    Performs consistency checks on the data passed into make_film_2d.

    These checks are only done when both x, y, and z arguments are passed into
    the function.

    Parameters
    ----------
    x : array_like
        Array specifying the x axis.
    y : array_like
        Array specifying the y axis.
    z : array_like
        Three dimensional array assumed to be of the form z(t, x, y). This
        specifies the values to be plotted as a function of time.
    """
    x_s = x.shape
    y_s = y.shape
    z_s = z.shape
    if len(x_s) != 1:
        raise IndexError('x must be one dimensional.')
    if len(y_s) != 1:
        raise IndexError('y must be one dimensional.')
    if len(z_s) != 3:
        raise IndexError('y must be three dimensional.')
    if x_s[0] != z_s[1]:
        raise ValueError('x and z must have the same length: {0}, {1}'.
            format(x_s[0], z_s[1]))
    elif y_s[0] != z_s[2]:
        raise ValueError('y and z must have the same length: {0}, {1}'.
            format(y_s[0], z_s[2]))
