[Numpy-discussion] Numeric vs numarray?

Peter Verveer verveer at embl-heidelberg.de
Thu Feb 10 05:42:00 EST 2005


On 10 Feb 2005, at 14:24, Timo Korvola wrote:

> Peter Verveer <verveer at embl-heidelberg.de> writes:
>> The NA_IoArray function I don't really need.
>
> Depends on what C code you are working with.  Bidirectional array
> arguments are not uncommon in libraries.

I agree, this is just a personal preference of me to rather keep the 
input and output arrays separate arguments, which gives you the same 
functionality plus a bit more flexibility. I would not argue to remove 
NA_IoArray though, if you prefer that.

>
>> Maybe I have understood the Numeric API wrong and you can do this
>> right now, I have not used it very much lately.
>
> Perhaps you can but you would have to write it all yourself.  In
> Numarray that work has been done for you.  The three functions
> NA_{Input,Output,Io}Array are pretty much all you need for accessing C
> libraries with the usual (int size, double *data) interface, whichever
> way the data goes.

Agreed. I don't know what the work would be to extend the Numeric API 
to at least have the OutputArray functionality (I guess IoArray would 
then be easily also added), but it seems worth having it.

Peter





More information about the NumPy-Discussion mailing list