Skip to content
Open
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions src/Matrix.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4311,7 +4311,7 @@

function charpoly(Y::MatrixElem)
R = base_ring(Y)
Rx, x = polynomial_ring(R; cached=false)
Rx, x = polynomial_ring(R; cached=true) # true: so that charpoly(M) == charpoly(M) works without triggering parent mismatch error
return charpoly(Rx, Y)
end

Expand Down Expand Up @@ -4561,7 +4561,7 @@

function minpoly(M::MatElem{T}, charpoly_only::Bool = false) where {T <: RingElement}
R = base_ring(M)
Rx, x = polynomial_ring(R; cached=false)
Rx, x = polynomial_ring(R; cached=true) # true: so that minpoly(M) == minpoly(M) works without triggering parent mismatch error

Check warning on line 4564 in src/Matrix.jl

View check run for this annotation

Codecov / codecov/patch

src/Matrix.jl#L4564

Added line #L4564 was not covered by tests
return minpoly(Rx, M, charpoly_only)
end

Expand Down
Loading