uvex_transients.utils.get_seed_sequence#

uvex_transients.utils.get_seed_sequence(seed: SeedSequence | int | None = None) → SeedSequence[source]#

Return a NumPy ~numpy.random.SeedSequence.

Companion to get_rng(), for callers that need to spawn further independent streams (see split_root_seed()/spawn_seeds()) rather than draw numbers directly.

Parameters:

seed (numpy.random.SeedSequence, int, or None, optional) –

  • If a ~numpy.random.SeedSequence is provided, it is returned unchanged.

  • If an integer is provided, it seeds a new SeedSequence.

  • If None, a new SeedSequence is initialized from NumPy’s default entropy source.

Returns:

Seed sequence suitable for spawning independent random streams.

Return type:

numpy.random.SeedSequence