kernels.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:neurotools 作者: michaelerule 项目源码 文件源码
def diffusion_basis(N=range(1,6),t=np.arange(100)):
    '''
    Note: conceptually similar to other basis functions in this file
    with base=2 and offset=1
    repeatly convolves exponential with itself to generate basis

    Parameters
    ----------

    Returns
    -------
    '''
    print('THIS IS BAD')
    assert 0
    normalize = lambda x:x/np.sum(x)
    first = np.fft(np.exp(-t))
    kernels = [normalize(np.real(np.ifft(first**(2**(1+(n-1)*0.5))))) for n in N]
    return np.array(kernels)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号