From 843550f295ed61800f5d5b64e3bf69c28eb438ce Mon Sep 17 00:00:00 2001 From: Leonid Kostrykin Date: Tue, 16 Jul 2024 09:07:27 +0000 Subject: [PATCH] Fix dsm.py --- superdsm/dsm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superdsm/dsm.py b/superdsm/dsm.py index 67248b2..594bf7d 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].sum())[None, :] + term4 = np.sqrt(kappa[pixelmask])[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: