1
"""Fast numerical expression evaluator
5
Build an expression up by using E.<variable> for the variables:
7
>>> ex = 2.0 * E.a + 3 * E.b * E.c
9
then compile it to a function:
11
>>> func = numexpr(ex, input_names=('a', 'b', 'c'))
13
(if input_names is not given to compile, the variables are sort lexically.)
15
Then, you can use that function for elementwise operations:
17
>>> func(array([1., 2, 3]), array([4., 5, 6]), array([7., 8, 9]))
18
array([ 86., 124., 168.])
20
Currently, this is only implemented for arrays of float64, and only
21
for the simple operations +, -, *, and /.
23
Copyright 2006 David M. Cooke <cookedm@physics.mcmaster.ca>
24
Licenced under a BSD-style license. See LICENSE.txt in the scipy source
28
depends = ['core', 'testing']