diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2017-08-13 13:02:30 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-13 13:02:30 -0700 |
commit | a13c066969212ed6c9e84b92eacfa77b802d99c4 (patch) | |
tree | 6522d4ceb0ebfd66b832fb04ae71877d7a882062 /numpy | |
parent | 965890dc6035f4f400f304ea5e990a88de127eb7 (diff) | |
parent | 3adf80ea81e605bbc6e021e0f741d2e6cd58cd74 (diff) | |
download | numpy-a13c066969212ed6c9e84b92eacfa77b802d99c4.tar.gz |
Merge pull request #9527 from Licht-T/fix-scalar-astype
BUG: Fix scalar methods to receive keyword arguments
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/src/multiarray/scalartypes.c.src | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/numpy/core/src/multiarray/scalartypes.c.src b/numpy/core/src/multiarray/scalartypes.c.src index e68d5b9b0..26a445529 100644 --- a/numpy/core/src/multiarray/scalartypes.c.src +++ b/numpy/core/src/multiarray/scalartypes.c.src @@ -1529,9 +1529,9 @@ gentype_wraparray(PyObject *NPY_UNUSED(scalar), PyObject *args) */ /**begin repeat * - * #name = tolist, item, tostring, tobytes, astype, copy, __deepcopy__, - * searchsorted, view, swapaxes, conj, conjugate, nonzero, flatten, - * ravel, fill, transpose, newbyteorder# + * #name = tolist, item, __deepcopy__, + * swapaxes, conj, conjugate, nonzero, + * fill, transpose, newbyteorder# */ static PyObject * gentype_@name@(PyObject *self, PyObject *args) @@ -1608,8 +1608,9 @@ 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, resize, reshape, - * choose# + * round, argmax, argmin, max, min, ptp, any, all, astype, resize, + * reshape, choose, tostring, tobytes, copy, searchsorted, view, + * flatten, ravel# */ static PyObject * gentype_@name@(PyObject *self, PyObject *args, PyObject *kwds) @@ -1873,19 +1874,19 @@ static PyMethodDef gentype_methods[] = { METH_VARARGS, NULL}, {"tobytes", (PyCFunction)gentype_tobytes, - METH_VARARGS, NULL}, + METH_VARARGS | METH_KEYWORDS, NULL}, {"tofile", (PyCFunction)gentype_tofile, METH_VARARGS | METH_KEYWORDS, NULL}, {"tostring", (PyCFunction)gentype_tostring, - METH_VARARGS, NULL}, + METH_VARARGS | METH_KEYWORDS, NULL}, {"byteswap", (PyCFunction)gentype_byteswap, METH_VARARGS | METH_KEYWORDS, NULL}, {"astype", (PyCFunction)gentype_astype, - METH_VARARGS, NULL}, + METH_VARARGS | METH_KEYWORDS, NULL}, {"getfield", (PyCFunction)gentype_getfield, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -1894,7 +1895,7 @@ static PyMethodDef gentype_methods[] = { METH_VARARGS | METH_KEYWORDS, NULL}, {"copy", (PyCFunction)gentype_copy, - METH_VARARGS, NULL}, + METH_VARARGS | METH_KEYWORDS, NULL}, {"resize", (PyCFunction)gentype_resize, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -1960,7 +1961,7 @@ static PyMethodDef gentype_methods[] = { METH_VARARGS | METH_KEYWORDS, NULL}, {"searchsorted", (PyCFunction)gentype_searchsorted, - METH_VARARGS, NULL}, + METH_VARARGS | METH_KEYWORDS, NULL}, {"argmax", (PyCFunction)gentype_argmax, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -1975,7 +1976,7 @@ static PyMethodDef gentype_methods[] = { METH_VARARGS, NULL}, {"view", (PyCFunction)gentype_view, - METH_VARARGS, NULL}, + METH_VARARGS | METH_KEYWORDS, NULL}, {"swapaxes", (PyCFunction)gentype_swapaxes, METH_VARARGS, NULL}, @@ -2038,10 +2039,10 @@ 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}, + METH_VARARGS | METH_KEYWORDS, NULL}, {"round", (PyCFunction)gentype_round, METH_VARARGS | METH_KEYWORDS, NULL}, |