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
59c083a1
Commit
59c083a1
authored
May 16, 2012
by
Mark Florisson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make is_c/f_contig return a bool
parent
00cf5cd5
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
Cython/Compiler/PyrexTypes.py
Cython/Compiler/PyrexTypes.py
+1
-1
tests/run/cythonarray.pyx
tests/run/cythonarray.pyx
+1
-1
tests/run/memoryviewattrs.pyx
tests/run/memoryviewattrs.pyx
+6
-6
No files found.
Cython/Compiler/PyrexTypes.py
View file @
59c083a1
...
...
@@ -572,7 +572,7 @@ class MemoryViewSliceType(PyrexType):
MemoryView
.
get_is_contig_func_name
(
c_or_f
,
self
.
ndim
)
cfunctype
=
CFuncType
(
return_type
=
c_int_type
,
return_type
=
c_
b
int_type
,
args
=
[
CFuncTypeArg
(
"memviewslice"
,
self
,
None
)],
exception_value
=
"-1"
,
)
...
...
tests/run/cythonarray.pyx
View file @
59c083a1
...
...
@@ -166,7 +166,7 @@ def test_array_from_pointer_3d():
>>> test_array_from_pointer_3d()
getp()
3 3
1 1
True True
"""
cdef
int
*
p
=
getp
(
2
,
2
,
2
)
cdef
array
c_arr
=
<
int
[:
2
,
:
2
,
:
2
:
1
]
>
p
...
...
tests/run/memoryviewattrs.pyx
View file @
59c083a1
...
...
@@ -174,13 +174,13 @@ def test_copy_mismatch():
def
test_is_contiguous
():
u'''
>>> test_is_contiguous()
1 1
0 1
1 0
1 0
True True
False True
True False
True False
<BLANKLINE>
0 1
1 0
False True
True False
'''
cdef
int
[::
1
,
:,
:]
fort_contig
=
array
((
1
,
1
,
1
),
sizeof
(
int
),
'i'
,
mode
=
'fortran'
)
print
fort_contig
.
is_c_contig
()
,
fort_contig
.
is_f_contig
()
...
...
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