diff --git a/module/interface.py b/module/interface.py index 10e0c633..e8a0f472 100644 --- a/module/interface.py +++ b/module/interface.py @@ -364,9 +364,9 @@ def adjoint_derivative(self, dx=None, dy_u=None, dy_l=None, d_sol = np.concatenate([dx, dy_u, dy_l]) if diff_mode == 'lsqr': - r_sol = - sla.lsqr(self._derivative_cache['M'].T, d_sol)[0] - + elif diff_mode == 'lu': + r_sol = - sla.spsolve(self._derivative_cache['M'].T, d_sol) elif diff_mode == 'qr': # TODO: Add something like https://github.com/oxfordcontrol/osqpth/pull/5 # but use slack variables too