def loc(w):
    'Returns the slice denoting the location of (x_w, p_w) in the basis.'
    ind = ((2 * w) + 1)
    return slice(ind, (ind + 2))
Returns the slice denoting the location of (x_w, p_w) in the basis.
def loc(w):
    
    ind = ((2 * w) + 1)
    return slice(ind, (ind + 2))