Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

(fix): handle internal type promotion andnas for extension arrays properly#10423

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
ilan-gold wants to merge20 commits intopydata:main
base:main
Choose a base branch
Loading
fromilan-gold:ig-minimumal-reindex

Conversation

ilan-gold
Copy link
Contributor

max-sixty reacted with thumbs up emoji
@github-actionsgithub-actionsbot added topic-backends topic-indexing topic-documentation topic-CF conventions topic-groupby topic-dask topic-plotting topic-testing topic-performance topic-cftime topic-zarrRelated to zarr storage library topic-arraysrelated to flexible array support CIContinuous Integration tools topic-html-repr topic-rolling dependenciesPull requests that update a dependency file AutomationGithub bots, testing workflows, release automation topic-DataTreeRelated to the implementation of a DataTree class topic-typing topic-hypothesisStrategies or tests using the hypothesis library io topic-NamedArrayLightweight version of Variable labelsJun 16, 2025
@ilan-goldilan-gold marked this pull request as ready for reviewJune 26, 2025 12:05
@ilan-gold
Copy link
ContributorAuthor

Unable to reproduce at least the 3.10 test failures on an ubuntu 22 machine

Comment on lines +248 to +251
if isinstance(array_or_dtype, str | bytes):
if should_return_str_or_bytes:
return array_or_dtype
return type(array_or_dtype)
Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

We actually do not want to produce returntype(array_or_dtype) in the case of extension array promotion because it is handled internally by the extension array functionality

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Otherwise, this function should be the same

Comment on lines +149 to +151
raise ValueError(
f"Cannot cast values to shared type, found values: {arrays_and_dtypes}"
)
Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

The main difference betweenhttps://github.com/pydata/xarray/pull/10380/files#diff-c803294f5216cbbdffa30f0b0c9f16a7e39855d4dd309c88d654bc317a78adc0R136-R137 and mine is the raising of the error here instead of using internal pandas functionality. I think this is reasonable to throw an error here, but maybe others have a better non-private function(ality) we could use.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

The other difference is we revert to the old concat behavior, which I think was reasonable before.

@ilan-gold
Copy link
ContributorAuthor

@deeplycloudy@richard-berg I think this is ready for review

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
AutomationGithub bots, testing workflows, release automationCIContinuous Integration toolsdependenciesPull requests that update a dependency fileiotopic-arraysrelated to flexible array supporttopic-backendstopic-CF conventionstopic-cftimetopic-dasktopic-DataTreeRelated to the implementation of a DataTree classtopic-groupbytopic-html-reprtopic-hypothesisStrategies or tests using the hypothesis librarytopic-indexingtopic-NamedArrayLightweight version of Variabletopic-performancetopic-plottingtopic-rollingtopic-testingtopic-typingtopic-zarrRelated to zarr storage library
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Regression in DataArrays created from Pandas
3 participants
@ilan-gold@dcherian@richard-berg

[8]ページ先頭

©2009-2025 Movatter.jp