set the dataptr from its current coordinates */
| 1645 | |
| 1646 | /* set the dataptr from its current coordinates */ |
| 1647 | static char* |
| 1648 | get_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| */ |