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

Simplify code which checks for numba #43

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions pero_ocr/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@
import subprocess

try:
subprocess.check_output(
'{} -c "import numba"'.format(sys.executable), shell=True
)
print('numba available, importing jit')
from numba import jit
print('numba available, importing jit')
Copy link
Author

Choose a reason for hiding this comment

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

Maybe this message could also be omitted or updated to show 'numba available, imported jit'.

except Exception:
print('cannot import numba, creating dummy jit definition')

Expand Down