[SciPy-User] Help of understanding C code in weave

Zheng Ruan zruan1991 at gmail.com
Wed Jan 28 23:04:54 EST 2015


Hi Scipy users,

I am trying to read code that uses scipy.weave and I don't understand some
of the code in C. To make it easy and clear, I'll just post the part that
confused me.

I have a numpy array (a) with a shape of (2, 623, 3, 333). And another
array numpy array (d) with a shape of (1, 623, 623).

In the C code part I have something like this:

code = """
...
c = *(a + b);
*(d+b) += 1;
...
"""

In the above code, b and c are float type in C. I just don't understand how
the c value are calculated and what does "*(d+b) += 1;" do.

The code is very old and I saw some deprecated warnings when I compile it.

Thank you so much and any hints are welcome!!!

Zheng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20150128/61c2c49b/attachment.html>


More information about the SciPy-User mailing list