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
06c02d31
Commit
06c02d31
authored
Jul 20, 2011
by
Mark Florisson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
py23 compat
parent
09e33cb2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
8 deletions
+11
-8
Cython/Compiler/CythonScope.py
Cython/Compiler/CythonScope.py
+1
-1
Cython/Compiler/MemoryView.py
Cython/Compiler/MemoryView.py
+10
-4
Cython/Compiler/PyrexTypes.py
Cython/Compiler/PyrexTypes.py
+0
-3
No files found.
Cython/Compiler/CythonScope.py
View file @
06c02d31
...
...
@@ -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
...
...
Cython/Compiler/MemoryView.py
View file @
06c02d31
...
...
@@ -567,20 +567,26 @@ def get_axes_specs(env, axes):
return
axes_specs
def
all
(
it
):
for
item
in
it
:
if
not
item
:
return
False
return
True
def
is_cf_contig
(
specs
):
is_c_contig
=
is_f_contig
=
False
if
(
len
(
specs
)
==
1
and
specs
==
[(
'direct'
,
'contig'
)]):
is_c_contig
=
True
elif
(
specs
[
-
1
]
==
(
'direct'
,
'contig'
)
and
all
(
axis
==
(
'direct'
,
'follow'
)
for
axis
in
specs
[:
-
1
])):
elif
(
specs
[
-
1
]
==
(
'direct'
,
'contig'
)
and
all
(
[
axis
==
(
'direct'
,
'follow'
)
for
axis
in
specs
[:
-
1
]
])):
# c_contiguous: 'follow', 'follow', ..., 'follow', 'contig'
is_c_contig
=
True
elif
(
len
(
specs
)
>
1
and
specs
[
0
]
==
(
'direct'
,
'contig'
)
and
all
(
axis
==
(
'direct'
,
'follow'
)
for
axis
in
specs
[
1
:
])):
specs
[
0
]
==
(
'direct'
,
'contig'
)
and
all
(
[
axis
==
(
'direct'
,
'follow'
)
for
axis
in
specs
[
1
:]
])):
# f_contiguous: 'contig', 'follow', 'follow', ..., 'follow'
is_f_contig
=
True
...
...
Cython/Compiler/PyrexTypes.py
View file @
06c02d31
...
...
@@ -578,9 +578,6 @@ class PyObjectType(PyrexType):
else
:
return
cname
def
invalid_value
(
self
):
return
"1"
def
global_init_code
(
self
,
entry
,
code
):
code
.
put_init_var_to_py_none
(
entry
,
nanny
=
False
)
...
...
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