[NumPy-Tickets] [NumPy] #2187: (fixed_dtype, shape) view of recarray broken

NumPy Trac numpy-tickets@scipy....
Sun Jul 22 12:52:56 CDT 2012


#2187: (fixed_dtype, shape) view of recarray broken
---------------------------+------------------------------------------------
 Reporter:  rgommers       |       Owner:  somebody
     Type:  defect         |      Status:  new     
 Priority:  highest        |   Milestone:  1.7.0   
Component:  numpy.core     |     Version:  1.6.1   
 Keywords:  recarray view  |  
---------------------------+------------------------------------------------
 Broken by https://github.com/numpy/numpy/pull/350:
 {{{
 >>> import statsmodels.api as sm
 >>> dta = sm.datasets.macrodata.load()
 >>> dta.data[['infl', 'realgdp']].view((float,2))
 Traceback (most recent call last):
   File "tmp.py", line 4, in <module>
     dta.data[['infl', 'realgdp']].view((float,2))
   File "/Users/rgommers/Code/numpy/numpy/core/records.py", line 496, in
 view
     return self.__array__().view(dtype)
 ValueError: new type not compatible with array.
 }}}
 Works with commit:578a4199, broken with commit:bc1005324. Looks like a
 blocker for 1.7.0 to me.

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


More information about the NumPy-Tickets mailing list