I am just wondering if there is a way to implement a random graph of size N where the probability of a bond between each pair of nodes is given by the specific cell in the matrix of probabilities, say P of size NxN, where P_{ij} denotes the probability of a bond between node n_{i} and n_{j}.
Perhaps the function should be similar to the function networkx.generators.random_graphs.gnp_random_graph but with a possibility of adding a matrix of probabilities P, rather than a float p that denotes probability of a bond creation between any node pair.