Skip to content

Commit

Permalink
fix type restriction on params function
Browse files Browse the repository at this point in the history
`params` was untyped for geometric, resulting in fallback for other distributions for which params weren't defined. So something like

```
d = Dirichlet(5, 1)
params(d)
```
resulted in a call here rather than method not found.
  • Loading branch information
jmxpearson committed Jan 21, 2016
1 parent ae0a846 commit 2ac001f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/univariate/discrete/geometric.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ end

succprob(d::Geometric) = d.p
failprob(d::Geometric) = 1.0 - d.p
params(d) = (d.p,)
params(d::Geometric) = (d.p,)


### Statistics
Expand Down

0 comments on commit 2ac001f

Please sign in to comment.