import math


def l2_distance(data1, data2):
    """ l2_distance function

    Find the L2 distance between two data points.

    Args
    ----
    data1 : np.array
        pixel array
    data2 : np.array
        pixel array

    Returns
    -------
    Number
    """
    sum = 0

    for i in range(len(data1)):
        val1 = data1[i]
        val2 = data2[i]
        sum += ((val1-val2) ** 2)

    return math.sqrt(sum)