shunwang / numexpr

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

'uint32' is not supported #19

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
Fixed in r133.

Original comment by fal...@gmail.com on 22 Jun 2009 at 11:21