diff options
-rw-r--r-- | CHANGES.rst | 4 | ||||
-rw-r--r-- | Cython/Includes/numpy/__init__.pxd | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/CHANGES.rst b/CHANGES.rst index dbcbeae28..bdffed8cb 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -159,6 +159,10 @@ Bugs fixed ``c_string_encoding`` directive appeared within the first two lines. (Github issue #2632) +* Cython generated modules no longer emit a warning during import when the + size of the NumPy array type is larger than what was found at compile time. + Instead, this is assumed to be a backwards compatible change on NumPy side. + Other changes ------------- diff --git a/Cython/Includes/numpy/__init__.pxd b/Cython/Includes/numpy/__init__.pxd index eda0b240d..11eee4e6e 100644 --- a/Cython/Includes/numpy/__init__.pxd +++ b/Cython/Includes/numpy/__init__.pxd @@ -203,7 +203,7 @@ cdef extern from "numpy/arrayobject.h": ctypedef struct PyArray_Descr: pass - ctypedef class numpy.dtype [object PyArray_Descr]: + ctypedef class numpy.dtype [object PyArray_Descr, check_size False]: # Use PyDataType_* macros when possible, however there are no macros # for accessing some of the fields, so some are defined. cdef PyTypeObject* typeobj @@ -239,7 +239,7 @@ cdef extern from "numpy/arrayobject.h": # like PyArrayObject**. pass - ctypedef class numpy.ndarray [object PyArrayObject]: + ctypedef class numpy.ndarray [object PyArrayObject, check_size False]: cdef __cythonbufferdefaults__ = {"mode": "strided"} cdef: |