summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2017-08-25 15:21:29 -0600
committerCharles Harris <charlesr.harris@gmail.com>2017-08-25 15:21:29 -0600
commit6958820f930c29c07c3484dacbd1d84f5c9ddc38 (patch)
treeee21889520e8796322f850be79bb6b4e0d080eb3 /numpy
parent1e3f1ed59c81ea63ae9660b990e95a77fc8c9747 (diff)
downloadnumpy-6958820f930c29c07c3484dacbd1d84f5c9ddc38.tar.gz
MAINT: Different fix for scalartypes.c.src `__copy__` method.
Create a new function `scalartype.c.src:gentype___copy__` that does not take keyword arguments. This is done by adding `__copy__` to the same code generator loop that generates `gentype___deepcopy__`.
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/src/multiarray/scalartypes.c.src6
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/core/src/multiarray/scalartypes.c.src b/numpy/core/src/multiarray/scalartypes.c.src
index 2882a4360..5618e2d19 100644
--- a/numpy/core/src/multiarray/scalartypes.c.src
+++ b/numpy/core/src/multiarray/scalartypes.c.src
@@ -1529,7 +1529,7 @@ gentype_wraparray(PyObject *NPY_UNUSED(scalar), PyObject *args)
*/
/**begin repeat
*
- * #name = tolist, item, __deepcopy__,
+ * #name = tolist, item, __deepcopy__, __copy__,
* swapaxes, conj, conjugate, nonzero,
* fill, transpose, newbyteorder#
*/
@@ -1913,8 +1913,8 @@ static PyMethodDef gentype_methods[] = {
/* for the copy module */
{"__copy__",
- (PyCFunction)gentype_copy,
- METH_VARARGS | METH_KEYWORDS, NULL},
+ (PyCFunction)gentype___copy__,
+ METH_VARARGS, NULL},
{"__deepcopy__",
(PyCFunction)gentype___deepcopy__,
METH_VARARGS, NULL},