From eeae3c55591139ee2e7907d43a0ef8bbecaeafed Mon Sep 17 00:00:00 2001 From: Licht Takeuchi Date: Thu, 10 Aug 2017 08:38:15 +0900 Subject: BUG: Fix scalar-flatten so that it can receive keyword arguments --- numpy/core/src/multiarray/scalartypes.c.src | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/numpy/core/src/multiarray/scalartypes.c.src b/numpy/core/src/multiarray/scalartypes.c.src index 56e75dcd9..33ede5ad2 100644 --- a/numpy/core/src/multiarray/scalartypes.c.src +++ b/numpy/core/src/multiarray/scalartypes.c.src @@ -1530,7 +1530,7 @@ gentype_wraparray(PyObject *NPY_UNUSED(scalar), PyObject *args) /**begin repeat * * #name = tolist, item, __deepcopy__, - * swapaxes, conj, conjugate, nonzero, flatten, + * swapaxes, conj, conjugate, nonzero, * ravel, fill, transpose, newbyteorder# */ static PyObject * @@ -1609,7 +1609,8 @@ gentype_byteswap(PyObject *self, PyObject *args, PyObject *kwds) * #name = take, getfield, put, repeat, tofile, mean, trace, diagonal, clip, * std, var, sum, cumsum, prod, cumprod, compress, sort, argsort, * round, argmax, argmin, max, min, ptp, any, all, astype, resize, - * reshape, choose, tostring, tobytes, copy, searchsorted, view# + * reshape, choose, tostring, tobytes, copy, searchsorted, view, + * flatten# */ static PyObject * gentype_@name@(PyObject *self, PyObject *args, PyObject *kwds) @@ -2038,7 +2039,7 @@ static PyMethodDef gentype_methods[] = { METH_VARARGS | METH_KEYWORDS, NULL}, {"flatten", (PyCFunction)gentype_flatten, - METH_VARARGS, NULL}, + METH_VARARGS | METH_KEYWORDS, NULL}, {"ravel", (PyCFunction)gentype_ravel, METH_VARARGS, NULL}, -- cgit v1.2.1