Questions tagged [numexpr]

Numexpr is a fast numerical expression evaluator for NumPy.

Numexpr is a fast numerical expression evaluator for NumPy. With it, expressions that operate on arrays (like 3*a+4*b) are accelerated and use less memory than doing the same calculation in Python.

In addition, its multi-threaded capabilities can make use of all your cores, which may accelerate computations, most specially if they are not memory-bounded (e.g. those using transcendental functions).

Last but not least, numexpr can make use of Intel's VML (Vector Math Library, normally integrated in its Math Kernel Library, or MKL). This allows further acceleration of transcendent expressions.

Numexpr User Guide lists the functionalities supported by it alongwith other useful info related to it.

94 questions
0
votes
2 answers

PyTables: Select Rows from Table and apply Numexpr

Is it possible to select rows from a table in PyTables and apply a Numexpr-like expression to the output? For example, if I have the table import tables as tb class Event(tb.IsDescription): x = tb.Float32Col() y = tb.Float32Col() z =…
xvtk
  • 1,030
  • 2
  • 10
  • 18
0
votes
1 answer

String comparison in PyTables / Numexpr

I have just created and filled my first PyTables file. Trying to query the data, I ran into a problem. There is a column ic_name which is of type StringCol(500) and I have created an index for this column. The following code works fine: count =…
Achim
  • 15,415
  • 15
  • 80
  • 144
-1
votes
1 answer

Fast Python Exponitial Function for curve_fit: Numpy Express gives slower results

I am fitting exponential data with python in real time. Many millions of calls to my exponential decay function "fexp", so speeding it up could greatly improve performance. I recently stumbled upon numexpr module but it seems to be tailored to…
-2
votes
1 answer

Error in python numexp module with 'and' operator

I'm using the numexpr module for python. I'm trying to run the next code snippet: import numexpr as ne def main(): result = ne.evaluate('where((1 > 9) & (where(1 > 9, 9, 1) == 0), 2, 3)') print(f'Result: {result}') if __name__ ==…
1 2 3 4 5 6
7