Skip to content

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