[NumPy-Tickets] [NumPy] #1948: chararray subscription returns empty string instead of empty list

NumPy Trac numpy-tickets@scipy....
Sun Mar 25 11:12:54 CDT 2012


#1948: chararray subscription returns empty string instead of empty list
------------------------------------+---------------------------------------
 Reporter:  jazzer                  |       Owner:  somebody    
     Type:  defect                  |      Status:  needs_review
 Priority:  normal                  |   Milestone:  1.7.0       
Component:  numpy.core              |     Version:  1.5.1       
 Keywords:  chararray empty string  |  
------------------------------------+---------------------------------------

Comment(by rgommers):

 A fix that doesn't break anything is to replace
 {{{
 if issubclass(val.dtype.type, character):
 }}}
 by
 {{{
 if issubclass(val.dtype.type, character) and not len(val) == 0:
 }}}

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


More information about the NumPy-Tickets mailing list