Open albertpod opened 10 months ago
I just checked out this problem (sorry completely forgot about it), thinking it would be easy to fix, but it's not that simple. Basically, we can sort out the mean
, but the cov/std/pdf/logpdf
methods are trickier. And fixing only the mean
is not really a solution because I suppose the rules will call cov
as well. The problem is they need one(T)
and zero(T)
to be defined, which isn't the case when T = Any
. So, in the code, we've specifically said T
has to be a type of number (Real
), but that's causing a confusing error because the method for T != Real
doesn't exist. Maybe we should just prevent making a PointMass
if T
isn't a real number. What do you think?
Perhaps we should just do a generic fallback
BayesBase.mean(p::PointMass) = p.point
I am getting cryptic stackoverflow when running inference with Vector{Any} observations.
Running inference yields:
To circumvent this error, we need to change the data var and data input as follows, which is fine, but the error should be handled better.