Commit 56ed33ba authored by Vincent Delecroix's avatar Vincent Delecroix

py2/py3 compatibility

parent 877e48cd
......@@ -3,6 +3,7 @@ Utility functions.
"""
from __future__ import print_function, absolute_import
from six.moves import range, map, filter, zip
def det2(u, v):
......
......@@ -11,7 +11,7 @@ TODO:
is called.
"""
from __future__ import absolute_import, print_function
from six.moves import range, map, zip
from six.moves import range, map, filter, zip
from array import array
from math import log
......
......@@ -2,7 +2,7 @@ r"""
Triangulation of surfaces.
"""
from __future__ import absolute_import, print_function
from six.moves import range, map, zip
from six.moves import range, map, filter, zip
from array import array
from .permutation import *
......@@ -397,7 +397,7 @@ class Triangulation(object):
return sum(ep[i] == i for i in range(n))
def num_edges(self):
return (self._n + self.num_folded_edges()) / 2
return (self._n + self.num_folded_edges()) // 2
def _edge_rep(self, e):
f = self._ep[e]
......
......@@ -6,6 +6,7 @@ to folded edges). It is said to be in canonical form if it starts with cycle
representatives.
"""
from __future__ import print_function, absolute_import
from six.moves import range, map, filter, zip
import numbers
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment