[Numpy-discussion] Problem with correlate

rob steed rjsteed at talk21.com
Sun May 31 13:54:48 EDT 2009


Hi,
After my previous email, I have opened a ticket #1117 (correlate not order dependent)

I have found that the correlate function is defined in multiarraymodule.c and
that inputs are being swapped using the following code

    n1 = ap1->dimensions[0];
    n2 = ap2->dimensions[0];
    if (n1 < n2) {
        ret = ap1;
        ap1 = ap2;
        ap2 = ret;
        ret = NULL;
        i = n1;
        n1 = n2;
        n2 = i;
    }

I do not know the code well enough to see whether this could just be removed (I don't know c either).
Maybe the algorithmn requires the inputs to be length ordered? I will try to work it out.


Regards

Rob



      



More information about the NumPy-Discussion mailing list