Skip to content

MAINT: improve nanmax, nanmin and nansum - #939

Merged
lucascolley merged 1 commit into
data-apis:mainfrom
qbarthelemy:nan
Aug 21, 2026
Merged

MAINT: improve nanmax, nanmin and nansum#939
lucascolley merged 1 commit into
data-apis:mainfrom
qbarthelemy:nan

Conversation

@qbarthelemy

@qbarthelemy qbarthelemy commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Reference issue

Related to #789

What does this implement/fix?

Simplify nanmax, nanmin and nansum functions, using

xp.full_like(a, value)

instead of

device_a = _compat.device(a)
xp.asarray(value, dtype=a.dtype, device=device_a)

Additional information

AI Generation Disclosure

No AI tools used, handmade

@OmarManzoor OmarManzoor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks nice! Thank you @qbarthelemy

@OmarManzoor

Copy link
Copy Markdown
Contributor

@lucascolley can we merge this?

@lucascolley
lucascolley self-requested a review August 20, 2026 09:47
@lucascolley lucascolley added this to the 0.11.2 milestone Aug 21, 2026
@lucascolley lucascolley changed the title ENH: improve nanmax, nanmin and nansum MAINT: improve nanmax, nanmin and nansum Aug 21, 2026
@lucascolley lucascolley added the maintenance general maintenance label Aug 21, 2026

@lucascolley lucascolley left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

great stuff, thanks both!

@lucascolley
lucascolley merged commit 478b915 into data-apis:main Aug 21, 2026
33 checks passed
@lucascolley

Copy link
Copy Markdown
Member

@all-contributors please add @qbarthelemy for code

@allcontributors

Copy link
Copy Markdown
Contributor

@lucascolley

I've put up a pull request to add @qbarthelemy! 🎉

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

Labels

maintenance general maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants