Skip to content

Commit

Permalink
Make dense problem work for problems with only one constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
A-CGray committed Jan 2, 2025
1 parent 710b677 commit ef13e1d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions paropt/paropt_pyoptsparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ def evalObjConGradient(self, x, g, A):
"""Evaluate the objective and constraint gradients"""
gobj, gcon, fail = self.ptr._masterFunc(x[:], ["gobj", "gcon"])
g[:] = gobj[:]
gcon = np.atleast_2d(gcon)
for i in range(self.ncon):
A[i][:] = -gcon[i][:]
return fail
Expand Down

0 comments on commit ef13e1d

Please sign in to comment.