diff --git a/python/sage_helper.py b/python/sage_helper.py index 4881c67b..95aa7854 100644 --- a/python/sage_helper.py +++ b/python/sage_helper.py @@ -37,10 +37,11 @@ def sage_method(function): from sage.all import VectorSpace, ChainComplex from sage.all import ComplexBallField, exp, sin, block_matrix, prime_range, det from sage.all import LaurentPolynomialRing, AbelianGroup, GroupAlgebra + from sage.all import is_prime except ImportError: # Modularized Sage library from sage.algebras.group_algebra import GroupAlgebra - from sage.arith.misc import gcd, xgcd + from sage.arith.misc import gcd, xgcd, is_prime from sage.combinat.subset import powerset from sage.functions.hyperbolic import arccosh from sage.functions.log import exp diff --git a/python/snap/slice_obs_HKL.py b/python/snap/slice_obs_HKL.py index 884f989a..752e2230 100644 --- a/python/snap/slice_obs_HKL.py +++ b/python/snap/slice_obs_HKL.py @@ -45,7 +45,7 @@ from ..sage_helper import _within_sage, sage_method if _within_sage: - from ..sage_helper import ZZ, PolynomialRing, vector, matrix, identity_matrix, MatrixSpace, block_matrix, prime_range + from ..sage_helper import ZZ, PolynomialRing, vector, matrix, identity_matrix, MatrixSpace, block_matrix, prime_range, is_prime from ..sage_helper import LaurentPolynomialRing, GF, CyclotomicField, ChainComplex from .nsagetools import (MapToFreeAbelianization, compute_torsion,