Skip to content

Commit

Permalink
Add Truncated to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardoV94 committed Sep 15, 2022
1 parent c53cd2f commit 990ab02
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/source/api/distributions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Distributions
distributions/multivariate
distributions/mixture
distributions/timeseries
distributions/truncated
distributions/censored
distributions/simulator
distributions/transforms
Expand Down
9 changes: 9 additions & 0 deletions docs/source/api/distributions/truncated.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*********
Truncated
*********

.. currentmodule:: pymc
.. autosummary::
:toctree: generated

Truncated
9 changes: 9 additions & 0 deletions pymc/distributions/truncated.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,15 @@ class Truncated(Distribution):
`SymbolicRandomVariable` graph representing the truncation process, via inverse
CDF sampling (if the underlying dist has a logcdf method), or rejection sampling
is returned.
Examples
--------
.. code-block:: python
with pm.Model():
normal_dist = pm.Normal.dist(mu=0.0, sigma=1.0)
truncated_normal = pm.Truncated("truncated_normal", normal_dist, lower=-1, upper=1)
"""

rv_type = TruncatedRV
Expand Down

0 comments on commit 990ab02

Please sign in to comment.