Skip to content
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

perf(task): only count nans/infs if any are found #234

Merged
merged 1 commit into from
Mar 29, 2023
Merged

Conversation

ljgray
Copy link
Contributor

@ljgray ljgray commented Mar 28, 2023

Using .all() is faster than .sum(), so we should only take the sum if we actually found a NaN/inf

@ljgray ljgray requested a review from sjforeman March 28, 2023 23:51
@ljgray ljgray marked this pull request as ready for review March 28, 2023 23:51
@ljgray ljgray marked this pull request as draft March 28, 2023 23:54
@ljgray ljgray marked this pull request as ready for review March 29, 2023 00:00
Copy link
Contributor

@sjforeman sjforeman left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@ljgray ljgray merged commit 55a4fe8 into master Mar 29, 2023
@ljgray ljgray deleted the nan-check-walk branch March 29, 2023 18:14
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