Skip to content

Commit 79a9867

Browse files
Update vmin vmax doc
1 parent b681496 commit 79a9867

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/gsd/gsd.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ def logbinom(n: ArrayLike, k: ArrayLike) -> Array:
1919

2020

2121
def vmin(psi: ArrayLike) -> Array:
22-
"""Compute the minimal possible variance for give mean
22+
"""Compute the minimal possible variance for categorical distribution
23+
supported on Z[1,N] for a give mean
2324
2425
:param psi: mean
2526
:return: variance
@@ -28,12 +29,13 @@ def vmin(psi: ArrayLike) -> Array:
2829

2930

3031
def vmax(psi: ArrayLike) -> Array:
31-
"""Compute the maximal possible variance for give mean
32+
"""Compute the maximal possible variance for categorical distribution
33+
supported on Z[1,N] for give mean
3234
3335
:param psi: mean
3436
:return: variance
3537
"""
36-
return (psi - 1.0) * (5 - psi)
38+
return (psi - 1.0) * (N - psi)
3739

3840

3941
def _C(Vmax: ArrayLike, Vmin: ArrayLike) -> Array:

0 commit comments

Comments
 (0)