import networkx as nx import numpy as np import random from networkx.utils import powerlaw_sequence W=powerlaw_sequence(100,exponent=2.5) random.choice(W)
What if I want the numbers in this sequence to be numbers other than zero? or any number in a certain range? so the smallest value is 1, for example .. Or even assign this condition when choosing a random number from a sequence.
Powerlaw_sequence (100, exponent = 2.0, range (1,20)) and powerlaw_sequence (100, exponent = 2.0, xmin = 1) do not work. Thanks you
source share