[Numpy-discussion] access ndarray in C++

Hoyt Koepke hoytak at gmail.com
Sat Apr 26 16:52:38 EDT 2008


Let me say also that I tried using boost.python a while back to
interface numpy with c++, and, while I got some things working, I
found the distribution and packaging end of things an order of
magnitude more complicated than what I found with weave.  Since weave
is built into scipy, as well as blitz itself (now recently under the
BSD license), it fits really well with numpy's distutils.  The only
dependencies on the user end are numpy and scipy, which they would
need anyway from the python end of the code.

Also, I find the syntax of blitz++ to be really simple and numpy-like.  E.g.

Array<double, 2> A;
A.resize(20,20);
for(int i = 0; i < 20; ++i)      A(i, Range::all() ) = i;
Array<double, 1> B = A(Range(2,18), 0);
B *= 2;
A(2, Range(5,10) ) += 2;
Array<double, 1> C = B*A(2, Range(1,17) );

and so on...  (I just typed this in here, prob some typos).

Anyway, after bouncing around for a bit I think I've found this to be
the solution that most closely fits my needs.
--Hoyt

On Sat, Apr 26, 2008 at 3:54 AM, Gael Varoquaux
<gael.varoquaux at normalesup.org> wrote:
> On Wed, Apr 23, 2008 at 09:47:46PM -0400, Andreas Klöckner wrote:
>  > > Any numpy-specific stuff for sip?
>
>  > Not as far as I'm aware. In fact, I don't know of any uses of sip outside of
>  > Qt/KDE-related things.
>
>  Airbus uses it for heavy numerical work. They claim they have benchmarked
>  all the tools and SIP was the fastest.
>  If you want more information on that, you should contact the sip
>  developer, Phil Thompson, he does some contracting job for Airbus.
>
>  Cheers,
>
>  Gaël
>
>
> _______________________________________________
>  Numpy-discussion mailing list
>  Numpy-discussion at scipy.org
>  http://projects.scipy.org/mailman/listinfo/numpy-discussion
>



-- 
+++++++++++++++++++++++++++++++++++
Hoyt Koepke
UBC Department of Computer Science
http://www.cs.ubc.ca/~hoytak/
hoytak at gmail.com
+++++++++++++++++++++++++++++++++++



More information about the NumPy-Discussion mailing list