Skip to content

Commit

Permalink
refactoring=bad, problem fixed now
Browse files Browse the repository at this point in the history
  • Loading branch information
mfinzi committed Feb 26, 2021
1 parent 871cd26 commit ffcdf9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion emlp/solver/linear_operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def _adjoint(self):
def invT(self):
return LazyDirectSum([M.invT() for M in self.Ms])
def to_dense(self):
Ms_all = [self.Ms[i] for i in range(len(self.Ms)) for _ in range(self.multiplicities[i])]
Ms_all = [M for M,c in zip(self.Ms,self.multiplicities) for _ in range(c)]
Ms_all = [Mi.to_dense() if isinstance(Mi,LinearOperator) else Mi for Mi in Ms_all]
return jax.scipy.linalg.block_diag(*Ms_all)
def __new__(cls,Ms,multiplicities=None):
Expand Down

0 comments on commit ffcdf9c

Please sign in to comment.