To John:
Did you try larger arrays/tuples? I would guess that makes a significant
difference.
No I didn't, due to the fact that these values are coordinates in 3D (x,y,z).
In fact I work with a list/array/tuple of arrays with 10 to 1M of elements
or more.
What I need to do is to calculate
Hey,
On Mon, 2011-01-10 at 08:09 +, EMMEL Thomas wrote:
#~
def bruteForceSearch(points, point):
minpt = min([(vec2Norm(pt, point), pt, i)
for i, pt in enumerate(points)], key=itemgetter(0))
Hey back...
#~
~
~~~
def bruteForceSearch(points, point):
minpt = min([(vec2Norm(pt, point), pt, i)
for i, pt in enumerate(points)], key=itemgetter(0))
return sqrt(minpt[0]), minpt[1],
Hi,
On 01/10/2011 09:09 AM, EMMEL Thomas wrote:
No I didn't, due to the fact that these values are coordinates in 3D (x,y,z).
In fact I work with a list/array/tuple of arrays with 10 to 1M of
elements or more.
What I need to do is to calculate the distance of each of these elements
Hi,
Spatial hashes are the common solution.
Another common optimization is using the distance squared for
collision detection. Since you do not need the expensive sqrt for
this calc.
cu.
On Mon, Jan 10, 2011 at 3:25 PM, Pascal pascal...@parois.net wrote:
Hi,
On 01/10/2011 09:09 AM, EMMEL
Hi,
There are some discussions on the speed of numpy compared to Numeric in this
list, however I have a topic
I don't understand in detail, maybe someone can enlighten me...
I use python 2.6 on a SuSE installation and test this:
#Python 2.6 (r26:66714, Mar 30 2010, 00:29:28)
#[GCC 4.3.2
Did you try larger arrays/tuples? I would guess that makes a significant
difference.
On Fri, Jan 7, 2011 at 7:58 AM, EMMEL Thomas thomas.em...@3ds.com wrote:
Hi,
There are some discussions on the speed of numpy compared to Numeric in
this list, however I have a topic
I don't understand in
On Fri, Jan 7, 2011 at 9:58 AM, EMMEL Thomas thomas.em...@3ds.com wrote:
Hi,
There are some discussions on the speed of numpy compared to Numeric in
this list, however I have a topic
I don't understand in detail, maybe someone can enlighten me...
I use python 2.6 on a SuSE installation and