Ask Your Question
0

Not able to relabel a Cartan type in the notebook

asked 2012-10-02 17:51:23 +0100

Jesustc gravatar image

In the shell:

sage: A3 = CartanType("A3")
sage: A3.relabel({1:2,2:3,3:1})
['A', 3] relabelled by {1: 2, 2: 3, 3: 1}

But in the notebook:

In:

A3 = CartanType("A3")
A3.relabel({1:2,2:3,3:1})

Out:

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

  File "/tmp/tmpWUCLyz/___code___.py", line 4, in <module>
exec compile(u'A3.relabel({_sage_const_1 :_sage_const_2 ,_sage_const_2 :_sage_const_3 ,_sage_const_3 :_sage_const_1 })
  File "", line 1, in <module>

  File "/usr/lib/sage/local/lib/python2.7/site-packages/sage/combinat/root_system/cartan_type.py", line 795, in relabel
import type_relabel
  File "/usr/lib/sage/local/lib/python2.7/site-packages/sage/combinat/root_system/type_relabel.py", line 278, in <module>
class CartanType_affine(sage.combinat.root_system.cartan_type.CartanType_affine):
AttributeError: 'module' object has no attribute 'cartan_type'

Strange, isn't it?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2012-10-02 23:27:42 +0100

benjaminfjones gravatar image

I just tried this on sagenb.org (which runs sage-5.3 right now) and it works perfectly fine. Perhaps you have some other cells in the worksheet that have affected the state of the running session? Are the notebook and terminal sessions running the same version of Sage?

edit flag offensive delete link more

Comments

It does indeed in 5.3. I am using 5.1 (the latest Ubuntu PPA version). I made sure that this is the version both in the shell and the notebook, and started with a clean session. I guess I will have to install 5.3, or wait until the PPA get's updated. Thanks!

Jesustc gravatar imageJesustc ( 2012-10-03 05:36:43 +0100 )edit

Should we delete the question, since it does not seem useful for anyone?

Jesustc gravatar imageJesustc ( 2012-10-03 05:38:47 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-10-02 17:51:23 +0100

Seen: 292 times

Last updated: Oct 02 '12