summaryrefslogtreecommitdiffstats
path: root/python/astra/matrix_c.pyx
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <wjp@usecode.org>2015-05-26 15:16:14 +0200
committerWillem Jan Palenstijn <wjp@usecode.org>2015-05-26 15:16:14 +0200
commit91977939eb7add4c503795a1e0b3fe6938b07404 (patch)
tree9b7b3b8492f40db759a11254a03fe3cd4766d846 /python/astra/matrix_c.pyx
parentf5c3a7c07d834eabc4abb78834c952bbfcf0c906 (diff)
parentaed157812c31df681a7ba7dd4479cb35fbce05bb (diff)
downloadastra-91977939eb7add4c503795a1e0b3fe6938b07404.tar.gz
astra-91977939eb7add4c503795a1e0b3fe6938b07404.tar.bz2
astra-91977939eb7add4c503795a1e0b3fe6938b07404.tar.xz
astra-91977939eb7add4c503795a1e0b3fe6938b07404.zip
Merge pull request #66 from dmpelt/fix-old-six
Fix range import for old six versions
Diffstat (limited to 'python/astra/matrix_c.pyx')
-rw-r--r--python/astra/matrix_c.pyx7
1 files changed, 6 insertions, 1 deletions
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