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

Function get_ptr_mirror

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

set the dataptr from its current coordinates */

Source from the content-addressed store, hash-verified

1645
1646/* set the dataptr from its current coordinates */
1647static char*
1648get_ptr_mirror(PyArrayIterObject* _iter, const npy_intp *coordinates)
1649{
1650 int i;
1651 npy_intp bd, _coordinates[NPY_MAXDIMS], lb;
1652 PyArrayNeighborhoodIterObject *niter = (PyArrayNeighborhoodIterObject*)_iter;
1653 PyArrayIterObject *p = niter->_internal_iter;
1654
1655 for(i = 0; i < niter->nd; ++i) {
1656 _INF_SET_PTR_MIRROR(i)
1657 }
1658
1659 return p->translate(p, _coordinates);
1660}
1661#undef _INF_SET_PTR_MIRROR
1662
1663/* compute l such as i = k * n + l, 0 <= l < |k| */

Callers

nothing calls this directly

Calls 1

translateMethod · 0.80

Tested by

no test coverage detected