We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b0ce40 commit cfa59c4Copy full SHA for cfa59c4
src/tabmat/standardized_mat.py
@@ -155,8 +155,9 @@ def sandwich(
155
156
limited_shift = self.shift[cols] if cols is not None else self.shift
157
limited_d = d[rows] if rows is not None else d
158
- term3_and_4 = np.outer(limited_shift, d_mat + limited_shift * np.sum(limited_d))
159
- res = term2 + term3_and_4
+ term3 = np.outer(limited_shift, d_mat)
+ term4 = np.outer(limited_shift, limited_shift) * np.sum(limited_d)
160
+ res = term2 + term3 + term4
161
if isinstance(term1, sps.dia_matrix):
162
idx = np.arange(res.shape[0])
163
to_add = term1.data[0, :]
0 commit comments