Skip to content

Commit

Permalink
Allow accessing dim_f during objective build
Browse files Browse the repository at this point in the history
  • Loading branch information
f0uriest committed Oct 1, 2024
1 parent d45bb1b commit 04121b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion desc/objectives/objective_funs.py
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ def dim_x(self):
@property
def dim_f(self):
"""int: Number of objective equations."""
if not self.built:
if not hasattr(self, "_dim_f"):
raise RuntimeError("ObjectiveFunction must be built first.")
return self._dim_f

Expand Down

0 comments on commit 04121b1

Please sign in to comment.