[Numpy-discussion] weird searchsorted behavior for unicode array

Thouis (Ray) Jones thouis@gmail....
Thu Mar 29 05:23:48 CDT 2012


On Thu, Mar 29, 2012 at 11:04, Thouis (Ray) Jones <thouis@gmail.com> wrote:
> It seems to be a bug in the unicode string length computation in
> arraytypes.c.src:UNICODE_compare(), based on comparison to the code in
> arrayobject.c:_myunicmp() and arrayobject.c:_compare_strings().
>
> Patch below (against maintenance/1.6.x, but the bug also looks to be
> present in master based on my reading of the code).

I just submitted a PR against numpy master for this bug, adding a test
based on the example I posted.
https://github.com/numpy/numpy/pull/243

Ray Jones


More information about the NumPy-Discussion mailing list