[Numpy-discussion] workaround for searchsorted with strings?

Charles R Harris charlesr.harris at gmail.com
Thu May 22 15:00:22 EDT 2008


On Thu, May 22, 2008 at 12:36 PM, Lewis Hyatt <lhyatt at gmail.com> wrote:

> Oh sorry, my example was dumb, never mind. It looks like this way does work
> after all. Can someone please confirm for me, though, that the workaround I
> am
> using (just changing to the wider string type) is reliable? Thanks, sorry
> for
> the noise.
>

You can still have problems because the numpy strings will be filled out
with zeros. The string compare in 1.0.4 doesn't handle zeros correctly and
this might cause some problems.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20080522/8ab9de0a/attachment.html>


More information about the NumPy-Discussion mailing list