numexpr.evaluate("a+b",out=a) numexpr.evaluate("a+b",out=a) numpy numpy

numexpr.evaluate("a+b",out=a)


It works, because numexpr still uses temporary arrays internally, albeit in chunk sizes of 1024 elements (or 4096 if using VML). You can think of these chunks of the inputs as slices, though they are stored as appropriate C data types for speed and memory compactness during the evaluation. The results will be stored into the out parameter after the calculation of each chunk is performed, otherwise it must allocate an array of of the same size as the inputs.

Check out the section Why It Works for pseudocode of how numexpr evaluates vectorized arithmetic.