Closed
Description
This Cython code fails on Numpy git master (4600b2f):
import numpy as np
def foo(y):
cdef double[:,::1] data
y = y.reshape(y.shape[0], -1).T
y = np.ascontiguousarray(y, dtype=np.double)
data = y # <- raises ValueError: Buffer not C contiguous.
called with
import numpy as np
import asd
asd.foo(np.zeros([90])[:,None])
ascontiguousarray should always return C contiguous arrays with correct flags, but that doesn't seem to be the case currently. Doesn't fail on 1.7.0rc1 and 1.7.x branch.
Observed in Scipy tests with Numpy master:
http://projects.scipy.org/scipy/ticket/1832
http://projects.scipy.org/scipy/ticket/1830