Skip to content

set_random_number_generator(None) does not revert to igraph's built-in default RNG #414

@ntamas

Description

@ntamas

Describe the bug

The documentation claims that set_random_number_generator(None) makes python-igraph use igraph's native RNG instead of the one from Python. Apparently this is not the case; it keeps on using the Python-based rng.

To reproduce

from igraph import Graph, set_random_number_generator
from time import time

start = time()
g = Graph.Degree_Sequence([750] * 1000, method="vl")
print(time() - start)

set_random_number_generator(None)

start = time()
g = Graph.Degree_Sequence([750] * 1000, method="vl")
print(time() - start)

The two calls take identical time, even though it heavily uses the RNG.

Version information

0.9.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions