Skip to content

BUG: NumpyEA[uint8].take([-1], allow_fill=True) nonsense result #62448

@jbrockmendel

Description

@jbrockmendel

Pandas version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

arr = pd.Series([1, 2, 3], dtype="uint8").array

>>> arr.take([-1], allow_fill=True)
<NumpyExtensionArray>
[nan]
Length: 1, dtype: uint8

Issue Description

The actual backing _ndarray is float64 but the result thinks it is still uint8.

Expected Behavior

N/A

Installed Versions

Replace this line with the output of pd.show_versions()

Metadata

Metadata

Assignees

Labels

AlgosNon-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diffBug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions