summaryrefslogtreecommitdiffstats
path: root/python/astra
diff options
context:
space:
mode:
Diffstat (limited to 'python/astra')
-rw-r--r--python/astra/functions.py6
-rw-r--r--python/astra/matrix_c.pyx7
-rw-r--r--python/astra/optomo.py8
3 files changed, 18 insertions, 3 deletions
diff --git a/python/astra/functions.py b/python/astra/functions.py
index b826b86..e38b5bc 100644
--- a/python/astra/functions.py
+++ b/python/astra/functions.py
@@ -32,7 +32,11 @@
from . import creators as ac
import numpy as np
-from six.moves import range
+try:
+ from six.moves import range
+except ImportError:
+ # six 1.3.0
+ from six.moves import xrange as range
from . import data2d
from . import data3d
diff --git a/python/astra/matrix_c.pyx b/python/astra/matrix_c.pyx
index b0d8bc4..d099a75 100644
--- a/python/astra/matrix_c.pyx
+++ b/python/astra/matrix_c.pyx
@@ -27,7 +27,12 @@
# distutils: libraries = astra
import six
-from six.moves import range
+try:
+ from six.moves import range
+except ImportError:
+ # six 1.3.0
+ from six.moves import xrange as range
+
import numpy as np
import scipy.sparse as ss
diff --git a/python/astra/optomo.py b/python/astra/optomo.py
index 0c37353..2937d9c 100644
--- a/python/astra/optomo.py
+++ b/python/astra/optomo.py
@@ -32,7 +32,13 @@ from . import creators
from . import algorithm
from . import functions
import numpy as np
-from six.moves import range, reduce
+from six.moves import reduce
+try:
+ from six.moves import range
+except ImportError:
+ # six 1.3.0
+ from six.moves import xrange as range
+
import operator
import scipy.sparse.linalg