From 2707a61dae83fff29f72260ec3904140798112af Mon Sep 17 00:00:00 2001 From: Michael Osthege Date: Wed, 11 Nov 2020 16:21:17 +0100 Subject: [PATCH] cast test values to the correct dtype before assignment closes #4219 --- pymc3/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pymc3/model.py b/pymc3/model.py index ca18a3278d0..126c7537427 100644 --- a/pymc3/model.py +++ b/pymc3/model.py @@ -1797,7 +1797,7 @@ def __init__( # make this RV a view on the combined missing/nonmissing array theano.gof.Apply(theano.compile.view_op, inputs=[data], outputs=[self]) - self.tag.test_value = theano.compile.view_op(data).tag.test_value + self.tag.test_value = theano.compile.view_op(data).tag.test_value.astype(self.dtype) self.scaling = _get_scaling(total_size, data.shape, data.ndim) @property