From da21cb4832a39b1c14c2c8ddac4568547f920c52 Mon Sep 17 00:00:00 2001 From: imengus Date: Tue, 15 Aug 2023 13:28:03 +0100 Subject: [PATCH] fix ruff --- linear_programming/simplex.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/linear_programming/simplex.py b/linear_programming/simplex.py index 314bcd327..c702bcc78 100644 --- a/linear_programming/simplex.py +++ b/linear_programming/simplex.py @@ -37,7 +37,9 @@ class Tableau: """ # Max iteration number to prevent cycling maxiter = 100 - def __init__(self, tableau: np.ndarray, n_vars: int, n_artificial_vars: int) -> None: + def __init__( + self, tableau: np.ndarray, n_vars: int, n_artificial_vars: int + ) -> None: if tableau.dtype != 'float64': raise TypeError('Tableau must have type float64') @@ -233,7 +235,7 @@ class Tableau: ... [0, 0, 0.25, 0.25, 2], ... [0, 1, 0.375, -0.125, 1], ... [1, 0, -0.125, 0.375, 1] - ... ]), 2, 0).run_simplex() + ... ]), 2, 0).run_simplex() {'P': 2.0, 'x1': 1.0, 'x2': 1.0} # Non-standard: >= constraints