Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit 40876ee

Browse files
author
Matthias Koeppe
committed
PPLBackend.add_linear_constraints: Fix handling of 'names' argument
1 parent 987f609 commit 40876ee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sage/numerical/backends/ppl_backend.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ cdef class PPLBackend(GenericBackend):
632632
self.row_lower_bound.append(lower_bound)
633633
self.row_upper_bound.append(upper_bound)
634634
if names is not None:
635-
self.row_name_var.append(names)
635+
self.row_name_var.append(names[i])
636636
else:
637637
self.row_name_var.append(None)
638638

@@ -992,7 +992,7 @@ cdef class PPLBackend(GenericBackend):
992992
993993
sage: from sage.numerical.backends.generic_backend import get_solver
994994
sage: p = get_solver(solver = "PPL")
995-
sage: p.add_linear_constraints(1, 2, None, names="Empty constraint 1")
995+
sage: p.add_linear_constraints(1, 2, None, names=["Empty constraint 1"])
996996
sage: p.row_name(0)
997997
'Empty constraint 1'
998998
"""

0 commit comments

Comments
 (0)