[Numpy-discussion] numpy.ndarray.astype conversion

Orest Kozyar orest.kozyar@gmail....
Thu May 22 15:52:22 CDT 2008

The following line:  array([6.95e-5]).astype('S')
returns: array(['6'], dtype='|S1')

I realize that I can get it to return the correct string
representation if I specify 'S12', etc, but anything below 'S9'
results in an incorrect string representation of the number.  Is this
expected behavior?


More information about the Numpy-discussion mailing list