File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -164,26 +164,23 @@ def convert_size(size: Size) -> StrongSize | None:
164164 )
165165
166166
167- def shape_from_dims (dims : StrongDims , model = None ) -> StrongShape :
167+ def shape_from_dims (dims : StrongDims , model : Model ) -> StrongShape :
168168 """Determine shape from a `dims` tuple.
169169
170170 Parameters
171171 ----------
172172 dims : array-like
173173 A vector of dimension names or None.
174- model : pm.Model, optional
175- The current model on stack. If None, it will be resolved via modelcontext.
174+ model : pm.Model
175+ The current model on stack.
176176
177177 Returns
178178 -------
179179 shape : tuple
180180 Shape inferred from model dimension lengths.
181181 """
182- # Lazy import to break circular dependency
183182 if model is None :
184- from pymc .model .core import modelcontext
185-
186- model = modelcontext (None )
183+ raise ValueError ("model must be provided explicitly to infer shape from dims" )
187184
188185 # Dims must be known already
189186 unknowndim_dims = set (dims ) - set (model .dim_lengths )
You can’t perform that action at this time.
0 commit comments