Skip to content

(fixed_dtype, shape) view of recarray broken (Trac #2187) #640

Closed
@numpy-gitbot

Description

@numpy-gitbot

Original ticket http://projects.scipy.org/numpy/ticket/2187 on 2012-07-22 by @rgommers, assigned to unknown.

Broken by #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 578a4199, broken with bc1005324. Looks like a blocker for 1.7.0 to me.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions