Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

timeit messing up

On our Sage server, the timeit stopped working. It did not work in 5.2 and it still does not work in 5.3. I even copied examples directly from a Sage reference page on timeit and it still doesn't work. Any ideas?

 timeit('2^10000')

or

 timeit.eval('2^10000')

result in:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_31.py", line 10, in <module>
    exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("dGltZWl0KCcyXjEwMDAwJyk="),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
  File "", line 1, in <module>

  File "/tmp/tmpbMe7hW/___code___.py", line 2, in <module>
    exec compile(u"timeit('2^10000')" + '\n', '', 'single')
  File "", line 1, in <module>

TypeError: 'module' object is not callable

On the other hand, the following works fine, but it gives very low precision so it isn't really helpful.

%time
2^10000

Any ideas???