timeit messing up

asked 2012-10-15 12:23:57 +0200

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?




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.


Any ideas???

edit retag flag offensive close merge delete


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 ( 2012-10-15 23:51:46 +0200 )edit