Skip to content
Snippets Groups Projects
Commit bffa84c0eb49 authored by Kurt Smith's avatar Kurt Smith
Browse files

fix in BufferCopyContents code.

parent 8e12747298ad
Branches
No related tags found
No related merge requests found
......@@ -650,6 +650,7 @@
for(i=0; i<ndim; i++) {
spec = axes_specs[i];
if (spec & __Pyx_MEMVIEW_CONTIG) {
if (buf->strides[i] != buf->itemsize) {
PyErr_SetString(PyExc_ValueError,
......@@ -659,7 +660,7 @@
}
if (spec & (__Pyx_MEMVIEW_STRIDED | __Pyx_MEMVIEW_FOLLOW)) {
if (buf->strides[i] <= buf->itemsize) {
if (buf->strides[i] < buf->itemsize) {
PyErr_SetString(PyExc_ValueError,
"Buffer and memoryview are not contiguous in the same dimension.");
goto fail;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment