Message143005
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 |
|
Date |
User |
Action |
Args |
2011-08-26 10:29:45 | skrah | set | recipients:
+ skrah |
2011-08-26 10:29:45 | skrah | set | messageid: <1314354585.27.0.717961402517.issue12845@psf.upfronthosting.co.za> |
2011-08-26 10:29:44 | skrah | link | issue12845 messages |
2011-08-26 10:29:44 | skrah | create | |
|