Basically I have a numpy ufunc that operates on npy_cdouble
and npy_cfloat
arrays. For instance:
static void
ufunc_H( char ** args
, npy_intp * dimensions
, npy_intp * steps
, void * data)
{
npy_cdouble * qm_in = (npy_cdouble *) (args[0]);
npy_cdouble * qm_out = (npy_cdouble *) (args[1]);
npy_intp i;
for(i = 0; i < ndim; i++)
{
qm_out[i] = (qm_in[i] - qm_in[i ^ ipow(2, argument.act)]) * M_SQRT1_2;
}
}
This however does not work and the compiler says that qm_in
has the type ‘npy_cdouble’ {aka ‘struct <anonymous>’}
. How do I treat npy_cdouble
correctly?