you can try numba.Its a efficient python package and easy to use. Optimize performance by compiling your Python code for machine code and automatically creating thread pools