[Numpy-discussion] Build external C functions that take numpy arrays as parameters and return numpy arrays

Lou Pecora lou_boog2000@yahoo....
Sun Jul 29 15:10:41 CDT 2007


I wrote a basic article on C extensions using NumPy
arrays on the SciPy.org site.  See: 
Cookbook/C_Extensions/NumPy at

http://www.scipy.org/Cookbook/C_Extensions/NumPy_arrays?highlight=%28%28----%28-%2A%29%28%5Cr%29%3F%5Cn%29%28.%2A%29CategoryCookbook%5Cb%29

It's very basic, but should get you started.  Note
that once you get the patterns down for NumPy then
other extensions are mostly the same pattern over and
over.

-- Lou Pecora


-------------------------------------------------
> > 2007/7/24, computer_guy < zyzhu2000@gmail.com>:
> >
> > > Hi Everyone,
> > >
> > > I am going to write some external C functions
> that takes in numpy
> > > arrays as parameters and return numpy arrays. I
> have the following
> > > questions:
> > >
> > > 1. What should I do in my C code?
> > > 2. Can I use any C compiler to build my library
> that takes numpy
> > > arrays? I am using Windows XP and Visual Studio
> 2005.
> > > 3. How can I generate the python binding?
> > >
> > > Thanks,
> > > cg


-- Lou Pecora,   my views are my own.
---------------
Great spirits have always encountered violent opposition from mediocre minds. 
-Albert Einstein


       
____________________________________________________________________________________
Got a little couch potato? 
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz 


More information about the Numpy-discussion mailing list