We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 49c0db9 commit ec222e2Copy full SHA for ec222e2
pymc/distributions/shape_utils.py
@@ -33,7 +33,7 @@
33
from pytensor.tensor.type_other import NoneTypeT
34
from pytensor.tensor.variable import TensorVariable
35
36
-#from pymc.model import modelcontext
+# from pymc.model import modelcontext
37
from pymc.pytensorf import convert_observed_data
38
39
__all__ = [
@@ -415,6 +415,8 @@ def get_support_shape(
415
assert isinstance(dims, tuple)
416
if len(dims) < ndim_supp:
417
raise ValueError(f"Number of dims is too small for ndim_supp of {ndim_supp}")
418
+ from pymc.model.core import modelcontext
419
+
420
model = modelcontext(None)
421
inferred_support_shape = [
422
model.dim_lengths[dims[i]] - support_shape_offset[i] for i in range(-ndim_supp, 0)
0 commit comments