shunwang / numexpr

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

Input/output to same array should work #93

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
In [31]: x=ones(2); numexpr.evaluate('x-x*0.001', out=x)
Out[31]: array([ 0.,  0.])

In [32]: x=ones(2); numexpr.evaluate('x-x*0.001')
Out[32]: array([ 0.999,  0.999]) 

The two above should produce the same output (the second is correct).

This feature should be added rather than raising an exception, as there's no 
reason why you shouldn't be able to write to the same array you're reading from 
since the computation is embarrassingly parallel and all the read operations 
will have been completed for any given element of the array before a write 
operation was even possible.

Original issue reported on code.google.com by dan.good...@thesamovar.net on 3 Sep 2012 at 11:31

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
This issue has been fixed in the trunk a while back. Unfortunately, we're still 
waiting for a new release...

Original comment by pierre.c...@gmail.com on 27 Sep 2012 at 2:44