[Numpy-discussion] Iterative Matrix Multiplication

Friedrich Romstedt friedrichromstedt@gmail....
Sat Mar 6 03:42:37 CST 2010


2010/3/5 Ian Mallett <geometrian@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: 4104 bytes
Desc: not available
Url : http://mail.scipy.org/pipermail/numpy-discussion/attachments/20100306/4b8cb139/attachment.obj 


More information about the NumPy-Discussion mailing list