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

Commit

Permalink
let extend_to_fraction_field be more tolerant
Browse files Browse the repository at this point in the history
  • Loading branch information
xcaruso committed Jul 5, 2020
1 parent 3cf021a commit 070792b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/sage/categories/rings.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def extend_to_fraction_field(self):
try:
if not self.is_injective():
raise ValueError("the morphism is not injective")
except NotImplementedError: # we trust the user
except (NotImplementedError, TypeError): # we trust the user
pass
domain = self.domain().fraction_field()
codomain = self.codomain().fraction_field()
Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/polynomial/ore_function_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ def is_sparse(self):
sage: R.<t> = RR[]
sage: sigma = R.hom([t+1])
sage: S.<x> = R['x',sigma]
sage: S.<x> = R['x', sigma]
sage: K = S.fraction_field()
sage: K.is_sparse()
False
Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/polynomial/ore_polynomial_ring.py
Original file line number Diff line number Diff line change
Expand Up @@ -1129,7 +1129,7 @@ def fraction_field(self):
:module:`sage.rings.polynomial.ore_function_field`
"""
if self._fraction_field is None:
if self.base_ring() in Fields():
if self.base_ring() in _Fields:
self._fraction_field = self._fraction_field_class(self)
else:
base = self.base_ring().fraction_field()
Expand Down

0 comments on commit 070792b

Please sign in to comment.