Re: [Numpy-discussion] Fwd: Advanced selection, duplicate indices, and augmented assignment

2007-01-07 Thread Sean R. Lynch
Travis Oliphant wrote: > I don't think we could make it work as he expects (and not radically > change NumPy itself so that other operations are very different) because > of the limitations of Python. > > The point was that it is too complicated to do any differently (and is > probably impossi

[Numpy-discussion] Advanced selection, duplicate indices, and augmented assignment

2007-01-06 Thread Sean R. Lynch
I have an array of vertices and an array of indices that make a list of triangles. I'd like to calculate the normals for each vertex as a (pseudo-)average of the normals of each triangle that contains it, so I get smooth lighting in OpenGL. I'd also like to avoid looping in Python because the verte