Boost logo

Boost :

From: rwgk_at_[hidden]
Date: 2001-01-08 11:50:23


> Actually, valarray<> has many problems, not least due to a lack of
experts
> on the C++ committee has who could help us get it right. Is the
NumPy
> interface "done right"? If so, maybe we should cannibalize.
>

I have not followed the NumPy developments in the last few
months. Assuming that the interface has not changed substantially,
I would say that it is definitely not "done right."
The strongest feature of NumPy is the umath module which
enables something like sin(x) for all built-in types and
NumPy arrays. The NumPy implementation of umath is done
in C. Redoing it this way would indeed be a lot of work.
However, umath could also be implemented as a relatively
small Python layer that coerces built-in types to wrapped
C++ arrays and then calls the wrapped C++ functions. Doing
it this way should be a lot easier and the performance
penalty is probably marginal.
Wrapping a clean C++ array library with BPL plus a umath
substitute would be a wonderful thing to have. NumPy is
very useful for the end-user, but quite a hack under the hood.

Wouldn't the Blitz++ library seem like a good base package
for a NumPy replacement?

Ralf


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk