[SciPy-user] arraysetops & string arrays
Thu Dec 20 04:31:41 CST 2007
David Warde-Farley wrote:
> Hi there,
> I noticed that setdiff1d() fails on string arrays. (numpy 18.104.22.168).
> There's nothing in the documentation that suggests it's for numeric
> dtypes only; should there be, or is this a bug?
> The problem appears to be the line
> tt = nm.concatenate( (zlike( ar1 ), zlike( ar2 ) + 1) )
> where zlike() is returning an array of empty strings, and thus adding
> 1 is causing problems. I tried modifying it to cast to int32 without
> much success.
Fixed in SVN. It was more a missing feature than a bug - I did not
realized that it should work for non-numerical arrays, too.
If you do not use SVN, I can mail you the fix, just tell me.
If other functions have the same problems, let me know, please.
More information about the SciPy-user