src/models/hippo/hippo.py
def initial_C(measure, N, dtype=torch.float):
    """ Return C that captures the other endpoint in the HiPPO approximation """

    if measure == 'legt':
        C = (torch.arange(N, dtype=dtype)*2+1)**.5 * (-1)**torch.arange(N)
    elif measure == 'fourier':
        C = torch.ones(N, dtype=dtype) # (N)
    else:
        C = torch.zeros(N, dtype=dtype) # (N)

    return C
 Return C that captures the other endpoint in the HiPPO approximation 
Return C that captures the other endpoint in the HiPPO approximation
Return C that captures the other endpoint in the HiPPO approximation
def initial_C(measure, N, dtype=torch.float):
    if measure == 'legt':
        C = (torch.arange(N, dtype=dtype)*2+1)**.5 * (-1)**torch.arange(N)
    elif measure == 'fourier':
        C = torch.ones(N, dtype=dtype) 
    else:
        C = torch.zeros(N, dtype=dtype) 
    return C
def initial_C ( measure , N , dtype = torch . float ) : if measure == 'legt' : C = ( torch . arange ( N , dtype = dtype ) * 2 + 1 ) ** .5 * ( - 1 ) ** torch . arange ( N ) elif measure == 'fourier' : C = torch . ones ( N , dtype = dtype ) else : C = torch . zeros ( N , dtype = dtype ) return C
Return C that captures the other endpoint in the HiPPO approximation
Return C that captures the other endpoint in the HiPPO approximation
""" Return C that captures the other endpoint in the HiPPO approximation """ # (N) # (N)
measure
N
dtype