[Numpy-discussion] Iterative Matrix Multiplication

Friedrich Romstedt friedrichromstedt at gmail.com
Sat Mar 6 04:42:37 EST 2010


2010/3/5 Ian Mallett <geometrian at gmail.com>:
> #takes 0.04 seconds
> inner = np.inner(ns, v1s - some_point)

Ok, I don't know why I was able to overlook this:

dotprod = (ns * (v1s - some_point)).sum(axis = 1)

The things with the inner product have been deleted.

Now I will really *attach* it ...

Hope it's faster,
Friedrich
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shading.py
Type: application/octet-stream
Size: 4105 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20100306/4b8cb139/attachment.obj>


More information about the NumPy-Discussion mailing list