[NumPy-Tickets] [NumPy] #1436: Regression creating array from character

NumPy Trac numpy-tickets@scipy....
Sat Mar 20 13:22:21 CDT 2010


#1436: Regression creating array from character
------------------------+---------------------------------------------------
 Reporter:  rmay        |       Owner:  somebody
     Type:  defect      |      Status:  new     
 Priority:  high        |   Milestone:  2.0.0   
Component:  numpy.core  |     Version:  devel   
 Keywords:  regression  |  
------------------------+---------------------------------------------------
 The following code, which works with numpy 1.4.0, results in an error:

 In [1]: import numpy as np
 In [2]: v = 'm'
 In [3]: dt = np.dtype('>c')
 In [4]: a = np.asarray(v, dt)

 On 1.4.0:

 In [5]: a
 Out[5]:
 array('m',
       dtype='|S1')
 In [6]: np.__version__
 Out[6]: '1.4.0'

 On SVN trunk:

 /home/rmay/.local/lib/python2.6/site-packages/numpy/core/numeric.pyc in
 asarray(a, dtype, order)
     282
     283     """
 --> 284     return array(a, dtype, copy=False, order=order)
     285
     286 def asanyarray(a, dtype=None, order=None):

 ValueError: assignment to 0-d array

 In [5]: np.__version__
 Out[5]: '2.0.0.dev8297'

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/1436>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list