Skip to content

TYP: Allow passing dtype=None to trace #29332

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 7, 2025
Merged

Conversation

MarcoGorelli
Copy link
Member

None is explicitly documented as an acceptable argument

dtype : dtype, optional

Determines the data-type of the returned array and of the accumulator where the elements are summed. If dtype has the value None and a is of integer type of precision less than the default integer precision, then the default integer precision is used. Otherwise, the precision is the same as that of a.

@MarcoGorelli MarcoGorelli marked this pull request as ready for review July 7, 2025 13:55
@jorenham jorenham self-requested a review July 7, 2025 14:44
Copy link
Member

@jorenham jorenham left a comment

Choose a reason for hiding this comment

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

DTypeLike technically already includes None. But it probably shouldn't. So being explicit here sounds like a good idea to me.

@jorenham jorenham merged commit a63bed4 into numpy:main Jul 7, 2025
78 of 79 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants