On 2013-12-31 at 14:32:36 -0700, Craig DeForest wrote: > Cool, thanks. I stand corrected there! Have I missed something else > important? Is there an equivalent to PP that handles bookkeeping for > you?
I think the closest may be Numba <http://numba.pydata.org/>, which takes Python code and translates it to LLVM IR. It supports broadcasting, which is the numpy equivalent of PDL's threading. This link covers the different tools available: <http://nbviewer.ipython.org/gist/anonymous/4271861> For Weave, broadcasting must be done by using iterators to work along each dimension (see PyArray_MultiIterNew in <http://wiki.scipy.org/Cookbook/Weave>). As a side note, a number of other libraries I've seen take this approach. I'm most familiar with ITK <http://www.itk.org/> which uses C++ templates to do things like apply filters to n-dimensional images. Cheers, - Zaki Mughal > > Cheers, > Craig > > On Dec 31, 2013, at 2:09 PM, Zakariyya Mughal <[email protected]> wrote: > > > On 2013-12-31 at 13:50:31 -0700, Craig DeForest wrote: > >> > >> Again, I could be missing something but it appears Python still > >> requires producing a several-file library to link in the simplest of C > >> programs. > > > > The equivalent to Inline::C in scipy is Weave. Here's an example > > <http://docs.scipy.org/doc/scipy/reference/tutorial/weave.html#more-examples>. > > > > Also, as you can see later in that page, they demonstrate how to use the > > blitz++ library along with Weave for doing vectorised math > > <http://blitz.sourceforge.net/>. > > > > Cheers, > > - Zaki Mughal > > > > _______________________________________________ > > Perldl mailing list > > [email protected] > > http://mailman.jach.hawaii.edu/mailman/listinfo/perldl > > > _______________________________________________ Perldl mailing list [email protected] http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
