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

Function NpyIter_New

numpy/core/src/multiarray/nditer_constr.c:540–552  ·  view source on GitHub ↗

NUMPY_API * Allocate a new iterator for one array object. */

Source from the content-addressed store, hash-verified

538 * Allocate a new iterator for one array object.
539 */
540NPY_NO_EXPORT NpyIter *
541NpyIter_New(PyArrayObject *op, npy_uint32 flags,
542 NPY_ORDER order, NPY_CASTING casting,
543 PyArray_Descr* dtype)
544{
545 /* Split the flags into separate global and op flags */
546 npy_uint32 op_flags = flags & NPY_ITER_PER_OP_FLAGS;
547 flags &= NPY_ITER_GLOBAL_FLAGS;
548
549 return NpyIter_AdvancedNew(1, &op, flags, order, casting,
550 &op_flags, &dtype,
551 -1, NULL, NULL, 0);
552}
553
554/*NUMPY_API
555 * Makes a copy of the iterator

Callers 7

array_deepcopyFunction · 0.85
PyArray_CopyAsFlatFunction · 0.85
PyArray_CountNonzeroFunction · 0.85
PyArray_NonzeroFunction · 0.85
arr_unravel_indexFunction · 0.85

Calls 1

NpyIter_AdvancedNewFunction · 0.85

Tested by

no test coverage detected