Skip to content

Commit

Permalink
change logic to use ones_like instead of full_like
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdsharpe committed Jan 17, 2024
1 parent a5cf9c6 commit f6fa352
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aerosandbox/optimization/opti.py
Original file line number Diff line number Diff line change
Expand Up @@ -1154,7 +1154,7 @@ def constrain_derivative(self,
try:
derivative[0]
except (TypeError, IndexError):
derivative = np.full_like(with_respect_to, fill_value=derivative)
derivative = np.ones_like(with_respect_to) * derivative

# TODO scale constraints by variable scale?
# TODO make
Expand Down

0 comments on commit f6fa352

Please sign in to comment.