finding most common elements between thousands of multiple arrays.

Steven D'Aprano steve at
Sat Jul 4 21:31:23 EDT 2009

On Sat, 04 Jul 2009 15:06:29 -0700, mclovin wrote:

> like I said I need to do this 480,000 times so to get this done
> realistically I need to analyse about 5 a second. It appears that the
> average matrix size contains about 15 million elements.

Have you considered recording the element counts as you construct the 
arrays? This will marginally increase the time it takes to build the 
array, but turn finding the most frequent elements into a very quick 


More information about the Python-list mailing list