timeit messing up

asked 12 years ago

G-Sage gravatar image

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???

Preview: (hide)

Comments

That's strange. The commands work perfectly fine for me. Must be something about the local state of your installation (or machine).

benjaminfjones gravatar imagebenjaminfjones ( 12 years ago )