[Numpy-discussion] numpy.array() of mixed integers and strings can truncate data

Thouis Jones thouis.jones at curie.fr
Thu Dec 1 10:43:52 EST 2011


On Thu, Dec 1, 2011 at 16:29, Benjamin Root <ben.root at ou.edu> wrote:
> Does the same problem occur if -345 comes after "ABC"?

Yes.

>>> np.array(list(reversed([-345,4,2,'ABC'])))
array(['ABC', '2', '4', '-34'],
      dtype='|S3')



More information about the NumPy-Discussion mailing list