Do any of these suggestions address my problem with array base?

    ctypedef class numpy.ndarray [object PyArrayObject]:
        cdef __cythonbufferdefaults__ = {"mode": "strided"}
        
        cdef:
            # Only taking a few of the most commonly used and stable fields.
            # One should use PyArray_* macros instead to access the C 
fields.
            char *data
            int ndim "nd"
            npy_intp *shape "dimensions" 
            npy_intp *strides
            dtype descr
            object base  <<< my addition

Problem was that base could be NULL, and attempting to assign to it would 
try to call DECREF, and BOOM.
   

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to