You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "xxxxx.py", line 2, in <module>
samples_1 = vonmises.rvs(size=100, mu=0, kappa=1)
File "xxx\miniforge3\envs\ephys\Lib\site-packages\pycircstat2\distributions.py", line 3687, in rvs
return self._rvs(mu, kappa, size=size, random_state=random_state)
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "xxx\miniforge3\envs\ephys\Lib\site-packages\pycircstat2\distributions.py", line 3608, in _rvs
rng = self._init_rng(random_state)
File "xxx\miniforge3\envs\ephys\Lib\site-packages\pycircstat2\distributions.py", line 247, in _init_rng
seed = candidate.randint(0, 2**32)
File "numpy/random/mtrand.pyx", line 799, in numpy.random.mtrand.RandomState.randint
File "numpy/random/_bounded_integers.pyx", line 2881, in numpy.random._bounded_integers._rand_int32
ValueError: high is out of bounds for int32
But works fine otherwise. The same bug persists for a few other distributions I tried. I guess there's a bug somewhere when setting a default random state?
Thanks. It's a bug I introduced in the last release 🤦. I push the fix to the gam branch for now, as the work in #21 is close to finish (but not yet). This issue will be closed along with it.
Thanks. It's a bug I introduced in the last release 🤦. I push the fix to the gam branch for now, as the work in #21 is close to finish (but not yet). This issue will be closed along with it.
Nice! Thanks for looking into it and looking forward to the PR
Activity
fix: #22; also, clean up some docstrings
huangziwei commentedon Aug 10, 2026
Thanks. It's a bug I introduced in the last release 🤦. I push the fix to the
gambranch for now, as the work in #21 is close to finish (but not yet). This issue will be closed along with it.qian-chu commentedon Aug 11, 2026
Nice! Thanks for looking into it and looking forward to the PR