Skip to content

Commit d58fa64

Browse files
igerberclaude
andcommitted
Address PR #362 CI review P3: docstring precision on rng contract
The helper accepts any ``np.random.Generator``, not specifically PCG64; library callers happen to seed via ``np.random.default_rng``. Clarifies that backend invariance is with respect to the supplied generator state, not a specific engine. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 4f3b163 commit d58fa64

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

diff_diff/bootstrap_utils.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,11 @@ def generate_bootstrap_weights_batch(
166166
"""
167167
Generate all bootstrap weights at once (vectorized).
168168
169-
Runs under the numpy PCG64 RNG exclusively, so the output is a
170-
deterministic function of ``rng`` state regardless of whether the
171-
Rust backend is available. A single ``seed`` therefore produces
172-
identical multiplier-bootstrap weights in both installs.
169+
Output is a deterministic function of the supplied ``rng`` state,
170+
so a single ``seed`` produces identical multiplier-bootstrap weights
171+
regardless of whether the Rust backend is compiled in. (Library
172+
call sites seed via ``np.random.default_rng`` — PCG64 — but any
173+
``np.random.Generator`` is accepted.)
173174
174175
Parameters
175176
----------

0 commit comments

Comments
 (0)