File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2036,6 +2036,26 @@ def to_graphviz(
20362036 dpi = dpi ,
20372037 )
20382038
2039+ def table (
2040+ self ,
2041+ * ,
2042+ split_groups : bool = True ,
2043+ truncate_deterministic : int | None = None ,
2044+ parameter_count : bool = True ,
2045+ ):
2046+ """Create a rich table summarizing the model's variables and their expressions.
2047+
2048+ See :func:`pymc.model_table` for details.
2049+ """
2050+ from pymc .printing import model_table
2051+
2052+ return model_table (
2053+ self ,
2054+ split_groups = split_groups ,
2055+ truncate_deterministic = truncate_deterministic ,
2056+ parameter_count = parameter_count ,
2057+ )
2058+
20392059
20402060class BlockModelAccess (Model ):
20412061 """Can be used to prevent user access to Model contexts."""
Original file line number Diff line number Diff line change @@ -420,7 +420,7 @@ def _extract_dim_value(var: Variable) -> np.ndarray:
420420 return " × " .join (f"{ dim } [{ dim_size } ]" for dim , dim_size in dim_sizes .items ())
421421 if not isinstance (var .type , HasShape ):
422422 return ""
423- shape_values = list (pt .as_tensor (var .shape ).eval (mode = _cheap_eval_mode ))
423+ shape_values = list (pt .as_tensor (var .shape ).eval (mode = _cheap_eval_mode )) # type: ignore[attr-defined]
424424 return f"[{ ', ' .join (map (str , shape_values ))} ]" if shape_values else ""
425425
426426
You can’t perform that action at this time.
0 commit comments