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

Code refactoring #309

Closed
wants to merge 3 commits into from
Closed

Code refactoring #309

wants to merge 3 commits into from

Conversation

tosemml
Copy link

@tosemml tosemml commented Sep 2, 2023

The objective of this minor code modification is to harness the power of optimized NumPy operations within the code.

@tosemml tosemml changed the title using np.cumsum Code refactoring Sep 2, 2023
@rom1504
Copy link
Owner

rom1504 commented Sep 2, 2023

does it improve the speed?

@tosemml
Copy link
Author

tosemml commented Sep 2, 2023

Generally NumPy operations are exceptionally optimized and outperform general Python for loop based operations in terms of speed. Additionally, they enhance code conciseness.

@rom1504
Copy link
Owner

rom1504 commented Sep 2, 2023 via email

@rom1504
Copy link
Owner

rom1504 commented Jan 6, 2024

I think it's better to keep the clearer naive code here. The list is at most 100k items and this will not provide a speedup

@rom1504 rom1504 closed this Jan 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

2 participants