list to array is slow

July 22, 2010
9:09 p.m.
Hi, any idea why the simple code below is so slow ? import numpy as n from time import time as t dims = (640,480) m = n.random.random( dims ) l=[] for i in range(200): l.append(m) t0=t() b=n.array(l) print t()-t0 To convert the list into an array takes about 5 sec ... Thanks, marco

5419
Age (days ago)
5419
Last active (days ago)
2 comments
3 participants
participants (3)
-
Ian Mallett
-
marco cammarata
-
Skipper Seabold