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

Function get_ptr_constant

numpy/core/src/multiarray/iterators.c:1592–1605  ·  view source on GitHub ↗

set the dataptr from its current coordinates */

Source from the content-addressed store, hash-verified

1590
1591/* set the dataptr from its current coordinates */
1592static char*
1593get_ptr_constant(PyArrayIterObject* _iter, const npy_intp *coordinates)
1594{
1595 int i;
1596 npy_intp bd, _coordinates[NPY_MAXDIMS];
1597 PyArrayNeighborhoodIterObject *niter = (PyArrayNeighborhoodIterObject*)_iter;
1598 PyArrayIterObject *p = niter->_internal_iter;
1599
1600 for(i = 0; i < niter->nd; ++i) {
1601 _INF_SET_PTR(i)
1602 }
1603
1604 return p->translate(p, _coordinates);
1605}
1606#undef _INF_SET_PTR
1607
1608#define _NPY_IS_EVEN(x) ((x) % 2 == 0)

Callers

nothing calls this directly

Calls 1

translateMethod · 0.80

Tested by

no test coverage detected