Forum: Poser Python Scripting


Subject: Faster operation on a list of vectors?

damir_prebeg opened this issue on Jan 17, 2007 · 5 posts


damir_prebeg posted Wed, 17 January 2007 at 1:29 AM

Hi there. I have 2 lists with 30000 and 20000 elements. Every element in 1st list named myVectors looks like this [x,y,z], in second list named newVectors every element looks like this [index,[x,y,z]]. Is there a more efficient (faster) way to do this:

for vec in newVectors:
    **myVectors[vec[0]] = vec[1]

**This is too slow and it takes ages to process all 20000 elements.