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

NumPy Trac numpy-tickets@scipy....
Mon Jul 4 06:00:55 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  |  
---------------------------------------+------------------------------------

Comment(by ehiggs):

 Now with code block formatting:

 {{{
 >>> 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')
 }}}

 I apologize if there is an edit function in Trac. I'm new to this bug
 tracker so I'm still getting up to speed.

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


More information about the NumPy-Tickets mailing list