Skip to content

Commit

Permalink
Fix glum issue-872. (Quantco#408)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlondschien committed Jan 24, 2025
1 parent 1b0ce40 commit cfa59c4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/tabmat/standardized_mat.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,9 @@ def sandwich(

limited_shift = self.shift[cols] if cols is not None else self.shift
limited_d = d[rows] if rows is not None else d
term3_and_4 = np.outer(limited_shift, d_mat + limited_shift * np.sum(limited_d))
res = term2 + term3_and_4
term3 = np.outer(limited_shift, d_mat)
term4 = np.outer(limited_shift, limited_shift) * np.sum(limited_d)
res = term2 + term3 + term4
if isinstance(term1, sps.dia_matrix):
idx = np.arange(res.shape[0])
to_add = term1.data[0, :]
Expand Down

0 comments on commit cfa59c4

Please sign in to comment.