Commit 97b7ffe7 authored by jakirkham's avatar jakirkham Committed by Stefan Behnel

Fill shape when PyBUF_ND is in the flags

parent 38653119
...@@ -515,7 +515,7 @@ cdef class memoryview(object): ...@@ -515,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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment