Message276409
memory_hash has to convert buffers unless the buffer is a single-dimensional, C-style and contiguous buffer. A NumPy matrix has more than one dimension, so it must be converted.
https://hg.python.org/cpython/file/tip/Objects/memoryobject.c#l2854
if (!MV_C_CONTIGUOUS(self->flags)) {
mem = PyMem_Malloc(view->len);
if (mem == NULL) {
PyErr_NoMemory();
return -1;
}
if (buffer_to_contiguous(mem, view, 'C') < 0) {
PyMem_Free(mem);
return -1;
}
} |
|
Date |
User |
Action |
Args |
2016-09-14 09:54:06 | christian.heimes | set | recipients:
+ christian.heimes, doko, vstinner, benjamin.peterson, ned.deily, skrah, serhiy.storchaka, ztane |
2016-09-14 09:54:06 | christian.heimes | set | messageid: <1473846846.02.0.639727257565.issue28055@psf.upfronthosting.co.za> |
2016-09-14 09:54:06 | christian.heimes | link | issue28055 messages |
2016-09-14 09:54:05 | christian.heimes | create | |
|