Use BoostNumpy's indexed_iterator template for indexed iterators.