Skip to content

Add a shape check to MvNormal when cov and mean are of different length #671

Answered by brandonwillard
Sayam753 asked this question in Q&A
Discussion options

You must be logged in to vote

I meant to say, for the case

at.random.multivariate_normal(mean=np.zeros(1), cov=np.eye(3)).shape.eval()

arguments imply (1), (3, 3) -> (3), (3, 3) -> (3) i.e adding an intermediate step to match the Op's broadcast pattern.

The broadcast pattern must match the "base" input and output dimensions of the mathematical object being modeled (i.e. a multivariate normal random variable under a specific parameterization), and that doesn't.

Replies: 8 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Sayam753
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested request discussion
3 participants
Converted from issue

This discussion was converted from issue #665 on November 19, 2021 12:33.