Matthew Brett wrote:
> I think the summary here is 'numpy strings are zero padded; therefore
> you may run into surprises with a string that has trailing zeros'.
>
> I see why that is - the zero terminator is the only way for numpy
> arrays to see where the end of the string is...
almost -- it's not quite zero-terminated, you can have embedded zeros:
In [35]: np.array('aa\x00bb', dtype='S6')
Out[35]:
array('aa\x00bb',
dtype='|S6')
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
[email protected]
_______________________________________________
NumPy-Discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion