From 1670a25336b7ff14abd5e364f6ce1bd98b9b5f72 Mon Sep 17 00:00:00 2001 From: Sanchali torpe Date: Sun, 18 Jan 2026 16:36:13 -0800 Subject: [PATCH] Clarify randomness and reproducibility of CSA operations --- csa/_elementary.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/csa/_elementary.py b/csa/_elementary.py index fdb22a6..70abac8 100644 --- a/csa/_elementary.py +++ b/csa/_elementary.py @@ -1,3 +1,15 @@ +""" +Randomness and reproducibility +------------------------------ +This module relies on Python's global random number generator. +Random values are drawn from the current RNG state and the RNG +is not re-seeded on each call. + +As a result, repeated CSA operations (e.g. random/block-style +masks) with identical parameters may produce different +realizations unless the user explicitly sets a random seed +using ``random.seed(...)`` before invoking them. +""" # # This file is part of the Connection-Set Algebra (CSA). # Copyright (C) 2010,2011,2012 Mikael Djurfeldt