Commit f75b8e8f authored by Stefan Behnel's avatar Stefan Behnel

Enable "check_size=False" for the NumPy ndarray and dtype extension types to...

Enable "check_size=False" for the NumPy ndarray and dtype extension types to avoid warning about otherwise backwards compatible changes.
parent bd8dab84
......@@ -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
-------------
......
......@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment