Robert Bradshaw wrote:
> You have to manually allocate b. Also, it's not guaranteed that the
> array is contiguous--you may need to look at the stride information.
I understand the part about contiguous, and I've seen examples on how to
deal with it. So if I manually allocate, I guess I'll have to free it
later too. But forgive me my ignorance, how do I do that in cython? In C
I would do:
b = (float **) malloc(N * sizeof(float*));
for(i = 0; i < N; i++)
b[i] = (float *) malloc(N * sizeof(float));
and to free:
for(i=0;i<N;i++)
free(b[i]);
free(b);
I could not find examples around of how to allocate an array like this
in Cython.
Thanks,
Tiago
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev