def check_all_values(base, target, tolerance=1e-15):
    """
    Check the deviation of each element of two data arrays.

    :param base: usually data arrays
    :param target: usually data arrays
    :param tolerance: max allowed deviation
    :return: boolean, True for pass
    """
    rtn = True
    # sanity check
    if len(base) != len(target):
        return False

    for idx in range(len(base)):
        deviation = abs(base[idx] - target[idx])
        if deviation > tolerance:
            print("Deviation is larger than tolerance!!")
            rtn = False

    return rtn