matrix.py 文件源码

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

项目:vampyre 作者: GAMPTeam 项目源码 文件源码
def __init__(self, A, shape0):
        LinTrans.__init__(self)
        self.A = A
        if np.isscalar(shape0):
            shape0 = (shape0,)
        self.shape0 = shape0

        # Compute the output shape
        # Note that A.dot(x) operates on the second to last axis of x
        Ashape = A.shape
        shape1 = np.array(shape0)
        if len(shape0) == 1:
            self.aaxis = 0
        else:
            self.aaxis = len(shape0)-2
        shape1[self.aaxis] = Ashape[0]
        self.shape1 = tuple(shape1)

        # Set SVD terms to not computed
        self.svd_computed = False
        self.svd_avail = True
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号