Hello NG, sorry to bother you again with this question... I never used the "timeit" function, and I would like to ask you if the call I am doing is correct:
C:\Python23\Lib>python timeit.py -n 1000 -s "from Numeric import ones" -s "floa ts=ones((1000,1),'f')" -s "ints = floats.astype(int)" 1000 loops, best of 3: 0.0536 usec per loop I used Numeric module to create a 1000 floats matrix of ones, and it seems to me that is a lot faster than other solutions... but probably I am doing something wrong in my call to the timeit function... Thank you a lot. Andrea. -- http://mail.python.org/mailman/listinfo/python-list