On Jan 31, 2008 9:17 AM, lorenzo bolla <[EMAIL PROTECTED]> wrote: > from docstring in multiarraymodule.c > > /** @brief Use bisection of sorted array to find first entries >= keys. > * > * For each key use bisection to find the first index i s.t. key <= > arr[i]. > * When there is no such index i, set i = len(arr). Return the results in > ret. > * All arrays are assumed contiguous on entry and both arr and key must be > of <----- > * the same comparable type. <----- > * > * @param arr contiguous sorted array to be searched. > * @param key contiguous array of keys. > * @param ret contiguous array of intp for returned indices. > * @return void > */ > static void > local_search_left(PyArrayObject *arr, PyArrayObject *key, PyArrayObject > *ret) > > In particular: > > * All arrays are assumed contiguous on entry and both arr and key must be > of <----- > * the same comparable type. <----- > >
Heh. I knew there was a reason I documented that subroutine, I had forgotten about that. Anyway, I think an exception should be thrown in the higher level routine that sets up the call when there is a type mismatch. Some typecasting might also be appropriate. Chuck
_______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion