[Numpy-svn] r5064 - trunk/numpy/core/code_generators
numpy-svn at scipy.org
numpy-svn at scipy.org
Tue Apr 22 15:09:08 EDT 2008
Author: cookedm
Date: 2008-04-22 14:09:02 -0500 (Tue, 22 Apr 2008)
New Revision: 5064
Modified:
trunk/numpy/core/code_generators/generate_umath.py
Log:
generate_umath.py: move chartoname higher for documentation purposes
(i.e., make it easier to answer the question, "what's ? or M mean?")
Modified: trunk/numpy/core/code_generators/generate_umath.py
===================================================================
--- trunk/numpy/core/code_generators/generate_umath.py 2008-04-22 03:50:35 UTC (rev 5063)
+++ trunk/numpy/core/code_generators/generate_umath.py 2008-04-22 19:09:02 UTC (rev 5064)
@@ -101,6 +101,29 @@
# 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 @@
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',
More information about the Numpy-svn
mailing list