Skip to content

Panel constructor ignores dtype #797

Closed
@CRP

Description

@CRP
Contributor

I thought this was fixed(see issue 411), but it appears to keep resurfacing ;)

In [27]: a=Panel(items=range(2),major_axis=range(10),minor_axis=range(5),dtype=np.float32)

In [28]: a[0].dtypes
Out[28]:
0 float64
1 float64
2 float64
3 float64
4 float64

A quick debug shows that the routine form_blocks just considers generic "float", "int" etc datatypes, so maybe it does not distinguish between float32 and float64?

Activity

adamklein

adamklein commented on Feb 22, 2012

@adamklein
Contributor

This is an analog of another issue #622

Which currently we don't really have short-term plans to attack. In short, it converts to float64 as a "feature" to keep the API simpler

wesm

wesm commented on Mar 16, 2012

@wesm
Member

More work is needed in the core infrastructure to enable the use of the full NumPy dtype hierarchy without allowing the complexity to leak through to the average user

jreback

jreback commented on Mar 11, 2013

@jreback
Contributor

@wesm this should be closable for 0.11

added a commit that references this issue on Sep 23, 2019

Merge pull request pandas-dev#797 from shashank88/fix_tests_py3

9fe59ef
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @wesm@CRP@adamklein@jreback

        Issue actions

          Panel constructor ignores dtype · Issue #797 · pandas-dev/pandas