diff --git a/superdsm/dsm.py b/superdsm/dsm.py index 705eed2..67248b2 100644 --- a/superdsm/dsm.py +++ b/superdsm/dsm.py @@ -352,7 +352,7 @@ def hessian(self, params): self._update_theta() kappa = self.theta - np.square(self.theta) pixelmask = (kappa != 0) - term4 = np.sqrt(kappa[pixelmask] * pixelmask.sum())[None, :] + term4 = np.sqrt(kappa[pixelmask].sum())[None, :] D1 = np.asarray([-self.y * qi for qi in self.q])[:, pixelmask] * term4 D2 = self.smooth_mat[pixelmask].multiply(-self.y[pixelmask, None]).T.multiply(term4).tocsr() if self.smooth_mat.shape[1] > 0: