classification
Title: PEP-3118: C-contiguity with zero strides
Type: behavior Stage: resolved
Components: Interpreter Core Versions: Python 3.5
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: skrah Nosy List: BreamoreBoy, skrah
Priority: normal Keywords:

Created on 2011-08-26 10:29 by skrah, last changed 2014-09-19 21:12 by skrah. This issue is now closed.

Messages (3)
msg143005 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2011-08-26 10:29
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
msg221481 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-06-24 19:14
What is the status of this issue as according to the index PEP 3118 has been completed?
msg227123 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2014-09-19 21:12
This was a bug in NumPy that has been fixed.
History
Date User Action Args
2014-09-19 21:12:38skrahsetstatus: open -> closed
versions: + Python 3.5, - Python 3.3
messages: + msg227123

resolution: not a bug
stage: resolved
2014-06-24 19:14:44BreamoreBoysetnosy: + BreamoreBoy
messages: + msg221481
2011-08-26 10:29:44skrahcreate