signal_base.py 文件源码

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

项目:enterprise 作者: nanograv 项目源码 文件源码
def add(self, other, idx):
        if other.ndim == 2 and self.ndim == 1:
            self = KernelMatrix(np.diag(self))

        if self.ndim == 1:
            self[idx] += other
        else:
            if other.ndim == 1:
                self[idx, idx] += other
            else:
                self._setcliques(idx)
                idx = ((idx, idx) if isinstance(idx, slice)
                       else (idx[:, None], idx))
                self[idx] += other

        return self
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号