Skip to content

Commit

Permalink
Merge pull request #118 from MCLF/python3
Browse files Browse the repository at this point in the history
Fix some small things related to python3
  • Loading branch information
swewers authored Aug 11, 2020
2 parents 9a83571 + 0f8d375 commit 083c13e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions mclf/berkovich/piecewise_affine_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -731,9 +731,10 @@ class AffineFunction(SageObject):
"""

def __init__(self, gamma, a, b):
from sage.rings.rational_field import QQ
self._gamma = gamma
self._a = a
self._b = b
self._a = QQ(a)
self._b = QQ(b)

def __repr__(self):
return "affine function on the tube of the {}, with initial value {}.".format(self.path(), self.initial_value())
Expand Down Expand Up @@ -933,10 +934,11 @@ class PiecewiseAffineFunction(SageObject):

def __init__(self, D, a0, restrictions):
from mclf.berkovich.berkovich_line import BerkovichLine
from sage.rings.rational_field import QQ
if isinstance(D, BerkovichLine):
D = Domain(D, [], [])
self._domain = D
self._initial_value = a0
self._initial_value = QQ(a0)
self._restrictions = restrictions
self._initial_point = D.minimal_point()

Expand Down
2 changes: 1 addition & 1 deletion mclf/curves/smooth_projective_curves.py
Original file line number Diff line number Diff line change
Expand Up @@ -992,7 +992,7 @@ def zeta_function(self, var_name='T'):
for k in range(1, g+1):
Z_series *= (1-S.gen()**k)**(-N[k])
P = (Z_series*(1-S.gen())*(1-q*S.gen())).polynomial()
c = range(2*g+1)
c = list(range(2*g+1))
for k in range(g+1):
c[k] = P[k]
for k in range(g+1, 2*g+1):
Expand Down

0 comments on commit 083c13e

Please sign in to comment.