[Numpy-discussion] Create a numpy array from an array of a C structure

mani sabri mani.sabri@gmail....
Sun Mar 9 03:57:19 CDT 2008


Hello

Is it possible to create a numpy array from an array of a C structure like
this?

struct RateInfo
  {
   unsigned int      ctm;
   double            open;
   double            low;
   double            high;
   double            close;
   double            vol;
  };

I am embedding python in a financial application and I have an array of this
structure that I want to perform some statistical computations on it.

Best regards,
Mani Sabri




More information about the Numpy-discussion mailing list