random access iterators
Dec. 30, 2007
4:23 p.m.
I'm looking at writing some c++ code to interoperate with numpy. A c++ random access iterator must include a 'distance' function. distance (i1, i2) must return the number of times i1 has to be incremented to reach i2. Is there a way to get this from PyArrayIterObject?
December 2007
11:35 p.m.
Neal Becker wrote:
I'm looking at writing some c++ code to interoperate with numpy. A c++ random access iterator must include a 'distance' function. distance (i1, i2) must return the number of times i1 has to be incremented to reach i2.
Is there a way to get this from PyArrayIterObject?
In the general case, not directly. However, you may be able to figure something out using the "coordinate" array that is stored with each iterator. -Travis O.
6708
Age (days ago)
6708
Last active (days ago)
1 comments
2 participants
participants (2)
-
Neal Becker -
Travis E. Oliphant