diff options
author | cookedm <cookedm@localhost> | 2008-04-22 19:09:02 +0000 |
---|---|---|
committer | cookedm <cookedm@localhost> | 2008-04-22 19:09:02 +0000 |
commit | 0a6d8a6b0c44fcf58f126d060840d8a0baf7e240 (patch) | |
tree | 7af7807d35d22960faa9ecbe2e1733231672769a /numpy/core | |
parent | 487612c85b7d23c81798e1cf71d39ac223204fd4 (diff) | |
download | numpy-0a6d8a6b0c44fcf58f126d060840d8a0baf7e240.tar.gz |
generate_umath.py: move chartoname higher for documentation purposes
(i.e., make it easier to answer the question, "what's ? or M mean?")
Diffstat (limited to 'numpy/core')
-rw-r--r-- | numpy/core/code_generators/generate_umath.py | 44 |
1 files changed, 23 insertions, 21 deletions
diff --git a/numpy/core/code_generators/generate_umath.py b/numpy/core/code_generators/generate_umath.py index 6d0fccf40..98fc2ec06 100644 --- a/numpy/core/code_generators/generate_umath.py +++ b/numpy/core/code_generators/generate_umath.py @@ -101,6 +101,29 @@ class Ufunc(object): # output specification (optional) # ] +chartoname = {'?': 'bool', + 'b': 'byte', + 'B': 'ubyte', + 'h': 'short', + 'H': 'ushort', + 'i': 'int', + 'I': 'uint', + 'l': 'long', + 'L': 'ulong', + 'q': 'longlong', + 'Q': 'ulonglong', + 'f': 'float', + 'd': 'double', + 'g': 'longdouble', + 'F': 'cfloat', + 'D': 'cdouble', + 'G': 'clongdouble', + 'O': 'OBJECT', + # M is like O, but calls a method of the object instead + # of a function + 'M': 'OBJECT', + } + all = '?bBhHiIlLqQfdgFDGO' O = 'O' M = 'M' @@ -519,27 +542,6 @@ def indent(st,spaces): indented = re.sub(r' +$',r'',indented) return indented -chartoname = {'?': 'bool', - 'b': 'byte', - 'B': 'ubyte', - 'h': 'short', - 'H': 'ushort', - 'i': 'int', - 'I': 'uint', - 'l': 'long', - 'L': 'ulong', - 'q': 'longlong', - 'Q': 'ulonglong', - 'f': 'float', - 'd': 'double', - 'g': 'longdouble', - 'F': 'cfloat', - 'D': 'cdouble', - 'G': 'clongdouble', - 'O': 'OBJECT', - 'M': 'OBJECT', - } - chartotype1 = {'f': 'f_f', 'd': 'd_d', 'g': 'g_g', |