From be44d46bd8456bb0ae5c1342662cd1a69a5e72e6 Mon Sep 17 00:00:00 2001 From: imengus Date: Tue, 25 Jul 2023 01:02:26 +0200 Subject: [PATCH] fix: doctest issues when running code --- linear_programming/simplex.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/linear_programming/simplex.py b/linear_programming/simplex.py index 198dbef6a..f46e1615c 100644 --- a/linear_programming/simplex.py +++ b/linear_programming/simplex.py @@ -28,8 +28,7 @@ class Tableau: >>> Tableau(np.array([[-1,-1,0,0,1],[1,3,1,0,4],[3,1,0,1,4.]]), -2, 2) Traceback (most recent call last): ... - ValueError: Number of decision and artificial variables must be greater or equal to - 2 or 0, respectively + ValueError: number of (artificial) variables must be a natural number """ # Maximum number of iterations to prevent cycling @@ -44,8 +43,7 @@ class Tableau: if n_vars < 2 or n_artificial_vars < 0: raise ValueError( - "Number of decision and artificial variables must be greater or equal \ - to 2 or 0, respectively" + "number of (artificial) variables must be a natural number" ) self.tableau = tableau