NA_OFFSETDATA is mentioned during the example in 10.2.3. It should be
documented in 10.2.1. Should some of the other macros in "nummacro.h" be
documented? Also the macros in "arrayobject.h" and "numcomplex.h".
-------------------
The "libnumarray_UNIQUE_SYMBOL" trick discussed in "libnumarray.h" has
been useful with Numeric and will be useful with numarray. It needs to
be in the main documentation. I think it is mentioned somewhere in the
Python documentation. I found it very confusing the first time I used
it. A detailed example is needed.
-------------------
"NA_longsFromIntTuple" works on both tuples and lists. A better name
might be "NA_longsFromIntSequence". Functions of this type have proven
_very_ useful for me in writing large SWIG wrappers. I generate them
using SWIG macros. Here are some of them. On the C side, auxillary
information about the lengths of things needs to be dealt with. "list"
means "list or tuple".
Python C
list of ints <--> array of ints
list of floats <--> array of doubles
list of floats <--> array of floats
...
list of strings <--> array of arrays of char
list of lists of ints <--> array of arrays of int
...
list <--> array of PyObject*
Thanks,
Ed Jones
|