[pypy-issue] Issue #2807: array.array fails to import in Cython (pypy/pypy)

Roman Yurchak issues-reply at bitbucket.org
Sun Apr 22 18:41:16 EDT 2018

New issue 2807: array.array fails to import in Cython

Roman Yurchak:

The following Cython example,

import array
from cpython cimport array
that can be build with,
cythonize -a -i example_array.pyx
fails to import with PyPy 3.5.3 - 5.10.1 with the following traceback,
python -c 'import example_array' 
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "array.pxd", line 58, in init example_array
ValueError: array.array has the wrong size, try recompiling. Expected 24, got 72

this was reported in the Cython project in https://github.com/cython/cython/issues/1818

It is also an issue that came up when building scikit-learn with PyPy https://github.com/scikit-learn/scikit-learn/pull/11010

cc @rlamy

More information about the pypy-issue mailing list