Skip to content

Commit

Permalink
Merge pull request #797 from null-a/add-type-to-delta-param
Browse files Browse the repository at this point in the history
Add type information to parameter of Delta dist.
  • Loading branch information
stuhlmueller committed Mar 17, 2017
2 parents 9c9ba0b + 0195cb1 commit 36b4472
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/primitive-distributions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

.. js:function:: Delta({v: ...})

* v: support element
* v: support element *(any)*

Discrete distribution that assigns probability one to the single element in its support. This is only useful in special circumstances as sampling from ``Delta({v: val})`` can be replaced with ``val`` itself. Furthermore, a ``Delta`` distribution parameterized by a random choice should not be used with MCMC based inference, as doing so produces incorrect results.

Expand Down
2 changes: 1 addition & 1 deletion src/dists.ad.js
Original file line number Diff line number Diff line change
Expand Up @@ -1527,7 +1527,7 @@ var Delta = makeDistributionType({
'from ``Delta({v: val})`` can be replaced with ``val`` itself. Furthermore, a ``Delta`` ' +
'distribution parameterized by a random choice should not be used with MCMC based inference, ' +
'as doing so produces incorrect results.',
params: [{name: 'v', desc: 'support element'}],
params: [{name: 'v', desc: 'support element', type: types.any}],
mixins: [finiteSupport],
sample: function() {
return ad.value(this.params.v);
Expand Down

0 comments on commit 36b4472

Please sign in to comment.