numpy/numpy — pull request #3827 by pv (2013-09-28 17:51:00+00:00)
Title: BUG: core: consider both C and F order buffers as contiguous

Accept also Fortran-order buffers as continuous in ndarray constructor. (The Bufferconverter is apparently not used elsewhere in the codebase.)

This commit plays fast and loose with the buffer life cycle management. However, this is also what PyObject_AsWriteBuffer does, as can be easily checked in [CPython sources](http://hg.python.org/cpython/file/f6792f734fcc/Objects/abstract.c#l321), so the situation does not get worse by this change.

The life cycle management of PEP-3118 buffers unfortunately is somewhat a PITA, since Py_buffer is not a refcounted Python object. In the long term, we want a managed buffer object --- this can be copied directly from [Python3 sources](http://hg.python.org/cpython/file/f6792f734fcc/Objects/memoryobject.c#l7), since they implemented one in order to implement memoryviews in a correct fashion.

Fixes gh-3796