The next used to work in 1.x series, but this is what I get with numexpr 2.0rc1:
>>> import numexpr as ne
>>> import numpy as np
>>> a = np.array([])
>>> ne.evaluate('a*a')
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
/home/faltet/python/numexpr/default/<ipython console> in <module>()
/home/faltet/python/numexpr/default/numexpr/necompiler.pyc in evaluate(ex,
local_dict, global_dict, out, order, casting, **kwargs)
662 compiled_ex = _numexpr_cache[numexpr_key] = \
663 NumExpr(ex, signature, **context)
664 return compiled_ex(*arguments,
665 out=out, order=order, casting=casting,
--> 666 ex_uses_vml=ex_uses_vml)
ValueError: Iteration of zero-sized operands is not enabled
The responsible in the new iterator in NumPy (>= 1.6):
>>> np.nditer(a)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
/home/faltet/python/numexpr/default/<ipython console> in <module>()
ValueError: Iteration of zero-sized operands is not enabled
I am wondering why this is so :-/
Original issue reported on code.google.com by fal...@gmail.com on 4 Nov 2011 at 3:57
Original issue reported on code.google.com by
fal...@gmail.com
on 4 Nov 2011 at 3:57