From: Francesc A. <fa...@op...> - 2003-10-07 16:18:48
|
A Dimarts 07 Octubre 2003 17:58, Norman Shelley va escriure: > How do I take data from a double array or a complex array as defined below > and initialize a Numeric array and load it appropriately? > > struct complex { > double real; > double imag; > } complex; > > complex cdata[100]; > double *data[100]; > PyArrayObject *array; By reading the manual (page 65), I guess the best would be something like: arr = PyArray_FromDimsAndData(1, 100, PyArray_CDOUBLE, cdata) Cheers, -- Francesc Alted |