The np.array().view(np.chararray) way to create a chararray appears to automatically strip trailing whitespace:
>>> c=np.array(['aAaAaA',' aA ','abBABba'],dtype='S7')
>>> c[1]; len(c[1])
' aA '
6
>>> c=c.view(np.chararray)
>>> c[1]; len(c[1])
' aA'
4
Is there a way to suppress this behavior? If not, bug or feature?
Thanks,
DG