In a C extension, I am accessing two arrays passed to the function:
PyObject *xw_array = PyArray_FROM_OTF(xw_obj, NPY_DOUBLE, NPY_IN_ARRAY);
PyObject *x1_array = PyArray_FROM_OTF(x1_obj, NPY_DOUBLE, NPY_IN_ARRAY);
and I then want to use PyArray_SearchSorted
with these two arrays - I am currently doing:
PyObject *ix_array = PyArray_SearchSorted(xw_array, x1_array);
But this leads to the following error:
propagate_pure.c:123:138: error: too few arguments to function call, expected 4, have 2
PyObject *ix_array = (*(PyObject * (*)(PyArrayObject *, PyObject *, NPY_SEARCHSIDE, PyObject *)) PyArray_API[131])(xw_array, x1_array);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
What is the correct way to use PyArray_SearchSorted
? What are the four arguments required? The documentation only mentions two.