set the dataptr from its current coordinates */
| 1590 | |
| 1591 | /* set the dataptr from its current coordinates */ |
| 1592 | static char* |
| 1593 | get_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) |