shunwang / numexpr

Automatically exported from code.google.com/p/numexpr
MIT License
0 stars 0 forks source link

result in-place enhancement #103

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This is an enhancement request.

Is it possible for numexpr to store result in place, similar to numpy's "out" 
in some operations, example: "np.add(ar1,ar2,out=ar1)". This way, there is no 
temporary memory consumed during numexpr evaluation.

Desired example:
  ne.evaluate("ar1 % 5",out=ar1)

I'm expecting "VmPeak" not to increase before the execution and after since 
result is stored in-place.

In very large array calculation, where the array size is almost equivalent to 
the physical memory of machine, then this enhancement would greatly help.

Original issue reported on code.google.com by johnqdel...@gmail.com on 22 May 2013 at 5:16

GoogleCodeExporter commented 9 years ago
numexpr (2.0 and later) has already an out argument which does exactly that

Original comment by gdemen...@gmail.com on 5 Jun 2013 at 7:00