[NumPy-Tickets] [NumPy] #1997: asarray may truncate strings if the input has numbers
NumPy Trac
numpy-tickets@scipy....
Thu Dec 15 10:04:54 CST 2011
#1997: asarray may truncate strings if the input has numbers
---------------------------------------+------------------------------------
Reporter: dalleyg | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone: Unscheduled
Component: numpy.core | Version: 1.6.0
Keywords: asarray string truncation |
---------------------------------------+------------------------------------
In the following example, numpy.asarray chooses the dtype '|S1', causing
the integer 10's string form to be truncated to '1'
>>> numpy.asarray(['1', 10])
array(['1', '1'],
dtype='|S1')
>>> numpy.__version__
'1.6.1'
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/1997>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list