Skip to content

Commit a92a414

Browse files
cuchoiOriolAbril
andauthored
Updates to pymc.Hypergeometric docstrings (#5488)
* Added bounds to the docstring of the Hypergeometric dist * Updated pymc.Hypergeometric docstring * Added array_like types for parameters * Added array_like types for parameters * Update pymc/distributions/discrete.py Co-authored-by: Oriol Abril-Pla <[email protected]>
1 parent 4a41789 commit a92a414

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

pymc/distributions/discrete.py

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -971,12 +971,12 @@ class HyperGeometric(Discrete):
971971
972972
Parameters
973973
----------
974-
N : integer
975-
Total size of the population
976-
k : integer
977-
Number of successful individuals in the population
978-
n : integer
979-
Number of samples drawn from the population
974+
N : tensor_like of integer
975+
Total size of the population (N > 0)
976+
k : tensor_like of integer
977+
Number of successful individuals in the population (0 <= k <= N)
978+
n : tensor_like of integer
979+
Number of samples drawn from the population (0 <= n <= N)
980980
"""
981981

982982
rv_op = hypergeometric
@@ -1004,6 +1004,10 @@ def logp(value, good, bad, n):
10041004
value : numeric
10051005
Value(s) for which log-probability is calculated. If the log probabilities for multiple
10061006
values are desired the values must be provided in a numpy array or Aesara tensor
1007+
good : integer, array_like or TensorVariable
1008+
Number of successful individuals in the population. Alias for parameter :math:`k`.
1009+
bad : integer, array_like or TensorVariable
1010+
Number of unsuccessful individuals in the population. Alias for :math:`N-k`.
10071011
10081012
Returns
10091013
-------
@@ -1042,8 +1046,14 @@ def logcdf(value, good, bad, n):
10421046
10431047
Parameters
10441048
----------
1045-
value: numeric
1049+
value : numeric
10461050
Value for which log CDF is calculated.
1051+
good : integer
1052+
Number of successful individuals in the population. Alias for parameter :math:`k`.
1053+
bad : integer
1054+
Number of unsuccessful individuals in the population. Alias for :math:`N-k`.
1055+
n : integer
1056+
Number of samples drawn from the population (0 <= n <= N)
10471057
10481058
Returns
10491059
-------

0 commit comments

Comments
 (0)