Operating system version:

❯ lsb_release -a

No LSB modules are available.

Distributor ID: Ubuntu

Description: Ubuntu 23.10

Release: 23.10

Codename: mantic

Graph-tool version:

The version distributed by canonical in mantic

Problem description:

I am using this function for the edge probabilities between blocks in a random graph block model

```
def prob(a,b):
return 0 if a==b else 1
```

I am expecting to see a graph where there are zero edges between members of the same block and only edges between members of different blocks, the latter as per the sampler for the degree distribution. The model is ‘block-degree’, I do pass the correct block membership as a list.

```
N=2000
blocks = choices(types[s],
cum_weights = list(accumulate(fracs[s])),
k = N)
gg, bm = gt.generation.random_graph(N,
lambda ix,nb: sample_k(uc, funcs[s][types[s].index(nb)]),
directed=False,
model='blockmodel-degree',
block_membership=blocks,
edge_probs = prob,
degree_block=False)
```

However, when looking a sample I observe that connections between nodes of the same block are in fact present. What am I doing wrong?

Regards,

Alex