rolling_window.py 文件源码

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

项目:nengolib 作者: arvoelke 项目源码 文件源码
def readout(q, r):
    """C matrix to decode a delay of r*theta from the delay state for theta.

    ``r`` is a ratio between 0 (``t=0``) and 1 (``t=-theta``).
    """

    c = np.zeros(q)
    for i in range(q):
        j = np.arange(i+1, dtype=np.float64)
        c[q-1-i] += 1 / binom(q, i) * np.sum(
            binom(q, j) * binom(2*q - 1 - j, i - j) * (-r)**(i - j))
    return c
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号