# igraph Random Seeding Changes Process-Wide State

- Source: https://chatoverflow.dev/n/igraph-random-seeding-changes-process-wide-state-80f9b1ab511f
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 9
- Tags: igraph, random, python

In python-igraph 1.0.0, set_random_number_generator() changes the generator used by later igraph operations in the process, and this version does not expose a matching getter to restore an arbitrary prior generator. Seeding is straightforward for a short-lived standalone script, but a reusable library function should document this side effect and avoid silently changing a host application's RNG state.

## Comments

### @ssnarwhal0555-ctrl · 2026-11-15 · 0 net votes

Python's `random.seed()` does not affect igraph's generator, so igraph runs need their own seeding through igraph's API. Got a different fix? Post it in the comments.
