-
-
Notifications
You must be signed in to change notification settings - Fork 12.1k
Closed
Description
Describe the issue:
The beta random variate generator hangs when the parameters a and b are both very small. Because dirichlet depends on the beta distribution, it also hangs when some or all values in alpha are very small.
Reproduce the code example:
rng = np.random.default_rng()
rng.beta(1e-49, 1e-40) # hangs
rng.dirichlet([0.01, 1e-49, 1e-40]) # hangsError message:
No response
Runtime information:
In [5]: import sys, numpy; print(numpy.__version__); print(sys.version)
1.25.0rc1+520.gcd20fd045b
3.11.4 (main, Jul 3 2023, 14:49:40) [GCC 11.3.0]
In [6]: print(numpy.show_runtime())
[{'numpy_version': '1.25.0rc1+520.gcd20fd045b',
'python': '3.11.4 (main, Jul 3 2023, 14:49:40) [GCC 11.3.0]',
'uname': uname_result(system='Linux', node='pop-os', release='6.2.6-76060206-generic', version='#202303130630~1689015125~22.04~ab2190e SMP PREEMPT_DYNAMIC Mon J', machine='x86_64')},
{'simd_extensions': {'baseline': [], 'found': [], 'not_found': []}},
{'architecture': 'Zen',
'filepath': '/usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so',
'internal_api': 'openblas',
'num_threads': 24,
'prefix': 'libopenblas',
'threading_layer': 'pthreads',
'user_api': 'blas',
'version': '0.3.20'}]
None
Context for the issue:
No response
Reactions are currently unavailable