| 2885 | } |
| 2886 | |
| 2887 | NPY_NO_EXPORT npy_bool |
| 2888 | npyiter_has_writeback(NpyIter *iter) |
| 2889 | { |
| 2890 | int iop, nop; |
| 2891 | npyiter_opitflags *op_itflags; |
| 2892 | if (iter == NULL) { |
| 2893 | return 0; |
| 2894 | } |
| 2895 | nop = NIT_NOP(iter); |
| 2896 | op_itflags = NIT_OPITFLAGS(iter); |
| 2897 | |
| 2898 | for (iop=0; iop<nop; iop++) { |
| 2899 | if (op_itflags[iop] & NPY_OP_ITFLAG_HAS_WRITEBACK) { |
| 2900 | return NPY_TRUE; |
| 2901 | } |
| 2902 | } |
| 2903 | return NPY_FALSE; |
| 2904 | } |
| 2905 | #undef NPY_ITERATOR_IMPLEMENTATION_CODE |