diff --git a/docs/source/api/distributions/transforms.rst b/docs/source/api/distributions/transforms.rst index ffccd979889..904ee19ea5c 100644 --- a/docs/source/api/distributions/transforms.rst +++ b/docs/source/api/distributions/transforms.rst @@ -2,7 +2,7 @@ Transformations *************** -.. currentmodule:: pymc.transforms +.. currentmodule:: pymc.distributions.transforms Transform Instances ~~~~~~~~~~~~~~~~~~~ diff --git a/pymc/__init__.py b/pymc/__init__.py index 9c4419c623c..0982b3edc6e 100644 --- a/pymc/__init__.py +++ b/pymc/__init__.py @@ -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 ( diff --git a/pymc/tests/test_distributions.py b/pymc/tests/test_distributions.py index d47d276038b..94ab4e7fb7e 100644 --- a/pymc/tests/test_distributions.py +++ b/pymc/tests/test_distributions.py @@ -2710,7 +2710,7 @@ def test_arguments_checks(self): with pm.Model() as m: x = pm.Poisson.dist(0.5) with pytest.raises(ValueError, match=msg): - pm.Bound("bound", x, transform=pm.transforms.log) + pm.Bound("bound", x, transform=pm.distributions.transforms.log) msg = "Given dims do not exist in model coordinates." with pm.Model() as m: diff --git a/pymc/tests/test_sampling.py b/pymc/tests/test_sampling.py index 9090189a7b7..21f89488e3d 100644 --- a/pymc/tests/test_sampling.py +++ b/pymc/tests/test_sampling.py @@ -327,11 +327,11 @@ def test_deterministic_of_unobserved(self): np.testing.assert_allclose(idata.posterior["y"], idata.posterior["x"] + 100) - def test_transform_with_rv_depenency(self): + def test_transform_with_rv_dependency(self): # Test that untransformed variables that depend on upstream variables are properly handled with pm.Model() as m: x = pm.HalfNormal("x", observed=1) - transform = pm.transforms.IntervalTransform(lambda *inputs: (inputs[-2], inputs[-1])) + transform = pm.distributions.transforms.IntervalTransform(lambda *inputs: (inputs[-2], inputs[-1])) y = pm.Uniform("y", lower=0, upper=x, transform=transform) trace = pm.sample(tune=10, draws=50, return_inferencedata=False, random_seed=336)