(f, basis, lim)
return r
L2 projects the function f on the basis over the domain lim.
L2 projects the function f on the basis over the domain lim.
L2 projects the function f on the basis over the domain lim .
def l2_projection(f, basis, lim):
    """
    L2 projects the function f on the basis over the domain lim.
    """
    r = 0
    for b in basis:
        r += l2_inner_product(f, b, lim) * b
    return r
def l2_projection ( f , basis , lim ) : r = 0 for b in basis : r += l2_inner_product ( f , b , lim ) * b return r