[SciPy-user] Understanding numpy array operations

Evan Wilson bandtheory@rocketmail....
Tue Nov 4 14:59:51 CST 2008


I am a novice python/numpy user, using the language for computational physical science research.  I have been modifying scripts developed by another student who worked on the project before me.  However, I require a good understanding of what is actually happening in the code for when I go back to modify them.  I was wondering if anyone could tell me what the bit of code does:

= 5
= reshape(zeros(5*3*n), (n*n,3))*1.0
j in range(n):
    for i in range(n):
        A[i+n*j] = i*u + j*v

I understand there are some matrix operations happening but I cannot tell what they do.  I would appreciate any help you could offer.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/scipy-user/attachments/20081104/c895e578/attachment.html 

More information about the SciPy-user mailing list