This is a really strange error — the function signature looks perfectly fine to me. Plus, I don't think this part changed since 2.43, and I cannot reproduce the error on my GNU/Linux machine.

Can you confirm that you do not see the error with 2.43, with the exact same python, boost and cairo versions, compiler, etc?

I was using graph-tool couple of ears ago and I was trying to use it again but i have some issues with the installation of the necessary dependencies for Your module. I am using Ubuntu and trying to install it by package manager. I have added necessary information in sources.list and downloaded the public key but after update and trying to install graph-tool i get below error:

```
The following packages have unmet dependencies:
python3-graph-tool : Depends: libboost-python1.74.0-py39 but it is not installable
Depends: libboost-regex1.74.0-icu67 but it is not installable
Recommends: libgv-python but it is not installable
Recommends: python-matplotlib but it is not installable
Recommends: python-cairo but it is not installable
Recommends: python-gi-cairo but it is not installable
Recommends: python-gi but it is not installable
E: Unable to correct problems, you have held broken packages.
```

I also found this issue on stack overflow but the only answers were about change of distribution that haven't worked for me: https://askubuntu.com/questions/869140/graph-tool-installation-problems

I was using different distributions but none of them worked. Maybe You know about this issue and have any information will it be fixed or it's problem with mine configuration?

/etc/apt/sources.list:
`deb [ arch=amd64 ] https://downloads.skewed.de/apt focal main`

Should be working now with version 2.45.

**Tiago Peixoto**
(8151f1f6)
*
at
23 May 07:08
*

RankedBlockState: Add missing documentation index

*
... and
1 more commit
*

**Tiago Peixoto**
(314dff4d)
*
at
22 May 21:52
*

Bump version to 2.45

**Tiago Peixoto**
(4583de75)
*
at
22 May 21:48
*

Bump version to 2.45

**Tiago Peixoto**
(1c016bc7)
*
at
22 May 17:51
*

inference: update expected test results

*
... and
3 more commits
*

The function .get_matrix() does not work properly in latest version of the package.

I run the following code:

import graph_tool.all as gt

print(gt.**version**)

g = gt.collection.data["football"]

state = gt.minimize_blockmodel_dl(g)

e = state.get_matrix()

print(e.shape)

With latest version 2.43 I get a shape of 115x115 (the football network has 115 nodes) which is wrong because it should be a matrix KxK where K is the number of blocks.

With older version 2.35 I get a shape of 10x10 which is correct.

This is in fact expected behavior. The matrix should be based on the group labels, which are not necessarily contiguous. For a KxK matrix to be returned, you need first to re-index the partition to K contiguous index values.

Hello, I was testing gt.BlockState.virtual_vertex_move(v, s) and I noticed that it doesn't check if the index s is higher than the number of blocks in the gt.BlockState object. In fact I have B with 6 blocks:

`<BlockState object with 6 blocks (6 nonempty), degree-corrected, for graph <Graph object, undirected, with 1401 vertices and 24207 edges, 1 internal edge property, at 0x7f85c2d27400>, at 0x7f8584ecea00>`

and

```
>>> B.virtual_vertex_move(0, 22)
-63.278288302929624
>>> B.virtual_vertex_move(0, 7)
inf
>>> B.virtual_vertex_move(0, 8)
libc++abi.dylib: terminating with uncaught exception of type std::length_error: vector
```

This kinds of bounds checking is complicated to enforce systematically (at least at C++ level) since it tends do degrade performance.

- OS Nixos 21.05.git.831ce6e04d5
- Python 3.8.12
- GCC 10.3
- Boost 1.69.0

Consider the following example:

```
g1=Graph(directed=True)
v1=g1.add_vertex()
v2=g1.add_vertex()
g1.add_edge(v1,v2)
flt=g1.new_vp('bool')
flt[v1]=True
flt[v2]=True
v3=g1.add_vertex() # <Line1
flt[v3]=False # <Line2
g2=Graph(directed=True)
v1=g2.add_vertex()
v2=g2.add_vertex()
g2.add_edge(v1,v2)
g1v=GraphView(g1,vfilt=flt)
iso=subgraph_isomorphism(g1v,g2)
assert len(iso)>0, f"Can't find isomorphism using a filtered pattern"
```

The assert would trigger, despite the fact that the unmasked parts of the graphs are identical.

Similarily, `set_vertex_filter`

doesn't work:

```
g1=Graph(directed=True)
v1=g1.add_vertex()
v2=g1.add_vertex()
g1.add_edge(v1,v2)
flt=g1.new_vp('bool')
flt[v1]=True
flt[v2]=True
v3=g1.add_vertex()
flt[v3]=False
g1.set_vertex_filter(flt)
g2=Graph(directed=True)
v1=g2.add_vertex()
v2=g2.add_vertex()
g2.add_edge(v1,v2)
iso=subgraph_isomorphism(g1,g2)
assert len(iso)>0, f"Can't find isomorphism using a filtered pattern"
```

Closing for the moment. Please re-open if the problem can still be reproduced.

In `graph_tool-2.43`

, attempting to draw a graph with removed vertex leads to a SEGFAULT if the `planar_layout`

is used.

```
from graph_tool import Graph
from graph_tool.draw import (graph_draw, planar_layout)
g=Graph(directed=True)
v1=g.add_vertex()
v2=g.add_vertex()
v3=g.add_vertex()
v4=g.add_vertex()
g.add_edge(v1,v2)
g.add_edge(v2,v3)
g.add_edge(v1,v3)
g.add_edge(v1,v4)
g.remove_vertex(v3)
# g.reindex_edges() # <-- uncomment to workaround
pos=planar_layout(g)
graph_draw(g,pos=pos)
```

Reindexing edges seems to fix the problem.

During the crash, the following line appears sometimes:

`free(): invalid next size (fast)`

**Tiago Peixoto**
(1d8167da)
*
at
22 May 08:18
*

Fix planarity test with noncontiguous edge indexes