summaryrefslogtreecommitdiff
path: root/Cython/Compiler/CythonScope.py
diff options
context:
space:
mode:
Diffstat (limited to 'Cython/Compiler/CythonScope.py')
-rw-r--r--Cython/Compiler/CythonScope.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Cython/Compiler/CythonScope.py b/Cython/Compiler/CythonScope.py
index 841a3fe7c..84205a5b5 100644
--- a/Cython/Compiler/CythonScope.py
+++ b/Cython/Compiler/CythonScope.py
@@ -346,7 +346,7 @@ cdef class array:
self.len = stride * self.itemsize
elif mode == "c":
idx = self.ndim-1; stride = itemsize
- for dim in reversed(shape):
+ for dim in shape[::-1]:
self.strides[idx] = stride
int_dim = <Py_ssize_t>dim
stride = stride * int_dim