[Numpy-discussion] what is the best way to pass c, c++ array to numpy in cython?

Gael Varoquaux gael.varoquaux@normalesup....
Thu Jan 5 01:03:38 CST 2012


On Thu, Jan 05, 2012 at 11:26:05AM +0900, 최원준 wrote:
>    it seems like you recommend below way.
>    Cython example of exposing C-computed arrays in Python without data copies
>    [1]https://gist.github.com/1249305

>    but it uses malloc. isn't it?

In this example, the data can be allocated the way you want in C. Malloc
is just an implementation detail, you can write the code you want
instead.

Gael


More information about the NumPy-Discussion mailing list