On 2013-04-17, Michael Welsh <yom...@yomcat.geek.nz> wrote:
> I have some GF(2) matrices that are incidence matrices of undirected graphs. 
> When I try to construct the graphs in sage, this happens:
>
> sage: Graph(matrix(GF(2), [[1,0,1,1],[1,1,0,1],[0,1,1,0]]))

it's not even clear what two parallel edges should lead to. Should they
"cancel" each other?

> ---------------------------------------------------------------------------
> ValueError                                Traceback (most recent call last)
><ipython-input-1-cf6c24cef566> in <module>()
> ----> 1 Graph(matrix(GF(Integer(2)), 
> [[Integer(1),Integer(0),Integer(1),Integer(1)],[Integer(1),Integer(1),Integer(0),Integer(1)],[Integer(0),Integer(1),Integer(1),Integer(0)]]))
>
> /Applications/sage/local/lib/python2.7/site-packages/sage/graphs/graph.pyc in 
> __init__(self, data, pos, loops, format, boundary, weighted, implementation, 
> sparse, vertex_labels, name, multiedges, convert_empty_dict_labels_to_None)
>    1288                     multiedges = (  len(uniq(positions)) < total  )
>    1289             except AssertionError:
> -> 1290                 raise ValueError(msg)
>    1291             num_verts = data.nrows()
>    1292         elif format == 'Graph':
>
> ValueError: Non-symmetric or non-square matrix assumed to be an incidence 
> matrix: Each column represents an edge: -1 goes to 1.
> sage: 
>
> Is there a way around this, apart from manually changing each column so that 
> it has a -1 in it?
>
> Michael
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to