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

Fixed compatibility with numba v0.51.2 #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ashrielbrian
Copy link

@ashrielbrian ashrielbrian commented Oct 22, 2020

This fixes the deprecation warnings from numba (#3 ) due to object mode fallback when nopython mode fails.

  1. Redundant @jit decorators were removed.
  • These were decorators that did not speed up the code due to numba object mode fallback.
  1. Added explicit nopython decorators: @njit
  • that way, if there is a compile failure, an error will be explicitly thrown.
  1. Refactored functions to be numba-compatible.
  • np.int -> np.int_
  • np.bool -> np.bool_
  • np.average -> np.mean
  • refactored the loop get_minimum_seam into a separate function and added the @njit decorator.

These refactorings did not have any noticeable effect on the performance of the algorithm during benchmarking.

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