Skip to content

pd.Index should not support float16 #1501

@cmp0xff

Description

@cmp0xff

The following constructions are invalid but are not reported with the current pandas-stubs:

import pandas as pd
import numpy as np

# numpy float16
pd.Index([1.0], dtype=np.half)
pd.Index([1.0], dtype="half")
pd.Index([1.0], dtype="float16")
pd.Index([1.0], dtype="e")
pd.Index([1.0], dtype="f2")

We can start to fix them after #1493 has been merged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ConstructorsSeries/DataFrame/Index/pd.array ConstructorsIndexRelated to the Index class or subclasses

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions