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?
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
http://www.sagemath.org/doc/html/ref/module-sage.combinat.carte
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 numpybook, in discussing iterators, it says that if you know your array
is contiguous, it may be faster to just use C-style pointers instead of
iterators.
Looking at the code a little, it appears that PyArray_ITER_NEXT(it) attempts
to optimize for certain cases. I wonder if anyone has done any
On Sat, 29 Dec 2007, "Travis E. Oliphant" apparently wrote:
> they make it so that the documentation standard for SciPy
> and NumPy is not different from the ETS standard
1. Is the Enthought Tool Suite standard published?
2. I think it miscasts things to say that the previous
standard was buil
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')
Prototype_exa