Skip to content

Commit 76d25d3

Browse files
committed
More renaming
1 parent 90aa50e commit 76d25d3

30 files changed

+97
-79
lines changed

pymc_extras/distributions/histogram_utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
import numpy as np
1717
import pymc as pm
18+
import pymc_extras as pmx
1819

1920
from numpy.typing import ArrayLike
2021

@@ -115,7 +116,7 @@ def histogram_approximation(name, dist, *, observed, **h_kwargs):
115116
Discrete variables are reduced to unique repetitions (up to min_count)
116117
117118
>>> import pymc as pm
118-
>>> import pymc_experimental as pmx
119+
>>> import pymc_extras as pmx
119120
>>> production = np.random.poisson([1, 2, 5], size=(1000, 3))
120121
>>> with pm.Model(coords=dict(plant=range(3))):
121122
... lam = pm.Exponential("lam", 1.0, dims="plant")

pymc_extras/model/marginal/distributions.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
from pytensor.scan import scan
1717
from pytensor.tensor import TensorVariable
1818

19-
from pymc_experimental.distributions import DiscreteMarkovChain
19+
from pymc_extras.distributions import DiscreteMarkovChain
20+
from pymc_extras.model.marginal.graph_analysis import get_support_axes
2021

2122

2223
class MarginalRV(OpFromGraph, MeasurableOp):
@@ -91,7 +92,7 @@ def reduce_batch_dependent_logps(
9192
as well as transpose the remaining axis of dep1 logp before adding the two element-wise.
9293
9394
"""
94-
from pymc_experimental.model.marginal.graph_analysis import get_support_axes
95+
from pymc_extras.model.marginal.graph_analysis import get_support_axes
9596

9697
reduced_logps = []
9798
for dependent_op, dependent_logp, dependent_dims_connection in zip(

pymc_extras/model/marginal/graph_analysis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from pytensor.tensor.subtensor import AdvancedSubtensor, Subtensor, get_idx_list
1717
from pytensor.tensor.type_other import NoneTypeT
1818

19-
from pymc_experimental.model.marginal.distributions import MarginalRV
19+
from pymc_extras.model.marginal.distributions import MarginalRV
2020

2121

2222
def static_shape_ancestors(vars):

pymc_extras/statespace/filters/kalman_filter.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,16 @@
1111
from pytensor.tensor import TensorVariable
1212
from pytensor.tensor.slinalg import solve_triangular
1313

14-
from pymc_experimental.statespace.filters.utilities import (
15-
quad_form_sym,
16-
split_vars_into_seq_and_nonseq,
14+
from pymc_extras.statespace.filters.utilities import (
15+
compute_forecast_error_cov,
16+
compute_kalman_gain,
17+
compute_predicted_state,
18+
compute_predicted_state_cov,
19+
compute_updated_state,
20+
compute_updated_state_cov,
1721
stabilize,
1822
)
19-
from pymc_experimental.statespace.utils.constants import JITTER_DEFAULT, MISSING_FILL
23+
from pymc_extras.statespace.utils.constants import JITTER_DEFAULT, MISSING_FILL
2024

2125
MVN_CONST = pt.log(2 * pt.constant(np.pi, dtype="float64"))
2226
PARAM_NAMES = ["c", "d", "T", "Z", "R", "H", "Q"]

pymc_extras/statespace/filters/kalman_smoother.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
from pytensor.compile import get_mode
55
from pytensor.tensor.nlinalg import matrix_dot
66

7-
from pymc_experimental.statespace.filters.utilities import (
8-
quad_form_sym,
9-
split_vars_into_seq_and_nonseq,
7+
from pymc_extras.statespace.filters.utilities import (
8+
compute_predicted_state,
9+
compute_predicted_state_cov,
1010
stabilize,
1111
)
12-
from pymc_experimental.statespace.utils.constants import JITTER_DEFAULT
12+
from pymc_extras.statespace.utils.constants import JITTER_DEFAULT
1313

1414

1515
class KalmanSmoother:

pymc_extras/statespace/filters/utilities.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
from pytensor.tensor.nlinalg import matrix_dot
44

5-
from pymc_experimental.statespace.core.representation import (
6-
NEVER_TIME_VARYING,
7-
VECTOR_VALUED,
5+
from pymc_extras.statespace.core.representation import (
6+
PytensorRepresentation,
7+
quad_form_sym,
88
)
9-
from pymc_experimental.statespace.utils.constants import JITTER_DEFAULT
9+
from pymc_extras.statespace.utils.constants import JITTER_DEFAULT
1010

1111

1212
def decide_if_x_time_varies(x, name):

tests/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14+
15+
from pymc_extras.distributions import histogram_utils
16+
from pymc_extras.distributions.histogram_utils import histogram_approximation

tests/distributions/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515

16-
from pymc_experimental.distributions import histogram_utils
17-
from pymc_experimental.distributions.histogram_utils import histogram_approximation
16+
from pymc_extras.distributions import histogram_utils
17+
from pymc_extras.distributions.histogram_utils import histogram_approximation
1818

1919
__all__ = ["histogram_utils", "histogram_approximation"]

tests/distributions/test_continuous.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
)
3535

3636
# the distributions to be tested
37-
from pymc_experimental.distributions import Chi, GenExtreme, Maxwell
37+
from pymc_extras.distributions import Chi, GenExtreme, Maxwell
3838

3939

4040
class TestGenExtremeClass:

tests/distributions/test_discrete.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
)
3131
from pytensor import config
3232

33-
from pymc_experimental.distributions import (
33+
from pymc_extras.distributions import (
3434
BetaNegativeBinomial,
3535
GeneralizedPoisson,
3636
Skellam,

0 commit comments

Comments
 (0)