Skip to content

Commit 7b69f45

Browse files
author
Release Manager
committed
Trac #33677: Fix typos in MixedIntegerLinearProgram backends
The methods `variable_upper_bound` and `variable_lower_bound` has argument value=False by default; their docstring mis-stated as "When set to `None` (default)". URL: https://trac.sagemath.org/33677 Reported by: yzh Ticket author(s): Yuan Zhou Reviewer(s): Matthias Koeppe
2 parents 9b4c61a + b91ab9f commit 7b69f45

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

src/sage/numerical/backends/cvxopt_backend.pyx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -914,7 +914,7 @@ cdef class CVXOPTBackend(GenericBackend):
914914
return self.col_name_var[index]
915915
return "x_" + repr(index)
916916

917-
cpdef variable_upper_bound(self, int index, value = None):
917+
cpdef variable_upper_bound(self, int index, value = False):
918918
"""
919919
Return or define the upper bound on a variable
920920
@@ -923,7 +923,7 @@ cdef class CVXOPTBackend(GenericBackend):
923923
- ``index`` (integer) -- the variable's id
924924
925925
- ``value`` -- real value, or ``None`` to mean that the
926-
variable has not upper bound. When set to ``None``
926+
variable has not upper bound. When set to ``False``
927927
(default), the method returns the current value.
928928
929929
EXAMPLES::
@@ -943,7 +943,7 @@ cdef class CVXOPTBackend(GenericBackend):
943943
else:
944944
return self.col_upper_bound[index]
945945

946-
cpdef variable_lower_bound(self, int index, value = None):
946+
cpdef variable_lower_bound(self, int index, value = False):
947947
"""
948948
Return or define the lower bound on a variable
949949
@@ -952,7 +952,7 @@ cdef class CVXOPTBackend(GenericBackend):
952952
- ``index`` (integer) -- the variable's id
953953
954954
- ``value`` -- real value, or ``None`` to mean that the
955-
variable has not lower bound. When set to ``None``
955+
variable has not lower bound. When set to ``False``
956956
(default), the method returns the current value.
957957
958958
EXAMPLES::

src/sage/numerical/backends/generic_backend.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1314,7 +1314,7 @@ cdef class GenericBackend:
13141314
- ``index`` (integer) -- the variable's id
13151315
13161316
- ``value`` -- real value, or ``None`` to mean that the
1317-
variable has not upper bound. When set to ``None``
1317+
variable has not upper bound. When set to ``False``
13181318
(default), the method returns the current value.
13191319
13201320
EXAMPLES::
@@ -1340,7 +1340,7 @@ cdef class GenericBackend:
13401340
- ``index`` (integer) -- the variable's id
13411341
13421342
- ``value`` -- real value, or ``None`` to mean that the
1343-
variable has not lower bound. When set to ``None``
1343+
variable has not lower bound. When set to ``False``
13441344
(default), the method returns the current value.
13451345
13461346
EXAMPLES::

src/sage/numerical/backends/interactivelp_backend.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -985,7 +985,7 @@ cdef class InteractiveLPBackend:
985985
- ``index`` (integer) -- the variable's id
986986
987987
- ``value`` -- real value, or ``None`` to mean that the
988-
variable has not upper bound. When set to ``None``
988+
variable has not upper bound. When set to ``False``
989989
(default), the method returns the current value.
990990
991991
EXAMPLES::
@@ -1029,7 +1029,7 @@ cdef class InteractiveLPBackend:
10291029
- ``index`` (integer) -- the variable's id
10301030
10311031
- ``value`` -- real value, or ``None`` to mean that the
1032-
variable has no lower bound. When set to ``None``
1032+
variable has no lower bound. When set to ``False``
10331033
(default), the method returns the current value.
10341034
10351035
EXAMPLES::

src/sage/numerical/backends/ppl_backend.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,7 +1070,7 @@ cdef class PPLBackend(GenericBackend):
10701070
- ``index`` (integer) -- the variable's id
10711071
10721072
- ``value`` -- real value, or ``None`` to mean that the
1073-
variable has not upper bound. When set to ``None``
1073+
variable has not upper bound. When set to ``False``
10741074
(default), the method returns the current value.
10751075
10761076
EXAMPLES::
@@ -1102,7 +1102,7 @@ cdef class PPLBackend(GenericBackend):
11021102
- ``index`` (integer) -- the variable's id
11031103
11041104
- ``value`` -- real value, or ``None`` to mean that the
1105-
variable has not lower bound. When set to ``None``
1105+
variable has not lower bound. When set to ``False``
11061106
(default), the method returns the current value.
11071107
11081108
EXAMPLES::

0 commit comments

Comments
 (0)