[Cython] NumPy test failures in Py2.4

mark florisson markflorisson88 at gmail.com
Sat Mar 24 23:24:53 CET 2012


On 23 March 2012 19:40, Stefan Behnel <stefan_ml at behnel.de> wrote:
> Hi,
>
> after re-enabling the NumPy tests, I'm getting two NumPy (1.6.1) test
> failure in Py2.4 (2.7 is ok):
>
> https://sage.math.washington.edu:8091/hudson/job/cython-devel-tests/BACKEND=c,PYVERSION=py24-ext/224/testReport/junit/doctest/DocTestCase/Doctest__numpy_test/
>
> """
> File ".../run/c/numpy_test.so", line 207, in numpy_test
> Failed example:
>    print(test_partially_packed_align(np.zeros((1,), dtype=np.dtype([('a',
> 'b'), ('b', 'i'), ('sub', np.dtype('b,i')), ('c', 'i')], align=True))))
> Exception raised:
>    Traceback (most recent call last):
>      File "numpy_test.pyx", line 451, in
> numpy_test.test_partially_packed_align (numpy_test.c:7967)
>    ValueError: Buffer dtype mismatch; next field is at offset 13 but 16
> expected
> ----------------------------------------------------------------------
> File ".../run/c/numpy_test.so", line 211, in numpy_test
> Failed example:
>    print(test_partially_packed_align_2(np.zeros((1,),
> dtype=np.dtype([('a', 'b'), ('b', 'i'), ('c', 'b'), ('sub', np.dtype('b,i',
> align=True))]))))
> Exception raised:
>      File "numpy_test.pyx", line 459, in
> numpy_test.test_partially_packed_align_2 (numpy_test.c:8186)
>    ValueError: Buffer dtype mismatch; next field is at offset 7 but 10
> expected
> """
>
> Does anyone know what to make of this?

That's probably a regression from my changes to the buffer format
parser. It should be aligning on the second integer in the substruct,
for which the entire struct is aligned and the first character padded.
I'll look into it, thanks.

> Stefan
> _______________________________________________
> cython-devel mailing list
> cython-devel at python.org
> http://mail.python.org/mailman/listinfo/cython-devel


More information about the cython-devel mailing list