Navigation Menu

Skip to content

Commit

Permalink
Updating library
Browse files Browse the repository at this point in the history
  • Loading branch information
AllenDowney committed Oct 2, 2018
1 parent 8465598 commit ec09d2e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions thinkbayes2/thinkbayes2.py
Expand Up @@ -1846,7 +1846,11 @@ def MakeNormalPmf(mu, sigma, num_sigmas, n=201):
def EvalBinomialPmf(k, n, p):
"""Evaluates the binomial PMF.
Returns the probabily of k successes in n trials with probability p.
k: number of successes
n: number of trials
p: probability of success on each trial
returns: probabily of k successes in n trials with probability p.
"""
return stats.binom.pmf(k, n, p)

Expand All @@ -1857,7 +1861,7 @@ def MakeBinomialPmf(n, p):
n: number of trials
p: probability of success on each trial
Returns: Pmf of number of successes
returns: Pmf of number of successes
"""
pmf = Pmf()
for k in range(n+1):
Expand Down
2 changes: 1 addition & 1 deletion thinkplot/thinkplot.py
Expand Up @@ -563,7 +563,7 @@ def Contour(obj, pcolor=False, contour=True, imshow=False, **options):
except AttributeError:
d = obj

_Underride(options, linewidth=3, cmap=matplotlib.cm.Blues)
_Underride(options, cmap=matplotlib.cm.Blues)

xs, ys = zip(*d.keys())
xs = sorted(set(xs))
Expand Down

0 comments on commit ec09d2e

Please sign in to comment.