Skip to content

Commit 8838710

Browse files
committed
Switching from list comprehension to np.fromiter converts this to an nd.array and resolves mypy error
1 parent 8a436d8 commit 8838710

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

pymc/sampling/mcmc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,7 @@ def joined_blas_limiter():
760760
UserWarning,
761761
)
762762
rngs = get_random_generator(random_seed).spawn(chains)
763-
random_seed_list = [rng.integers(2**30) for rng in rngs]
763+
random_seed_list = np.fromiter((rng.integers(2**30) for rng in rngs), dtype=np.int64)
764764

765765
if not discard_tuned_samples and not return_inferencedata and not isinstance(trace, ZarrTrace):
766766
warnings.warn(

scripts/run_mypy.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
pymc/model/transform/conditioning.py
4545
pymc/pytensorf.py
4646
pymc/sampling/jax.py
47-
pymc/sampling/mcmc.py
4847
"""
4948

5049

0 commit comments

Comments
 (0)