The next reproduces the problem:
{{{
In [4]: a = np.array([1], 'uint32')
In [5]: ne.evaluate('a')
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/home/faltet/python/numexpr/trunk/<ipython console> in <module>()
/home/faltet/python/numexpr/trunk/numexpr/necompiler.pyc in evaluate(ex,
local_dict, global_dict, **kwargs)
682 compiled_ex = _numexpr_cache[numexpr_key]
683 except KeyError:
684 compiled_ex = _numexpr_cache[numexpr_key] = \
685 NumExpr(ex, signature, copy_args, **kwargs)
--> 686 return compiled_ex(*arguments)
TypeError: array cannot be safely cast to required type
}}}
My guess is that simply upcasting 'uint32' to a 'long' numexpr type would
be enough to implement the support.
Original issue reported on code.google.com by fal...@gmail.com on 17 Jun 2009 at 3:19
Original issue reported on code.google.com by
fal...@gmail.com
on 17 Jun 2009 at 3:19