summaryrefslogtreecommitdiff
path: root/numpy/array_api/tests/test_array_object.py
diff options
context:
space:
mode:
authorWarren Weckesser <warren.weckesser@gmail.com>2020-04-05 23:25:53 -0400
committerWarren Weckesser <warren.weckesser@gmail.com>2020-04-05 23:35:50 -0400
commitf90f26c40ac4b37e1df8c76ee6745433557d999b (patch)
tree57af5f657f9769fdab28eb1dd45dd621c14fa7fe /numpy/array_api/tests/test_array_object.py
parent0f6a3aaa34fe72586f8c66ecc4744fc960d62ae2 (diff)
downloadnumpy-f90f26c40ac4b37e1df8c76ee6745433557d999b.tar.gz
BUG: random: Disallow p=0 in negative_binomial
Make `Generator.negative_binomial` raise a ValueError if p=0. `negative_binomial(n, p)` draws samples from the distribution of the number of failures until n successes are encountered. If p is 0, then a success is never encountered, so the probability distribution is 0 for any finite number of failures. In other words, it is not really a meaningful distribution, so we disallow p=0. Closes gh-15913.
Diffstat (limited to 'numpy/array_api/tests/test_array_object.py')
0 files changed, 0 insertions, 0 deletions