Neal Becker wrote:
> I need a function that is the inverse of PyArray_ITER_GOTO1D. A bit of
> guesswork brought me to this, can anyone please tell me if it looks
> correct?
>
> inline npy_intp as_linear (PyArrayIterObject const* it) {
> if (it->nd_m1 == 0)
> return (it->dataptr - it->ao->d
I need a function that is the inverse of PyArray_ITER_GOTO1D. A bit of
guesswork brought me to this, can anyone please tell me if it looks
correct?
inline npy_intp as_linear (PyArrayIterObject const* it) {
if (it->nd_m1 == 0)
return (it->dataptr - it->ao->data)/it->strides[0];
else if (it