On 3 January 2014 18:22, Stefan Behnel <stefan...@behnel.de> wrote: > Hi, > > I enabled the NumPy build for our Py3.3 test runs and while I was at it, I > got it to use the latest NumPy release 1.8. This made one of the tests fail: > > """ > Traceback (most recent call last): > File ".../doctest.py", line 1313, in __run > compileflags, 1), test.globs) > File "<doctest relaxed_strides.__test__.test_one_sized (line > 29)[3]>", line 1, in <module> > test_one_sized(a)[0] > File "relaxed_strides.pyx", line 38, in > relaxed_strides.test_one_sized (relaxed_strides.cpp:1414) > File "stringsource", line 622, in View.MemoryView.memoryview_cwrapper > (relaxed_strides.cpp:7568) > File "stringsource", line 327, in > View.MemoryView.memoryview.__cinit__ (relaxed_strides.cpp:3717) > > ValueError: ndarray is not C-contiguous > """ > > https://sage.math.washington.edu:8091/hudson/job/cython-devel-tests/1787/ARCH=m64,BACKEND=cpp,PYVERSION=py33m/console > > According to the comments in the test file and the corresponding NumPy pull > request, this seems to be somewhat expected. > > https://github.com/cython/cython/blob/master/tests/memoryview/relaxed_strides.pyx > > https://github.com/numpy/numpy/pull/3162 > > Does someone know enough about this to figure out what to do? > > Stefan > _______________________________________________ > cython-devel mailing list > cython-devel@python.org > https://mail.python.org/mailman/listinfo/cython-devel
Hey Stefan, It seems to come from the call to __Pyx_GetBuffer, which is PyObject_GetBuffer in python 3. Maybe this is Python 3 not checking for an extent of 1, but instead only checking the stride (which is a multiple of the itemsize)? Maybe Nathaniel or Sebastien can shed more light on this matter. Mark _______________________________________________ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel