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

Commit

Permalink
Generic function change_precision
Browse files Browse the repository at this point in the history
  • Loading branch information
Xavier Caruso committed Mar 27, 2016
1 parent 930e35e commit 9ca8df8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/sage/rings/padics/local_generic.py
Expand Up @@ -164,6 +164,17 @@ def _latex_(self):
"""
return self._repr_(do_latex = True)

def change_precision(self, prec):
(functor, ring) = self.construction()
if hasattr(functor, "prec"):
functor.prec = prec
else:
try:
ring = ring.change_precision(prec)
except AttributeError:
raise NotImplementedError
return functor(ring)

def precision_cap(self):
r"""
Returns the precision cap for ``self``.
Expand Down

0 comments on commit 9ca8df8

Please sign in to comment.