[NumPy-Tickets] [NumPy] #1892: numpy.vectorize truncates strings

NumPy Trac numpy-tickets@scipy....
Mon Jul 4 05:33:52 CDT 2011


#1892: numpy.vectorize truncates strings
---------------------------------------+------------------------------------
 Reporter:  ehiggs                     |       Owner:  somebody   
     Type:  defect                     |      Status:  new        
 Priority:  normal                     |   Milestone:  Unscheduled
Component:  Other                      |     Version:  1.4.1      
 Keywords:  vectorize string truncate  |  
---------------------------------------+------------------------------------
Changes (by ehiggs):

  * version:  1.3.0 => 1.4.1


Comment:

 This is also a problem in 1.4.1:

 >>> import numpy
 >>> numpy.__version__
 '1.4.1'

 >>> numpy.vectorize(lambda x: x[:10],
 otypes=[numpy.dtype('|S10')])(numpy.array(['a'*20]))
 array(['aaaaaaaa'],
       dtype='|S8')

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


More information about the NumPy-Tickets mailing list