Sunday, 25 August 2013

What will be the optimized and fast way to generate 1 million random points in Python?

What will be the optimized and fast way to generate 1 million random
points in Python?

Basically I need over a million points on x-y plane. I am thinking about
first generating 1 million points in range -x to x, another million in
range y to -y and then coupling them together. What will be optimized and
fast way to do this? In random.randrange good enough?

No comments:

Post a Comment