Skip to content

Commit 5371d6c

Browse files
authored
Fix Nemo#2173 (Nemocas#2216)
1 parent 4c01fa1 commit 5371d6c

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/Solve.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ function matrix_normal_form_type(R::Ring)
9797
end
9898

9999
matrix_normal_form_type(::Field) = RREFTrait()
100-
matrix_normal_form_type(::Matrix{Rational{BigInt}}) = FFLUTrait()
101100

102101
# The fflu approach is the fastest over a fraction field (see benchmarks on PR 661)
103102
matrix_normal_form_type(::FracField) = FFLUTrait()

src/generic/MatRing.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,12 @@ end
5858
function AbstractAlgebra.can_solve_with_solution(M::MatRingElem{T}, B::MatRingElem{T}) where {T <: RingElement}
5959
check_parent(M, B)
6060
R = base_ring(M)
61-
MS = MatSpaceElem{T}(R, M.entries) # convert to ordinary matrix
62-
BS = MatSpaceElem{T}(R, B.entries)
61+
# TODO: Once #1955 is resolved, the conversion to matrix and back to MatRingElem
62+
# should be done better
63+
MS = matrix(R, M.entries) # convert to ordinary matrix
64+
BS = matrix(R, B.entries)
6365
flag, S = can_solve_with_solution(MS, BS)
64-
SA = MatRingElem{T}(R, S.entries)
66+
SA = MatRingElem{T}(R, Array(S))
6567
return flag, SA
6668
end
6769

0 commit comments

Comments
 (0)