From: <cl...@sp...> - 2002-04-01 17:01:22
|
Hello, I'm trying to track down a segv when I do the B[:] operation on an array, "B", a that I've built in as a view on external data. During the process I ran into the following code (Numeric-21.0): /* {%c++%} */ extern int PyArray_Free(PyObject *op, char *ptr) { PyArrayObject *ap = (PyArrayObject *)op; int i, n; if (ap->nd > 2) return -1; if (ap->nd == 3) { n = ap->dimensions[0]; for (i=0; i<n; i++) { free(((char **)ptr)[i]); } } if (ap->nd >= 2) { free(ptr); } Py_DECREF(ap); return 0; } /* {%c++%} */ The multiple, incompatible tests of ap->nd are the problem. -chris |