I have a problem in that I have a DLL function which accepts several numpy
double arrays, but you need to pass a NULL pointer for the ones from which
you do not require results. The prototype is as follows:
T_ndDp = numpy.ctypeslib.ndpointer(dtype=float, ndim=1,
flags='C_CONTIGUOUS')
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?
On Wed, 26 Dec 2007, Mathew Yeates apparently wrote:
r1=[dog,cat]
r2=[1,2]
I want to return [[dog,1],[dog,2],[cat,1],[cat,2]]
This is a Cartesian product.
Sage has ``cartesian_product_iterator`` for this.
Also
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?