ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> numpy-discussion
numpy-discussion
Re: [Numpy-discussion] Numarrays from C arrays without copying
by Todd Miller other posts by this author
Apr 22 2004 4:57PM messages near this date
Re: [Numpy-discussion] Numarrays from C arrays without copying | Re: [Numpy-discussion] Numarrays from C arrays without copying
On Thu, 2004-04-22 at 11:47, Paul F. Dubois wrote:
>  This is what PyArray_FromDimsAndData was for, and I believe it is fairly 
>  heavily used.

That's good to know.  I was just discussing with Perry how to expand the
C-API to support this stuff.  Perhaps we don't have to.

>  Todd Miller wrote:
>  > On Thu, 2004-04-22 at 08:51, Ville Hakulinen wrote:
>  > 
>  >>Dear all,
>  >>
>  >>I would like to turn a large C array allocated by a library into a
>  >>Numarray object without copying the contents. In other words I have
>  >>a given array of double precision floats and I want to get a Numarray
>  >>object, where the data pointer points to this array and no additional
>  >>memory is allocated. Naturally when the reference count of the Numarray
>  >>object gets back to zero, the object is freed, but the array itself
>  >>is left as a nuisance for the C code.
>  >>
>  >>Is there a standard way of doing this?
>  > 
>  > 
>  > No, not yet.  You're not the first person to ask for this but I'd
>  > appreciate it if you'd explain why you need it.  So far,  not having
>  > that feature is a conscious omission to keep complexity down.
>  > 
>  > Regards,
>  > Todd
>  > 
-- 
Todd Miller <jmiller@[...].edu> 



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@[...].net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion
Thread:
Todd Miller
Craig Rasmussen
Todd Miller

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved