[Numpy-discussion] searchsorted bug
James Philbin
philbinj@gmail....
Thu Jan 31 12:41:00 CST 2008
I can't fathom where the comparison functions exist in the code. It
seems that the comparison signature is of the form (void*, void*,
PyArrayObject*), so it doesn't seem possible at the moment to specify
a compare function which can reason about the underlying types of the
two void*'s. However, I think arrays of strings are a common enough
use case that they should work as expected - would it be possible to
extend the comparison type to accept two integers specifying the types
of the arguments?
James
On Jan 31, 2008 6:02 PM, Charles R Harris <charlesr.harris@gmail.com> wrote:
>
>
>
>
> On Jan 31, 2008 10:55 AM, James Philbin <philbinj@gmail.com> wrote:
> >
> > > True. The problem is knowing when that is the case. The subroutine in
> > > question is at the bottom of the heap and don't know nothin'. IIRC, it
> just
> > > sits there and does the comparison by calling through a pointer with
> char*
> > > arguments.
> >
> > What does the comparison function actually look like for the case of
> > dtype='|Sn'? Is there no way of sending the underlying types to the
> > comparison, so it can throw an exception if the two data types are not
> > supported?
> >
> >
> >
> >
>
> There is an upper level routine that parses the keywords and sets things up.
> There may even be two upper level routines, but I don't recall. The purpose
> of the two routines you touched was to pull out a small block of code that
> could be very simple because of its assumptions.
>
>
> Chuck
>
>
>
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion@scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>
>
More information about the Numpy-discussion
mailing list