The full declaration of PyArray_SearchSorted
is here:
NPY_NO_EXPORT PyObject *
PyArray_SearchSorted(PyArrayObject *op1, PyObject *op2,
NPY_SEARCHSIDE side, PyObject *perm)
You need to provide a side
and a perm
arguments. The defaults being NPY_SEARCHLEFT
and NULL
. So the following should work:
PyObject *ix_array = PyArray_SearchSorted(xw_array, x1_array,
NPY_SEARCHLEFT, NULL);