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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
16d02114
Commit
16d02114
authored
Oct 24, 2013
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix memoryview warnings
parent
fc136a21
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
Cython/Utility/MemoryView.pyx
Cython/Utility/MemoryView.pyx
+7
-4
No files found.
Cython/Utility/MemoryView.pyx
View file @
16d02114
...
...
@@ -407,7 +407,8 @@ cdef class memoryview(object):
cdef
void
*
tmp
=
NULL
cdef
void
*
item
cdef
{{
memviewslice_name
}}
tmp_slice
,
*
dst_slice
cdef
{{
memviewslice_name
}}
*
dst_slice
cdef
{{
memviewslice_name
}}
tmp_slice
dst_slice
=
get_slice_from_memview
(
dst
,
&
tmp_slice
)
if
<
size_t
>
self
.
view
.
itemsize
>
sizeof
(
array
):
...
...
@@ -580,12 +581,14 @@ cdef class memoryview(object):
# Support the same attributes as memoryview slices
def
is_c_contig
(
self
):
cdef
{{
memviewslice_name
}}
*
mslice
,
tmp
cdef
{{
memviewslice_name
}}
*
mslice
cdef
{{
memviewslice_name
}}
tmp
mslice
=
get_slice_from_memview
(
self
,
&
tmp
)
return
slice_is_contig
(
mslice
,
'C'
,
self
.
view
.
ndim
)
def
is_f_contig
(
self
):
cdef
{{
memviewslice_name
}}
*
mslice
,
tmp
cdef
{{
memviewslice_name
}}
*
mslice
cdef
{{
memviewslice_name
}}
tmp
mslice
=
get_slice_from_memview
(
self
,
&
tmp
)
return
slice_is_contig
(
mslice
,
'F'
,
self
.
view
.
ndim
)
...
...
@@ -1017,7 +1020,7 @@ cdef {{memviewslice_name}} *get_slice_from_memview(memoryview memview,
@
cname
(
'__pyx_memoryview_slice_copy'
)
cdef
void
slice_copy
(
memoryview
memview
,
{{
memviewslice_name
}}
*
dst
):
cdef
int
dim
cdef
Py_ssize_t
*
shape
,
*
strides
,
*
suboffsets
cdef
(
Py_ssize_t
*
)
shape
,
strides
,
suboffsets
shape
=
memview
.
view
.
shape
strides
=
memview
.
view
.
strides
...
...
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