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

chore: rewrite extract_latex.py to not use numpy #400

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

T4ras123
Copy link

This pull request includes changes to the pix2tex/dataset/extract_latex.py file to simplify the code and remove unnecessary dependencies. The most important changes include removing the numpy import and refactoring the check_brackets function to use built-in Python functions instead of numpy.

Codebase simplification:

  • pix2tex/dataset/extract_latex.py: Removed the import of the numpy library as it was not necessary for the operations being performed.
  • pix2tex/dataset/extract_latex.py: Refactored the check_brackets function to use the built-in sum function instead of numpy.cumsum, simplifying the code and removing the dependency on numpy.
  • get rid of unnecessary dependencies
  • get the same functionality
  • faster code

- get rid of unnecessary dependencies
- get the same functionality
- faster code
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.

1 participant