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
Gwenaël Samain
cython
Commits
692a7421
Commit
692a7421
authored
Nov 23, 2018
by
Stefan Behnel
Committed by
GitHub
Nov 23, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2716 from jakirkham/memoryview_PyBUF_ND_shape
Fill shape when PyBUF_ND is in the flags
parents
f158e490
0aee59ed
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
Cython/Utility/MemoryView.pyx
Cython/Utility/MemoryView.pyx
+2
-1
No files found.
Cython/Utility/MemoryView.pyx
View file @
692a7421
...
@@ -64,6 +64,7 @@ cdef extern from *:
...
@@ -64,6 +64,7 @@ cdef extern from *:
PyBUF_WRITABLE
PyBUF_WRITABLE
PyBUF_STRIDES
PyBUF_STRIDES
PyBUF_INDIRECT
PyBUF_INDIRECT
PyBUF_ND
PyBUF_RECORDS
PyBUF_RECORDS
PyBUF_RECORDS_RO
PyBUF_RECORDS_RO
...
@@ -514,7 +515,7 @@ cdef class memoryview(object):
...
@@ -514,7 +515,7 @@ cdef class memoryview(object):
if
flags
&
PyBUF_WRITABLE
and
self
.
view
.
readonly
:
if
flags
&
PyBUF_WRITABLE
and
self
.
view
.
readonly
:
raise
ValueError
(
"Cannot create writable memory view from read-only memoryview"
)
raise
ValueError
(
"Cannot create writable memory view from read-only memoryview"
)
if
flags
&
PyBUF_
STRIDES
:
if
flags
&
PyBUF_
ND
:
info
.
shape
=
self
.
view
.
shape
info
.
shape
=
self
.
view
.
shape
else
:
else
:
info
.
shape
=
NULL
info
.
shape
=
NULL
...
...
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