[Numpy-svn] r8166 - trunk/numpy/core/src/multiarray

numpy-svn@scip... numpy-svn@scip...
Sat Feb 20 12:13:41 CST 2010


Author: ptvirtan
Date: 2010-02-20 12:13:40 -0600 (Sat, 20 Feb 2010)
New Revision: 8166

Modified:
   trunk/numpy/core/src/multiarray/scalartypes.c.src
Log:
3K: ENH: core: alias __round__ -> round for the generic scalar type, for the round() builtin

Modified: trunk/numpy/core/src/multiarray/scalartypes.c.src
===================================================================
--- trunk/numpy/core/src/multiarray/scalartypes.c.src	2010-02-20 18:13:23 UTC (rev 8165)
+++ trunk/numpy/core/src/multiarray/scalartypes.c.src	2010-02-20 18:13:40 UTC (rev 8166)
@@ -1625,6 +1625,12 @@
     {"round",
         (PyCFunction)gentype_round,
         METH_VARARGS | METH_KEYWORDS, NULL},
+#if defined(NPY_PY3K)
+    /* Hook for the round() builtin */
+    {"__round__",
+        (PyCFunction)gentype_round,
+        METH_VARARGS | METH_KEYWORDS, NULL},
+#endif
     {"setflags",
         (PyCFunction)gentype_setflags,
         METH_VARARGS | METH_KEYWORDS, NULL},



More information about the Numpy-svn mailing list