Skip to content

Commit

Permalink
Adjusted constrained optimization printout messages
Browse files Browse the repository at this point in the history
  • Loading branch information
arpastrana committed Sep 21, 2024
1 parent da310d2 commit ea9c2d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/jax_fdm/equilibrium/fdm.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def constrained_fdm(datastructure,
datastructure_validate(datastructure)

if constraints and sparse:
print("Constraints are not supported yet for sparse inputs. Switching to dense.")
print("\nConstraints are not supported yet for sparse inputs. Switching to dense.")
sparse = False

model = model_from_sparsity(sparse, tmax, eta, is_load_local, itersolve_fn, implicit_diff, verbose)
Expand Down
2 changes: 1 addition & 1 deletion src/jax_fdm/optimization/optimizers/optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def constraints(self, constraints, model, params_opt):
Returns the defined constraints in a format amenable to `scipy.minimize`.
"""
if constraints:
print(f"Warning! {self.name} does not support constraints. I am ignoring them.")
print(f"\nWarning! {self.name} does not support constraints. I am ignoring them.")

def gradient(self, loss):
"""
Expand Down

0 comments on commit ea9c2d0

Please sign in to comment.