Skip to content

ENH: improve nanmax, nanmin and nansum - #939

Open
qbarthelemy wants to merge 1 commit into
data-apis:mainfrom
qbarthelemy:nan
Open

ENH: improve nanmax, nanmin and nansum#939
qbarthelemy wants to merge 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants