Skip to content

Conversation

cbourjau
Copy link
Contributor

@cbourjau cbourjau commented Jun 4, 2025

The min and max values are drawn specifically for their dtypes. This means that they may assume values that overflow the default integer data type. This is explicitly undefined behavior in the standard. This change avoids this UB by passing the dtype parameter to asarray where appropriate.

Copy link
Member

@ev-br ev-br left a comment

Choose a reason for hiding this comment

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

Indeed, nice catch!
Thanks @cbourjau

@ev-br ev-br merged commit ddffe11 into data-apis:master Jun 4, 2025
3 checks passed
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