diff options
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/src/multiarray/scalartypes.c.src | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/numpy/core/src/multiarray/scalartypes.c.src b/numpy/core/src/multiarray/scalartypes.c.src index fbe81abd4..e98805c1c 100644 --- a/numpy/core/src/multiarray/scalartypes.c.src +++ b/numpy/core/src/multiarray/scalartypes.c.src @@ -1625,6 +1625,12 @@ static PyMethodDef gentype_methods[] = { {"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}, |