array from list of lists

Tim Hochberg tim.hochberg at
Mon Nov 13 11:45:55 CST 2006

Tim Hochberg wrote:
> [SNIP]
> Just for completeness, I benchmarked the fromiter and map(tuple, 
> results)  solutions as well. Map is fastest, followed by fromiter, list 
> comprehension and then fromrecords. The differences are pretty minor 
> however, so I'd stick with whatever seems clearest.
> -tim
Here's one more approach that's marginally faster than the map based 
solution and also won't chew up an extra memory since it's based on from 

numpy.fromiter(itertools.imap(tuple, results), dtype=mydescriptor, 



Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo

More information about the Numpy-discussion mailing list