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

Replaced sum with np.sum for improved performance #160

Closed
wants to merge 1 commit into from

Conversation

nikhilnarla
Copy link

@nikhilnarla nikhilnarla commented Jun 11, 2022

@mathause
Copy link
Member

Thanks for the PR. Unfortunately, the tests failed - do you need help to debug this?

@nikhilnarla
Copy link
Author

yes @mathause Could you please help?

@mathause
Copy link
Member

As a hint - can you compare

import numpy as np

a = np.random.randn(5, 3)

sum(a)
np.sum(a)

@mathause mathause mentioned this pull request Jan 13, 2023
7 tasks
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.

micro-optimization: use np.sum instead of sum
2 participants