From 77d6c609d5f7cbd3e0151dce37076ca2e9247595 Mon Sep 17 00:00:00 2001 From: Ricardo Date: Fri, 14 May 2021 11:33:07 +0200 Subject: [PATCH] Fix _check_start_shape --- pymc3/sampling.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pymc3/sampling.py b/pymc3/sampling.py index 3a70cc38dbe..434ee232e06 100644 --- a/pymc3/sampling.py +++ b/pymc3/sampling.py @@ -684,6 +684,11 @@ def sample( def _check_start_shape(model, start): if not isinstance(start, dict): raise TypeError("start argument must be a dict or an array-like of dicts") + + # Filter "non-input" variables + initial_point = model.initial_point + start = {k: v for k, v in deepcopy(start).items() if k in initial_point} + e = "" for var in model.basic_RVs: var_shape = model.fastfn(var.shape)(start)