Skip to content

Commit

Permalink
run Black
Browse files Browse the repository at this point in the history
  • Loading branch information
dallan-keylogic committed Apr 11, 2024
1 parent da664b0 commit 9b8a25d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions idaes/core/util/model_diagnostics.py
Original file line number Diff line number Diff line change
Expand Up @@ -3619,7 +3619,12 @@ def ipopt_solve_halt_on_error(model, options=None):
)


def check_parallel_jacobian(model, tolerance: float = 1e-8, direction: str = "row", zero_norm_tolerance: float = 1e-8):
def check_parallel_jacobian(
model,
tolerance: float = 1e-8,
direction: str = "row",
zero_norm_tolerance: float = 1e-8,
):
"""
Check for near-parallel rows or columns in the Jacobian.
Expand Down Expand Up @@ -3667,7 +3672,7 @@ def check_parallel_jacobian(model, tolerance: float = 1e-8, direction: str = "ro

for i in range(len(components)):
norms[i] = norm(mat[i, :], ord="fro")
#norms = np.array([norm(mat[i, :], ord="fro") for i in range(len(components))])
# norms = np.array([norm(mat[i, :], ord="fro") for i in range(len(components))])
zero_norm_indices = np.nonzero(np.abs(norms) <= zero_norm_tolerance)

# Take product of all rows/columns with all rows/columns by taking outer
Expand Down

0 comments on commit 9b8a25d

Please sign in to comment.