[Numpy-discussion] numarray C api examples

Faheem Mitha faheem at email.unc.edu
Sun Mar 28 07:55:09 CST 2004


On Sat, 27 Mar 2004, Todd Miller wrote:

> On Sat, 2004-03-27 at 12:35, Faheem Mitha wrote:
> > The README in numarray-0.9/Examples refers to the non-existent file
> > setup.py (at least in that directory). There are other files called
> > setup.py elsewhere in the tarball, but they don't look like they are
> > supposed to compile the examples.
> >
> > What am I missing?
>
> Nothing.  Those are dead comments in the README (they didn't survive the
> "numarray re-packaging").  There is now a single setup.py for all
> numarray packages in the root numarray directory.

Ok. In that case changing the README would be a good idea in order to
avoid confusion.

> To install the examples, just install numarray.  The examples are then
> found in the package numarray.examples.convolve.

Ok. I see the examples are in the Debian package
python2.3-numarray-ext.

> If you want to write your own extension, my advice is to stick with
> the numpy compatible interfaces.  A close second is the numarray
> "high level" interface.

I see. You mean use

#include "arrayobject.h"

right?

BTW, the high level API example in convolve uses

#include "libnumarray.h"

even though the documentation refers to

#include "numarray.h"

Which of these should be used? Actually, it might be an idea to state
explicitly in 12.3-12.6 which header files should be use. Possibly
include them in the example code itself.

I'm considering just using the Numeric C API on the assumption that is
will be easier to use (since I am a beginner). Is this assumption
accurate?

Thanks for all the help.
                                                         Faheem.







More information about the Numpy-discussion mailing list