New submission from Stefan Krah <stefan-use...@bytereef.org>: Numpy and PyBuffer_IsContiguous() have different ideas of C-contiguity if there is a zero in strides (this is allowed, I asked Pauli Virtanen).
>>> from numpy import * >>> nd = ndarray(shape=[10], strides=[0]) >>> nd.flags C_CONTIGUOUS : True F_CONTIGUOUS : False OWNDATA : True WRITEABLE : True ALIGNED : True UPDATEIFCOPY : False >>> >>> from _testbuffer import ndarray as pyarray >>> from _testbuffer import PyBUF_FULL_RO >>> x = pyarray(nd, getbuf=PyBUF_FULL_RO) >>> x.c_contiguous False ---------- assignee: skrah components: Interpreter Core messages: 143005 nosy: skrah priority: normal severity: normal status: open title: PEP-3118: C-contiguity with zero strides type: behavior versions: Python 3.3 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue12845> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com