Skip to content

CI: Numpy changed dtype inference #39089

Closed
@phofl

Description

@phofl

Numpy changed the dtype inference (numpy/numpy#17863), which causes tests to fail. Problem description as follows:

other = [pd.Interval(0, 1, closed="right"), 0, "foo"]
arr = np.asarray(other)
result = pd.array(arr)

On a regular Numpy version the numpy array has dtype object and this returns

<PandasArray>
[Interval(0, 1, closed='right'), 0, 'foo']
Length: 3, dtype: object

while on numpy dev the numpy array has dtype <U64 and this returns

<StringArray>
['(0, 1]', '0', 'foo']
Length: 3, dtype: string

This leads to a different evaluation of is_object_dtype(other_dtype)

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugCIContinuous IntegrationDtype ConversionsUnexpected or buggy dtype conversionsNeeds TriageIssue that has not been reviewed by a pandas team member

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions