Skip to content

Commit

Permalink
Merge pull request #869 from null-a/document-sampling-helpers
Browse files Browse the repository at this point in the history
Document flip and uniformDraw.
  • Loading branch information
stuhlmueller committed Jul 6, 2017
2 parents b6c3593 + 3d7ae7e commit c1d62c4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/functions/other.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
Other
=====

.. js:function:: flip([p])

Draws a sample from ``Bernoulli({p: p})``.

``p`` defaults to ``0.5`` when omitted.

.. js:function:: uniformDraw(arr)

Draws a sample from the uniform distribution over elements of array
``arr``.

.. js:function:: display(val)

Prints a representation of the value ``val`` to the console.
Expand Down

0 comments on commit c1d62c4

Please sign in to comment.