[Matrix-SIG] Accessing raw data in PyArrays from C

Konrad Hinsen hinsen@cnrs-orleans.fr
Fri, 12 Mar 1999 20:08:21 +0100


> I have been writing some C code that extends NumPy. I find myself
> regularly using the C macro:
> 
> #define ARRAYDATUM(type,charptr) (*( ((type) *) (charptr)))

Looks fine to me. Why do you want to replace it by functions
with added function call overhead?
-- 
-------------------------------------------------------------------------------
Konrad Hinsen                            | E-Mail: hinsen@cnrs-orleans.fr
Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.55.69
Rue Charles Sadron                       | Fax:  +33-2.38.63.15.17
45071 Orleans Cedex 2                    | Deutsch/Esperanto/English/
France                                   | Nederlands/Francais
-------------------------------------------------------------------------------