Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
add a doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
xcaruso committed Jul 6, 2020
1 parent ec0e24b commit 8c0efe7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/sage/categories/rings.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,14 @@ def extend_to_fraction_field(self):
Traceback (most recent call last):
...
ValueError: the morphism is not injective
TESTS::
sage: A.<x> = RR[]
sage: phi = A.hom([x+1])
sage: phi.extend_to_fraction_field()
Ring endomorphism of Fraction Field of Univariate Polynomial Ring in x over Real Field with 53 bits of precision
Defn: x |--> x + 1.00000000000000
"""
from sage.rings.morphism import RingHomomorphism_from_fraction_field
if self.domain().is_field() and self.codomain().is_field():
Expand Down

0 comments on commit 8c0efe7

Please sign in to comment.