Hi all, According to Travis' advice in a prevoius thread (see http://www.mail-archive.com/numpy-discussion%40scipy.org/msg00442.html), I have modified the ``compiler.getType()`` function in Numexpr so that it uses the ``dtype.kind`` attribute instead of ``issubclass()``. The patch is attached.
By the way, what is the proper casing of "Numexpr"? :)
::
Ivan Vilata i Balaguer >qo< http://www.carabos.com/
Cárabos Coop. V. V V Enjoy Data
""
Index: compiler.py
===================================================================
--- compiler.py (revision 2465)
+++ compiler.py (working copy)
@@ -554,14 +554,14 @@
def getType(a):
- t = a.dtype.type
- if issubclass(t, numpy.bool_):
+ kind = a.dtype.kind
+ if kind == 'b':
return bool
- if issubclass(t, numpy.integer):
+ if kind in 'iu':
return int
- if issubclass(t, numpy.floating):
+ if kind == 'f':
return float
- if issubclass(t, numpy.complexfloating):
+ if kind == 'c':
return complex
raise ValueError("unkown type %s" % a.dtype.name)
signature.asc
Description: Digital signature
_______________________________________________ Numpy-discussion mailing list [email protected] http://projects.scipy.org/mailman/listinfo/numpy-discussion
