Skip to content

Commit

Permalink
Trac #33844: remove deprecation in matrix2
Browse files Browse the repository at this point in the history
from #17405

URL: https://trac.sagemath.org/33844
Reported by: chapoton
Ticket author(s): Frédéric Chapoton
Reviewer(s): Thierry Monteil
  • Loading branch information
Release Manager committed May 24, 2022
2 parents e47906b + 292144d commit 041f643
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions src/sage/matrix/matrix2.pyx
Expand Up @@ -783,14 +783,13 @@ cdef class Matrix(Matrix1):
sage: b = vector(QQ[I], [1+I, 2])
sage: x = A.solve_right(b)

Calling this method with anything but a vector or matrix is
deprecated::
This method must be called with a vector or a matrix::

sage: A = matrix(CDF, 5, [1/(i+j+1) for i in range(5) for j in range(5)])
sage: x = A.solve_right([1]*5)
doctest:...: DeprecationWarning: solve_right should be called with
a vector or matrix
See http://trac.sagemath.org/17405 for details.
sage: A = matrix(CDF, 2, [1 for i in range(4)])
sage: x = A.solve_right([1]*2)
Traceback (most recent call last):
...
TypeError: the second argument must be a vector or a matrix

Over inexact rings, the ``check`` parameter is ignored as the result is
only an approximate solution (:trac:`13932`)::
Expand Down Expand Up @@ -838,11 +837,7 @@ cdef class Matrix(Matrix1):
try:
L = B.base_ring()
except AttributeError:
from sage.misc.superseded import deprecation
deprecation(17405, "solve_right should be called with a vector "
"or matrix")
from sage.modules.free_module_element import vector
B = vector(B)
raise TypeError("the second argument must be a vector or a matrix")
b_is_vec = is_Vector(B)
if b_is_vec:
if self.nrows() != B.degree():
Expand Down

0 comments on commit 041f643

Please sign in to comment.