I'd like to construct a sparse vector (say a unit vector in 100
dimensional space) by saying

a = vector(GF(2),100,dict([(22,1)]),sparse=True)

However, this gives the error message below.

This seems like a bug to me.

Victor




ValueError: incompatible degrees in vector constructor

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

  File "/tmp/tmpubMoJH/___code___.py", line 3, in <module>
    exec compile(u'a =
vector(GF(_sage_const_2 ),_sage_const_100 ,dict([(_sage_const_22 ,_sage_const_1 
)]),sparse=True)
  File "", line 1, in <module>

  File "free_module_element.pyx", line 277, in
sage.modules.free_module_element.vector (sage/modules/
free_module_element.c:2312)
ValueError: incompatible degrees in vector constructor


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

Reply via email to