[Numpy-discussion] workaround for searchsorted with strings?

Charles R Harris charlesr.harris@gmail....
Thu May 22 14:00:22 CDT 2008

On Thu, May 22, 2008 at 12:36 PM, Lewis Hyatt <lhyatt@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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20080522/8ab9de0a/attachment.html 

More information about the Numpy-discussion mailing list