File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
src/sage/rings/polynomial Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -871,16 +871,23 @@ cdef class MPolynomial(CommutativePolynomial):
871
871
872
872
TESTS:
873
873
874
- Check that :trac :`25022` is fixed::
874
+ Check that :issue :`25022` is fixed::
875
875
876
876
sage: K. <x,y> = ZZ[]
877
877
sage: ( x* y) . change_ring( SR) . monomials( ) # needs sage. rings. number_field sage. symbolic
878
878
[x*y ]
879
+
880
+ Check that :issue:`36832` is fixed::
881
+
882
+ sage: F = GF( 11)
883
+ sage: phi = Hom( F,F) . an_element( )
884
+ sage: R. <x,y> = F[]
885
+ sage: x. change_ring( phi)
886
+ x
879
887
"""
880
888
if isinstance (R, Map):
881
- # if we're given a hom of the base ring extend to a poly hom
882
889
if R.domain() == self .base_ring():
883
- R = self .parent().hom(R, self .parent().change_ring(R.codomain()) )
890
+ return self .map_coefficients(R )
884
891
return R(self )
885
892
else :
886
893
return self .parent().change_ring(R)(self .dict())
You can’t perform that action at this time.
0 commit comments