[Numpy-tickets] [NumPy] #512: Incorrect conversion of None into a string for string arrays of size less than 4.

NumPy numpy-tickets@scipy....
Fri May 4 13:29:33 CDT 2007


#512: Incorrect conversion of None into a string for string arrays of size less
than 4.
------------------------+---------------------------------------------------
 Reporter:  socha       |       Owner:  somebody                
     Type:  defect      |      Status:  new                     
 Priority:  normal      |   Milestone:  1.0.2 Release           
Component:  numpy.core  |     Version:  none                    
 Severity:  normal      |    Keywords:  None string array size 4
------------------------+---------------------------------------------------
 I would have expected each of the following to have 'None' in them, and a
 type of |S4:

 {{{
 Python 2.4.3 - Enthought Edition 1.0.0 (#69, Aug  2 2006, 12:09:59) [MSC
 v.1310
 32 bit (Intel)] on win32
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import numpy
 >>> numpy.__version__
 '1.0.2'
 >>> from numpy import array
 >>> array(['a',None,'c'], dtype='S')
 array(['a', 'N', 'c'],
       dtype='|S1')
 >>> array(['abd',None,'cde'], dtype='S')
 array(['abd', 'Non', 'cde'],
       dtype='|S3')
 >>> array(['abcd',None,'cdef'], dtype='S')
 array(['abcd', 'None', 'cdef'],
       dtype='|S4')
 >>>
 }}}

 -- David Socha & Daniel Terhorst ([http://www.urbansim.org/ UrbanSim])

-- 
Ticket URL: <http://projects.scipy.org/scipy/numpy/ticket/512>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.


More information about the Numpy-tickets mailing list