January 2018
Beginner to intermediate
548 pages
12h 11m
English
NumExpr is a package that can offer some speedup on complex computations on NumPy arrays. NumExpr evaluates algebraic expressions involving arrays, parses them, compiles them, and finally executes them, possibly on multiple processors.
This principle is somewhat similar to Numba, in that normal Python code is compiled dynamically to machine code. However, NumExpr only tackles algebraic array expressions rather than arbitrary Python code. We will see how that works in this recipe.
NumExpr should already be installed in Anaconda, but you can also install it manually with conda install numexpr.
>>> import numpy as np
import numexpr as neRead now
Unlock full access