Export to GitHub

numexpr - issue #93

Input/output to same array should work


Posted on Sep 3, 2012 by Happy Elephant

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.

Comment #1

Posted on Sep 27, 2012 by Quick Elephant

Comment deleted

Comment #2

Posted on Sep 27, 2012 by Quick Elephant

This issue has been fixed in the trunk a while back. Unfortunately, we're still waiting for a new release...

Status: New

Labels:
Type-Defect Priority-Medium