summaryrefslogtreecommitdiff
path: root/Cython/Utility
diff options
context:
space:
mode:
authorjakirkham <jakirkham@gmail.com>2018-11-16 11:44:14 -0500
committerStefan Behnel <stefan_ml@behnel.de>2018-11-24 10:02:00 +0100
commit97b7ffe7bee58f147298e403e7286cf9cca7b974 (patch)
treed412bc6d47ad66321b04de5736e19806857be3b5 /Cython/Utility
parent38653119cb8b1f8b8f5123abe90fbc05b0214ad9 (diff)
downloadcython-97b7ffe7bee58f147298e403e7286cf9cca7b974.tar.gz
Fill shape when PyBUF_ND is in the flags
Diffstat (limited to 'Cython/Utility')
-rw-r--r--Cython/Utility/MemoryView.pyx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Cython/Utility/MemoryView.pyx b/Cython/Utility/MemoryView.pyx
index 32655b336..d03fddb86 100644
--- a/Cython/Utility/MemoryView.pyx
+++ b/Cython/Utility/MemoryView.pyx
@@ -515,7 +515,7 @@ cdef class memoryview(object):
if flags & PyBUF_WRITABLE and self.view.readonly:
raise ValueError("Cannot create writable memory view from read-only memoryview")
- if flags & PyBUF_STRIDES:
+ if flags & PyBUF_ND:
info.shape = self.view.shape
else:
info.shape = NULL