def inner_p_s(u, v):  
    """
    Calculate the inner product space of the 2 vectors.
    """
    s = 0
    if len(u) != len(v):
        s = -1
    else:
        for i in range(len(u)):
            s += u[i]*v[i]
    return s