Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
src/sage/matrix/special.py: Fixup
  • Loading branch information
Matthias Koeppe committed May 26, 2024
commit 4b38dd802204af5eb655520b693429f76a6adfb8
5 changes: 2 additions & 3 deletions src/sage/matrix/special.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
import sage.matrix.matrix_space as matrix_space
from sage.categories.rings import Rings
from sage.modules.free_module_element import vector
from sage.structure.element import Matrix, parent
from sage.structure.element import Matrix, parent, RingElement
from sage.structure.sequence import Sequence
from sage.rings.integer_ring import ZZ
from sage.rings.rational_field import QQ
Expand Down Expand Up @@ -1411,7 +1411,6 @@ def elementary_matrix(arg0, arg1=None, **kwds):

- Rob Beezer (2011-03-04)
"""
import sage.structure.element
# determine ring and matrix size
if arg1 is not None and arg0 not in Rings():
raise TypeError('optional first parameter must be a ring, not {0}'.format(arg0))
Expand All @@ -1420,7 +1419,7 @@ def elementary_matrix(arg0, arg1=None, **kwds):
R = arg0
arg0 = arg1
elif scale is not None:
if not sage.structure.element.isinstance(scale, RingElement):
if not isinstance(scale, RingElement):
raise TypeError('scale must be an element of some ring, not {0}'.format(scale))
R = scale.parent()
else:
Expand Down