Skip to content

Commit ff15dcb

Browse files
committed
[gviz] fix bug
- Now shape(n, m) is completed to shape(n, n), where n > m (to be interpreted as an adjacency matrix)
1 parent f865336 commit ff15dcb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

python/pycubool/gviz.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ def matrix_data_to_gviz(shape, rows, cols, **kwargs):
1010
label = "" if _label is None else _label
1111
base_vertex = 0 if _base_vertex is None else _base_vertex
1212

13-
n = shape[0]
14-
m = shape[1]
13+
n = max(shape[0], shape[1])
1514

1615
if not (graph_name is None):
1716
result += f'graph [label={graph_name}];\n'

0 commit comments

Comments
 (0)