[Numpy-discussion] copying ctypes arrays to numarray?
RJ
rays at san.rr.com
Thu Dec 16 17:05:29 EST 2004
Doh.
Thanks Todd,
At 04:55 PM 12/16/2004 -0500, Todd Miller wrote:
> try: repr(src._data)
...
>Other buffers, e.g. a string, might not.
Which is fine for this app, so I will.
>It looks to me like you forgot to import Numeric
Yep. I screwed up the import statements - I'll re-do it tomorrow. In that light, it is interesting that the assign N were always longer than the n ones...
>To be safe, check the .is_c_array() method.
Will do. I am also a little concerned about the address changing in a long-running process (literally, weeks), so I might check that too.
Also, why is assignment from a (ctypes.c_long * 2000)() to a numarray so much slower than a memmove()? Does the assign make a temp buffer?
Ray
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20041216/c8aa6dfc/attachment.html>
More information about the NumPy-Discussion
mailing list