Hi, I would like to convert the numpy double array to numpy float array in C(Swig). I am trying to use
PyObject *object = PyArray_FROM_OT(input,NPY_FLOAT)
or
PyObject *object = PyArray_FROMANY(input,NPY_FLOAT,0,0,NPY_DEFAULT)
or
PyObject *object = PyArray_FromObject(input,NPY_FLOAT,0,0)
or
PyObject *object = PyArray_ContiguousFromAny(input,NPY_FLOAT,0,0)
But all of them return NULL? Am I missing anything?