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 improvements using Numpy #23

Merged
merged 3 commits into from
Aug 28, 2024
Merged

Conversation

tosemml
Copy link
Contributor

@tosemml tosemml commented Aug 9, 2023

Overview

Refactorings to improve code

Description of Changes

Use np.cumsum to compute the cumulative sum, which is efficient and concise.

Screenshots

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code + updated documentation (if necessary)
  • I have added tests to define the behavior of the feature(s) and verify it is working
  • New + existing unit tests pass

@ysymyth ysymyth merged commit 0837da4 into princeton-nlp:master Aug 28, 2024
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