Skip to content

Commit

Permalink
Do not make transforms module accessible at root level
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardoV94 committed Mar 18, 2022
1 parent 037dd79 commit cd32e02
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ All of the above apply to:
- `pm.sample_prior_predictive`, `pm.sample_posterior_predictive` and `pm.sample_posterior_predictive_w` now return an `InferenceData` object by default, instead of a dictionary (see [#5073](https://github.com/pymc-devs/pymc/pull/5073)).
- `pm.sample_prior_predictive` no longer returns transformed variable values by default. Pass them by name in `var_names` if you want to obtain these draws (see [4769](https://github.com/pymc-devs/pymc/pull/4769)).
- `pm.sample(trace=...)` no longer accepts `MultiTrace` or `len(.) > 0` traces ([see 5019#](https://github.com/pymc-devs/pymc/pull/5019)).
- `transforms` module is no longer accessible ta the root level. It is accessible at `pymc.distributions.transforms` (see[#5347](https://github.com/pymc-devs/pymc/pull/5347)).
- `logpt`, `logpt_sum`, `logp_elemwiset` and `nojac` variations were removed. Use `Model.logpt(jacobian=True/False, sum=True/False)` instead.
- `dlogp_nojact` and `d2logp_nojact` were removed. Use `Model.dlogpt` and `d2logpt` with `jacobian=False` instead.
- `logp`, `dlogp`, and `d2logp` and `nojac` variations were removed. Use `Model.compile_logp`, `compile_dlgop` and `compile_d2logp` with `jacobian` keyword instead.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/api/distributions/transforms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Transformations
***************

.. currentmodule:: pymc.transforms
.. currentmodule:: pymc.distributions.transforms

Transform Instances
~~~~~~~~~~~~~~~~~~~
Expand Down
1 change: 0 additions & 1 deletion pymc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ def __set_compiler_flags():
from pymc.blocking import *
from pymc.data import *
from pymc.distributions import *
from pymc.distributions import transforms
from pymc.exceptions import *
from pymc.func_utils import find_constrained_prior
from pymc.math import (
Expand Down
6 changes: 3 additions & 3 deletions pymc/distributions/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,12 +262,12 @@ def bounds_fn(*rv_inputs):

log_exp_m1 = LogExpM1()
log_exp_m1.__doc__ = """
Instantiation of :class:`pymc.transforms.LogExpM1`
Instantiation of :class:`pymc.distributions.transforms.LogExpM1`
for use in the ``transform`` argument of a random variable."""

ordered = Ordered()
ordered.__doc__ = """
Instantiation of :class:`pymc.transforms.Ordered`
Instantiation of :class:`pymc.distributions.transforms.Ordered`
for use in the ``transform`` argument of a random variable."""

log = LogTransform()
Expand All @@ -277,7 +277,7 @@ def bounds_fn(*rv_inputs):

sum_to_1 = SumTo1()
sum_to_1.__doc__ = """
Instantiation of :class:`pymc.transforms.SumTo1`
Instantiation of :class:`pymc.distributions.transforms.SumTo1`
for use in the ``transform`` argument of a random variable."""

circular = CircularTransform()
Expand Down

0 comments on commit cd32e02

Please sign in to comment.