MCPcopy Create free account
hub / github.com/numpy/numpy / array_copy

Function array_copy

numpy/core/src/multiarray/methods.c:1228–1242  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1226}
1227
1228static PyObject *
1229array_copy(PyArrayObject *self,
1230 PyObject *const *args, Py_ssize_t len_args, PyObject *kwnames)
1231{
1232 NPY_ORDER order = NPY_CORDER;
1233 NPY_PREPARE_ARGPARSER;
1234
1235 if (npy_parse_arguments("copy", args, len_args, kwnames,
1236 "|order", PyArray_OrderConverter, &order,
1237 NULL, NULL, NULL) < 0) {
1238 return NULL;
1239 }
1240
1241 return PyArray_NewCopy(self, order);
1242}
1243
1244/* Separate from array_copy to make __copy__ preserve Fortran contiguity. */
1245static PyObject *

Callers

nothing calls this directly

Calls 1

PyArray_NewCopyFunction · 0.85

Tested by

no test coverage detected