def difference ( ydata1 , ydata2 ) : y1 = _n . array ( ydata1 ) y2 = _n . array ( ydata2 ) return ( sum ( y2 - y1 ) / len ( ydata1 ) )
get number of different elements of two array python
def difference(ydata1, ydata2):
    """

    Returns the number you should add to ydata1 to make it line up with ydata2

    """

    y1 = _n.array(ydata1)
    y2 = _n.array(ydata2)

    return(sum(y2-y1)/len(ydata1))