Skip to content

Commit

Permalink
Minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
rohanbabbar04 committed Feb 2, 2025
1 parent e9db80b commit 62467bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions preliz/distributions/binomial.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ def mean(self):

def mode(self):
y = (self.n + 1) * self.p
if np.issubdtype(type(y), np.integer):
return (self.n + 1) * self.p, (self.n + 1) * self.p - 1
if not np.mod(y, 1):
return y, y - 1
return np.where(self.p == 1, self.n, np.floor(y))

def median(self):
Expand Down

0 comments on commit 62467bd

Please sign in to comment.