graph-tool issueshttps://git.skewed.de/count0/graph-tool/-/issues2020-09-15T13:17:52Zhttps://git.skewed.de/count0/graph-tool/-/issues/678NestedBlockState with base_state=OverlapBlockState array broadcasting error2020-09-15T13:17:52ZDan SpragueNestedBlockState with base_state=OverlapBlockState array broadcasting errorThis is reproducible on Ubuntu even with provided test data. Here is the code:
```python
g = gt.collection.data["celegansneural"]
state= NestedBlockState(g,base_type=OverlapBlockState)
```
Yields the traceback:
```
------------------...This is reproducible on Ubuntu even with provided test data. Here is the code:
```python
g = gt.collection.data["celegansneural"]
state= NestedBlockState(g,base_type=OverlapBlockState)
```
Yields the traceback:
```
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-85-aaf1edba7efe> in <module>
----> 1 NestedBlockState(g,base_type=OverlapBlockState)
~/anaconda3/envs/gt/lib/python3.8/site-packages/graph_tool/inference/nested_blockmodel.py in __init__(self, g, bs, base_type, state_args, hstate_args, hentropy_args, sampling, **kwargs)
102 recs_dl=False,
103 beta_dl=1.)
--> 104 self.levels = [base_type(g, b=bs[0], **self.state_args)]
105 for i, b in enumerate(bs[1:]):
106 state = self.levels[-1]
~/anaconda3/envs/gt/lib/python3.8/site-packages/graph_tool/inference/overlap_blockmodel.py in __init__(self, g, b, B, recs, rec_types, rec_params, clabel, pclabel, deg_corr, dense_bg, **kwargs)
109 # substitute provided graph by its half-edge graph
110 g, b, node_index, half_edges, eindex, rec = \
--> 111 half_edge_graph(g, b, B, rec)
112
113 if len(recs) > 0:
~/anaconda3/envs/gt/lib/python3.8/site-packages/graph_tool/inference/overlap_blockmodel.py in half_edge_graph(g, b, B, rec)
798
799 if b_array is not None:
--> 800 be.a = b_array
801
802 if rec is None:
~/anaconda3/envs/gt/lib/python3.8/site-packages/graph_tool/__init__.py in __set_array(self, v)
486 raise TypeError("cannot set property map values from array for" +
487 " property map of type: " + self.value_type())
--> 488 a[:] = v
489
490 a = property(get_array, __set_array,
ValueError: could not broadcast input array from shape (594) into shape (4718)
```https://git.skewed.de/count0/graph-tool/-/issues/450Dot parser fails on graph attributes2020-08-18T06:24:50ZAlexander UstimenkoDot parser fails on graph attributes# Bug reports:
On latest docker repeats, repeats under python 2/3. Seems issue inside cpp.
To repeat:
## Fails
```
echo 'digraph Wtf {graph[layout="dot"]}' | python -c 'import sys; import graph_tool.all as gt; g = gt.load_graph(sys.s...# Bug reports:
On latest docker repeats, repeats under python 2/3. Seems issue inside cpp.
To repeat:
## Fails
```
echo 'digraph Wtf {graph[layout="dot"]}' | python -c 'import sys; import graph_tool.all as gt; g = gt.load_graph(sys.stdin, fmt="dot");'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/graph_tool/__init__.py", line 2936, in load_graph
g.load(file_name, fmt, ignore_vp, ignore_ep, ignore_gp)
File "/usr/lib/python2.7/dist-packages/graph_tool/__init__.py", line 2485, in load
ignore_vp, ignore_ep, ignore_gp)
RuntimeError: boost::bad_any_cast: failed conversion using boost::any_cast
```
## Works
```
echo 'digraph Wtf {graph[]}' | python -c 'import sys; import graph_tool.all as gt; g = gt.load_graph(sys.stdin, fmt="dot");'
```https://git.skewed.de/count0/graph-tool/-/issues/597Graphviz_draw core dumping when using HTML labels2020-08-18T06:13:51ZJoe MichaelsGraphviz_draw core dumping when using HTML labels# Bug report:
- [X] Are you running the latest `graph-tool` version?
- [ ] Do you observe the problem with the current git version?
- [ ] Are you using Macports or Homebrew? If yes, please submit an issue there instead: https://github.co...# Bug report:
- [X] Are you running the latest `graph-tool` version?
- [ ] Do you observe the problem with the current git version?
- [ ] Are you using Macports or Homebrew? If yes, please submit an issue there instead: https://github.com/Homebrew/brew/issues and https://trac.macports.org/newticket
- [ ] Did you compile `graph-tool` manually?
- [ ] If you answered yes above, did you use the exact same compiler to build `graph-tool`, `boost-python` and `Python`?
When using `graphviz_draw()` with an HTML vertex label, it core dumps. The `graphviz_draw()` works without issues otherwise. I tracked the issue to the `agstrdup_html()` function call (https://git.skewed.de/count0/graph-tool/blob/master/src/graph_tool/draw/graphviz_draw.py#L97).
I am currently using Ubuntu 18.04, Python 3.6 (default), graph-tool 2.28 installed from apt from this repository: http://downloads.skewed.de/apt/bionic.
```
from graph_tool.all import *
g = Graph()
g.add_vertex(2)
g.add_edge(0, 1)
graphviz_draw(g, vprops={'label': '<x>' })
```
I would expect both vertices to have the same label `x`. If I remove the enclosing < >, it works. However, when enclosed with < >, to specify an HTML label, it core dumps - regardless if I place actual HTML tags or not.https://git.skewed.de/count0/graph-tool/-/issues/677Trouble building C++ version of Graph Tool using CMake.2020-08-07T07:08:36ZAnthony LiotTrouble building C++ version of Graph Tool using CMake.Hello, I would like to use graph-tool directly in C++ (Only)
My System is using CMake and I decide to try to build graph tool with that. Because the Makefile are really clean its really easy to use CMake to build graph tool, here for ex...Hello, I would like to use graph-tool directly in C++ (Only)
My System is using CMake and I decide to try to build graph tool with that. Because the Makefile are really clean its really easy to use CMake to build graph tool, here for example how I am mimicking the makefile for centrality
```
SET(NAME centrality)
SET(${NAME}_SOURCES
graph_betweenness.cc
graph_centrality_bind.cc
graph_closeness.cc
graph_eigentrust.cc
graph_eigenvector.cc
graph_hits.cc
graph_katz.cc
graph_pagerank.cc
graph_trust_transitivity.cc
)
SET(${NAME}_HEADERS
graph_closeness.hh
graph_eigentrust.hh
graph_eigenvector.hh
graph_pagerank.hh
graph_hits.hh
graph_katz.hh
graph_trust_transitivity.hh
minmax.hh
)
SET(${NAME}_DIR ${CMAKE_CURRENT_SOURCE_DIR}/${NAME})
SET(${NAME}_INCLUDEDIR ${CMAKE_CURRENT_SOURCE_DIR}/include/${NAME})
ADD_LIBRARY(${NAME} OBJECT ${${NAME}_SOURCES} ${${NAME}_HEADERS})
TARGET_INCLUDE_DIRECTORIES(${NAME} PRIVATE ${GRAPHTOOL_INCLUDEDIR})
TARGET_INCLUDE_DIRECTORIES(${NAME} INTERFACE ${${NAME}_INCLUDEDIR})
```
So far almost everything is good, but when come the dynamic library I have some issue for linking.
I also build my own boost with the latest version 1.73
Unfortunately I have this kind of error :
```
Undefined symbols for architecture x86_64:
"graph_tool::ActionNotFound::ActionNotFound(std::type_info const&, std::__1::vector<std::type_info const*, std::__1::allocator<std::type_info const*> > const&)", referenced from:
void graph_tool::detail::action_dispatch<std::__1::__bind<graph_tool::find_vertices, std::__1::placeholders::__ph<1> const&, std::__1::reference_wrapper<graph_tool::GraphInterface>, std::__1::placeholders::__ph<2> const&, std::__1::reference_wrapper<boost::python::tuple>, std::__1::reference_wrapper<boost::python::list> >, mpl_::bool_<false>, graph_tool::detail::all_graph_views, graph_tool::all_selectors>::operator()<boost::any, boost::any&>(boost::any&&, boost::any&) const in graph_search.cc.o
void graph_tool::detail::action_dispatch<std::__1::__bind<graph_tool::find_edges, std::__1::placeholders::__ph<1> const&, std::__1::reference_wrapper<graph_tool::GraphInterface>, boost::adj_edge_index_property_map<unsigned long>&, std::__1::placeholders::__ph<2> const&, std::__1::reference_wrapper<boost::python::tuple>, std::__1::reference_wrapper<boost::python::list> >, mpl_::bool_<false>, graph_tool::detail::all_graph_views, boost::mpl::v_item<boost::adj_edge_index_property_map<unsigned long>, boost::mpl::v_item<boost::checked_vector_property_map<boost::python::api::object, boost::adj_edge_index_property_map<unsigned long> >, boost::mpl::v_item<boost::checked_vector_property_map<std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, boost::adj_edge_index_property_map<unsigned long> >, boost::mpl::v_item<boost::checked_vector_property_map<std::__1::vector<long double, std::__1::allocator<long double> >, boost::adj_edge_index_property_map<unsigned long> >, boost::mpl::v_item<boost::checked_vector_property_map<std::__1::vector<double, std::__1::allocator<double> >, boost::adj_edge_index_property_map<unsigned long> >, boost::mpl::v_item<boost::checked_vector_property_map<std::__1::vector<long long, std::__1::allocator<long long> >, boost::adj_edge_index_property_map<unsigned long> >, boost::mpl::v_item<boost::checked_vector_property_map<std::__1::vector<int, std::__1::allocator<int> >, boost::adj_edge_index_property_map<unsigned long> >, boost::mpl::v_item<boost::checked_vector_property_map<std::__1::vector<short, std::__1::allocator<short> >, boost::adj_edge_index_property_map<unsigned long> >, boost::mpl::v_item<boost::checked_vector_property_map<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >, boost::adj_edge_index_property_map<unsigned long> >, boost::mpl::v_item<boost::checked_vector_property_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, boost::adj_edge_index_property_map<unsigned long> >, boost::mpl::v_item<boost::checked_vector_property_map<long double, boost::adj_edge_index_property_map<unsigned long> >, boost::mpl::v_item<boost::checked_vector_property_map<double, boost::adj_edge_index_property_map<unsigned long> >, boost::mpl::v_item<boost::checked_vector_property_map<long long, boost::adj_edge_index_property_map<unsigned long> >, boost::mpl::v_item<boost::checked_vector_property_map<int, boost::adj_edge_index_property_map<unsigned long> >, boost::mpl::v_item<boost::checked_vector_property_map<short, boost::adj_edge_index_property_map<unsigned long> >, boost::mpl::v_item<boost::checked_vector_property_map<unsigned char, boost::adj_edge_index_property_map<unsigned long> >, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, 0>, 0>, 0>, 0>, 0>, 0>, 0>, 0>, 0>, 0>, 0>, 0>, 0> >::operator()<boost::any, boost::any&>(boost::any&&, boost::any&) const in graph_search.cc.o
"graph_tool::GraphException::~GraphException()", referenced from:
graph_tool::ActionNotFound::~ActionNotFound() in graph_search.cc.o
graph_tool::ActionNotFound::~ActionNotFound() in graph_search.cc.o
"graph_tool::ValueException::ValueException(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
graph_tool::PythonEdge<boost::adj_list<unsigned long> >::check_valid() const in graph_search.cc.o
graph_tool::PythonEdge<boost::reversed_graph<boost::adj_list<unsigned long>, boost::adj_list<unsigned long> const&> >::check_valid() const in graph_search.cc.o
graph_tool::PythonEdge<boost::undirected_adaptor<boost::adj_list<unsigned long> > >::check_valid() const in graph_search.cc.o
graph_tool::PythonEdge<boost::filt_graph<boost::adj_list<unsigned long>, graph_tool::detail::MaskFilter<boost::unchecked_vector_property_map<unsigned char, boost::adj_edge_index_property_map<unsigned long> > >, graph_tool::detail::MaskFilter<boost::unchecked_vector_property_map<unsigned char, boost::typed_identity_property_map<unsigned long> > > > >::check_valid() const in graph_search.cc.o
graph_tool::PythonEdge<boost::filt_graph<boost::reversed_graph<boost::adj_list<unsigned long>, boost::adj_list<unsigned long> const&>, graph_tool::detail::MaskFilter<boost::unchecked_vector_property_map<unsigned char, boost::adj_edge_index_property_map<unsigned long> > >, graph_tool::detail::MaskFilter<boost::unchecked_vector_property_map<unsigned char, boost::typed_identity_property_map<unsigned long> > > > >::check_valid() const in graph_search.cc.o
graph_tool::PythonEdge<boost::filt_graph<boost::undirected_adaptor<boost::adj_list<unsigned long> >, graph_tool::detail::MaskFilter<boost::unchecked_vector_property_map<unsigned char, boost::adj_edge_index_property_map<unsigned long> > >, graph_tool::detail::MaskFilter<boost::unchecked_vector_property_map<unsigned char, boost::typed_identity_property_map<unsigned long> > > > >::check_valid() const in graph_search.cc.o
"graph_tool::ValueException::~ValueException()", referenced from:
graph_tool::PythonEdge<boost::adj_list<unsigned long> >::check_valid() const in graph_search.cc.o
graph_tool::PythonEdge<boost::reversed_graph<boost::adj_list<unsigned long>, boost::adj_list<unsigned long> const&> >::check_valid() const in graph_search.cc.o
graph_tool::PythonEdge<boost::undirected_adaptor<boost::adj_list<unsigned long> > >::check_valid() const in graph_search.cc.o
graph_tool::PythonEdge<boost::filt_graph<boost::adj_list<unsigned long>, graph_tool::detail::MaskFilter<boost::unchecked_vector_property_map<unsigned char, boost::adj_edge_index_property_map<unsigned long> > >, graph_tool::detail::MaskFilter<boost::unchecked_vector_property_map<unsigned char, boost::typed_identity_property_map<unsigned long> > > > >::check_valid() const in graph_search.cc.o
graph_tool::PythonEdge<boost::filt_graph<boost::reversed_graph<boost::adj_list<unsigned long>, boost::adj_list<unsigned long> const&>, graph_tool::detail::MaskFilter<boost::unchecked_vector_property_map<unsigned char, boost::adj_edge_index_property_map<unsigned long> > >, graph_tool::detail::MaskFilter<boost::unchecked_vector_property_map<unsigned char, boost::typed_identity_property_map<unsigned long> > > > >::check_valid() const in graph_search.cc.o
graph_tool::PythonEdge<boost::filt_graph<boost::undirected_adaptor<boost::adj_list<unsigned long> >, graph_tool::detail::MaskFilter<boost::unchecked_vector_property_map<unsigned char, boost::adj_edge_index_property_map<unsigned long> > >, graph_tool::detail::MaskFilter<boost::unchecked_vector_property_map<unsigned char, boost::typed_identity_property_map<unsigned long> > > > >::check_valid() const in graph_search.cc.o
"graph_tool::degree_selector(boost::variant<graph_tool::GraphInterface::degree_t, boost::any>)", referenced from:
find_vertex_range(graph_tool::GraphInterface&, boost::variant<graph_tool::GraphInterface::degree_t, boost::any>, boost::python::tuple) in graph_search.cc.o
"graph_tool::GraphException::what() const", referenced from:
vtable for graph_tool::ActionNotFound in graph_search.cc.o
"graph_tool::GraphInterface::get_graph_view() const", referenced from:
find_vertex_range(graph_tool::GraphInterface&, boost::variant<graph_tool::GraphInterface::degree_t, boost::any>, boost::python::tuple) in graph_search.cc.o
find_edge_range(graph_tool::GraphInterface&, boost::any, boost::python::tuple) in graph_search.cc.o
"typeinfo for graph_tool::GraphException", referenced from:
typeinfo for graph_tool::ActionNotFound in graph_search.cc.o
"typeinfo for graph_tool::ValueException", referenced from:
graph_tool::PythonEdge<boost::adj_list<unsigned long> >::check_valid() const in graph_search.cc.o
graph_tool::PythonEdge<boost::reversed_graph<boost::adj_list<unsigned long>, boost::adj_list<unsigned long> const&> >::check_valid() const in graph_search.cc.o
graph_tool::PythonEdge<boost::undirected_adaptor<boost::adj_list<unsigned long> > >::check_valid() const in graph_search.cc.o
graph_tool::PythonEdge<boost::filt_graph<boost::adj_list<unsigned long>, graph_tool::detail::MaskFilter<boost::unchecked_vector_property_map<unsigned char, boost::adj_edge_index_property_map<unsigned long> > >, graph_tool::detail::MaskFilter<boost::unchecked_vector_property_map<unsigned char, boost::typed_identity_property_map<unsigned long> > > > >::check_valid() const in graph_search.cc.o
graph_tool::PythonEdge<boost::filt_graph<boost::reversed_graph<boost::adj_list<unsigned long>, boost::adj_list<unsigned long> const&>, graph_tool::detail::MaskFilter<boost::unchecked_vector_property_map<unsigned char, boost::adj_edge_index_property_map<unsigned long> > >, graph_tool::detail::MaskFilter<boost::unchecked_vector_property_map<unsigned char, boost::typed_identity_property_map<unsigned long> > > > >::check_valid() const in graph_search.cc.o
graph_tool::PythonEdge<boost::filt_graph<boost::undirected_adaptor<boost::adj_list<unsigned long> >, graph_tool::detail::MaskFilter<boost::unchecked_vector_property_map<unsigned char, boost::adj_edge_index_property_map<unsigned long> > >, graph_tool::detail::MaskFilter<boost::unchecked_vector_property_map<unsigned char, boost::typed_identity_property_map<unsigned long> > > > >::check_valid() const in graph_search.cc.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
```
I know the way I am doing it its not a classical way, but if you have any idea why I miss I will really appreciate.
Thankshttps://git.skewed.de/count0/graph-tool/-/issues/673[Feature Request] Ignore edge probabilities when fitting to weighted graph2020-08-03T14:30:01ZDominik Schlechtweg[Feature Request] Ignore edge probabilities when fitting to weighted graphfollowing the discussion in the mailing list (subject "Effect of hubs in WSBM"), it would be nice to be able to ignore edge probabilities in the likelihood function when fitting a weighted SBM, i.e., fitting only to edge weights.following the discussion in the mailing list (subject "Effect of hubs in WSBM"), it would be nice to be able to ignore edge probabilities in the likelihood function when fitting a weighted SBM, i.e., fitting only to edge weights.https://git.skewed.de/count0/graph-tool/-/issues/675Vertex Property Map changed by graph_draw()2020-07-31T06:56:54ZEmil OldenburgVertex Property Map changed by graph_draw()# Bug reports:
## Please follow the general troubleshooting steps first:
- [x] Are you running the latest `graph-tool` version?
- [ ] Do you observe the problem with the current git version?
- [ ] Are you using Macports or Homebrew? If...# Bug reports:
## Please follow the general troubleshooting steps first:
- [x] Are you running the latest `graph-tool` version?
- [ ] Do you observe the problem with the current git version?
- [ ] Are you using Macports or Homebrew? If yes, please submit an issue there instead: https://github.com/Homebrew/brew/issues and https://trac.macports.org/newticket
- [ ] Did you compile `graph-tool` manually?
- [ ] If you answered yes above, did you use the exact same compiler to build `graph-tool`, `boost-python` and `Python`?
Please replace this section with a brief summary of your issue.
I am running the latest docker image of graph-tool.
When generating a graph with an edge property map of type double, the values in this map are multiplied by 2 after each time the graph is drawn.
```
cc_g
```
```
<Graph object, undirected, with 79 vertices and 232 edges, 1 internal vertex property, 2 internal edge properties, at 0x7fbe191baf70>
```
```
cc_g.ep.weight.a
```
```
PropertyArray([ 3., 3., 3., 6., 4., 4., 6., 6., 4., 9., 7., 4.,
3., 5., 4., 4., 3., 5., 5., 3., 4., 5., 4., 3.,
5., 3., 3., 5., 5., 4., 3., 3., 3., 3., 4., 5.,
...
...
```
```
graph_draw(cc_g, edge_pen_width=cc_g.ep.weight)
```
```
<VertexPropertyMap object with value type 'vector<double>', for Graph 0x7fbe191baf70, at 0x7fbe167d46a0>
```
```
cc_g.ep.weight.a
```
```
PropertyArray([ 6., 6., 6., 12., 8., 8., 12., 12., 8., 18., 14., 8.,
6., 10., 8., 8., 6., 10., 10., 6., 8., 10., 8., 6.,
10., 6., 6., 10., 10., 8., 6., 6., 6., 6., 8., 10.,
8., 6., 6., 6., 6., 12., 6., 6., 6., 12., 8., 6.,
...
...
```https://git.skewed.de/count0/graph-tool/-/issues/595graph_draw fails for larger graphs when called with vertex_* parameter2020-07-22T14:49:17ZMichał Tuszyńskigraph_draw fails for larger graphs when called with vertex_* parameter# Bug reports:
## Please follow the general troubleshooting steps first:
- [x] Are you running the latest `graph-tool` version?
- [x] Do you observe the problem with the current git version?
- [ ] Are you using Macports or Homebrew? If...# Bug reports:
## Please follow the general troubleshooting steps first:
- [x] Are you running the latest `graph-tool` version?
- [x] Do you observe the problem with the current git version?
- [ ] Are you using Macports or Homebrew? If yes, please submit an issue there instead: https://github.com/Homebrew/brew/issues and https://trac.macports.org/newticket
- [x] Did you compile `graph-tool` manually?
- [x] If you answered yes above, did you use the exact same compiler to build `graph-tool`, `boost-python` and `Python`?
Invocation of graph_draw(g, vertex_size=g.degree_property_map('total')) fails with the following error:
`ValueError: Received property map for graph <Graph object, directed, with 2044 vertices and 897 edges at 0x7fe73b730c50> (base: <Graph object, directed, with 2044 vertices and 897 edges at 0x7fe73b730c50>), expected: <Graph object, directed, with 6137 vertices and 12952 edges at 0x7fe71fa17198> (base: <Graph object, directed, with 6137 vertices and 12952 edges at 0x7fe71fa17198>)`. This happens only for graphs larger than ~ 1000 vertices. The ```testgraph.gt``` file is available at: https://drive.google.com/open?id=1Akiumz3C-h69GKiuCDczQPyNtczqqMcP
```python
import sys; print('Python %s on %s' % (sys.version, sys.platform))
from graph_tool.all import *
show_config()
g = load_graph('./testgraph.gt')
print('Full graph: ', g)
deg = g.degree_property_map('total')
print('Degree property map shape: ', deg.a.shape)
graph_draw(g, vertex_size=prop_to_size(deg)) # Fails
```
The output of the script is:
```
Python 3.7.3 (default, Jun 24 2019, 04:54:02)
[GCC 9.1.0] on linux
version: 2.29dev (commit 07196449, Thu Jun 27 12:58:11 2019 +0200)
gcc version: 9.1.0
compilation flags: -DNDEBUG -fopenmp -O3 -fvisibility=default -fvisibility-inlines-hidden -Wno-deprecated -Wall -Wextra -ftemplate-backtrace-limit=0 -Wno-register
install prefix: /home/michal/.local/bin
python dir: /home/michal/SIP/src/lang/pl/graph/lib/python3.7/site-packages
graph filtering: True
openmp: True
uname: Linux ant 5.1.15-arch1-1-ARCH #1 SMP PREEMPT Tue Jun 25 04:49:39 UTC 2019 x86_64
Full graph: <Graph object, directed, with 6137 vertices and 12952 edges at 0x7fd77e9530b8>
Degree property map shape: (6137,)
```
However, this works:
```python
pos= sfdp_layout(g)
graph_draw(g, pos=pos, vertex_size=prop_to_size(deg)) # Works
```
Drawing smaller graphs also works:
```python
gv = GraphView(g, vfilt= lambda v: v.out_degree() > 4)
print('Graph View: ', gv)
deg = gv.degree_property_map('total')
graph_draw(gv, vertex_size=prop_to_size(deg)) # Works
```
giving output:
```
Graph View: <GraphView object, directed, with 861 vertices and 1178 edges, edges filtered by (<EdgePropertyMap object with value type 'bool', for Graph 0x7f06405bb7f0, at 0x7f06405c9d30>, False), vertices filtered by (<VertexPropertyMap object with value type 'bool', for Graph 0x7f06405bb7f0, at 0x7f06405c99e8>, False) at 0x7f06405bb7f0>
```
It seems that there is something wrong with the hierarchical graph layout in graph_draw() - somehow the property map passed as a parameter is modified by the layout algorithm.https://git.skewed.de/count0/graph-tool/-/issues/674Does graph-tool still support Ubuntu16.04 ?2020-07-21T12:45:11ZpredictwiseDoes graph-tool still support Ubuntu16.04 ?I checked the [distribution link](http://downloads.skewed.de/apt/dists/) and found that the Ubuntu16.04's release version(xenial) was not in the list. I think that is the reason why I couldn't install the graph-tool successfully.
I'd li...I checked the [distribution link](http://downloads.skewed.de/apt/dists/) and found that the Ubuntu16.04's release version(xenial) was not in the list. I think that is the reason why I couldn't install the graph-tool successfully.
I'd like to confirm that whether the ubuntu16.04 is still compatible or not?https://git.skewed.de/count0/graph-tool/-/issues/411apt repository broken / ubuntu xenail2020-07-21T12:45:10ZDSapt repository broken / ubuntu xenailsource.list looks like this
```
deb http://downloads.skewed.de/apt/xenial xenial universe
deb-src http://downloads.skewed.de/apt/xenial xenial universe
```
```
$apt update
Ign http://downloads.skewed.de/apt/xenial xenial Release.gpg
G...source.list looks like this
```
deb http://downloads.skewed.de/apt/xenial xenial universe
deb-src http://downloads.skewed.de/apt/xenial xenial universe
```
```
$apt update
Ign http://downloads.skewed.de/apt/xenial xenial Release.gpg
Get: 6 http://downloads.skewed.de/apt/xenial xenial/universe Sources [845 B]
Get: 7 http://downloads.skewed.de/apt/xenial xenial/universe amd64 Packages [774 B]
Get: 8 http://downloads.skewed.de/apt/xenial xenial/universe i386 Packages [776 B]
Fetched 463 kB in 1s (315 kB/s)
W: GPG error: http://downloads.skewed.de/apt/xenial xenial Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 78AF38AD52B46290
W: The repository 'http://downloads.skewed.de/apt/xenial xenial Release' is not signed.
```https://git.skewed.de/count0/graph-tool/-/issues/668[Feature Request] compatibility methods for PPBlockState2020-07-11T15:14:57ZDavide Cittaro[Feature Request] compatibility methods for PPBlockStateHello, I've tested the gt.PPBlockState introduced since version 2.33. I noticed some methods available for other objects (gt.BlockState) have not been implemented. I'm referring in particular to virtual_vertex_move(), but also get_nonemp...Hello, I've tested the gt.PPBlockState introduced since version 2.33. I noticed some methods available for other objects (gt.BlockState) have not been implemented. I'm referring in particular to virtual_vertex_move(), but also get_nonempty_B().
Would it be possible to implement them?https://git.skewed.de/count0/graph-tool/-/issues/664[feature request] fit SBM only to weights2020-06-05T13:43:45ZDominik Schlechtweg[feature request] fit SBM only to weightsAs far as I understand, the current implementation only allows to fit an SBM to the edge weights *and the degree/edge structure* of the graph. In certain situations it may be better to totally ignore the degree/edge structure of the grap...As far as I understand, the current implementation only allows to fit an SBM to the edge weights *and the degree/edge structure* of the graph. In certain situations it may be better to totally ignore the degree/edge structure of the graph and to fit the model only to the edge weights. It would be great to have this possibility implemented.https://git.skewed.de/count0/graph-tool/-/issues/655GraphIsomorphism: IndexError2020-05-30T12:46:28ZDarkaMaulGraphIsomorphism: IndexError# Bug reports:
## Please follow the general troubleshooting steps first:
- [x] Are you running the latest `graph-tool` version? 2.31 (commit 8561bac9, Fri Mar 27 23:59:57 2020 +0100)
## Bug description
Trying to perform an isomorphis...# Bug reports:
## Please follow the general troubleshooting steps first:
- [x] Are you running the latest `graph-tool` version? 2.31 (commit 8561bac9, Fri Mar 27 23:59:57 2020 +0100)
## Bug description
Trying to perform an isomorphism between two graphs. The isomorphism fails when we use a vertex_property with "large" numbers.
## Sample case
```python
# The values must be large but the actual number does not matter much
values = [851733746, 1390959473, 0, 0]
edge_list = [[0, 1], [2, 1], [2, 3]]
g1 = graph_tool.Graph()
g1.add_edge_list(edge_list)
g1.vp.prop_int = g1.new_vertex_property('int')
g1.vp.prop_int.get_array()[:] = values
g2 = graph_tool.Graph()
g2.add_edge_list(edge_list)
g2.vp.prop_int = g2.new_vertex_property('int')
g2.vp.prop_int.get_array()[:] = values
# This fails:
graph_tool.topology.isomorphism(g1, g2, vertex_inv1=g1.vp.prop_int, vertex_inv2=g2.vp.prop_int)
```
## General information
- [x] Your operating system : Debian 10 (buster) - Linux 5.4.0-0.bpo.4-amd64 Debian 5.4.19-1~bpo10+1 (2020-03-09) x86_64 GNU/Linux
- [x] The Python version you are using: 3.7.3
## Error report
```shell
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "bug.py", line 22, in main
return graph_tool.topology.isomorphism(g1, g2, vertex_inv1=g1.vp.prop_int, vertex_inv2=g2.vp.prop_int)
File "/usr/lib/python3/dist-packages/graph_tool/topology/__init__.py", line 626, in isomorphism
_prop("v", g1, imap))
IndexError: vector::_M_range_check: __n (which is 18446744073587462741) >= this->size() (which is 2242693221)
```https://git.skewed.de/count0/graph-tool/-/issues/653Graph Isomorphism with VertexPropertyMap of type long2020-05-30T12:46:23ZDarkaMaulGraph Isomorphism with VertexPropertyMap of type long# Bug reports:
## Informations
* graph-tool version: 2.31 (commit 8561bac9, Fri Mar 27 23:59:57 2020 +0100)
* System: Debian 10 / 5.4.0-0.bpo.4-amd64 / Python version 3.7.3
## Bug description
I want to compute an isomorphism between t...# Bug reports:
## Informations
* graph-tool version: 2.31 (commit 8561bac9, Fri Mar 27 23:59:57 2020 +0100)
* System: Debian 10 / 5.4.0-0.bpo.4-amd64 / Python version 3.7.3
## Bug description
I want to compute an isomorphism between two graph using an invariant.
This does not work if the type of the `VertexPropertyMap` is long (while it works for int or bool).
## Reproducible example (may not be minimal)
```python
import graph_tool
# Create g
g: graph_tool.Graph = graph_tool.Graph()
g.add_vertex(3)
g.vp.prop_int = g.new_vertex_property('int')
g.vp.prop_long = g.new_vertex_property('long')
g.vp.prop_int.get_array()[:] = [3, 1, 2]
g.vp.prop_long.get_array()[:] = [2**32, 2**32-1, 2**32-5]
g.add_edge_list([(0, 1), (1, 2)])
# Create g2
g2: graph_tool.Graph = graph_tool.Graph()
g2.add_vertex(3)
g2.vp.prop_int = g2.new_vertex_property('int')
g2.vp.prop_long = g2.new_vertex_property('long')
g2.vp.prop_int.get_array()[:] = [3, 1, 2]
g2.vp.prop_long.get_array()[:] = [2**32, 2**32-1, 2**32-5]
g2.add_edge_list([(0, 1), (1, 2)])
# Works as expected
graph_tool.topology.isomorphism(g, g2, vertex_inv1=g.vp.prop_int, vertex_inv2=g2.vp.prop_int)
# This fails:
graph_tool.topology.isomorphism(g, g2, vertex_inv1=g.vp.prop_long, vertex_inv2=g2.vp.prop_long)
```
## Python error
```shell
MemoryError Traceback (most recent call last)
<ipython-input-34-0535769d768c> in <module>
----> 1 graph_tool.topology.isomorphism(g1, g2, vertex_inv1=g1.vp.prop_long, vertex_inv2=g2.vp.prop_long)
/usr/lib/python3/dist-packages/graph_tool/topology/__init__.py in isomorphism(g1, g2, vertex_inv1, vertex_inv2, isomap)
624 _prop("v", g2, vertex_inv2),
625 inv_max,
--> 626 _prop("v", g1, imap))
627 if isomap:
628 return iso, imap
MemoryError:
```https://git.skewed.de/count0/graph-tool/-/issues/658graph_draw changes the value of a property map2020-05-29T19:47:22ZFrancesco D'Amatograph_draw changes the value of a property map# Bug reports:
## Please follow the general troubleshooting steps first:
- [Y ] Are you running the latest `graph-tool` version?
- [Y] Do you observe the problem with the current git version?
- [N] Are you using Macports or Homeb...# Bug reports:
## Please follow the general troubleshooting steps first:
- [Y ] Are you running the latest `graph-tool` version?
- [Y] Do you observe the problem with the current git version?
- [N] Are you using Macports or Homebrew? If yes, please submit an issue there instead: https://github.com/Homebrew/brew/issues and https://trac.macports.org/newticket
- [N] Did you compile `graph-tool` manually?
- [Not sure] If you answered yes above, did you use the exact same compiler to build `graph-tool`, `boost-python` and `Python`?
Running the code below somehow causes the value of the property map ew to double each time (when it's more than one edge, each value doubles). It does not happen on other properties that I have tried, and changing ew with ew.copy() in graph_draw runs as expected. I looked at the code for graph_draw but can't figure out what is happening
``` g = Graph()
g.add_vertex(2)
g.add_edge(0,1)
ew = g.new_ep('double')
ew[g.edge(0,1)] = 1
graph_draw(g, edge_pen_width = ew)
print(ew.a)
graph_draw(g, edge_pen_width = ew)
print(ew.a)
graph_draw(g, edge_pen_width = ew)
print(ew.a)
graph_draw(g, edge_pen_width = ew)
```
I am running this in Ubuntu WLS, Windows 10 version 2004. Installed it through conda, and I am running it on a jupyter notebook.https://git.skewed.de/count0/graph-tool/-/issues/661Reconsider publishing on PyPI2020-05-28T23:58:09ZMichaël DefferrardReconsider publishing on PyPII'm aware the issue was discussed in #327 3 years ago and PyPI was discarded "because many of graph-tool's C++ dependencies, e.g. boost, cannot be pulled in" (though [old releases are there](https://pypi.org/project/graph-tool/)). But ti...I'm aware the issue was discussed in #327 3 years ago and PyPI was discarded "because many of graph-tool's C++ dependencies, e.g. boost, cannot be pulled in" (though [old releases are there](https://pypi.org/project/graph-tool/)). But time as passed, and what's possible might have changed. After all, [numpy](https://pypi.org/project/numpy/), [scipy](https://pypi.org/project/scipy/), [Qt5](https://pypi.org/project/PySide2/) are available on PyPI, while too being mostly python APIs to C, C++, Fortran. Similarly, conda-forge was discarded because "it requires one to package every single C++ dependency of graph-tool, for every possible combination of OS and architecture", yet we now [have it](https://anaconda.org/conda-forge/graph-tool). Judging by the number of downloads, this is much appreciated.
I understand well that it requires a fair amount of work to maintain wheels on PyPI, but I sincerely think that this is the single most important barrier to a greater adoption of graph-tool. It's a great library, and it's a pity to see users flock to NetworkX because `pip install networkx` just works. In my experience (teaching [networks to 100+ students](https://github.com/mdeff/ntds_2019)), beginners care a lot about the easiest route to use the API, and only later about the rest (features, speed, API design). At that time, they are already fairly invested in say NetworkX, and graph-tool misses out. Beside direct users, binary distributions considerably simplify cloud deployments like CIs and <https://mybinder.org>. While conda was a great leap forward, PyPI would be the cherry on the cake. :)
I take this occasion to thank you again for the amazing work you put on this project. Looking forward to an eventual `pip install graph-tool`!https://git.skewed.de/count0/graph-tool/-/issues/660No longer mirrored on github2020-05-28T19:39:11ZMichaël DefferrardNo longer mirrored on githubThe [documentation](https://graph-tool.skewed.de/download) says "The git repository is also mirrored at [github](http://github.com/count0/graph-tool)". This doesn't seem to be the case anymore.The [documentation](https://graph-tool.skewed.de/download) says "The git repository is also mirrored at [github](http://github.com/count0/graph-tool)". This doesn't seem to be the case anymore.https://git.skewed.de/count0/graph-tool/-/issues/657Missing Ubuntu focal distribution2020-05-07T23:38:24ZMatteo ZanellaMissing Ubuntu focal distributionA distribution for the new Ubuntu 20.04 LTS Focal Fossa is missingA distribution for the new Ubuntu 20.04 LTS Focal Fossa is missinghttps://git.skewed.de/count0/graph-tool/-/issues/654Build failed with gcc 8.3.02020-04-29T19:51:29ZNorth PhantomBuild failed with gcc 8.3.0When I manually build graph-tool 2.31 on CentOS 7, the make tool returns with an error:
> In file included from partition_centroid/graph_partition_centroid_multiflip_mcmc.cc:25:
> partition_centroid/../loops/mcmc_loop.hh: In lambda f...When I manually build graph-tool 2.31 on CentOS 7, the make tool returns with an error:
> In file included from partition_centroid/graph_partition_centroid_multiflip_mcmc.cc:25:
> partition_centroid/../loops/mcmc_loop.hh: In lambda function:
> partition_centroid/../loops/mcmc_loop.hh:84:42: error: lambda capture of ‘single_step’ is not a constant expression
> if constexpr (single_step)
The same error occurs in several files.
In fact, I guess it is something wrong about the GCC so I upgrade my GCC from 8.3.0 to 9.3.0 and the error has gone. So is that a bug of graph-tool or GCC 8.3.0?
This is my env info when error occoured:
```
================================================================================
CONFIGURATION SUMMARY
================================================================================
Using python version: 3.7.6
Python interpreter: /usr/local/bin/python3.7
Installation path: /usr/local/lib/python3.7/site-packages/graph_tool
C++ compiler (CXX): g++ -std=gnu++17
C++ compiler version: 8.3.0
Prefix: /usr/local
Pkgconfigdir: ${libdir}/pkgconfig
Python CPP flags: -I/usr/local/lib/python3.7/site-packages/cairo/include -I/usr/local/include/python3.7m
Python LD flags: -L/usr/local/lib -lpython3.7m
Boost CPP flags: -pthread -I/usr/local/boost/include
Boost LD flags: -L/usr/local/boost/lib -lboost_iostreams -lboost_python37 -lboost_regex -lboost_context -lboost_coroutine
Numpy CPP flags: -I/usr/local/lib/python3.7/site-packages/numpy/core/include
Sparsehash CPP flags:
CGAL CPP flags: -I/usr/include
CGAL LD flags:
Expat CPP flags: -I/usr/include
Expat LD flags: -L/usr/lib -lexpat
Cairomm CPP flags: -I/usr/include/cairomm-1.0 -I/usr/lib64/cairomm-1.0/include -I/usr/include/cairo -I/usr/include/sigc++-2.0 -I/usr/lib64/sigc++-2.0/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng15 -I/usr/include/uuid -I/usr/include/libdrm
Cairomm LD flags: -lcairomm-1.0 -lcairo -lsigc-2.0
OpenMP compiler flags: -fopenmp
OpenMP LD flags:
Extra CPPFLAGS: -DNDEBUG -I/usr/local/boost/include
Extra CXXFLAGS: -fopenmp -O3 -fvisibility=default -fvisibility-inlines-hidden -Wno-deprecated -Wall -Wextra -ftemplate-backtrace-limit=0 -Wno-register
Extra LDFLAGS: -L/usr/local/boost/lib
Using OpenMP: yes
Using sparsehash: yes
Using cairo: yes
================================================================================
```
https://git.skewed.de/count0/graph-tool/-/issues/656Out of memory when draw svg2020-04-28T17:07:41ZNorth PhantomOut of memory when draw svg# Bug reports:
When I drew a graph with 5000 vertexes and 890000 edges with graph_draw(g, output="test.svg"), I got a MemoryError.
In fact, at that time Python only used 1G RAM.
When I drew with graph_draw(g, output="apks.pdf"), there...# Bug reports:
When I drew a graph with 5000 vertexes and 890000 edges with graph_draw(g, output="test.svg"), I got a MemoryError.
In fact, at that time Python only used 1G RAM.
When I drew with graph_draw(g, output="apks.pdf"), there is no error and I got a 663M pdf.
I have searched for this issue and got a similar issue https://github.com/Kozea/WeasyPrint/issues/566 but I do not know how to fix it in graph-tool.
> Sys: CentOS 7
>
> Compiler: GCC 9.3.0
>
> BOOST: 1.72
>
> Py: 3.8.2
>
> Cairomm: 1.12.2(When I build with the latest version 1.15.5 I got another error and I found someone said you will not fix that bug because it is not a stable version, so I choose 1.12.2)
```
---------------------------------------------------------------------------
cairo.MemoryError Traceback (most recent call last)
<ipython-input-28-f94cd02d0f62> in <module>
1 # graph_draw(g, vertex_text=g.vertex_index)
----> 2 graph_draw(g, output="test.svg")
3 #
/usr/local/lib/python3.8/site-packages/graph_tool/draw/cairo_draw.py in graph_draw(g, pos, vprops, eprops, vorder, eorder, nodesfirst, output_size, fit_view, adjust_aspect, ink_scale, inline, inline_scale, mplfig, output, fmt, bg_color, **kwargs)
1189 srf.write_to_png(out)
1190 elif fmt == "svg":
-> 1191 srf.finish()
1192
1193 del cr
cairo.MemoryError: out of memory
```https://git.skewed.de/count0/graph-tool/-/issues/482Compiling Graph Tool, No longer gets along with Cairo2020-04-28T15:13:46ZChristopher DonlanCompiling Graph Tool, No longer gets along with CairoThe graph-tool master branch as of today (6/15/18) does not compile with cairomm > 1.15.5.
I ran into the following error during compilation:
```
CXX graph_cairo_draw.lo
graph_cairo_draw.cc: In member function ‘double VertexShap...The graph-tool master branch as of today (6/15/18) does not compile with cairomm > 1.15.5.
I ran into the following error during compilation:
```
CXX graph_cairo_draw.lo
graph_cairo_draw.cc: In member function ‘double VertexShape<Descriptor>::get_size(Cairo::Context&)’:
graph_cairo_draw.cc:640:56: error: ‘FontSlant’ in namespace ‘Cairo’ does not name a type
static_cast<Cairo::FontSlant>(_attrs.template get<int32_t>(VERTEX_FONT_SLANT)),
^
graph_cairo_draw.cc:641:56: error: ‘FontWeight’ in namespace ‘Cairo’ does not name a type
static_cast<Cairo::FontWeight>(_attrs.template get<int32_t>(VERTEX_FONT_WEIGHT)));
^
graph_cairo_draw.cc: In member function ‘void VertexShape<Descriptor>::draw(Cairo::Context&, bool)’:
graph_cairo_draw.cc:974:56: error: ‘FontSlant’ in namespace ‘Cairo’ does not name a type
static_cast<Cairo::FontSlant>(_attrs.template get<int32_t>(VERTEX_FONT_SLANT)),
^
graph_cairo_draw.cc:975:56: error: ‘FontWeight’ in namespace ‘Cairo’ does not name a type
static_cast<Cairo::FontWeight>(_attrs.template get<int32_t>(VERTEX_FONT_WEIGHT)));
^
graph_cairo_draw.cc: In member function ‘void EdgeShape<Descriptor, VertexShape>::draw(Cairo::Context&, double)’:
graph_cairo_draw.cc:1180:30: error: ‘FILL_RULE_EVEN_ODD’ is not a member of ‘Cairo’
cr.set_fill_rule(Cairo::FILL_RULE_EVEN_ODD);
^
graph_cairo_draw.cc:1185:29: error: ‘OPERATOR_SOURCE’ is not a member of ‘Cairo’
cr.set_operator(Cairo::OPERATOR_SOURCE);
^
graph_cairo_draw.cc:1229:29: error: ‘OPERATOR_OVER’ is not a member of ‘Cairo’
cr.set_operator(Cairo::OPERATOR_OVER);
^
graph_cairo_draw.cc:1252:34: error: ‘FILL_RULE_EVEN_ODD’ is not a member of ‘Cairo’
cr.set_fill_rule(Cairo::FILL_RULE_EVEN_ODD);
^
graph_cairo_draw.cc:1317:52: error: ‘FontSlant’ in namespace ‘Cairo’ does not name a type
static_cast<Cairo::FontSlant>(_attrs.template get<int32_t>(EDGE_FONT_SLANT)),
^
graph_cairo_draw.cc:1318:52: error: ‘FontWeight’ in namespace ‘Cairo’ does not name a type
static_cast<Cairo::FontWeight>(_attrs.template get<int32_t>(EDGE_FONT_WEIGHT)));
^
Makefile:577: recipe for target 'graph_cairo_draw.lo' failed
```
During my troubleshooting, I searched for any files in `cairomm` which contain `FontSlant`:
```
grep -rnw /path/to/cairomm -e 'FontSlant'
```
And this action returned the following:
```
./cairomm-1.15.5/NEWS:17: - Change Cairo::FontSlant enum to Cairo::ToyFontFace::Slant.
./cairomm-1.15.5/ChangeLog:43: Change Cairo::FontSlant enum to Cairo::ToyFontFace::Slant.
```
So, there is no `FontSlant` in cairomm as of cairomm-1.15.5. I will now try different versions of py-cairo, cairo and cairomm, but this seems like an important issue.