aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2019-01-15 13:27:46 +0100
committerAnton Khirnov <anton@khirnov.net>2019-01-15 13:31:31 +0100
commite14f7d3c807d2a46c8c10553f11556d94bb8998c (patch)
tree040084204849e198409467334ffb265a9053b76a
parent1ac741602f8ec4bee73cdc8931529ea770a5c8e7 (diff)
teukolsky_data.py: python3 compatibility
dict.iteritems() -> dict.items() xrange() -> range()
-rw-r--r--teukolsky_data.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/teukolsky_data.py b/teukolsky_data.py
index c9bf83c..bb6ba92 100644
--- a/teukolsky_data.py
+++ b/teukolsky_data.py
@@ -52,7 +52,7 @@ class TeukolskyData(object):
coeffs_init = ctypes.c_void_p()
- for arg, value in kwargs.iteritems():
+ for arg, value in kwargs.items():
if arg == 'coeffs_init':
coeffs_init = (ctypes.POINTER(ctypes.c_double) * 3)()
coeffs_init[0] = ctypes.cast(np.ctypeslib.as_ctypes(value[0]), ctypes.POINTER(ctypes.c_double))
@@ -75,7 +75,7 @@ class TeukolskyData(object):
raise RuntimeError('Error solving the equation')
self.coeffs = [None] * 3
- for i in xrange(3):
+ for i in range(3):
self.coeffs[i] = np.copy(np.ctypeslib.as_array(self._tdctx.contents.coeffs[i], (self._tdctx.contents.nb_coeffs[1], self._tdctx.contents.nb_coeffs[0])))
def __del__(self):