Numeric CVS __array_struct__ interface is broken on 64 bit platforms
Hi, A couple bugs have been reported (including mine last night) which indicate a problem with the following bit of code in Numerical/Src/arrayobject.c (near line 2200) on 64 bit platforms. I think it'll be a lot faster for someone else to fix it, so I'll leave it at this for now. if (strcmp(name, "__array_struct__") == 0) { PyArrayInterface *inter; inter = (PyArrayInterface *)malloc(sizeof(PyArrayInterface)); inter->version = 2; inter->nd = self->nd; if ((inter->nd == 0) || (sizeof(int) == sizeof(Py_intptr_t))) { inter->shape = (Py_intptr_t *)self->dimensions; inter->strides = (Py_intptr_t *)self->strides; } else { int i; for (i=0; i<self->nd; i++) { inter->shape[i] = self->dimensions[i]; inter->strides[i] = self->strides[i]; } }
participants (1)
-
Andrew Straw