From: Pierre GM <pgm...@gm...> - 2006-11-14 23:47:56
|
John, I just added the following to your example: =2E.................................. tnow =3D time.time() y =3D numpy.fromiter((tuple(i) for i in x), dtype=3D[('a',numpy.float_), ('= b',=20 numpy.float_)]) tdone =3D time.time() print 'Numpy.fromiter %1.2f elapsed seconds'%(tdone - tnow) =2E.................................. Here are my results with dtype: 4.43 elapsed seconds w/o dtype 5.78 elapsed seconds Numeric =A01.17 elapsed seconds Numpy.fromiter 0.62 elapsed seconds 23.7 1.0 Numpy, one point. |