[NumPy-Tickets] [NumPy] #2081: String gets truncated in asarray() in Python 3.2

NumPy Trac numpy-tickets@scipy....
Wed Mar 14 13:41:09 CDT 2012

#2081: String gets truncated in asarray() in Python 3.2
 Reporter:  taldcroft  |       Owner:  somebody   
     Type:  defect     |      Status:  new        
 Priority:  normal     |   Milestone:  Unscheduled
Component:  Other      |     Version:  devel      
 Keywords:             |  
 Using numpy devel with Python 3.2 gives an unexpected result trying to
 initialize an array from numpy string objects.  This is a regression from
 previous behavior (devel prior to about two weeks ago and 1.6.1).


 >>> d = np.array(['a'])
 >>> np.asarray([d[0]])

 In numpy 1.6.1:

 >>> d = np.array(['a'])
 >>> np.asarray([d[0]])

 If one uses a longer string like "abcd" instead of "a" then the result is
 "ab", so it looks like the actual output length is // 2 from the desired
 length.  Perhaps this is related to:


Ticket URL: <http://projects.scipy.org/numpy/ticket/2081>
NumPy <http://projects.scipy.org/numpy>
My example project

More information about the NumPy-Tickets mailing list