numexpr
numexpr copied to clipboard
numexpr.evaluate('0', out=A) fails
Currently, the instructions
import numpy
import numexpr
a = numpy.zeros((2,2))
numexpr.evaluate('0.0', out=a)```
fail with error ValueError: output for a constant expression must have size 1
It would be nice to have regular broadcasting instead that would make it behave like:
import numpy
import numexpr
a = numpy.zeros((2,2))
K = numpy.array(0.0)
numexpr.evaluate('K', out=a)```
That would be useful when evaluating user-supplied formulas, that may occasionally be constant expressions.
Agreed. Feel free to contribute a patch if you want to.
Message to comment on stale issues. If none provided, will not mark issues stale