[Numpy-discussion] Any idea to run the dot-product on many arrays

EMMEL Thomas Thomas.EMMEL at 3ds.com
Thu Jan 13 11:04:33 EST 2011


I need to rotate many vectors (x,y,z) with a given rotation matrix (3x3).
I can always do

for v in vectors:
    tv += np.dot(mat, v)

where mat is my fixed matrix (or array of arrays) and v is a single array.
Is there any efficient way to use an array of vectors to do the transfomation
for all of these vectors at once?

Kind regards


This email and any attachments are intended solely for the use of the individual or entity to whom it is addressed and may be confidential and/or privileged.  If you are not one of the named recipients or have received this email in error, (i) you should not read, disclose, or copy it, (ii) please notify sender of your receipt by reply email and delete this email and all attachments, (iii) Dassault Systemes does not accept or assume any liability or responsibility for any use of or reliance on this email.For other languages, go to http://www.3ds.com/terms/email-disclaimer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20110113/336abd9b/attachment.html>

More information about the NumPy-Discussion mailing list