Numexpr is a "fast numerical expression evaluator for NumPy". It has a internal Virtual Machine to rewrite code more efficiently by breaking down operations into smaller chunks for the CPU cache. By using a JIT (just-in-time compiler), compilation at runtime is not necessary.

As listed in the documentation, it currently supports the following operators:

Logical operators: &, |, ~ Comparison operators: <, <=, ==, !=, >=, > Unary arithmetic operators: - Binary arithmetic operators: +, -, *, /, **, %, <<, >>

The usage is quite simple, we just have to provide the numerical expression that we want to evaluate as a string to the evaluate function, e.g.,