NetworkX

Previous topic

random_weighted_sample

Next topic

open_file

weighted_choice

static random_sequence.weighted_choice(mapping)

Return a single element from a weighted sample.

The input is a dictionary of items with weights as values.