Hello,
I play with the famous timeit function.
I don't understand if this function sends a result or only gives a
displayed text.
I test :
timeit ('2+3') # In these 2 cases Sage displays
625 loops...
res=timeit ('2+3) # the res variable contains <None>.
The result is displayed.
type(res)
timeit.eval ('2+3') # In these cases, Sage sends an
object with field stats.
res=timeit.eval('2+3') # there is no displayed result.
res.stats # is a tuple.
I don't understand what are really timeit (string) and timeit.eval(string).
Can I assume that %timeit string is an other syntax for timeit (string) ?
Many thanks for any helps...
Francois (in France)
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org