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

Function PyArray_CopyAnyInto

numpy/core/src/multiarray/ctors.c:2760–2764  ·  view source on GitHub ↗

NUMPY_API * Copy an Array into another array -- memory must not overlap * Does not require src and dest to have "broadcastable" shapes * (only the same number of elements). * * TODO: For NumPy 2.0, this could accept an order parameter which * only allows NPY_CORDER and NPY_FORDER. Could also rename * this to CopyAsFlat to make the name more intuitive. * * Returns 0 on success

Source from the content-addressed store, hash-verified

2758 * Returns 0 on success, -1 on error.
2759 */
2760NPY_NO_EXPORT int
2761PyArray_CopyAnyInto(PyArrayObject *dst, PyArrayObject *src)
2762{
2763 return PyArray_CopyAsFlat(dst, src, NPY_CORDER);
2764}
2765
2766/*NUMPY_API
2767 * Copy an Array into another array.

Callers 3

PyArray_CastAnyToFunction · 0.85
iter_arrayFunction · 0.85

Calls 1

PyArray_CopyAsFlatFunction · 0.85

Tested by

no test coverage detected