summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Smith <kwsmith1@wisc.edu>2009-08-11 10:28:51 -0500
committerKurt Smith <kwsmith1@wisc.edu>2009-08-11 10:28:51 -0500
commitc0ef99a11d7af9f99ade237add93d851160b25bd (patch)
tree97b98f15f0172fb62ea02700c2e79437cca2a6dd
parent38f150575b356bb7bcfdd48e9e45f9f5dc85850e (diff)
downloadcython-c0ef99a11d7af9f99ade237add93d851160b25bd.tar.gz
replacement of 'f' flag with 'fortran' in cython.array.
-rw-r--r--Cython/Compiler/CythonScope.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Cython/Compiler/CythonScope.py b/Cython/Compiler/CythonScope.py
index 931843f96..a44182cc6 100644
--- a/Cython/Compiler/CythonScope.py
+++ b/Cython/Compiler/CythonScope.py
@@ -218,7 +218,7 @@ cdef class array:
Py_ssize_t itemsize
str mode
- def __cinit__(array self, tuple shape, Py_ssize_t itemsize, char *format, str mode="c"):
+ def __cinit__(array self, tuple shape, Py_ssize_t itemsize, char *format, mode="c"):
self.ndim = len(shape)
self.itemsize = itemsize
@@ -248,7 +248,7 @@ cdef class array:
idx += 1
assert idx == self.ndim
- if mode == "f":
+ if mode == "fortran":
idx = 0; stride = 1
for dim in shape:
self.strides[idx] = stride*itemsize
@@ -267,7 +267,7 @@ cdef class array:
assert idx == -1
self.len = stride * itemsize
else:
- raise ValueError("Invalid mode, expected 'c' or 'f', got %s" % mode)
+ raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode)
self.mode = mode
@@ -280,7 +280,7 @@ cdef class array:
cdef int bufmode = -1
if self.mode == "c":
bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
- elif self.mode == "f":
+ elif self.mode == "fortran":
bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
if not (flags & bufmode):
raise ValueError("Can only create a buffer that is contiguous in memory.")