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
评论列表
文章目录