Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
cython
Commits
26fb5448
Commit
26fb5448
authored
Aug 11, 2009
by
Kurt Smith
Committed by
Mark Florisson
Sep 30, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replacement of 'f' flag with 'fortran' in cython.array.
parent
1b9ebbbb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
Cython/Compiler/CythonScope.py
Cython/Compiler/CythonScope.py
+4
-4
No files found.
Cython/Compiler/CythonScope.py
View file @
26fb5448
...
...
@@ -301,7 +301,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
...
...
@@ -331,7 +331,7 @@ cdef class array:
idx += 1
assert idx == self.ndim
if mode == "f":
if mode == "f
ortran
":
idx = 0; stride = 1
for dim in shape:
self.strides[idx] = stride
...
...
@@ -350,7 +350,7 @@ cdef class array:
assert idx == -1
self.len = stride * self.itemsize
else:
raise ValueError("Invalid mode, expected 'c' or 'f', got %s" % mode)
raise ValueError("Invalid mode, expected 'c' or 'f
ortran
', got %s" % mode)
self.mode = mode
...
...
@@ -363,7 +363,7 @@ cdef class array:
cdef int bufmode = -1
if self.mode == b"c":
bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
elif self.mode == b"f":
elif self.mode == b"f
ortran
":
bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
if not (flags & bufmode):
raise ValueError("Can only create a buffer that is contiguous in memory.")
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment