diff --git a/pyadic/padic.py b/pyadic/padic.py index 3fa4131..4a8e6a5 100644 --- a/pyadic/padic.py +++ b/pyadic/padic.py @@ -182,6 +182,11 @@ def as_tuple(self): """Tuple reprensentation of the mantissa.""" return (to_base(int(self), self.p) + tuple([0 for i in range(self.k)]))[:self.k] + @property + def as_dict(self): + """Dict reprensentation: {valuation: mantissa digit}.""" + return dict(zip(range(self.n, self.k), self.as_tuple)) + @property def as_tuple_from_zero(self): """Tuple representation of the mantissa, shifted to start from p^0 term.""" diff --git a/sphinx/source/conf.py b/sphinx/source/conf.py index ac6694e..07bf98b 100644 --- a/sphinx/source/conf.py +++ b/sphinx/source/conf.py @@ -17,7 +17,7 @@ sys.path.insert(0, os.path.abspath('../../')) -from version import __version__ as version +from version import __version__ as version # noqa: E402 # -- Project information -----------------------------------------------------