> This inconsistency is fixed in Numpy 1.4 (which included a major 
> overhaul of chararrays).  in1d will perform the auto 
> whitespace-stripping on chararrays, but not on regular ndarrays of strings.

Great, thanks.

> Pyfits continues to use chararray since not doing so would break 
> existing code relying on this behavior.  And there are many use cases 
> where this behavior is desirable, particularly with fixed-length strings 
> in tables. 
> 
> The best way to get around it from your code is to cast the chararray 
> pyfits returns to a regular ndarray.

My problem was I didn't know I needed to get around it :)  But thanks for the 
suggestion, I'll use that in future when I need to switch between chararrays 
and 
ndarrays.

Neil



_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to