[NumPy-Tickets] [NumPy] #1756: Segfault when recasting string arrays

NumPy Trac numpy-tickets@scipy....
Sat Mar 5 11:25:07 CST 2011


#1756: Segfault when recasting string arrays
--------------------+-------------------------------------------------------
 Reporter:  faltet  |       Owner:  somebody   
     Type:  defect  |      Status:  new        
 Priority:  normal  |   Milestone:  Unscheduled
Component:  Other   |     Version:  devel      
 Keywords:          |  
--------------------+-------------------------------------------------------

Comment(by charris):

 This is peculiar, it is only S3 that causes problems:


 {{{
 In [6]: array(arr, dtype="|S4")
 Out[6]:
 array(['1', '12', '123', '1234', '1234'],
       dtype='|S4')

 In [7]: array(arr, dtype="|S3")
 Out[7]:
 array(['1', '\x00\x001', '2', '\x0012', '3'],
       dtype='|S3')

 In [8]: array(arr, dtype="|S2")
 Out[8]:
 array(['1', '12', '12', '12', '12'],
       dtype='|S2')

 In [9]: array(arr, dtype="|S1")
 Out[9]:
 array(['1', '1', '1', '1', '1'],
       dtype='|S1')

 }}}

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/1756#comment:6>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list